Individual activity position prediction method based on spatial clustering and graph embedding

Through spatial clustering and graph embedding technology, combined with the hierarchical graph attention mechanism and timing dependence decoder, the adaptability and accuracy of individual activity position prediction in complex urban environments is solved, and efficient position prediction and model generalization are achieved.

CN120336887APending Publication Date: 2025-07-18CHINA UNIV OF GEOSCIENCES (WUHAN)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510537311.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-27
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

The existing individual activity position prediction methods lack the ability to adapt to multi-scale behavior patterns in complex urban environments, and it is difficult to effectively integrate location semantic information with user behavior preferences. Moreover, traditional models have shortcomings in computing complexity and adaptability to dynamic spatial changes.

Method used

Using a method based on spatial clustering and graph embedding, a density-optimized spatial clustering algorithm is used to identify user activity hot spots, a clustering area CA relationship diagram is constructed, and a graph embedding learning framework is used to extract potential correlation characteristics of position nodes, combined with a hierarchical graph attention mechanism and a timing dependence decoder for prediction, and an adversarial regularization mechanism is introduced to improve the generalization ability of the model.

Benefits of technology

It improves the accuracy of individual activity position prediction and the scalability of the model, enhances the adaptability to the dynamic environment, and improves the interpretability and generalization of the prediction results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120336887A_ABST
    Figure CN120336887A_ABST
Patent Text Reader

Abstract

The invention discloses an individual activity position prediction method based on spatial clustering and graph embedding, and relates to the technical field of spatio-temporal data analysis, and the individual activity position prediction method based on spatial clustering and graph embedding mainly comprises the steps: constructing a multi-dimensional behavior trajectory data set; an individual activity hot spot area is identified based on a spatial clustering algorithm of density optimization to generate position semantic nodes with time-space consistency; the geographic space topological relation, the movement transition probability and the user behavior preference are fused into a multi-dimensional graph structure, and potential association features of position nodes are extracted through a hierarchical graph attention network; and modeling a dynamic evolution process of the activity sequence by using a time sequence dependent decoder, and introducing an adversarial regularization mechanism to output an individual activity position prediction result. By implementing the individual activity position prediction method based on spatial clustering and graph embedding provided by the invention, the accuracy of individual activity position prediction can be improved, and the expandability and generalization ability of the model can be enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of spatio-temporal data analysis, and more specifically, to an individual activity location prediction method based on spatial clustering and graph embedding. Background Art

[0002] Individual activity location prediction has important application values in fields such as intelligent transportation, public safety, commercial recommendation, and urban planning. Accurately predicting the future activity locations of users helps to optimize the allocation of traffic resources, improve the performance of intelligent recommendation systems, and enhance public safety monitoring capabilities. However, due to the complexity of individual movement behaviors, the high-dimensional characteristics of spatio-temporal data, and the uncertainty of movement trajectories, achieving high-precision location prediction still faces many challenges.

[0003] Currently, individual activity location prediction methods mainly include statistical modeling methods based on Markov chains, sequence modeling methods based on deep learning, and spatial topology modeling methods based on graph structures. Among them, the Markov chain method constructs a state transition probability matrix using historical movement patterns. Although the calculation is simple, it is difficult to capture long-term dependence relationships; deep learning methods (such as LSTM, GRU, etc.) have improved the time series modeling ability through end-to-end training, but there are limitations in modeling complex geographical space relationships; graph structure-based methods (such as GCN, GAT) can effectively capture the spatial dependence between locations, but lack in-depth characterization of individual dynamic behavior patterns.

[0004] Most traditional location prediction methods are targeted at specific scenarios or limited data sets and lack the ability to adapt to the multi-scale behavior patterns of users in complex urban environments. In addition, existing research generally ignores the interaction between location semantic information and user behavior preferences, resulting in weak interpretability and generalization ability of prediction results.

[0005] In existing research, some methods attempt to combine external environmental data (such as weather, traffic conditions, etc.) to improve prediction accuracy. However, due to data heterogeneity and uneven spatio-temporal distribution, the effects of such methods in practical applications are still limited. In addition, the vast majority of models only focus on individual historical trajectories and fail to make full use of group behavior patterns for joint prediction, and fail to effectively mine the potential interaction relationships between individuals.

[0006] Driven by deep learning technology, the Transformer structure has made significant progress in sequence prediction tasks due to its powerful global modeling ability. However, the application of traditional Transformers in individual location prediction still has problems such as high computational complexity and difficulty in adapting to dynamic spatial changes. Therefore, how to efficiently integrate individual historical trajectories, environmental information, and group behavior patterns to achieve accurate and interpretable location prediction remains a key challenge in current research.

[0007] The above content is only used to assist in understanding the technical solution of the present invention, and does not represent an admission that the above content is prior art. Summary of the Invention

[0008] The object of the present invention is to provide an individual activity location prediction method based on spatial clustering and graph embedding, which can improve the accuracy of individual activity location prediction and enhance the scalability and generalization ability of the model.

[0009] The present invention provides an individual activity location prediction method based on spatial clustering and graph embedding, including the following steps: S1: According to the multi-dimensional behavior trajectory data set, use the clustering algorithm to obtain the clustering regions; S2: According to the clustering regions and the multi-dimensional behavior trajectory data set, construct a spatial clustering graph structure to obtain a clustering region CA relationship graph; S3: According to the clustering region CA relationship graph, use the user trajectory encoding algorithm to encode the CA graph to obtain the vector representation of each user trajectory; S4: Construct a time series prediction model, and use the time series prediction model to predict the vector representation of each user trajectory to obtain the prediction result.

[0010] Further, step S1 specifically includes: S11: According to the multi-dimensional behavior trajectory data set, use the kernel function to obtain the neighborhood density of each point; S12: According to the neighborhood density of each point, perform a neighboring point search to obtain the point that is closest to each point and has a density higher than its own; S13: According to the neighborhood density of each point and the point that is closest to each point and has a density higher than its own, obtain the outlier points, in-cluster points, and cluster center points; S14: According to the outlier points, in-cluster points, and cluster center points, use density reachability to aggregate the data points into different clustering clusters, and assign corresponding clustering region identifiers to each point to obtain the clustering regions.

[0011] Further, step S11 specifically includes: According to the multi-dimensional behavior trajectory data set, use the kernel function to obtain the neighborhood density of each point, as shown in the formula: , where represents the density of point i, is the weight information of the target point, is the Euclidean distance between point i and point j, is the Gaussian kernel bandwidth that controls the neighborhood range of density calculation.

