A mobile user trajectory prediction method and system

By introducing social relationship data and comparison learning mechanisms into the mobile service platform, building heterogeneous graphs and extracting trajectory features, the problem of spatiotemporal data sparseness of mobile users is solved, and the accuracy and personalization of recommended services are improved.

CN119005457BActive Publication Date: 2025-02-14SHANDONG UNIV
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411495598.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-25
Publication Date
2025-02-14
Estimated Expiration
2044-10-25

AI Technical Summary

Technical Problem

The prior art is difficult to accurately capture the complete mobile mode and personalized preferences of mobile users, resulting in spatiotemporal data spatiotemporal data, affecting the accuracy and personalization level of recommendation services.

Method used

By introducing social relationship data, a heterogeneous graph is constructed, and a feature extraction model based on contrast learning is adopted to enhance data from the structural layer and feature layer, extract trajectory features, and alleviate the problem of spatiotemporal data sparseness.

Benefits of technology

Capturing the characteristics of mobile users and interests more accurately improves the accuracy and personalization of recommendation services, and enhances the prediction capabilities and user experience of mobile service platforms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119005457B_ABST
    Figure CN119005457B_ABST
Patent Text Reader

Abstract

The present invention proposes a mobile user trajectory prediction method and system, which relates to the field of computer information communication and service computing technology, including: obtaining historical spatiotemporal trajectory data of mobile users, introducing social relationship data, and constructing a heterogeneous graph; through a feature extraction model based on contrastive learning, data enhancement is performed on the heterogeneous graph from a structure layer and a feature layer respectively, and the dependency relationship and interest preference in the spatiotemporal trajectory data are captured to extract trajectory features; based on the trajectory features, points of interest are predicted; the structure layer uses a singular value decomposition method to extract structural information in the heterogeneous graph and reconstruct the heterogeneous graph; the feature layer adds noise to the feature space during the contrastive learning process of the original heterogeneous graph and the reconstructed heterogeneous graph through a lightweight graph convolutional neural network; the present invention accurately extracts trajectory features and alleviates the sparsity problem of spatiotemporal data by introducing social relationship data and a contrastive learning mechanism for data enhancement from two levels.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of computer information communication and service computing technology, and in particular, relates to a mobile user trajectory prediction method and system. Background Art

[0002] In recent years, with the rapid development of technologies such as mobile Internet, Internet of Things and sharing economy, the number of mobile users has increased dramatically. The diversified and personalized services provided by mobile service platforms have greatly facilitated the catering, transportation, entertainment and other needs of individuals in their daily lives. When mobile users enjoy these services, mobile terminal devices collect user spatiotemporal data in real time through various sensors (such as GPS location sensors) to generate massive spatiotemporal trajectory data. These spatiotemporal trajectory data provide mobile service providers with valuable information to gain insight into users' future action preferences, because historical trajectories reveal the behavioral patterns of users' decisions each time.

[0003] The mobile service platform relies on the spatiotemporal trajectory data generated by these mobile users, mines the preferences and interests of mobile users from these data, and accurately recommends personalized places of interest to mobile users, thereby improving the user experience.

[0004] However, this type of spatiotemporal data often faces the problem of sparsity. At the geographic space level, due to differences in living habits and interests, mobile users usually only frequently interact with a few specific places (i.e., points of interest), while there are few or no interaction records for a large number of other places. This limitation results in relatively few places where a single user interacts compared to widely distributed geographical locations. In the time dimension, the trajectory data of mobile users also shows significant periodic characteristics, such as daily activities, weekend leisure, and holiday travel, which further exacerbates the challenge of data sparsity. This limitation makes it difficult for existing prediction methods to accurately capture the complete mobility patterns and personalized preferences of mobile users, thereby limiting the accuracy and personalization level of recommendation services, affecting user experience and the overall performance of the system. Therefore, the sparsity problem of spatiotemporal data leads to deficiencies in the accuracy of mobile user behavior analysis and the quality of personalized services. Summary of the invention

[0005] In order to overcome the shortcomings of the above-mentioned prior art, the present invention provides a mobile user trajectory prediction method and system, which accurately extracts trajectory features and alleviates the sparsity problem of spatiotemporal data by introducing social relationship data and a comparative learning mechanism for data enhancement at both the structure layer and the feature layer.

[0006] To achieve the above objectives, one or more embodiments of the present invention provide the following technical solutions:

[0007] A first aspect of the present invention provides a mobile user trajectory prediction method.

