Location recommendation method based on longitude and latitude perception and federated learning

Through multi-sequence collaborative modeling and dynamic cluster optimization model aggregation, the spatial heterogeneity problem in federal point of interest recommendation is solved, and higher recommendation accuracy and adaptability are achieved.

CN120372101APending Publication Date: 2025-07-25CHONGQING UNIV
View PDF 0 Cites 2 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The existing federal point of interest recommendation method is difficult to effectively capture the spatial and temporal dependence and directional characteristics of user behavior in spatial heterogeneous environments, resulting in limited geographical coverage and scene adaptability of the recommendation results.

Method used

Multi-sequence collaborative modeling technology is used to independently capture the dynamic characteristics of longitude and latitude, and optimize model aggregation through dynamic clustering and weight allocation mechanisms. Combining self-attention coding and K-means algorithm, the category structure is dynamically adjusted to adapt to changes in client behavior patterns.

Benefits of technology

It significantly improves recommendation accuracy and generalization capabilities, can more accurately characterize the user's time and space dynamic behavior, and solves the model performance bottleneck caused by spatial heterogeneity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120372101A_ABST
    Figure CN120372101A_ABST
Patent Text Reader

Abstract

The invention relates to a location recommendation method based on longitude and latitude perception and federated learning, which breaks through the limitation of semantic flattening of traditional geographical representation by decoupling independent self-attention coding of longitude and latitude sequences and explicitly capturing directional movement characteristics of a user. A federal dynamic clustering mechanism based on a behavior pattern is further designed, compatibility fusion of heterogeneous knowledge is achieved, the problems of gradient conflicts and long tail marginalization caused by spatial isomerism are effectively relieved, and therefore the problem of spatial heterogeneity in POI recommendation is solved, and the relevance and accuracy of recommendation are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method for recommending points of interest, and particularly to a location recommendation method based on latitude and longitude perception and federated learning. Background Art

[0002] With the deep integration of mobile Internet and intelligent terminals, location-based services (LBS) have become an important support for users to obtain information in scenarios such as travel, shopping, and dining. As a core component of LBS, point-of-interest (POI) recommendation realizes accurate location recommendation by analyzing user preferences, historical behaviors, and real-time location data, which can not only improve the user experience but also have significant commercial value. In response to the challenges of data utilization and secure collaboration in the traditional centralized recommendation mode, federated learning (FL) technology provides an innovative solution for POI recommendation - by constructing a federated POI recommendation framework, the system can coordinate multiple clients to perform distributed model training based on local trajectory data without centrally storing the original data, and only achieve knowledge sharing through encrypted model parameter interaction, taking into account the optimization of global recommendation performance and the need for local protection of user data.

[0003] However, in the distributed collaborative recommendation paradigm, how to efficiently represent the complex spatio-temporal dependence relationships in user behaviors and the fairness and adaptability of model optimization in an environment with significant client space heterogeneity are still key issues to be urgently solved. As Figure 1 shown, space heterogeneity is reflected in the significant differences in geographical coverage, POI distribution density, and user movement patterns among different clients: for example, the trajectory data of clients in the city center is highly dense and radially distributed in multiple directions; the trajectories of clients in coastal areas mostly extend along the east-west or north-south coastlines. This non-equilibrium of spatial distribution and behavior patterns restricts the robustness and scalability of the federated POI recommendation system.

[0004] Existing federal Point of Interest (POI) recommendation research still has significant deficiencies in modeling the correlation between user behavior and geospatial features: Traditional recommendation methods usually simplify user behavior into discrete interaction sequences. Although they can capture explicit location interaction patterns, they ignore the spatio-temporal correlation in the continuous change of geographical locations, resulting in longitude and latitude information being only shallowly embedded as auxiliary labels and making it difficult to capture the dynamic evolution laws of spatial semantics such as direction and distance in the movement trajectory. In addition, traditional federal aggregation strategies default that all client models have the same contribution degree, without considering the significant differences in user behavior patterns, data quality, and local model performance in different regions. This "one-size-fits-all" weight allocation method easily causes the global model to overfit the features of high-frequency active regions, while the personalized needs of edge scenarios or low-frequency long-tail clients are difficult to be effectively captured, ultimately resulting in limited geographical coverage and scenario adaptability of the recommendation results. Summary of the Invention

[0005] In view of the above problems existing in the prior art, the technical problem to be solved by the present invention is: How to effectively improve the recommendation accuracy and generalization ability of the federal Point of Interest (POI) recommendation model in a spatially heterogeneous environment.