[0012] Further, step S2 specifically includes: S21: According to the clustering regions and the multi-dimensional behavior trajectory data set, obtain the adjacent vertex weights between the check-in regions of each user; S22: According to the adjacent vertex weights between the check-in regions of each user, calculate the edge weights of any two vertices to obtain the clustering region CA relationship graph.

[0013] Further, step S21 specifically includes: obtaining the adjacent vertex weights between the check-in areas of each user according to the clustering area and the multi-dimensional behavior trajectory dataset, as shown in the formula: , , , , , , wherein, is the weight between the clustering area where the user checks in and the clustering area , that is, the adjacent vertex weights between the check-in areas of each user; represents the trajectory representation of the check-in record of the k-th user, represents the clustering area of the i-th check-in record of the k-th user, represents the check-in time of the i-th check-in record of the user, m represents the number of check-in records of the k-th user, V represents the set of clustering areas, and n represents the number of clustering areas; represents the i-th clustering area, that is, the i-th vertex; represents the user 's maximum time interval.

[0014] Further, step S22 specifically includes: calculating the edge weights between any two vertices according to the adjacent vertex weights between the check-in areas of each user, and obtaining the clustering area CA relationship graph, as shown in the formula: , wherein, represents the edge weight between the vertices and , represents the number of users.

[0015] Further, step S3 is specifically: S31: obtaining the joint probability distribution between each node according to each undirected edge in the clustering area CA relationship graph; S32: obtaining the first-order similarity measure according to the joint probability distribution between each node; S33: obtaining the conditional probability distribution of each node based on the second-order similarity theory according to the clustering area CA relationship graph; S34: obtaining the second-order similarity measure according to the conditional probability distribution of each node; S35: learning the representation of each node and the representation when each node is regarded as the context of other nodes according to the first-order similarity measure and the second-order similarity measure, and obtaining the vector representation of each user's trajectory.

[0016] Further, the construction of the time series prediction model is as shown in the formula: , , , , , Among them, is the output result after convolution calculation, represents a 7×7 large kernel depthwise separable convolution, represents the input, represents the result after normalization, and are the statistical mean and variance of the feature , represents a small constant used to avoid division by zero, represents the GELU activation function, which uses a third-order approximation fitting function of the Gaussian distribution cumulative distribution function to accelerate the calculation; represents the hyperbolic tangent function, represents the output result after two 1*1 convolutions and one GELU activation, represents a 1×1 convolution, represents the output of the final model.

[0017] Furthermore, the individual activity location prediction method based on spatial clustering and graph embedding further includes: performing clustering parameter ablation experiments, model structure ablation experiments, graph embedding ablation experiments, and frontier comparison experiments according to the multi-dimensional behavior trajectory data set and the prediction result, and obtaining an evaluation result.

[0018] The present invention also provides a computer program product, including a computer program, which implements the steps of the above-mentioned individual activity location prediction method based on spatial clustering and graph embedding when executed by a processor.

[0019] Implementing the individual activity location prediction method based on spatial clustering and graph embedding provided by the present invention has the following beneficial effects: The present invention combines spatial clustering and graph embedding techniques to effectively model the spatial dependence relationship between individual positions, improving the prediction accuracy; draws on the hierarchical graph attention mechanism to accurately characterize individual behavior patterns and enhance the adaptability to dynamic environments; introduces an adversarial regularization mechanism to improve the generalization ability of the model and make it applicable to different user behavior patterns; adopts an extensible modeling framework, which is applicable to various application scenarios such as intelligent transportation, urban planning, and public safety, improving the versatility and adaptability of the system. Specifically, the present invention constructs a multi-dimensional behavioral trajectory dataset by integrating users' historical movement trajectories, geospatial topological features, time-period patterns, and context semantic information; the present invention identifies individual activity hotspots based on a density-optimized spatial clustering algorithm (such as a variant of DBSCAN) and generates location semantic nodes with spatio-temporal consistency; the present invention designs a graph embedding representation learning framework to fuse geospatial topological relationships, movement transition probabilities, and user behavior preferences into a multi-dimensional graph structure, and extracts potential correlation features of location nodes through a hierarchical graph attention network; the present invention uses a time-series dependence decoder to model the dynamic evolution process of activity sequences, realizing short-term behavior prediction and long-term interest location inference; the present invention improves the robustness of the model in dealing with sparse trajectories and noisy data by introducing an adversarial regularization mechanism, and finally outputs highly reliable individual activity location prediction results.

[0020] Experimental results show that, compared with traditional methods, this method has significantly improved in terms of prediction accuracy, spatio-temporal consistency, and interpretability (the Top1 and Top5 of Accuracy are increased by 20.8% and 16.2% respectively, and the F1 value is increased by 18.7%). The present invention can be widely applied to the fields of personalized location recommendation, urban population flow simulation, and public safety warning, providing more reliable data support for relevant decision-making.

[0021] In summary, the present invention combines density-optimized spatial clustering technology to identify user activity hotspots and constructs a location semantic relationship network based on a graph embedding learning framework; at the same time, it uses a hierarchical graph attention mechanism and a time-series dependence decoder to model individual dynamic behavior patterns, and introduces an adversarial regularization mechanism to improve the robustness of the model; the present invention not only improves the accuracy of individual activity location prediction, but also enhances the scalability and generalization ability of the model, providing more reliable technical support for applications such as intelligent transportation recommendation, urban planning, and public safety. Brief Description of the Drawings

[0022] The present invention will be further described below in conjunction with the drawings and embodiments. In the drawings: Figure 1 is a flowchart of the method for predicting individual activity locations based on spatial clustering and graph embedding provided by the present invention; Figure 2It is the flowchart of the user trajectory prediction method based on spatial clustering and graph embedding in the present invention, mainly covering three modules: clustering processing, graph embedding mapping, and designing and implementing a lightweight large-kernel convolutional neural network TPNet for user trajectory prediction.

[0023] Figure 3 It is the flowchart of the CA graph construction in the present invention, and this graph aims to integrate all user trajectories for representation.

[0024] Figure 4 It is the structural diagram of the TPNet model in the present invention. The overall structure of the TPNet model adopts a hierarchical design, expecting the model to achieve the effect of hierarchical feature extraction.

[0025] Figure 5 It is the clustering result graph under different parameters of the present invention. Detailed implementation manners

[0026] For a clearer understanding of the technical features, objectives, and effects of the present invention, the detailed implementation manners of the present invention will now be described in detail with reference to the accompanying drawings.