[0008] A mobile user trajectory prediction method, comprising:

[0009] Obtain historical spatiotemporal trajectory data of mobile users, introduce social relationship data, and construct a heterogeneous graph;

[0010] Through the feature extraction model based on contrastive learning, data enhancement is performed on the heterogeneous graph from the structure layer and feature layer respectively, and the dependencies and interest preferences in the spatiotemporal trajectory data are captured to extract trajectory features.

[0011] Predict points of interest based on trajectory features;

[0012] Among them, the structure layer uses the singular value decomposition method to extract the structural information in the heterogeneous graph and reconstruct the heterogeneous graph; the feature layer adds noise to the feature space during the comparative learning process of the original heterogeneous graph and the reconstructed heterogeneous graph through a lightweight graph convolutional neural network.

[0013] Furthermore, the construction of the heterogeneous graph is specifically as follows:

[0014] Based on historical spatiotemporal trajectory data, establish an interaction relationship matrix between users and points of interest;

[0015] Based on the historical spatiotemporal trajectory data, a trajectory sequence is established, which includes points of interest and their geographical locations arranged in chronological order;

[0016] Based on social relationship data, establish a social relationship matrix between users;

[0017] Construct a heterogeneous graph based on the interaction relationship matrix, social relationship matrix and trajectory sequence;

[0018] The heterogeneous graph includes two types of nodes, namely users and points of interest, and two types of relationships, namely interactive relationships and social relationships.

[0019] Furthermore, the feature extraction model includes a reconstruction module, a user interest point feature extraction module, a context feature extraction module, and a self-attention mechanism module;

[0020] The reconstruction module uses a singular value decomposition method to extract structural information in the heterogeneous graph and reconstruct the heterogeneous graph;

[0021] The user interest point feature extraction module uses a lightweight graph convolutional neural network based on contrastive learning to extract user features and interest point features from the original heterogeneous graph and the reconstructed heterogeneous graph;

[0022] The context feature extraction module extracts time series features and geographic location series features from the historical spatiotemporal trajectory data;

[0023] The self-attention mechanism module extracts trajectory features from the merged user features, interest point features, time series features and geographic location sequence features.

[0024] Furthermore, the reconstructing the heterogeneous graph comprises the following specific steps:

[0025] Perform singular value decomposition on the adjacency matrix corresponding to the heterogeneous graph to obtain a singular value diagonal matrix;

[0026] Truncating the singular value diagonal matrix, retaining the largest preset number of singular values, and reconstructing the adjacency matrix using the truncated matrix;

[0027] The heterogeneous graph is reconstructed using the reconstructed adjacency matrix.

[0028] Furthermore, the contrastive learning of the lightweight graph convolutional neural network uses contrastive loss to distinguish the embedding of the same node in the original heterogeneous graph and the reconstructed heterogeneous graph from the embedding of other nodes, and encourages the alignment of the embedding of the same node between two separately learned heterogeneous graphs, so that each heterogeneous graph can extract complementary information from another heterogeneous graph to achieve mutual enhancement.

[0029] Furthermore, the extraction of the geographic location sequence features is specifically as follows:

[0030] The trajectory sequence is converted into an n-gram sequence using quadruple key encoding;

[0031] The n-gram sequence is input into the geographic information encoder to capture the proximity relationship between adjacent interest points in geographic space and obtain the geographic location sequence features.

[0032] Furthermore, the prediction of the interest point is based on the extracted trajectory features, calculating the score of each candidate interest point, and selecting the interest point according to the score.

[0033] A second aspect of the present invention provides a mobile user trajectory prediction system.

[0034] A mobile user trajectory prediction system includes a construction module, an extraction module and a prediction module:

[0035] The building module is configured to: obtain historical spatiotemporal trajectory data of mobile users, introduce social relationship data, and build a heterogeneous graph;

[0036] The extraction module is configured to: perform data enhancement on the heterogeneous graph from the structure layer and feature layer respectively through a feature extraction model based on contrastive learning, and capture the dependencies and interest preferences in the spatiotemporal trajectory data to extract trajectory features;

[0037] The prediction module is configured to: predict points of interest based on trajectory features;

[0038] Among them, the structure layer uses the singular value decomposition method to extract the structural information in the heterogeneous graph and reconstruct the heterogeneous graph; the feature layer adds noise to the feature space during the comparative learning process of the original heterogeneous graph and the reconstructed heterogeneous graph through a lightweight graph convolutional neural network.