[0006] To solve the above technical problem, the present invention adopts the following technical solution: A location recommendation method based on longitude and latitude perception and federated learning, comprising the following steps:

[0007] S1: Local training: Input the check-in sequences {S i |1 ≤ i ≤ N i} of all users in the i-th local client into the local model θ i for predictive training, and end the training when the preset number of training rounds is reached, where N i is the number of users in the i-th client.

[0008] S2: Upload of local models: Upload the N locally trained models {θ i |1 ≤ i ≤ N} to the server.

[0009] S3: Dynamic clustering and weight assignment: Extract the behavior patterns {R i |1 ≤ i ≤ N} of the local models on each client, use the K-means algorithm to perform dynamic clustering on R i to obtain clusters {C k |1 ≤ k ≤ K}, and then obtain the cluster weights {W k |1 ≤ k ≤ K} according to the mean model utility {Perf(C k )|1 ≤ k ≤ K} in the clusters, where K is the number of clusters obtained after clustering.

[0010] S4: Intra-cluster parameter aggregation: Aggregate the clusters {C kAll local models {θ where 1 ≤ k ≤ K} i | i ∈ C k} Aggregate according to the data volume {D i | i ∈ C k} to obtain the cluster model

[0011] S5: Inter - cluster parameter aggregation: Combine the dynamic cluster weights {W k | 1 ≤ k ≤ K} to aggregate the cluster models to obtain the global model θ g .

[0012] S6: Model update: Broadcast θ g to each client, and use θ g to overwrite the local model θ on each client i , to obtain the latest θ i .

[0013] S7: Determine whether the preset number of iterations is reached. If not, return to S2; otherwise, take the current local model as the optimal local model and execute the next step.

[0014] S8: For a user, obtain the user's historical check - in sequence and input the historical check - in sequence into the latest θ i , the latest θ i Output the recommendation list TopK as the user's point - of - interest recommendation result.

[0015] Furthermore, in S1, the prediction training process in the local model θ of multi - sequence collaborative modeling is as follows: i The check - in sequence S of the user