[0027] Figure 1 The schematic diagram of the individual activity location prediction method based on spatial clustering and graph embedding in this embodiment is shown. In this embodiment, the individual activity location prediction method based on spatial clustering and graph embedding includes the following steps: S1: According to the multi-dimensional behavior trajectory data set, use the clustering algorithm to obtain the clustering regions; In an exemplary embodiment, step S1 specifically includes: S11: According to the multi-dimensional behavior trajectory data set, use the kernel function to obtain the neighborhood density of each point; In an exemplary embodiment, step S11 specifically includes: According to the multi-dimensional behavior trajectory data set, use the kernel function to obtain the neighborhood density of each point, as shown in the formula: , where, represents the density of point i, is the weight information of the target point, is the Euclidean distance between point i and point j, is the Gaussian kernel bandwidth that controls the neighborhood range of density calculation; S12: According to the neighborhood density of each point, perform a nearest neighbor search to obtain the point that is the nearest to each point and has a density higher than its own; In an exemplary embodiment, step S12 specifically includes: According to the neighborhood density of each point, perform a nearest neighbor search to obtain the point that is the nearest to each point and has a density higher than its own, as shown in the formula: , where, Represents the distance from point i to the nearest high-density point; S13: Obtain outliers, in-cluster points, and cluster center points based on the neighborhood density of each point and the point that is the nearest and has a density higher than its own; S14: Aggregate data points into different clustering clusters according to the outliers, in-cluster points, and cluster center points, and assign corresponding clustering region identifiers to each point to obtain a clustering region; S2: Construct a spatial clustering graph structure based on the clustering region and the multi-dimensional behavior trajectory dataset to obtain a clustering region CA relationship graph; In an exemplary embodiment, step S2 specifically includes: S21: Obtain the adjacent vertex weights between each user's check-in regions based on the clustering region and the multi-dimensional behavior trajectory dataset; In an exemplary embodiment, step S21 specifically includes: Obtain the adjacent vertex weights between each user's check-in regions based on the clustering region and the multi-dimensional behavior trajectory dataset, as the formula: , , , , , , where, is the weight between the clustering region where the user checks in and the clustering region and the clustering region , that is, the adjacent vertex weights between each user's check-in regions; represents the trajectory representation of the k-th user's check-in record, represents the clustering region of the i-th check-in record of the k-th user, represents the check-in time of the i-th check-in record of the user, m represents the number of check-in records of the k-th user, V represents the set of clustering regions, and n represents the number of clustering regions; represents the i-th clustering region, that is, the i-th vertex; represents the user 's maximum time interval; S22: Calculate the edge weights between any two vertices based on the adjacent vertex weights between each user's check-in regions to obtain a clustering region CA relationship graph; In an exemplary embodiment, step S22 specifically includes: Calculate the edge weights between any two vertices based on the adjacent vertex weights between each user's check-in regions to obtain a clustering region CA relationship graph, as the formula: , Among them, represents the vertex and is the edge weight, represents the number of users; S3: According to the clustering region CA relationship graph, use the user trajectory encoding algorithm to encode the CA graph to obtain the vector representation of each user trajectory; In an exemplary embodiment, step S3 is specifically as follows: S31: According to each undirected edge in the clustering region CA relationship graph, obtain the joint probability distribution between each node; In an exemplary embodiment, step S31 specifically includes: According to each undirected edge in the clustering region CA relationship graph, obtain the joint probability distribution between each node, such as the formula: , , Among them, is the joint probability distribution between node and , and are respectively the transposes of the low-dimensional vectors of node and node , is the low-dimensional vector representation of node , carrying the compressed mapping of node features; represents that the dimension of the real number space is d, represents the learning dimension; S32: According to the joint probability distribution between each node, obtain the first-order similarity measure; In an exemplary embodiment, step S32 specifically includes: According to the joint probability distribution between each node, obtain the first-order similarity measure, such as the formula: , Among them, is the first-order similarity measure, is the set of edges, is the weight of edge (i,j), used to represent the importance of the edge; S33: According to the clustering region CA relationship graph, based on the second-order similarity theory, obtain the conditional probability distribution of each node; In an exemplary embodiment, step S33 specifically includes: According to the clustering region CA relationship graph, based on the second-order similarity theory, obtain the conditional probability distribution of each node, such as the formula: , Among them, For each directed edge (i,j), its context representation is the conditional probability about node ; is the representation of node ; is the representation of node when regarded as the context of other nodes; S34: Obtain a second-order similarity metric according to the conditional probability distributions of the respective nodes; In an exemplary embodiment, step S34 specifically includes: obtaining a second-order similarity metric according to the conditional probability distributions of the respective nodes, as in the formula: , wherein, is the second-order similarity metric; S35: Learn the representations of the respective nodes and the representations of the respective nodes when regarded as the contexts of other nodes according to the first-order similarity metric and the second-order similarity metric, to obtain vector representations of the respective user trajectories; S4: Construct a time series prediction model, and use the time series prediction model to predict the vector representations of the respective user trajectories to obtain a prediction result; In an exemplary embodiment, the construction of the time series prediction model is as in the formula: , , , , , wherein, is the output result after convolution calculation, represents a 7×7 large kernel depthwise separable convolution, represents the input, represents the result after normalizing , and are the statistical mean and variance of the feature ; represents a small constant for avoiding division by zero, represents the GELU activation function, which uses a cubic approximation fitting function of the cumulative distribution function of the Gaussian distribution to accelerate the calculation; represents the hyperbolic tangent function, represents the output result after two 1*1 convolutions and one GELU activation, represents a 1×1 convolution, represents the output of the final model; In an exemplary embodiment, it further includes: performing a clustering parameter ablation experiment, a model structure ablation experiment, a graph embedding ablation experiment, and a state-of-the-art comparison experiment based on the multi-dimensional behavior trajectory dataset and the prediction result to obtain an evaluation result.