[0039] A third aspect of the present invention provides a computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements the steps in a method for predicting a mobile user trajectory as described in the first aspect of the present invention.

[0040] A fourth aspect of the present invention provides an electronic device, comprising a memory, a processor, and a program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps in a method for predicting a mobile user trajectory as described in the first aspect of the present invention are implemented.

[0041] One or more of the above technical solutions have the following beneficial effects:

[0042] The present invention provides a mobile trajectory prediction method for processing spatiotemporal data sparsity, constructs a heterogeneous graph for mobile user spatiotemporal trajectory data and social relationship data, performs graph comparative learning, and more accurately captures the features of mobile users and points of interest through the introduction of social relationships and a comparative learning mechanism that performs data enhancement at both the structural layer and the feature layer, fully utilizes the original data to capture the effective information therein, and alleviates the sparsity problem of spatiotemporal data.

[0043] The geographic information encoder in the present invention uses a stacked self-attention network and a point feedforward network, which can better capture the proximity relationship between adjacent points of interest in the geographic space, so that the model can more accurately understand the user's movement behavior and location selection.

[0044] The present invention can effectively solve the problem of how to use limited spatiotemporal trajectory data to mine the complex behavior patterns of mobile users constrained by spatiotemporal factors to predict user trajectories, so that the mobile service platform can accurately and timely predict the trajectories of mobile users, infer user needs and provide corresponding high-quality personalized services.

[0045] Advantages of additional aspects of the present invention will be given in part in the following description, and in part will become obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.

[0047] Figure 1 This is a flow chart of the method of the first embodiment.

[0048] Figure 2 This is a diagram of the data enhancement and contrast learning process of the first embodiment.

[0049] Figure 3 This is a flow chart of the geocoder of the first embodiment. DETAILED DESCRIPTION

[0050] It should be noted that the following detailed descriptions are illustrative and are intended to provide further explanation of the present application. Unless otherwise specified, all technical and scientific terms used in the present invention have the same meanings as those commonly understood by those skilled in the art to which the present application belongs.

[0051] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.

[0052] Terminology explanation:

[0053] Mobile service platform: refers to a comprehensive platform that provides various services and applications based on mobile Internet technology, including but not limited to social networking, map navigation, online entertainment, etc. Mobile service platform is mainly based on mobile terminal devices, such as smart phones, tablet computers, etc., to provide connection and interaction between users and services.

[0054] Quadkey: In the map tile system, a quadkey is a numerical reference to a geographic region at a specific map zoom level. Each quadkey uniquely identifies a tile at the current zoom level. Given the GPS coordinates of a location and the map zoom level, the quadkey can be calculated by the Microsoft Bing map tile system.

[0055] Embodiment 1

[0056] In one embodiment of the present disclosure, a method for predicting a mobile user trajectory is provided, comprising the following steps:

[0057] Step S1: Obtain the historical spatiotemporal trajectory data of mobile users, introduce social relationship data, and construct a heterogeneous graph.

[0058] Furthermore, the construction of the heterogeneous graph is specifically as follows:

[0059] Based on historical spatiotemporal trajectory data, establish an interaction relationship matrix between users and points of interest;

[0060] Based on the historical spatiotemporal trajectory data, a trajectory sequence is established, which includes points of interest and their geographical locations arranged in chronological order;

[0061] Based on social relationship data, establish a social relationship matrix between users;

[0062] Construct a heterogeneous graph based on the interaction relationship matrix, social relationship matrix and trajectory sequence;

[0063] The heterogeneous graph includes two types of nodes, namely users and points of interest, and two types of relationships, namely interactive relationships and social relationships.

[0064] Step S2: Through the feature extraction model based on contrastive learning, the heterogeneous graph is enhanced from the structure layer and feature layer respectively, and the dependencies and interest preferences in the spatiotemporal trajectory data are captured to extract trajectory features.

[0065] Among them, the structure layer uses the singular value decomposition method to extract the structural information in the heterogeneous graph and reconstruct the heterogeneous graph; the feature layer adds noise to the feature space during the comparative learning process of the original heterogeneous graph and the reconstructed heterogeneous graph through a lightweight graph convolutional neural network.

[0066] Furthermore, the feature extraction model includes a reconstruction module, a user interest point feature extraction module, a context feature extraction module, and a self-attention mechanism module;

[0067] The reconstruction module uses a singular value decomposition method to extract structural information in the heterogeneous graph and reconstruct the heterogeneous graph;