[0016] obtains the POI access sequence S = [v1, v2,..., v i , item where v is the discrete POI ID, n the longitude coordinate sequence of the corresponding POI and the latitude coordinate sequence of the corresponding POI where there are significant differences in semantics and distribution between the discrete POI access and the continuous geographical trajectory in user behavior. It is necessary to fully capture their characteristics through multi - modal independent modeling while reducing the risk of feature interference. To capture the spatio - temporal patterns of user movement, map S where

[0017] , S item and S lon and S lat to a unified latent space through independent embedding layers.

[0018] E iten = Embed item (S iten )

[0019] E lon = Embed lon (S lon )

[0020] E lat = Embed lat (S lat )

[0021] Among them, E iten , E lon and E lat respectively represent the latent spaces corresponding to S item , S lon and S lat .

[0022] H iten = MHA(E iten )

[0023] H lon = MHA(E lon )

[0024] H lat = MHA(E lat )

[0025] Among them, H iten , H lon and H lat respectively represent the hidden states corresponding to E iten , E lon and E lat .

[0026] The three types of hidden states generate a comprehensive representation through the strategy of direct addition: H fusion = H item + H lon + H lat .

[0027] Take the hidden state at the final moment in H fusion as the user representation. As the user representation.

[0028] Furthermore, in the above S3, the process of dynamic clustering and weight assignment is as follows:

[0029]

[0030] Among them, r j ∈R i is the local model θ iThe position of the true value in the TopK of the recommendation list obtained by testing on user j in the public test set, denoted as r j The utility value of

[0031] Convert the R generated by each client i through the utility value conversion and obtain the feature vector corresponding to client i

[0032] Use the K-means algorithm to cluster the feature vectors corresponding to all clients The corresponding expression is as follows:

[0033]

[0034] where C k is the k-th cluster, μ k is the cluster center, and K represents the number of clustering clusters.

[0035] After clustering, cluster performance evaluation will be carried out. The utility value of cluster C k is the average utility of the clients within the cluster:

[0036]

[0037] Calculate the cluster weight W k of cluster C k :

[0038]

[0039] where, C l represents the l-th cluster, Perf(C l ) is the utility value of cluster C l .

[0040] Furthermore, in the S4, the in-cluster parameter aggregation process is:

[0041]

[0042] where, represents the cluster model parameters obtained after aggregating the local models in cluster C k , θ i represents the local model parameters of client i, D i and D j represent the local data volumes of client i and j respectively.

[0043] Furthermore, in the S5, the between-cluster parameter aggregation process is:

[0044]

[0045] where, θ gRepresents global model parameters.

[0046] Compared with the prior art, the present invention has at least the following advantages:

[0047] 1. Multi-sequence collaborative modeling: By independently capturing the dynamic features of discrete POI access, east-west longitude changes, and north-south latitude changes, it avoids interference between modalities, retains the fine-grained information of spatial behavior, accurately depicts the spatio-temporal dynamics of user behavior, and ultimately achieves a significant improvement in recommendation accuracy.

[0048] Dynamic clustering based on behavior patterns: The innovative design of the dynamic clustering mechanism further optimizes the model aggregation process in federated learning, effectively alleviating semantic conflicts in federated aggregation. This method breaks through the traditional static partitioning methods based on geographical grids or statistical metrics, instead, by analyzing the performance and behavior patterns of the client local models, dynamically adjusts the category structure, and then achieves selective knowledge fusion through weight assignment, ultimately achieving a robust performance of the global model under spatial heterogeneity.

[0049] 2. The present invention solves the problem of spatial heterogeneity: Existing federated learning methods cannot handle the spatial heterogeneity in POI trajectory data. The present invention effectively improves the model accuracy and generalization ability in a spatial heterogeneous environment. Significantly improves model performance: Through comparative experiments with six personalized federated learning methods and tests on two real datasets, the LL-FedRec method of the present invention is significantly superior to existing methods in a spatial heterogeneous environment. Brief Description of the Drawings

[0050] Figure 1 Spatial heterogeneity display: Different colored blocks represent the geographical distribution differences of clients, and the point density reflects the density of POI distribution.

[0051] Figure 2 Is the overall framework of LL-FedRec.

[0052] Figure 3 Performance of NDCG at different clustering numbers. Detailed Description of the Preferred Embodiment

[0053] The present invention will be further described in detail below.

[0054] The present invention proposes a location recommendation method based on latitude and longitude awareness and federated learning, simply referred to as the LL-FedRec method. This method combines a multi-sequence modeling mechanism and a dynamic clustering strategy of behavior patterns to achieve collaborative modeling of local models and collaborative optimization of global models, ultimately improving the recommendation accuracy and robustness in a spatial heterogeneous scenario.

[0055] The present invention proposes a method for modeling longitude and latitude sequences as independent spatio-temporal patterns, effectively solving the problem of directional semantic confusion in traditional geocoding.

[0056] The present invention proposes a dynamic clustering method based on behavior patterns, combined with a hierarchical weight aggregation strategy, effectively alleviating the regional preference problem caused by geographical distribution deviation in federated collaboration.

[0057] In the LL-FedRec method, through an explicit mechanism of separating longitude and latitude sequences and independently modeling them respectively, a new solution idea is provided for the problem of spatial heterogeneity in federated POI recommendation. Traditional methods usually model longitude and latitude as a unified two-dimensional coordinate. Although this processing method simplifies the calculation process, it ignores the potential directional feature differences in user movement behaviors - for example, east-west commuting and north-south commercial activities may imply different semantic patterns. By independently encoding longitude and latitude sequences, the model can more finely capture the direction preferences of users in spatial movement, thus alleviating the problem of federated model convergence oscillation caused by geographical location distribution differences. At the same time, the design of the dynamic clustering mechanism further optimizes the model aggregation process in federated learning, effectively alleviating the semantic conflicts in federated aggregation. This method breaks through the traditional static division methods based on geographical grids or statistical indicators, and instead dynamically adjusts the category structure by analyzing the performance and behavior patterns of local models on the client side. The introduction of double weights not only balances the trade-off relationship between data contribution and model quality, but also takes into account the collaborative requirements of global optimization and personalized recommendation under the federated framework, enabling the system to adaptively process the dynamic evolution of client data.

[0058] In this study, we define the user set as where N u represents the total number of users, and the historical behavior of each user is characterized as a time-series access sequence S i ={(v i1 , lon i1 , lat i1 ),…,(v in , lon in , lat in )}, which contains discrete POI identifiers and the corresponding geographical coordinates longitude lon ik and latitude lat ik , where is the POI set, and N v represents the total number of POI locations. The meanings of some symbols in the present invention are shown in Table 1.

[0059] Table 1 Symbols and Definitions

[0060]

[0061] User historical behavior not only contains discrete POI visit sequences but also implies complex spatio-temporal movement patterns. To fully exploit this information, this study proposes a method (LL-FedRec) that combines multi-modal geographical sequence modeling with dynamic federated clustering to achieve the deep fusion of geographical coordinates and semantic features and the fairness and adaptability of model optimization in federated POI recommendation under spatial heterogeneity. For the specific architecture of LL-FedRec, please refer to Figure 2 。

[0062] A location recommendation method based on latitude-longitude perception and federated learning includes the following steps:

[0063] S1: Local training: Input the check-in sequences {S i |1 ≤ i ≤ N i} of all users in the i-th local client into the local model θ i for predictive training, and end the training when the preset number of training rounds is reached, where N i is the number of users in the i-th client.

[0064] S2: Upload of local models: Upload the N locally trained models {θ i |1 ≤ i ≤ N} to the server.

[0065] S3: Dynamic clustering and weight assignment: Extract the behavior patterns {R i |1 ≤ i ≤ N} of the local models on each client.

R i is the Rank sequence

[0066] S4: Intra-cluster parameter aggregation: Aggregate all the local models {θ k |1 ≤ k ≤ K} in the clusters {C i |i ∈ C k} according to the data quantity {D i |i ∈ C k} to obtain the cluster model

[0067] S5: Inter-cluster parameter aggregation: Combine the dynamic cluster weights {W k |1 ≤ k ≤ K} to aggregate the cluster models to obtain the global model θ g 。

[0068] S6: Model update: Broadcast θ g to each client, and use θ g to overwrite the local model θ i on each client to obtain the latest θ i .

[0069] S7: Determine whether the preset number of iterations is reached. If not, return to S2; otherwise, take the current local model as the optimal local model and proceed to the next step.

[0070] S8: For a user, obtain the user's historical check-in sequence and input the historical check-in sequence into the latest θ i , the latest θ i outputs the recommendation list TopK, which is the POI recommendation result for the user.

[0071] Specifically, in S1, the prediction training process in the local model θ i for multi-sequence collaborative modeling is as follows:

[0072] Traditional POI recommendation methods merge longitude and latitude into a single geographical coordinate embedding, ignoring the possible directional independence differences in the movement patterns of user behavior in the east-west and north-south directions. This coupled coding method may lead to mixed azimuth semantics and limit the model's ability to capture complex spatial patterns. The present invention explicitly decouples the two types of geographical signals through independent self-attention coding, and then fuses the three types of features by direct addition, reducing the number of parameters while retaining the complementarity of multi-modal information.

[0073] From the user's check-in sequence S i obtain the POI access sequence S item = [v1, v2,..., v n , where v is the discrete POI ID, the longitude coordinate sequence corresponding to the POI and the latitude coordinate sequence corresponding to the POI where

[0074] There are significant differences in semantics and distribution between the discrete POI access and the continuous geographical trajectory in user behavior. It is necessary to fully capture their characteristics through multi-modal independent modeling while reducing the risk of feature interference. To capture the spatio-temporal patterns of user movement, map S item , S lon and S lat to a unified latent space through independent embedding layers.

[0075] E iten= Embed item (S iten )

[0076] E lon = Embed lon (S lon )

[0077] E lat = Embed lat (S lat )

[0078] where E iten , E lon and E lat represent the corresponding latent spaces of S item , S lon and S lat respectively.

[0079] E iten , E lon and E lat respectively model the long-term dependencies within the sequence through the multi-head self-attention encoding MHA. The self-attention mechanism is good at capturing long-sequence dependencies, but a single attention network may confuse the temporal patterns of different modalities. Independent multi-head self-attention encoding can separately model the unique patterns of each modality, independently analyze the dynamic evolution laws of user trajectories in the east-west and north-south axes, and overcome the inherent defect of direction semantic aliasing in traditional geocoding.

[0080] H iten = MHA(E iten )

[0081] H lon = MHA(E lon )

[0082] H lat = MHA(E lat )

[0083] where E iten , H lon and H lat represent the corresponding hidden states of E iten , E lon and E lat respectively.

[0084] The three types of hidden states generate a comprehensive representation through the strategy of direct addition: H fusion = H item + H lon + H lat . This not only preserves the independence of each modality, avoids the mutual interference between geographical and semantic signals, but also realizes information complementarity through simple linear superposition, avoiding the overfitting risk introduced by complex interaction networks.

[0085] Take H fusion The hidden state at the final moment in as the user representation. The generated recommendation list is:

[0086] Specifically, in S3, the process of dynamic clustering and weight assignment is:

[0087] Different from traditional scalar metrics (such as accuracy), this study uses the Rank sequence as the behavior pattern of the client. The server receives the local model θ i uploaded by client i, evaluates its recommendation performance on the public test set, and generates the Rank sequence R i = [r1, r2, …, r m . For the test sample t in the public test set, if the true POI is at the k-th position in the top K of the recommendation list, then record r t = k. If a certain model's recommended position for the true POI on the test set is [3, 1, 5, …], then its Rank sequence directly reflects its preference characteristics. For example, this user tends to recommend popular POIs or long-tail scenarios.

[0088] Since in recommendations, the absolute difference of the original recommended position values does not have a linear relationship with the relative importance, it is necessary to convert them into a feature space that can measure similarity through a non-linear utility function.

[0089] Utility value conversion:

[0090]

[0091] where r j ∈ R i is the position of the true value in the top K of the recommendation list obtained by testing the local model θ i on user j in the public test set, representing the utility value of r j .

[0092] Convert the R i generated by each client through utility value conversion and obtain the feature vector corresponding to client i

[0093] Convert the position value to the utility value. The larger the utility value, the higher the recommendation quality, and obtain the feature vector This can avoid the deviation in distance calculation caused by directly using the original position values. For example, the difference between position 1 and 2 should be greater than the difference between position 10 and 11.

[0094] Dynamic clustering based on behavior patterns needs to adapt to the spatio-temporal evolution characteristics of client data. The efficiency and scalability of the K-means algorithm can support real-time updating of client clustering. Through the K-means algorithm for dynamic clustering, the within-cluster distance is minimized, and clients with similar behavior patterns are divided into the same cluster (for example, cluster 1 may correspond to "downtown business district preference", and cluster 2 may correspond to "suburban natural landscape preference").

[0095] Use the K-means algorithm for the feature vectors corresponding to all clients for clustering, and the corresponding expression is as follows:

[0096]

[0097] where C k is the k-th cluster, μ k is the cluster center, and K represents the number of clustering clusters.

[0098] After clustering is completed, cluster performance evaluation will be carried out. The utility value of cluster C k is the average utility of the clients within the cluster:

[0099]

[0100] Calculate the cluster weight W k of cluster C k :

[0101]

[0102] where, C l represents the l-th cluster, Pref(C l ) is the utility value of cluster C l , and the denominator part is to sum up the utility values of all clusters. The cluster weight W k can be obtained by the proportion of the utility value Perf(C k ) of cluster k in the total utility value.

[0103] Specifically, in the S4, the process of aggregating the intra-cluster parameters is as follows:

[0104] The cluster weight needs to reflect both the overall performance of the cluster and the internal diversity at the same time. Calculating through the average utility of the clients within the cluster can balance the influence of individual outliers and improve the stability of clustering. Model aggregation is divided into two layers. First is intra-cluster aggregation. The contribution weight of each client within the cluster is determined by its local data volume. Clients with a large amount of data dominate the update of the local model, which can ensure the dominance of large data clients and suppress small data noise.

[0105]

[0106] where, represents cluster Ck The cluster model parameters θ obtained after aggregating the local models in i denote the local model parameters of client i, D i and D j respectively represent the local data volumes of clients i and j.

[0107] Specifically, in S5, the inter-cluster parameter aggregation process is as follows:

[0108] The inter-cluster aggregation completed through cluster weights avoids large clusters monopolizing the global model update due to large data volumes, protects the knowledge retention of niche scenarios, guides the global model to learn from high-performance clients, and accelerates convergence. Its expression is as follows:

[0109]

[0110] Among them, θ g denotes the global model parameters. The clusters and cluster weights obtained by clustering clients through model performance can change dynamically to adapt to the model performance fluctuations caused by the spatial heterogeneity between clients and the dynamic changes of data.

[0111] Experiments and Analysis

[0112] 1. Datasets

[0113] Two public datasets from the Foursquare platform were used, including the NYC and TKY datasets, which are check-in datasets for New York and Tokyo respectively, and these datasets are commonly used in recommendation tasks. Table 2 shows the number of users, the number of locations, the number of check-ins, the average number of check-ins, the minimum number of check-ins, and the maximum number of check-ins of the experimental datasets used.

[0114] Table 2 Experimental Data Statistics

[0115]

[0116] To meet the federated learning scenario, the data was clustered according to the average activity range of each user and assigned to clients, and during the training process, the client data always remained only on the local client and was not shared with other clients or the server, which could make the spatial heterogeneity problem more prominent in the federated learning process. Then, a part of the data was randomly selected from each client according to the proportion of data volume as the public test dataset on the server side, and this dataset would be used to test the performance of each local model and the global model.

[0117] 2. Baselines

[0118] To evaluate the performance of the model, several mainstream federated frameworks and federated sequential recommendation models were selected as baselines. Among them, the sequential recommendation model in the federated framework is the sequential recommendation model based on the self-attention mechanism (SASREC).

[0119] FedAVG: In this framework, during the iterative process, the model updates are weighted and aggregated according to the amount of client data, giving more importance to clients with a larger data scale, which can effectively alleviate the problems brought by data imbalance among devices.

[0120] SCAFFOLD: By introducing a control variable containing the direction of model update to correct the local model update direction, it can effectively address the client drift phenomenon during local updates.

[0121] FedProx: This method introduces a proximal term in the global model update, aiming to reduce the difference between the local model and the global model, thus solving the problem of uneven data distribution among devices.

[0122] FedDyn: Adaptively selects the devices participating in communication, adopts a dynamic learning rate adjustment strategy on the global server, reduces communication overhead, and improves the model convergence speed.

[0123] FedALA: Proposes an Adaptive Local Aggregation (ALA) module, which adaptively aggregates the downloaded global model and local model to optimize the local objective of each client, and finally alleviates the problem of statistical heterogeneity in federated learning.

[0124] FedHyper: To address the challenges of hyperparameter optimization in federated learning, this paper proposes a learning rate adaptation algorithm based on hypergradient. It has a general learning rate scheduler that can adjust the global and local learning rates as the training progresses. It speeds up the model convergence speed and enhances robustness.

[0125] 3 Evaluation Metrics

[0126] The commonly used evaluation metrics NDCG@k and HR@k in the current sequential recommendation system are used to evaluate the quality of the model, where the value of k is 5, 10, and 20. NDCG represents Normalized Discounted Cumulative Gain, which is used to measure the difference between the recommended results and the actual interaction list of users, and shows the quality of the item ranking in the recommended list. HR represents Hit Rate, which is the ratio of the number of correctly predicted samples in the prediction results to the total number of samples in the prediction result list, and is used to evaluate the accuracy of the recommended results.

[0127] 4 Implementation Details

[0128] Due to environmental and equipment limitations, a client and a server are set up on a single device to simulate the scenario of federated learning training, which is consistent with the current popular federated training methods. The specific parameter settings of the experiment are shown in Table 3, where "None" indicates that a certain method does not use this parameter. A total of 35 clients are set in the experiment, and all clients participate in each round of federated training and communication. The client data is obtained by clustering the average activity range of users. Among the NYC data, the client with the smallest amount of data has 6 users and 509 check-in data, and the client with the largest amount of data has 173 users and 18,357 check-in data; among the TKY data, the client with the smallest amount of data has 18 users and 1,890 check-in data, and the client with the largest amount of data has 212 users and 32,590 check-in data.

[0129] Table 3 Experimental Setting Parameters

[0130]

[0131] 5 Result Analysis

[0132] (1) Global Model Performance

[0133] Table 4 shows the experimental results of LL-FedRec and the baselines on the NYC and TKY datasets. In the table, the bold values represent the experimental results of LL-FedRec, and the underlines represent the best values in the federated learning baselines. It can be seen that LL-FedRec shows the most superior performance, far exceeding other baselines, indicating that it has significant performance advantages in POI recommendation.

[0134] Table 4 Global Model Results of LL-FedRec and Baselines on NYC and TKY

[0135]

[0136] When facing the problem of spatial heterogeneity, the experimental results show the excellent adaptability of the method of the present invention. Specifically, LL-FedRec far exceeds other baselines in all indicators except HR@20 in the TKY dataset, verifying the synergistic advantages of directional modeling and dynamic clustering. Traditional federated strategies show obvious limitations in dealing with spatial heterogeneity; although FedProx and SCAFFOLD alleviate parameter drift through proximal terms or control variables, their performance has not been improved due to the failure to decouple geographic directional semantics; although the adaptive optimization of FedAdam and FedHyper improves convergence efficiency, it is limited by the flattening of geographic representation, and the performance is still an order of magnitude behind LL-FedRec. It is worth noting that FedDyn and FedALA partially alleviate the impact of geographic heterogeneity through dynamic device selection or adaptive aggregation, but their performance is still lower than that of LL-FedRec, highlighting the lack of high-order geographic semantic modeling in existing methods. The geographical long-tail effect is the core factor that restricts the baseline method. LL-FedRec has achieved a significant improvement on NYC's HR@20 through directional decoupling and dynamic clustering, proving that it can effectively capture the behavioral characteristics of edge scenes (such as vertical paths in mountainous areas and waterfront diffusion patterns).

[0137] Although LL-FedRec is slightly inferior to FedDyn in the HR@20 indicator of the TKY dataset, its stable advantage in the NDCG indicator shows that its recommendation result ranking quality is better. At the same time, cross-dataset comparison shows that TKY's performance gain relative to NYC is more moderate, which may be due to the fact that Tokyo's user behavior is driven by the dense urban structure and presents a higher spatial consistency, while New York's complex multi-center layout amplifies the challenge of spatial heterogeneity, further highlighting the superiority of this method in complex geographic scenarios. Overall, the experimental results fully verify the advancement and robustness of LL-FedRec in geographically heterogeneous federated recommendation scenarios.

[0138] (2) Hyperparameter Experiments

[0139] Here, we systematically analyze the impact of the hyperparameter cluster number C on the overall federated learning method. We consider the impact of this parameter on the overall federated learning method when C is {3, 5, 7, 9, 11, 13, 15}.

[0140] The experimental results are as follows Figure 3As shown, it can be seen that when the number of clusters gradually increases from 3 to 7, all indicators are rising, indicating that moderately increasing the number of clusters can effectively capture the geographical heterogeneity patterns of New York users' behaviors; however, when the number of clusters continues to expand to 15, all indicators eventually show a downward trend, suggesting that an overly fragmented cluster structure may disrupt the continuity of geographical semantics and introduce noise interference. In contrast, the overall fluctuation range of the TKY dataset is relatively small, reflecting that the mobility patterns of Tokyo users have stronger intra-cluster consistency under complex urban structures and are more robust to changes in the number of clusters. Too few clusters cannot fully model the client behavior differentiation, resulting in knowledge confusion, while too many clusters lead to overfitting and noise sensitivity due to the sparsity of intra-cluster samples, indicating that federated clustering needs to seek a balance between fine-grained semantic capture and noise suppression. The experimental results verify the robustness of 7 clusters in most scenarios, which can not only capture the essential differentiation of geographical behavior patterns but also maintain the effectiveness of intra-cluster knowledge aggregation.

[0141] (3) Ablation Experiment

[0142] To verify the effectiveness of the two methods proposed in LL-FedRec, ablation experiments were conducted to evaluate the impact of each component on the overall performance. The specific operations include: removing the latitude-longitude encoding module; removing the model performance dynamic clustering module; the complete LL-FedRec method.

[0143] Table 5 Results of Ablation Experiment

[0144]

[0145] The results of the ablation experiment are shown in Table 5. It can be seen from the experimental results that whether the latitude-longitude encoding module or the model performance dynamic clustering module is removed, the overall performance of the model decreases. In the NYC dataset, removing the latitude-longitude encoding module (w / o lat-lon) leads to a sharp drop in all indicators, confirming the effectiveness of directional feature decoupling for geographical semantic capture. In contrast, although the results are better when removing the dynamic clustering module (w / o cluster), all indicators still decline compared to the complete method, revealing the knowledge conflict problem in federated aggregation: ungrouped homogeneous aggregation blurs the geographical behavior differentiation between clients, leading to the global model falling into the knowledge averaging dilemma. It is worth noting that the TKY dataset shows a similar pattern but with a slower attenuation amplitude, indicating that the geographical behavior patterns of Tokyo users have higher intrinsic consistency, but dynamic clustering still contributes significantly by alleviating the long-tail marginalization. The experimental results verify the inseparability of geographical decoupling and federated clustering. The former provides fine-grained directional semantics, and the latter constructs an adaptable collaborative framework. The two cooperate to break through the performance bottlenecks of traditional methods in privacy protection and geographically heterogeneous spaces.

[0146] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention, and they should all be covered by the scope of the claims of the present invention.

Claims

1. A location recommendation method based on latitude and longitude perception and federated learning, characterized in that: It includes the following steps: S1: Local Training: Input the check-in sequences {S i | 1 ≤ i ≤ N i} of all users in the i-th local client into the local model θ of multi-sequence collaborative modeling i for predictive training, and end the training when the preset number of training rounds is reached, where N i is the number of users in the i-th client; S2: Local model upload: Upload the N locally trained models {θ i | 1 ≤ i ≤ N} to the server; S3: Dynamic Clustering and Weight Assignment: Extract the behavior patterns {R i | 1 ≤ i ≤ N} of the local models on each client, and use the K-means algorithm to perform dynamic clustering on R i to obtain clusters {C k | 1 ≤ k ≤ K}. Then, based on the mean model utility {Perf(C k ) | 1 ≤ k ≤ K} in the clusters, obtain the cluster weights {W k | 1 ≤ k ≤ K}, where K is the number of clusters obtained after clustering; S4: Intra-cluster parameter aggregation: Aggregate all local models {θ k | 1 ≤ k ≤ K} in the cluster {C i | i ∈ C k} according to the data volume {D i | i ∈ C k} to obtain the cluster model S5: Inter-cluster parameter aggregation: Aggregate the cluster models by combining the dynamic cluster weights {W k | 1 ≤ k ≤ K} to obtain the global model θ g ; S6: Model update: Broadcast θ g to each client, and use θ g to overwrite the local model θ i on each client to obtain the latest θ i ; S7: Determine whether the preset number of iterations is reached. If not, return to S2. Otherwise, regard the current local model as the optimal local model and execute the next step; S8: For a user, obtain the user's historical check-in sequence and input the historical check-in sequence into the latest θ i , the latest θ i Output the top K of the recommended list as the POI recommendation result for this user.

2. The location recommendation method based on latitude and longitude perception and federated learning according to claim 1, wherein: In the above S1, the local model θ for multi-sequence collaborative modeling i The prediction training process is as follows: From user u i 's check-in sequence S i obtain the POI access sequence S item =[v1, v2, …, v n , is the discrete POI ID, u i corresponding longitude coordinate sequence of the POI and u i corresponding latitude coordinate sequence of the POI where There are significant differences in semantics and distribution between discrete POI access and continuous geographical trajectories in user behavior. It is necessary to fully capture their characteristics through multi-modal independent modeling while reducing the risk of feature interference; To capture the spatio-temporal patterns of user movements, map S item , S lon and S lat to a unified latent space through independent embedding layers; E iten = Embed item (S iten ) E lon = Embed lon (S lon ) E lat = Embed lat (S lat ) Among them, E iten , E lon and E lat respectively represent the latent spaces corresponding to S item , S lon and S lat ; H iten = MHA(E iten ) H lon = MHA(E lon ) H lat = MHA(E lat ) Among which H iten 、H lon and H lat respectively represent the hidden states corresponding to E iten 、E lon and E lat ; Three types of hidden states generate a comprehensive representation through a direct addition strategy: H fusion = H item + H lon + H lat ; Take H fusion The hidden state at the final moment in as the user representation.

3. The location recommendation method based on latitude and longitude perception and federated learning according to claim 2, wherein: In the S3, the process of dynamic clustering and weight assignment is as follows: where r j ∈ R i is the position of the true value in the Top-K recommended list obtained by testing the local model θ i on user j in the public test set, representing the utility value of r j ; Each R generated by the client i is converted through the utility value to obtain the feature vector corresponding to client i Use the K-means algorithm to cluster the feature vectors corresponding to all clients The corresponding expression is as follows: where C k is the k-th cluster, μ k is the cluster center, and K represents the number of clustering clusters; After clustering is completed, the cluster performance evaluation will be carried out. The utility value of cluster C k is the average utility of the clients within the cluster: Calculate cluster C k The cluster weight value W k : Among them, C l represents the l-th cluster, and Perf(C l ) is the utility value of cluster C l .

4. The method for location recommendation based on latitude and longitude perception and federated learning according to claim 3, wherein: In the S4, the process of intra-cluster parameter aggregation is as follows: Among them, represents the cluster model parameter θ obtained after aggregating the local models in cluster C k , i represents the local model parameter of client i, D i and D j represent the local data volumes of clients i and j respectively.

5. The location recommendation method based on latitude and longitude perception and federated learning according to claim 4, wherein: In the S5, the process of inter-cluster parameter aggregation is as follows: Among them, θ g represents the global model parameters.

Citation Information

Cited By

  • Data processing method and device based on deep learning and readable storage medium

    CN121257665A

  • An image classification method and device based on deep learning and a readable storage medium

    CN121257665B