[0028] In some embodiments, the above-mentioned individual activity location prediction method based on spatial clustering and graph embedding can also be implemented in the following manner. In this embodiment, the individual activity location prediction method based on spatial clustering and graph embedding includes: S01: For the multi-dimensional behavior trajectory dataset, based on the density-optimized spatial clustering algorithm (HiSpatialCluster clustering algorithm), identify the individual activity hotspots and generate clustering regions with spatio-temporal consistency. S02: Construct a spatial clustering graph structure, fuse the geographical access sequence and access frequency of the user trajectory, and use the LINE graph embedding algorithm to generate a low-dimensional CA graph representation with strong structure preservation, generating a CA graph with spatio-temporal characteristics. S03: Perform CA graph encoding according to the user trajectory encoding algorithm. The CA graph encoding aims to construct a vector representation of each user trajectory. S04: Construct a temporal prediction model structure, fuse the multi-dimensional trajectory embedding vector and the time period encoding, extract deep spatio-temporal dependencies through large kernel convolution and normalization mechanisms, and construct a TPNet temporal prediction network. S05: Through a series of processes in this embodiment, finally, the results and analysis are presented through a clustering parameter ablation experiment, a model structure ablation experiment, a graph embedding ablation experiment, and a state-of-the-art comparison experiment. Specifically, step S01 is specifically as follows: S011: First, the algorithm quantifies the neighborhood density characteristics of each point using a kernel function. The specific density quantification representation formula is as follows: , In the formula, represents the density of point i, is the Euclidean distance between point i and point j, is the Gaussian kernel bandwidth that controls the neighborhood range of density calculation, is the weight information of the target point. S012: Search for the point j that is the closest and has a density higher than its own for each point. The formula for this process is as follows: , where, represents the distance from point i to the nearest high-density point.

[0029] Specifically, step S02 is specifically as follows: S021: First, given all region sets represented as . Suppose the trajectory of the k-th user with m check-in records is represented as . Wherein, , the check-in time , the user 's maximum time interval is . The weight of adjacent vertices between the check-in areas of this user, that is, and is calculated as follows: , S022: After traversing and calculating all user trajectories according to the above rules, the edge weight between any two vertices and can be obtained by accumulating the weights of the access trajectories of each user. The formula for this process is as follows: , Through the above steps, the construction of the user CA graph of the research area can be completed.

[0030] Specifically, step S03 is specifically as follows: S031: For each undirected edge in the CA graph structure, define the joint distribution between nodes and from the perspective of constructing the probability distribution. The construction formula is as follows: , Wherein, is the low-dimensional vector representation of node , carrying the compressed mapping of node features.

[0031] S032: After constructing the probability distribution in the space, further introduce the empirical probability as a reference benchmark. Wherein, realizes the global normalization of the edge weight. Then, by minimizing the distance between the two distributions, the approximation fusion of the probability distribution and the empirical distribution is achieved. The formula of the objective function of this process is as follows: , Wherein, is the distance metric function, quantifying the degree of distribution difference.

[0032] S033: According to the recommendation of the LINE algorithm, in this embodiment, the KL divergence is selected as the distribution fusion objective function for the first-order similarity metric. The specific formula of the objective function is: , By finding the , the representation of each node can be obtained in the d-dimensional space.

[0033] S034: Based on the second-order similarity theory (nodes sharing a large number of connected edges exhibit feature similarity in the graph structure), two vectors and are introduced. For each directed edge (i, j), its context representation is defined. Then, the conditional probability formula for node is expressed as follows: , S035: Similar to the first-order similarity objective function, we also need to make this distribution as close as possible to its empirical distribution , that is, the formula for setting the distribution fusion objective function is expressed as follows: , S036: Considering that nodes in the network may have different importance, the contribution of each node to the loss is not consistent in theory. The algorithm introduces as the importance of node i, which is measured by the degree of the node. In this embodiment, is set. Similarly, the KL divergence is used to measure the distance between distributions. The formula for the final loss function is expressed as follows: , Specifically, step S04 is as follows: S041: Input First, it passes through a 7×7 large kernel depthwise separable convolution, and the convolution operation is only performed independently in the channel dimension to balance the model capacity and efficiency. The process formula is expressed as follows: , Among them, represents the 7×7 large kernel depthwise separable convolution.

[0034] S042: Through the layer normalization layer LN (Layer Normalization), independent normalization is performed on each channel of the features. The formula for this processing process is: , Among them, and are the statistical mean and variance of the feature .

[0035] S043: Feature First, a 1×1 convolution is used to perform feature non-linear modeling on the channel number according to the class MLP structure with a channel expansion rate of 4, enhancing the non-linear expression ability of the model. According to the recommendation of ConvNeXt, the GELU activation function is selected as the non-linear activation function here, introducing a random regularization effect. Then, a 1×1 convolution is used here to complete feature compression. During this process, The forward process formula of is as follows: where and uses a cubic approximation fitting function of the cumulative distribution function of the Gaussian distribution to accelerate the calculation.

[0036] S044: The module uses a residual connection to directly add the features to the module input through a skip connection, thereby optimizing the gradient propagation path and supporting the training of deeper networks. Finally, the formula for the output features is as follows: where Specifically, step S05 is specifically as follows: S051: Set the Gaussian kernel neighborhood range σ ∈ {10, 30, 50} and the maximum number of clusters m ∈ {100, 300, 800}, and count the clustering results for different combinations; S052: Use the distance between the clustering region surfaces and the surface density to quantitatively evaluate the covered and uncovered points of the clustering regions; S053: Evaluate the results of the number of parameters and floating-point operation counts (FLOPs) under different model structures by proportionally expanding the model structure; S054: Use first-order similarity and second-order similarity as the training objectives of the LINE graph embedding respectively, and set the embedding dimension d ∈ {200, 500} for comparison; S055: Under the same clustering configuration, compare with models such as ResNet-50, ConvNeXt-tiny, and VAN-tiny, and evaluate their performance under different numbers of clusters m ∈ {100, 300, 800}.

[0037] In some embodiments, the above-mentioned individual activity location prediction method based on spatial clustering and graph embedding can also be implemented in the following manner.

[0038] To overcome the problems of insufficient adaptability, inadequate characterization of spatial dependence relationships, and limited prediction accuracy in existing individual activity location prediction methods in complex environments, this embodiment provides an individual activity location prediction method based on spatial clustering and graph embedding, including: Data preprocessing and spatial clustering: Based on the user's historical trajectory data, first perform data cleaning, denoising, and standardization operations to ensure data quality; then, use a density-optimized spatial clustering method to identify the user's activity hotspots, remove outliers, and construct a spatial clustering network based on spatial adjacency relationships; Graph embedding learning: On the basis of the constructed spatial clustering network, use a graph neural network (GNN) or variational graph autoencoder (VGAE) method to learn the high-dimensional representations between nodes, and construct a location embedding vector based on location semantic relationships. This step can further optimize the embedding expression through self-supervised learning; Hierarchical graph attention mechanism: For the dynamic influence between different locations, use a hierarchical graph attention mechanism to calculate node weights. This mechanism captures global and local dependence relationships through a multi-layer attention network, thereby enhancing the model's ability to model individual behavior patterns; Temporal modeling and decoding prediction: Based on the historical trajectory sequence and spatial embedding features, use a temporal dependence decoder (such as a Transformer or LSTM-Transformer structure) to model the individual's dynamic behavior. Combine spatial dependence relationships for multi-step location prediction to ensure that the prediction results conform to the individual's movement pattern; Adversarial regularization mechanism: To enhance the model's generalization ability, introduce an adversarial regularization mechanism. This mechanism optimizes the model parameters through adversarial perturbations, improves the model's adaptability to different user behavior patterns, and reduces the risk of overfitting.