[0068] The user interest point feature extraction module uses a lightweight graph convolutional neural network based on contrastive learning to extract user features and interest point features from the original heterogeneous graph and the reconstructed heterogeneous graph;

[0069] The context feature extraction module extracts time series features and geographic location series features from the historical spatiotemporal trajectory data;

[0070] The self-attention mechanism module extracts trajectory features from the merged user features, interest point features, time series features and geographic location sequence features.

[0071] Furthermore, the reconstructing the heterogeneous graph comprises the following specific steps:

[0072] Perform singular value decomposition on the adjacency matrix corresponding to the heterogeneous graph to obtain a singular value diagonal matrix;

[0073] Truncating the singular value diagonal matrix, retaining the largest preset number of singular values, and reconstructing the adjacency matrix using the truncated matrix;

[0074] The heterogeneous graph is reconstructed using the reconstructed adjacency matrix.

[0075] Furthermore, the contrastive learning of the lightweight graph convolutional neural network uses contrastive loss to distinguish the embedding of the same node in the original heterogeneous graph and the reconstructed heterogeneous graph from the embedding of other nodes, and encourages the alignment of the embedding of the same node between two separately learned heterogeneous graphs, so that each heterogeneous graph can extract complementary information from another heterogeneous graph to achieve mutual enhancement.

[0076] Furthermore, the extraction of the geographic location sequence features is specifically as follows:

[0077] The trajectory sequence is converted into an n-gram sequence using quadruple key encoding;

[0078] The n-gram sequence is input into the geographic information encoder to capture the proximity relationship between adjacent interest points in geographic space and obtain the geographic location sequence features.

[0079] Step S3: Predicting points of interest based on trajectory features.

[0080] Furthermore, the prediction of the interest point is based on the extracted trajectory features, calculating the score of each candidate interest point, and selecting the interest point according to the score.

[0081] The following describes in detail the implementation process of a mobile user trajectory prediction method in this embodiment.

[0082] In order to solve the sparsity problem of spatiotemporal data, the method described in this embodiment adopts a feature extraction model based on contrastive learning to model the user's spatiotemporal trajectory. This method makes full use of the user's social relationships and the contextual information of the user's historical trajectory, and can learn high-quality embedding representations in limited data to capture the user's interest preferences and mobility patterns, thereby solving the problem of not being able to accurately predict the trajectory of mobile users in a personalized manner due to the sparsity of spatiotemporal data. This enables the mobile service platform to accurately predict the user's trajectory and provide personalized recommendations to the user, thereby improving the user's experience.

[0083] The above technical solution of this embodiment is to predict the points of interest that the user wants to visit at time t+1 based on the social relationship data of the mobile user and the spatiotemporal trajectory data before time t, such as Figure 1 As shown, the specific steps are:

[0084] Step 1: Preprocess the historical spatiotemporal trajectory data and social relationship data of the current mobile user to obtain the interaction relationship matrix, social relationship matrix and trajectory sequence arranged in chronological order for each mobile user.

[0085] By processing the acquired historical spatiotemporal trajectory data and social relationship data of the current mobile user, the interaction relationship matrix, social relationship matrix and trajectory sequence arranged in chronological order of each mobile user are obtained;

[0086] In a specific implementation, the historical spatiotemporal trajectory data of mobile users is the sign-in data generated by users in the existing mobile service platform, specifically including: a series of continuous information points including visited points of interest and time belonging to each user up to the current moment, for example, the sign-in records of each mobile user are arranged in chronological order as the mobile user The space-time trajectory sequence , where the sign-in record , indicating that the user In timestamp Visited location Points of Interest ,in, Represents each point of interest Coordinates . Construct an interactive relationship matrix based on the mobile user's check-in data and social relationship data and social relationship matrix .

[0087] Based on the interaction matrix and social relationship matrix , construct a heterogeneous graph containing two types of nodes: users and points of interest, and two types of relationships: interaction relationships and social relationships , where the interactive relation indicates whether a user has visited a POI, and the social relation indicates the relationship between two users.

[0088] In one or more embodiments, in order to better model the behavior pattern and periodicity of the mobile user's trajectory, the historical spatiotemporal trajectory data of the mobile user is cut with a preset length k (k is a positive integer, which can be set according to actual needs) to obtain an equal-length trajectory sequence.