[0039] This embodiment provides an individual activity location prediction system based on spatial clustering and graph embedding, including: A data preprocessing module: used to process the user's historical trajectory data, perform data cleaning, denoising, and standardization operations to ensure data quality; A spatial clustering module: used to identify the user's activity hotspots, construct a spatial clustering network, and remove outliers; A graph embedding learning module: used to learn the embedding vector of the location semantic relationship network, generate a high-dimensional location representation, and optimize the embedding expression using self-supervised learning; A prediction modeling module: uses a hierarchical graph attention mechanism and a temporal dependence decoder to combine the user's individual behavior and spatial topological relationship for location prediction; A result analysis module: used to evaluate the prediction results, provide visual analysis, and optimize the prediction model based on an error feedback mechanism.

[0040] In some embodiments, the above individual activity location prediction method based on spatial clustering and graph embedding can also be implemented in the following manner.

[0041] Please refer to Figure 2Flowchart of the user trajectory prediction method based on spatial clustering and graph embedding in this embodiment, mainly covering three modules: clustering processing, graph embedding mapping, and designing and implementing a lightweight large-kernel convolutional neural network TPNet for user trajectory prediction; in this embodiment, the individual activity location prediction method based on spatial clustering and graph embedding includes: Step 1: For the multi-dimensional behavior trajectory dataset, implement a density-optimized spatial clustering algorithm (HiSpatialCluster clustering algorithm) to perform spatial clustering processing on the original location data and generate clustering regions with geographical semantic features.

[0042] Specifically, Step 1 is as follows: Data encoding and region feature processing. First, perform pre-encoding processing on the collected Weibo user check-in data. Analyses show that these data have the following problems: (1) The spatial distribution is sparse and uneven, mainly concentrated in the city center; (2) The location information accuracy is insufficient, with an error of up to 30m; (3) The representation of the user's movement trajectory is not unified due to differences in the movement locations, frequencies, directions, and step lengths of different users; Therefore, in this embodiment, the area where the user's next location is predicted is selected as the prediction target to avoid the sparsity and accuracy problems brought by directly using the original data; at the same time, the unified representation of trajectory information is achieved through subsequent graphical encoding; Step 11: Implement the HiSpatialCluster clustering algorithm, which combines the CFSFDP clustering center determination mechanism and the density connection filtering idea of DBSCAN. Its specific process includes: Calculate the neighborhood density of each point in the social media check-in data point set using the Gaussian kernel function , and the specific density quantification representation formula is as follows:

[0043] In the formula, represents the density of point i, is the Euclidean distance between point i and point j, is the Gaussian kernel bandwidth that controls the neighborhood range of density calculation, is the weight information of the target point. In this embodiment, the weights of all target points are set to 1; Step 12: Search for the point j that is the closest and has a density higher than itself for each point. By calculating the distances between point i and all points with a density greater than , select the minimum value The corresponding points are recorded as the nearest high-density points to construct the density correlation relationship between points. The formula for this process is as follows:

[0044] In the formula, represents the distance from point i to the nearest high-density point. This process constructs the density correlation relationship between points and provides connection clues for subsequent clustering structure recognition.

[0045] Step 13 determines outliers, in-cluster points, and cluster center points based on the comprehensive information of the neighborhood density and the minimum distance of each point. Outliers usually have low density and are far away; in-cluster points have high density and are close; cluster center points satisfy the conditions of both high density and large minimum distance; Step 14 aggregates data points into different clustering clusters using density reachability and assigns corresponding clustering area (Cluster Area, CA) identifiers to each point. This algorithm makes full use of the parallel computing advantage of GPU and can efficiently process large-scale data sets, providing a reliable data basis for subsequent spatial behavior pattern mining.

[0046] Step 2: Please refer to Figure 3 , and this figure aims to integrate all user trajectories for representation. The CA graph is constructed, and this step aims to integrate all user trajectories for representation. Suppose two users are given, and they have visited clustering regions A, B, C and A, C, D in sequence according to the time order. The lighter the color of the connecting line in the figure, the longer the time interval between the corresponding two clustering regions CA and the smaller the edge weight. By analyzing the user access sequence, the relationship graph of these four clustering regions CA can be deduced. It should be noted that the weight between A and C in the network is the sum of the weights of all users between A and C. By continuously incorporating new users and new locations, the vertices of the graph are continuously expanded and the weights between vertices are updated, and finally a stable clustering region CA relationship graph is formed.

[0047] Specifically, Step 2 is as follows: Step 21: First, all region sets are given and represented as . Suppose the trajectory of the kth user with m check-in records is represented as . In the formula, , the check-in time , and the maximum time interval of user is . The weight of adjacent vertices between the check-in regions of this user, that is, the weight calculation between and is as follows:

[0048] In the formula, is the control time interval weight. In this embodiment, is uniformly set to 10 according to the characteristics of the dataset.

[0049] Step 22: Subsequently, after traversing and calculating all user trajectories according to the above rules, the edge weight between any two vertices and can be obtained by accumulating the access trajectory weights of each user. The formula for this process is as follows:

[0050] Through the above steps, the construction of the user CA graph for the research area can be completed.

[0051] Step 3: Perform CA graph encoding based on the LINE algorithm. The CA graph encoding aims to construct a vector representation of each user trajectory. This step is completely based on the constructed in step 2 ); Furthermore, embed the graph structure into a low-dimensional space so that each vertex in the graph is represented by a low-dimensional vector. Considering the large amount of data in the research area and the powerful encoding ability of subsequent deep learning methods, this embodiment uses the LINE algorithm for CA graph encoding to achieve the encoding of user trajectories. Compared with the random walk mechanism relied on by other typical graph encoding algorithms such as Deepwalk and node2vec, the LINE algorithm defines first-order proximity and second-order proximity, and can more accurately depict the complex relationships between vertices in the CA graph.

[0052] Step 3 is specifically as follows: S31: For each undirected edge in the CA graph structure, define the joint distribution between nodes and from the perspective of constructing the probability distribution. The construction formula is as follows:

[0053] In the formula, is the low-dimensional vector representation of node , carrying the compressed mapping of node features.

[0054] Step 32: After constructing the probability distribution in the space, further introduce the empirical probability as a reference benchmark. Among them, realizes the global normalization of the edge weight. Then, by minimizing the distance between the two distributions, the approximation and fusion of the probability distribution and the empirical distribution are achieved. The formula for the objective function of this process is as follows:

[0055] Wherein, is a distance metric function that quantifies the degree of distribution difference and drives the algorithm to retain the first-order similarity between nodes in iterative optimization, that is, the direct association features represented by edge weights, laying a first-order similarity foundation for the vector representation of the graph structure. According to the recommendation of the LINE algorithm, in this embodiment, the KL divergence is selected as the distribution fusion objective function for the first-order similarity metric, and the specific formula of the objective function is expressed as:

[0056] By finding the that can minimize the objective function, the representation of each node can be obtained in the d-dimensional space. It should be noted that the concept of first-order similarity only exists for undirected graphs, and there is no first-order similarity between nodes in directed graphs.

[0057] Step 33: Based on the second-order similarity theory (nodes sharing a large number of connected edges show feature similarity in the graph structure), introduce two vectors and . Among them, is the representation of node , and is the representation of node when it is regarded as the context of other nodes. For each directed edge (i, j), define its context representation , then the conditional probability formula regarding node is expressed as follows:

[0058] Step 34: Similar to the first-order similarity objective function, we also need to make this distribution as close as possible to its empirical distribution , that is, the formula for setting the distribution fusion objective function is expressed as follows:

[0059] Step 35: Considering that the nodes in the network may have different importance, the contribution of each node to the loss is not consistent in theory. The algorithm introduces as the importance of node i, which is measured by the degree of the node. Specifically, the empirical distribution in the formula of the distribution fusion objective function is defined as . Among them, is the out-degree of node . In this embodiment, is set, and the KL divergence is also used to measure the distance between distributions. The formula of the final loss function is expressed as follows:

[0060] Step 36: Finally, through learning and completing the minimization of the objective function, the algorithm can achieve the representation of each node in the d-dimensional space. In this embodiment, for each node, the learning dimension d is set to 200.

[0061] Step 4: Please refer to Figure 4 , construct the TPNet model. The overall structure of the TPNet model adopts a hierarchical design, hoping that the model can achieve the effect of hierarchical feature extraction. Considering the sparse characteristics and data volume characteristics of the punch card media data involved in the embodiment, this embodiment proposes a trajectory prediction model TPNet (Trajectory Prediction Network) based on sparse large kernel convolution for it.

[0062] Step 4: Specifically: Step 41: Design of the basic module of TPNet. The basic module structure of TPNet consists of 3 convolutional layers. Assume that any given input , will pass through a class MLP structure with a ratio of 4. In this process, the last two convolutional layers adopt the depthwise separable convolution structure design. In order to avoid the problem of gradient disappearance caused by deep networks, a skip connection structure similar to ResNet is also adopted. Specifically, the input first passes through a 7×7 large kernel depthwise separable convolution, and only performs convolution operations independently in the channel dimension to balance the model capacity and efficiency. The process formula is expressed as follows:

[0063] In the formula, represents the 7×7 large kernel depthwise separable convolution.

[0064] Subsequently, through the layer normalization layer LN (Layer Normalization), each channel of the feature is independently normalized. This processing process formula is expressed as:

[0065] Among them, and are the statistical mean and variance of the feature .

[0066] After that, the feature First, a 1×1 convolution is used to perform feature non-linear modeling on the channel number according to the MLP-like structure with a channel expansion rate of 4, enhancing the non-linear expression ability of the model. According to the recommendation of ConvNeXt, the GELU activation function is selected as the non-linear activation function here, introducing a random regularization effect. Then, a 1×1 convolution is used here to complete feature compression. During this process, The forward process formula of

[0067]

[0068] In the formula, The cubic approximation fitting function of the cumulative distribution function of the Gaussian distribution is adopted to accelerate the calculation.

[0069] Finally, the module uses a residual connection to directly add the features to the module input through a skip connection, thereby optimizing the gradient propagation path and supporting the training of deeper networks. Finally, the formula for the output features is as follows:

[0070] Step 42: Composition of the overall TPNet model. The overall TPNet model is designed into four Stages according to the design idea of mainstream models. For the basic number of modules in each Stage, it is designed and experimentally optimized according to the ratio of 1:1:3:1 in the mainstream model design. The specific optimization process can be seen in the subsequent ablation experiment. For the downsampling process between each Stage, the model uses a 2×2 convolutional layer to avoid the edge jagging problem that may be brought by bilinear sampling in traditional CNN models.

[0071] Step 43: Preprocessing of model input. The input of the TPNet model is the combined processing result of region coding data and user check-in data. Both types of data are stored in a database form and need to be preprocessed for input into the deep learning model. Table 1 shows the organization of each data, and Table 2 shows the region coding data.

[0072] Table 1: Table of the organization of each data

[0073] Table 2: Table of region coding data

[0074] Step 44: The combined processing of region coding data and user check-in data can be divided into two major steps, namely user trajectory matrix coding and preprocessing of model input data. The specific introduction is as follows: (1) User trajectory matrix encoding. Given the user check-in data table M, each record of which represents a single area check-in record of a user. First, sort all the user check-in data in chronological order. Second, retrieve according to the N sequential check-in area IDs of the user in the area coding table N. After performing max-min normalization on the obtained corresponding coding vector list, splice them in date order to obtain the user check-in area matrix representation. Subsequently, encode according to the check-in time of the user's sequential check-in areas. The encoding is 44 bits in total, and the corresponding user check-in time encoding matrix is obtained. Finally, concatenate the check-in time matrix and the check-in area matrix vector to obtain the user trajectory matrix. Table 3 shows the meanings of each bit of the user trajectory vector.

[0075] Table 3: Table of the meanings of each bit of the user trajectory vector

[0076] (2) Preprocessing of model input data. This step is processed based on the user trajectory matrix obtained in the above step. Specifically, take the 0th bit of the first N - 1 vector representations of the trajectory matrix respectively, and the 44th to 243rd bits are used as the check-in area identifier and the pre-input of the user trajectory respectively. For the pre-input of the user trajectory , perform 0 value filling on it to expand it to . For the check-in area identifier, establish a regional category mapping table according to the order of the area coding results. Subsequently, extract the 0th bit of the Nth vector of the trajectory matrix as the target area identifier, and after passing it through the regional mapping category mapping table, use it as the true value for the subsequent classification processing of the model, thus completing the construction of the dataset. After the above steps are completed, store the trajectory matrix of each user in the form of a single file. After traversing and processing all users, finally generate the behavior trajectory dataset of the research area.