[0089] Step 2: Merge the user's interaction relationship matrix and social relationship matrix into an adjacency matrix containing social relationships, and perform data enhancement at the structural layer. Figure 2 The GA in is the data enhancement of the structure layer.

[0090] In the specific implementation, the interaction relationship matrix and the social relationship matrix obtained by the previous data processing are merged into a heterogeneous graph The corresponding adjacency matrix ,matrix The construction form is as follows:

[0091] ,

[0092] in, is the matrix of the interaction relationship between users and points of interest, is the matrix of social relationships between users, is a zero matrix.

[0093] The data enhancement of the structure layer uses the singular value decomposition method to extract important structural information from the graph from a global perspective. Specifically:

[0094] Adjacency Matrix Perform singular value decomposition, and we get ,in, and The sizes are and The orthogonal matrices represent the adjacency matrix The eigenvectors of the row and column correlation matrices of Is the size of The singular value diagonal matrix of The singular values ​​of .

[0095] The singular vector corresponding to the largest singular value of the matrix can maximize the variance of the matrix, so the largest singular value is usually associated with the main information of the matrix. Therefore, truncate the singular value matrix and retain the largest singular values, reconstruct the adjacency matrix using the truncated matrix , as shown below:

[0096]

[0097] in, , , respectively including and Before feature vector It contains the largest A diagonal matrix of singular values.

[0098] Reconstructed adjacency matrix , which corresponds to the reconstructed graph after data enhancement of the original heterogeneous graph, that is, the reconstructed heterogeneous graph , which preserves the global cooperation signal in the graph.

[0099] Step 3: Pass the user and the points of interest in the trajectory sequence through the graph neural network to obtain user features and points of interest features.

[0100] In the specific implementation, the two views, the original heterogeneous graph and the reconstructed heterogeneous graph, are respectively input into the lightweight graph convolutional neural network (LightGCN) for information propagation, and the data enhancement of the feature layer is performed in the graph convolution process ( Figure 2 FA in ), that is, adding random noise to nodes at each layer, for the original heterogeneous graph, The information propagation of the layers is as follows:

[0101]

[0102] For the reconstructed heterogeneous graph, The information propagation of the layers is as follows:

[0103]

[0104] in, is the adjacency matrix of the original heterogeneous graph, is the adjacency matrix corresponding to the reconstructed heterogeneous graph, that is The matrix obtained after singular value decomposition is is the degree matrix, and is the normalized adjacency matrix, and are the random noises added to the embedding of the original heterogeneous graph and the reconstructed heterogeneous graph, respectively.

[0105] The final node features are obtained by averaging the embeddings of each layer, as shown below:

[0106] ,

[0107] ,

[0108] in, and The original heterogeneous graph and the reconstructed heterogeneous graph The user features obtained after the graph convolutional network, and The original heterogeneous graph and the reconstructed heterogeneous graph The interest point features obtained after the graph convolutional network, is the total number of convolutional layers of the graph convolutional network LightGCN, Indicates the current layer.

[0109] The user features and interest point features obtained from the two views are averaged to obtain the final user features. and point of interest features .

[0110] In the above graph convolution process, Figure 2As shown, the contrast loss is used to distinguish the embedding of the same node in two different views from the embedding of other nodes. By encouraging the alignment of the embedding of the same node between two separately learned views, each view can extract complementary information from the other view and achieve mutual enhancement. At the same time, by widening the gap between different nodes in the same view and between different nodes in different views, the self-distinguishing ability of the representation is enhanced.

[0111] For any node , which is in the original heterogeneous graph and the reconstructed heterogeneous graph The two corresponding embeddings in , A pair of positive samples is formed, which is different from the original heterogeneous graph and the reconstructed heterogeneous graph The embeddings of other nodes besides this constitute negative samples.

[0112] The calculation of contrastive loss is as follows:

[0113]

[0114]

[0115] in, and are the cross-view contrast losses for users and interest points, respectively; and The original heterogeneous graph and the reconstructed heterogeneous graph The same user The embedding of is a pair of positive samples; and The original heterogeneous graph and the reconstructed heterogeneous graph Different users and The embedding of is a pair of negative samples; and The original heterogeneous graph and the reconstructed heterogeneous graph Same point of interest The embedding of is a pair of positive samples; and The original heterogeneous graph and the reconstructed heterogeneous graph Different points of interest and The embedding of is a pair of negative samples; is the cosine similarity function, is a hyperparameter.

[0116] The final contrast loss is the average of the two:

[0117]