[0077] Step 5: Please refer to Figure 5 In this embodiment, after a series of processes, finally present its results and analysis. Step S5 is specifically as follows: Step 51: Regional clustering experiment. It can be found that as the parameter m increases, the clustering area becomes more detailed. Among them, when the Gaussian kernel neighborhood range When the number of samples is 10 and the maximum number of clusters m is 800, the clustering results are the most detailed and can better describe the user trajectories. Nevertheless, it can be found that due to algorithm limitations, some of the clustering region surfaces are not always convex. Therefore, there are still some points that are outside the clustering region surfaces and not covered by the clustering regions. Based on this, in this embodiment, the numerical statistics of the covered points and the uncovered points are performed based on the distance and surface density between the clustering region surfaces, and the clustering results are quantitatively evaluated by interpolating the expected clustering regions. As shown in Table 4, it can be found that the difference in the expected number of clusters under different settings is not significant. In addition, it is also found that in cases, the clustering results under all m parameters can achieve the expected clustering effect. Therefore, this embodiment will select the results as the input of the clustering results for subsequent encoding.

[0078] For the parameter m, although its higher parameter settings can describe the user trajectories more meticulously, it also requires the subsequent model to have stronger classification capabilities. Therefore, this embodiment mainly selects and parameter combinations for subsequent model structure ablation experiments to reduce the training difficulty of the subsequent model for model selection. For other parameter combinations under the settings, the clustering results will be shown in the comparison experiment of the frontier methods.

[0079] Table 4: Statistical table of regional clustering experiment results

[0080] Step 52: Model structure ablation experiment. Table 5 shows the evaluation results of the number of parameters and floating-point operation counts (FLOPs) under different model structures. It can be seen from the table that as the model structure scales proportionally, the increase in the number of model parameters and computational complexity is relatively small, indicating that the proposed model architecture has good scalability. Specifically, when the number of modules in the model doubles, the increase in the number of model parameters is approximately 9M, and the increase in the number of floating-point operations is approximately 0.2G. This linear growth characteristic indicates that a good balance is maintained between the computational resource consumption of the model and its structural complexity, providing feasibility for the application of the model in larger-scale datasets or more complex tasks. In addition, comparative experiments on different normalization layers (such as Batch Normalization, BN, and Layer Normalization, LN) and activation functions (such as ReLU and GELU) show that the number of parameters in each model is roughly the same, indicating that the choice of these components has little impact on the scale of model parameters. However, in terms of computational volume, the model using Layer Normalization (LN) brings a slightly increased floating-point operation count of approximately 0.001G compared to Batch Normalization (BN). This difference mainly stems from the fact that LN needs to perform normalization independently for each sample during the calculation, while BN is calculated based on batch statistics, so BN is slightly more efficient than LN in terms of computational efficiency. Nevertheless, LN performs more stably in small-batch training or sequence data tasks, so it still has significant advantages in specific scenarios.

[0081] Table 6 shows the prediction result accuracies of different model structures in the clustering region encoding dataset based on and parameter combinations. The results show that: under the same model architecture, the prediction accuracy using Layer Normalization (LN) is significantly better than that of Batch Normalization (BN). This difference may be related to the stronger robustness of LN to small-batch data. At the same time, the performance of the ReLU activation function is significantly better than that of the GELU activation function, which may be attributed to the sparsity and computational efficiency advantages of ReLU in gradient propagation. Further comparative analysis reveals that under the combination of BN normalization and ReLU activation, the model with the number of modules in each stage being [2, 2, 6, 2] achieves the optimal performance, and its prediction accuracy reaches 29.31% and 50.3% respectively in the Accuracy Top1 and Top5 metrics, significantly better than other configurations. However, as the number of model layers further increases, the model performance shows an obvious downward trend, and this performance decay may be caused by factors such as model overfitting, vanishing gradients, or increased training difficulty.

[0082] Based on the above experimental results, in this embodiment, the TPNet with the number of modules [2, 2, 6, 2], using BN normalization and ReLU activation, is finally determined as the benchmark model, which will be used for the optimization and determination of subsequent graph embedding parameters. This choice not only ensures the best performance of the model but also provides a reliable comparison benchmark for subsequent experiments.

[0083] Table 5: Evaluation results table of the number of parameters and floating-point operation counts (FLOPs) under different model structures

[0084] Table 6: Prediction result accuracy table of different model structures in the clustering region coding dataset based on and the parameter combination of m = 100

[0085] Step 53: Graph embedding ablation experiment. Table 7 shows the prediction performance of the proposed user trajectory prediction method based on spatial clustering (SCTPM) under different parameter configurations of the LINE algorithm encoding. The experimental results show that the choice of encoding strategy has a significant impact on the model performance. Specifically, when using the 1st-order similarity metric for node encoding, as the encoding length increases, the prediction performance of the model shows a significant upward trend, and the Top1 index of Accuracy increases most significantly, with an increase of 64.94%. This phenomenon indicates that under the 1st-order similarity metric, increasing the encoding length can effectively capture the direct association information between nodes, thereby improving the accuracy of trajectory prediction.

[0086] However, under the 2nd-order similarity metric, the increase in encoding length does not bring the expected performance improvement, but instead leads to a decrease in model performance. Specifically, when the encoding length increases from 200 to 500, the Top1 and Top5 indices of Accuracy decrease by 6.08% and 13% respectively. This result shows that when the 2nd-order similarity metric captures the indirect relationships between nodes, too long an encoding length may introduce redundant information or noise, which instead has a negative impact on the model performance.

[0087] Based on the above experimental results and considering both prediction performance and computational efficiency, in this embodiment, the encoding algorithm parameters of SCTPM are finally set to an encoding length of 200 and the 2nd-order similarity metric. This parameter combination ensures a relatively high prediction accuracy while avoiding the problem of performance degradation caused by an increase in encoding length.

[0088] Table 7: Graph embedding ablation experiment results table

[0089] Step 54: Comparative experiment of frontier methods. To further verify the rationality and effectiveness of the design of the TPNet model, this embodiment conducted a comparative experiment with three typical classification models and analyzed the prediction accuracy under different numbers of clustering regions (see Tables 8, 9, and 10). The experimental results show that as the number of clusters increases, the accuracy of each model generally decreases. This is mainly attributed to the increase in the number of nodes in the encoding result due to the increase in the number of clusters, which reduces the similarity of the node vector representation and thus affects the model training effect. Nevertheless, TPNet performs best among multiple evaluation metrics under different clustering parameters. Specifically, when the expected number of clusters is 100, 300, and 500, the Accuracy (Top1) of TPNet reaches 29.3069%, 20.2222%, and 8.9347% respectively, which is about 21%, 44%, and 43% higher than that of the traditional convolutional model ResNet50. In contrast, the accuracy of similar large-kernel convolutional models (such as ConvNeXt and VAN) drops significantly when the number of clusters increases, which may be due to the lack of sufficient training data.

[0090] In addition, the comparison results of the model parameter quantity and floating-point computation quantity (see Table 11) further prove the superiority of TPNet. TPNet can achieve higher accuracy with only 19.143M parameter quantity and 0.535G floating-point computation quantity, demonstrating extremely strong computational efficiency. In summary, the TPNet model performs excellently in terms of task adaptability and prediction performance, and the proposed SCTPM method can achieve reliable prediction tasks at different scales.

[0091] Table 8: Prediction accuracy table of different models under m = 100

[0092] Table 9: Prediction accuracy table of different models under m = 300

[0093] Table 10: Prediction accuracy table of different models under m = 800

[0094] Table 11: Parameter quantity and floating-point computation quantity table of different models

[0095] This embodiment provides a computer program product, including a computer program, which implements the steps of the above-mentioned individual activity location prediction method based on spatial clustering and graph embedding when executed by a processor.

[0096] The embodiments of the present invention have been described above in conjunction with the accompanying drawings. However, the present invention is not limited to the above specific embodiments. The above specific embodiments are merely illustrative and not restrictive. Under the inspiration of the present invention, those of ordinary skill in the art can also make many forms without departing from the spirit of the present invention and the scope protected by the claims. All of these fall within the protection scope of the present invention.

Claims

1. An individual activity location prediction method based on spatial clustering and graph embedding, characterized in that It includes the following steps: S1: According to the multi-dimensional behavior trajectory dataset, use the clustering algorithm to obtain the clustering regions; S2: According to the clustering regions and the multi-dimensional behavior trajectory dataset, construct the spatial clustering graph structure to obtain the clustering region CA relationship graph; S3: According to the clustering region CA relationship graph, use the user trajectory encoding algorithm to encode the CA graph to obtain the vector representation of each user trajectory; S4: Construct a time series prediction model, and use the time series prediction model to predict the vector representation of each user trajectory to obtain the prediction result.

2. The individual activity location prediction method based on spatial clustering and graph embedding according to claim 1, wherein Step S1 specifically includes: S11: According to the multi-dimensional behavior trajectory dataset, use the kernel function to obtain the neighborhood density of each point; S12: According to the neighborhood density of each point, perform a neighboring point search to obtain the point that is closest to each point and has a density higher than its own; S13: According to the neighborhood density of each point and the point that is closest to each point and has a density higher than its own, obtain the outlier points, in-cluster points, and cluster center points; S14: According to the outlier points, in-cluster points, and cluster center points, use density reachability to aggregate the data points into different clustering clusters, and assign corresponding clustering region identifiers to each point to obtain the clustering regions.

3. The individual activity location prediction method based on spatial clustering and graph embedding according to claim 2, wherein Step S11 specifically includes: According to the multi-dimensional behavior trajectory dataset, use the kernel function to obtain the neighborhood density of each point, as shown in the formula: , Among them, represents the density of point i, is the weight information of the target point, is the Euclidean distance between point i and point j, is the neighborhood range for the Gaussian kernel bandwidth to control density calculation.

4. The individual activity location prediction method based on spatial clustering and graph embedding according to claim 1, wherein Step S2 specifically includes: S21: According to the clustering regions and the multi-dimensional behavior trajectory dataset, obtain the adjacent vertex weights between the check-in regions of each user; S22: According to the adjacent vertex weights between the check-in regions of each user, calculate the edge weights of any two vertices to obtain the clustering region CA relationship graph.

5. The individual activity location prediction method based on spatial clustering and graph embedding according to claim 4, wherein Step S21 specifically includes: According to the clustering regions and the multi-dimensional behavior trajectory dataset, obtain the adjacent vertex weights between the check-in regions of each user, as shown in the formula: , , , , , , Among them, is the weight for the user in the clustering area of clock-in and the clustering area That is, the adjacent vertex weight between the clock-in areas of each user; represents the trajectory representation of the check-in record of the k-th user, represents the clustering area of the i-th check-in record of the k-th user, represents the clock-in time of the i-th check-in record of the user, m represents the number of check-in records of the k-th user, V represents the set of clustering areas, and n represents the number of clustering areas; represents the i-th clustering area, that is, the i-th vertex; represents the user 's maximum time interval.

6. The individual activity location prediction method based on spatial clustering and graph embedding according to claim 4, wherein Step S22 specifically includes: According to the adjacent vertex weights between the check-in regions of each user, calculate the edge weights of any two vertices to obtain the clustering region CA relationship graph, as shown in the formula: , Among them, represents the vertex and is the edge weight, represents the number of users.

7. The individual activity location prediction method based on spatial clustering and graph embedding according to claim 1, characterized in that Step S3 is specifically: S31: According to each undirected edge in the clustering region CA relationship graph, obtain the joint probability distribution between each node; S32: According to the joint probability distribution between each node, obtain the first-order similarity metric; S33: According to the clustering region CA relationship graph, based on the second-order similarity theory, obtain the conditional probability distribution of each node; S34: According to the conditional probability distribution of each node, obtain the second-order similarity metric; S35: According to the first-order similarity metric and the second-order similarity metric, learn the representation of each node and the representation when each node is regarded as the context of other nodes to obtain the vector representation of each user trajectory.

8. The individual activity location prediction method based on spatial clustering and graph embedding according to claim 1, characterized in that, The construction of the time series prediction model is as shown in the formula: , , , , , Among them, is the output result after convolution calculation, represents a 7×7 large kernel depthwise separable convolution, represents the input, represents the result after normalizing , and are the statistical mean and variance of the feature , represents a small constant used to avoid division by zero, represents the GELU activation function, which uses a third-order approximation fitting function of the Gaussian distribution cumulative distribution function to accelerate the calculation; represents the hyperbolic tangent function, represents the output result after two 1*1 convolutions and one GELU activation, represents a 1×1 convolution, represents the output of the final model.

9. The individual activity location prediction method based on spatial clustering and graph embedding according to claim 1, wherein The individual activity location prediction method based on spatial clustering and graph embedding further includes: According to the multi-dimensional behavior trajectory dataset and the prediction result, perform clustering parameter ablation experiments, model structure ablation experiments, graph embedding ablation experiments, and frontier comparison experiments to obtain the evaluation result.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the individual activity location prediction method based on spatial clustering and graph embedding according to any one of claims 1-9.