[0118] Use contrast loss to minimize the distance between positive sample pairs and maximize the distance between negative sample pairs to update the network weights of the previous LightGCN graph convolutional network and enhance the self-distinguishing ability of the learned feature representation.

[0119] Step 4: The time and geographic location information are respectively input into the embedding layer and the geocoder for feature embedding to obtain time series features and geographic location series features.

[0120] The time series of user trajectories is transformed into Figure 1 The embedding layer shown in obtains time series features. Specifically, the timestamp is mapped to 168 corresponding embeddings according to the 7 days of a week and 24 hours a day.

[0121] The user's geographic location information sequence is passed through Figure 3 Specifically, the geographic location information of the point of interest is mapped to the map tile system according to the latitude and longitude of the geographic location, encoded as a quadkey, and the spatial attributes of all points of interest are obtained through sliding window segmentation. For example, the geographic location of a point of interest corresponds to a unique quadkey "1302231103120321", which is converted into "1302-3022-0223-2231-2311-3110-1103-1031-0312-3120-1203-2031" after sliding window segmentation. -0321"; for a grid mapped to a point of interest, take its quadruple key and the quadruple keys of the surrounding eight grids and convert them into the above n-gram sequence, put the n-gram sequence into the embedding layer to get n-gram embedding, and use the stacked self-attention network and point feedforward network to capture the dependencies between these n-gram embeddings; by average pooling the aggregated representation of these nine grids, the geographic sequence features of the point of interest are obtained; the moving window mechanism helps to reduce the deviation caused by grid division and enhance the accuracy of embedding by incorporating the information of neighboring grids.

[0122] Step 5: The user features, POI features, time series features, and geographic location sequence features of the trajectory sequence are input into the connection layer for feature merging, and then input into the self-attention neural network to obtain the final trajectory features containing prediction information.

[0123] In the specific implementation, intercept the user sign-in sequence The most recent time sign-in records, if the user's sign-in sequence length , then pad the left side of the sequence to make its length In order to improve the accuracy and richness of the user's interest points, each user Sign in Transformed into a more expressive trajectory feature sequence , which is the feature merging process.

[0124] In this transformation process, the feature set of interest points obtained by previous contrast learning is used , geographic information features obtained through the geocoder And the time information is embedded in Perform sequential modeling. User Each sign-in record in the sign-in sequence Each point of interest corresponds to a latitude and longitude (geographic location of the point of interest) and a timestamp, which are matched one by one with the features obtained previously to ensure that each Each one corresponds exactly to ,in Corresponding users Features, Exactly corresponds to this sign-in sequence A point of interest , Corresponding sign-in sequence The geographic embedding of longitude and latitude in , Corresponding sign-in sequence Embedding of timestamp in .

[0125] Among them, the input of the self-attention neural network is the merged trajectory feature sequence obtained , so that the model can effectively capture the dependencies and interest preferences in the user check-in sequence; the attention mechanism is divided into multiple heads to form multiple subspaces, so that the model focuses on different aspects of information to integrate spatiotemporal context information, thereby establishing a personalized preference model. For each attention head, the user check-in sequence The self-attention result can be calculated as:

[0126]

[0127] , , ,

[0128] in, is the feature embedding matrix of the user check-in sequence, is the weight matrix.

[0129] Finally, the outputs of all heads are concatenated and a linear transformation is performed to obtain the final output:

[0130]

[0131] in, , is the output transformation matrix.

[0132] By concatenating each self-attention result and obtaining a multi-head self-attention result, the encoder can jointly pay attention to information from different representation subspaces at different positions, which helps the model better capture the complex dependencies in the sign-in sequence data; then a feedforward network is used to enhance the nonlinear characteristics of the model, so that it can capture and process more complex and sophisticated patterns in the input data. The feedforward network can be expressed as:

[0133]

[0134] in, is the embedding after multi-head attention, and is the linear transformation weight, and is the linear transformation bias.

[0135] After the above process, the final trajectory features containing prediction information are obtained.

[0136] Step 6: Process the trajectory features containing prediction information using a fully connected layer to obtain the trajectory prediction result for the current mobile user.

[0137] In the specific implementation, Figure 1 As shown, the final trajectory features containing prediction information are processed by the fully connected layer to obtain the score of each candidate predicted interest point, and based on the score, the interest point to be visited at time t+1 is predicted.

[0138] The solution described in this embodiment extracts features from user spatiotemporal trajectory data on a mobile service platform and makes full use of spatiotemporal context information, and adopts a process based on contrastive learning, which can effectively use the original data to construct training samples, train the model's ability to distinguish between positive and negative samples, make full use of effective information in the original data, and alleviate the sparsity problem of user spatiotemporal trajectory data; the hierarchical network structure can effectively mine the mobility patterns and periodicity of different time scales in the user trajectory sequence; the use of the geocoder can effectively capture the proximity of geographic spatial locations, integrate geographic information into the model, and enable the model to more accurately understand the user's mobility behavior and location selection; different loss functions are used in the model training process, which makes the training of the neural network more controllable and improves the robustness of the model.

[0139] Embodiment 2

[0140] In one embodiment of the present disclosure, a mobile user trajectory prediction system is provided, including a construction module, an extraction module and a prediction module:

[0141] The building module is configured to: obtain historical spatiotemporal trajectory data of mobile users, introduce social relationship data, and build a heterogeneous graph;

[0142] The extraction module is configured to: perform data enhancement on the heterogeneous graph from the structure layer and feature layer respectively through a feature extraction model based on contrastive learning, and capture the dependencies and interest preferences in the spatiotemporal trajectory data to extract trajectory features;

[0143] The prediction module is configured to: predict points of interest based on trajectory features;

[0144] Among them, the structure layer uses the singular value decomposition method to extract the structural information in the heterogeneous graph and reconstruct the heterogeneous graph; the feature layer adds noise to the feature space during the comparative learning process of the original heterogeneous graph and the reconstructed heterogeneous graph through a lightweight graph convolutional neural network.

[0145] Embodiment 3

[0146] The purpose of this embodiment is to provide a computer-readable storage medium.

[0147] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps in a method for predicting a mobile user trajectory as described in Embodiment 1 of the present disclosure.

[0148] Embodiment 4

[0149] The purpose of this embodiment is to provide an electronic device.

[0150] An electronic device includes a memory, a processor, and a program stored in the memory and executable on the processor. When the processor executes the program, the steps in a method for predicting a mobile user trajectory as described in Embodiment 1 of the present disclosure are implemented.

[0151] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A mobile user trajectory prediction method, characterized in that: include: Step S1: Obtain historical spatiotemporal trajectory data of mobile users, introduce social relationship data, and construct a heterogeneous graph; The construction of the heterogeneous graph is specifically as follows: Based on historical spatiotemporal trajectory data, establish an interaction relationship matrix between users and points of interest; Based on the historical spatiotemporal trajectory data, a trajectory sequence is established, which includes points of interest and their geographical locations arranged in chronological order; Based on social relationship data, establish a social relationship matrix between users; Construct a heterogeneous graph based on the interaction relationship matrix, social relationship matrix and trajectory sequence; The heterogeneous graph includes two types of nodes, namely users and points of interest, and two types of relationships, namely interactive relationships and social relationships; Step S2: Through a feature extraction model based on contrastive learning, data enhancement is performed on the heterogeneous graph from the structure layer and the feature layer respectively, and the dependency and interest preference in the spatiotemporal trajectory data are captured to extract trajectory features; The specific steps of the feature extraction model to extract trajectory features are: The singular value decomposition method is used to extract the structural information in the heterogeneous graph and reconstruct the heterogeneous graph; In the process of comparative learning between the original heterogeneous graph and the reconstructed heterogeneous graph through a lightweight graph convolutional neural network, noise is added to the feature space to enhance the data at the feature layer. The points of interest in the user and trajectory sequence are processed through a lightweight graph convolutional neural network to obtain user features and points of interest features. The time and geographic location information in the historical spatiotemporal trajectory data are input into the embedding layer and the geocoder for feature embedding, respectively, to obtain time series features and geographic location series features; User features, POI features, time series features, and geographic location sequence features are input into the connection layer for feature merging, and then input into the self-attention neural network to obtain the final trajectory features containing prediction information; The extraction of the geographic location sequence features is specifically as follows: The trajectory sequence is converted into an n-gram sequence using quadruple key encoding; Input the n-gram sequence into the geographic information encoder to capture the proximity relationship between adjacent interest points in the geographic space and obtain the geographic location sequence features; The geographic information encoder includes: placing the n-gram sequence into an embedding layer to obtain n-gram embeddings, using a stacked self-attention network and a point feedforward network to capture the dependencies between the n-gram embeddings; and obtaining geographic sequence features of the points of interest by averaging the aggregated representations of the nine grids; Step S3: predicting points of interest based on trajectory features.

2. A mobile user trajectory prediction method as claimed in claim 1, characterized in that: The specific steps of reconstructing the heterogeneous graph are as follows: Perform singular value decomposition on the adjacency matrix corresponding to the heterogeneous graph to obtain a singular value diagonal matrix; Truncating the singular value diagonal matrix, retaining the largest preset number of singular values, and reconstructing the adjacency matrix using the truncated matrix; The heterogeneous graph is reconstructed using the reconstructed adjacency matrix.

3. A mobile user trajectory prediction method as claimed in claim 1, characterized in that: The contrastive learning of the lightweight graph convolutional neural network uses contrastive loss to distinguish the embedding of the same node from the embedding of other nodes in the original heterogeneous graph and the reconstructed heterogeneous graph, and encourages the alignment of the embedding of the same node between two separately learned heterogeneous graphs, so that each heterogeneous graph can extract complementary information from another heterogeneous graph to achieve mutual enhancement.

4. A mobile user trajectory prediction method as claimed in claim 1, characterized in that: The prediction of the interest point is based on the extracted trajectory features, calculating the score of each candidate interest point, and selecting the interest point according to the score.

5. A mobile user trajectory prediction system, characterized in that: Including building module, extraction module and prediction module: The building module is configured to: obtain historical spatiotemporal trajectory data of mobile users, introduce social relationship data, and build a heterogeneous graph; The construction of the heterogeneous graph is specifically as follows: Based on historical spatiotemporal trajectory data, establish an interaction relationship matrix between users and points of interest; Based on the historical spatiotemporal trajectory data, a trajectory sequence is established, which includes points of interest and their geographical locations arranged in chronological order; Based on social relationship data, establish a social relationship matrix between users; Construct a heterogeneous graph based on the interaction relationship matrix, social relationship matrix and trajectory sequence; The heterogeneous graph includes two types of nodes, namely users and points of interest, and two types of relationships, namely interactive relationships and social relationships; The extraction module is configured to: perform data enhancement on the heterogeneous graph from the structure layer and feature layer respectively through a feature extraction model based on contrastive learning, and capture the dependencies and interest preferences in the spatiotemporal trajectory data to extract trajectory features; The specific steps of the feature extraction model to extract trajectory features are: The singular value decomposition method is used to extract the structural information in the heterogeneous graph and reconstruct the heterogeneous graph; In the process of comparative learning between the original heterogeneous graph and the reconstructed heterogeneous graph through a lightweight graph convolutional neural network, noise is added to the feature space to enhance the data at the feature layer. The points of interest in the user and trajectory sequence are processed through a lightweight graph convolutional neural network to obtain user features and points of interest features. The time and geographic location information in the historical spatiotemporal trajectory data are input into the embedding layer and the geocoder for feature embedding, respectively, to obtain time series features and geographic location series features; User features, POI features, time series features, and geographic location sequence features are input into the connection layer for feature merging, and then input into the self-attention neural network to obtain the final trajectory features containing prediction information; The extraction of the geographic location sequence features is specifically as follows: The trajectory sequence is converted into an n-gram sequence using quadruple key encoding; Input the n-gram sequence into the geographic information encoder to capture the proximity relationship between adjacent interest points in the geographic space and obtain the geographic location sequence features; The geographic information encoder includes: placing the n-gram sequence into an embedding layer to obtain n-gram embeddings, using a stacked self-attention network and a point feedforward network to capture the dependencies between the n-gram embeddings; and obtaining geographic sequence features of the points of interest by averaging the aggregated representations of the nine grids; The prediction module is configured to predict points of interest based on trajectory features.

6. An electronic device, comprising: a memory for non-transitory storage of computer readable instructions; a processor for executing the computer-readable instructions; Wherein, when the computer-readable instructions are executed by the processor, the method according to any one of claims 1 to 4 is executed.

7. A storage medium, characterized in that: The computer-readable instructions are non-transitorily stored, wherein when the computer-readable instructions are executed by a computer, the method according to any one of claims 1 to 4 is performed.

Citation Information

Patent Citations

  • Sequence position recommendation method based on geographic perception

    CN111723306A

  • Friend and interest point recommendation method and terminal

    CN115146180A

  • Multi-view comparative learning recommendation method and system of fusion layer attention mechanism

    CN117131282A

  • Interest point recommendation method based on heterogeneous graph representation learning

    CN117573978A