A Cluster Federated Learning Method and Apparatus Based on Mobile Scenarios
By using cluster partitioning and geographic region binding based on client trajectory similarity, the problems of statistical heterogeneity and privacy leakage in VEFL are solved, improving training efficiency and protecting data privacy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-19
- Publication Date
- 2026-04-03
AI Technical Summary
Existing federated learning schemes are ill-suited to the challenges of high client mobility and statistical heterogeneity caused by geographical differences, which impacts model training efficiency and poses privacy risks.
By acquiring the historical trajectories of clients and calculating trajectory similarity, clients with high trajectory similarity are grouped into a cluster. The cluster FL model is then bound to a specific geographical region. Data clustering is performed using location trajectories to reduce the impact of statistical heterogeneity and protect data privacy.
It improves VEFL training efficiency, reduces the risk of privacy leaks, and is suitable for federated learning applications in mobile scenarios.
Smart Images

Figure CN119337129B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of automotive driver assistance technology, and more specifically, to a cluster federated learning method and apparatus based on mobile scenarios. Background Technology
[0002] In recent years, intelligent connected vehicles have flourished. Their highly intelligent characteristics rely on various machine learning applications. These applications require data to be aggregated to a central server for model training, which is difficult for client nodes with limited computing and communication resources to achieve and also faces the risk of privacy leaks.
[0003] Federated learning (FL) is a new paradigm that enables distributed collaboration on edge networks to train machine learning models while protecting data privacy. To fully utilize the rich resources at the network edge, client-side edge federated learning (VEFL) is a viable solution.
[0004] However, VEFL's application scenarios differ from traditional FL scenarios in two ways: ① Data collected from different geographical regions have different statistical characteristics. Therefore, there is an implicit relationship between the data collected by the client and the regions it passes through. Data collected by clients in different regions follow different distributions, while data collected in the same region follow highly similar distributions. ② The high mobility of clients further exacerbates statistical heterogeneity. That is, the distribution of data collected by clients may change with their location, affecting the model's performance and greatly reducing training efficiency. This makes existing federated learning schemes unsuitable for VEFL application scenarios. Summary of the Invention
[0005] To address the issue that existing federated learning methods are not well adapted to VEFL application scenarios, this application provides a cluster federated learning method and apparatus based on mobile scenarios.
[0006] The embodiments of this application are implemented as follows:
[0007] Firstly, this application provides a cluster federated learning method based on mobile scenarios, including:
[0008] Obtain the historical trajectories of all clients, and calculate the trajectory similarity between any two clients based on the historical trajectories;
[0009] Based on the data collected by the client and the connections between the areas they pass through, and based on the trajectory similarity, clients with high trajectory similarity are grouped into a cluster.
[0010] Based on the locations traversed by the historical trajectories of all clients in each cluster, the coverage area of the cluster is determined, and the cluster FL model is bound to a specific geographic location.
[0011] In one possible implementation, the step of obtaining the historical trajectories of all clients and calculating the trajectory similarity between any two clients based on the historical trajectories further includes:
[0012] Obtain AP access log data from the client, including access records and received signal strength when the client accesses the AP;
[0013] Since the data collected by clients within the coverage area of the same AP has a similar distribution, when calculating the similarity of the AP access log data between clients, it is necessary to consider the overlapping areas traversed by different clients and the corresponding dwell time.
[0014] Based on the AP access log data, the coverage area M of each client i at each edge AP before time t can be obtained. u Total duration within The similarity between different clients is calculated.
[0015] In one possible implementation, the similarity between the AP access log data of two clients i and j is defined as follows:
[0016]
[0017] Where i and j are the client IDs; M is the set of all APs, and also represents the set of coverage areas of all APs; M u It is the AP number; Before time t, client i is in AP M u The total time spent within the coverage area.
[0018] In one possible implementation, the step of grouping clients based on the relationships between the data collected by the clients and the areas they traverse, and simultaneously grouping them according to trajectory similarity to form a cluster, further includes:
[0019] Based on the AP access log data of all clients, the time each client spends within the coverage area of each AP is calculated.
[0020] Based on the total duration of AP access log data from different clusters within the AP coverage area, the AP coverage area is bound to the cluster with the longest dwell time.
[0021] In one possible implementation, the step of obtaining the historical trajectories of all clients and calculating the trajectory similarity between any two clients based on the historical trajectories further includes:
[0022] The GPS log data is obtained by acquiring the client's current coordinates at fixed time intervals.
[0023] The GPS log data includes the client's latitude and longitude coordinates and the corresponding timestamps, represented as a set of sequence data;
[0024] Based on the longest common subsequence algorithm, the length of the longest common subsequence of the GPS log data from different clients is obtained, and the similarity between different clients is calculated.
[0025] In one possible implementation, the length of the longest common subsequence of the GPS log data from two clients is defined as:
[0026]
[0027] Where γ is the threshold for determining whether two coordinate points are approximately similar, and a and b represent the indices of sequences A and B.
[0028] In one possible implementation, the position trajectories J of the two clients i and j i (t) and J j The similarity between (t) is calculated as follows:
[0029] λ i,j (t)=F(J i (t),J j (t)) / min(J i (t),J j (t)), (3)
[0030] Among them, J i (t) represents the trajectory data of client i before time t.
[0031] In one possible implementation, the step of grouping clients based on the relationships between the data collected by the clients and the areas they traverse, and simultaneously grouping them according to trajectory similarity to form a cluster, further includes:
[0032] Based on the GPS log data from all clients, the total number of coordinate points for each client within the coverage area of each AP is calculated.
[0033] Based on the total number of coordinate points of the GPS log data of different clusters within the AP coverage area, the AP coverage area is bound to the cluster with the largest number of coordinate points.
[0034] In one possible implementation, determining the coverage area of a cluster based on the locations traversed by the historical trajectories of all clients in each cluster, and binding the cluster FL model to a specific geographic location, further includes:
[0035] After obtaining the coverage of each cluster, federated learning training begins. In each round of training, based on the sampling ratio of the clients, a set of sampling clients is selected from the clients within the coverage of the same cluster, and the current cluster model of each cluster is sent to all sampling clients of each cluster.
[0036] The sampling client performs the training task, that is, it uses local data to update the cluster model locally, thereby obtaining the local model;
[0037] The local models are aggregated to obtain a new round of cluster models. The above process is repeated to obtain the optimal cluster model for each cluster.
[0038] Secondly, this application provides a cluster federated learning device based on mobile scenarios, comprising:
[0039] Data acquisition module: used to acquire the historical trajectories of all clients and calculate the trajectory similarity between any two clients based on the historical trajectories;
[0040] Cluster partitioning module: This module is used to group clients with high trajectory similarity into a cluster based on the data collected by the clients and the relationships between the regions they pass through, and also based on the trajectory similarity.
[0041] Model training module: Based on the locations traversed by the historical trajectories of all clients in each cluster, the coverage area of the cluster is determined, and the cluster FL model is bound to a specific geographic location.
[0042] The technical solution provided in this application can achieve at least the following beneficial effects:
[0043] This application provides a cluster federated learning method and apparatus based on mobile scenarios. By taking into account the geographical dispersion of data, i.e., data collected from different geographical regions have different statistical characteristics, corresponding strategies are formulated to reduce the impact of statistical heterogeneity. Furthermore, this application can indirectly calculate the data similarity between clients through the client's mobile trajectory, thereby reducing the risk of privacy leakage to a certain extent. Attached Figure Description
[0044] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0045] Figure 1 This is a flowchart illustrating an exemplary embodiment of a cluster federated learning method based on a mobile scenario.
[0046] Figure 2 This is a schematic diagram illustrating the implementation process of federated learning training in an exemplary embodiment of this application;
[0047] Figure 3 This is a schematic diagram of a federated learning training area shown in an exemplary embodiment of this application;
[0048] Figure 4 This is a schematic diagram of the structure of a federated learning device illustrated in an exemplary embodiment of this application.
[0049] Figure label:
[0050] 1. Data acquisition module; 2. Cluster partitioning module; 3. Model training module. Detailed Implementation
[0051] To make the objectives, implementation methods and advantages of this application clearer, the exemplary implementation methods of this application will be clearly and completely described below with reference to the accompanying drawings of the exemplary embodiments of this application. Obviously, the exemplary embodiments described are only some embodiments of this application, and not all embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0052] It should be noted that the brief descriptions of terms in this application are only for the convenience of understanding the embodiments described below, and are not intended to limit the embodiments of this application. Unless otherwise stated, these terms should be understood in their ordinary and common meaning.
[0053] The terms "first," "second," "third," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar or related objects or entities, and do not necessarily imply a specific order or sequence, unless otherwise specified. It should be understood that such terms are interchangeable where appropriate.
[0054] The terms “comprising” and “having”, and any variations thereof, are intended to cover but not exclude inclusion, for example, a product or device that includes a range of components is not necessarily limited to all of the components that are clearly listed, but may include other components that are not clearly listed or that are inherent to such product or device.
[0055] Before explaining the cluster federated learning method based on mobile scenarios provided in the embodiments of this application, the application scenarios and implementation environment of the embodiments of this application will be introduced first.
[0056] In recent years, intelligent connected vehicles have flourished. Their highly intelligent characteristics rely on various machine learning applications. These applications require data to be aggregated to a central server for model training, which is difficult for client nodes with limited computing and communication resources to achieve and also faces the risk of privacy leaks.
[0057] Federated learning (FL) is a new paradigm that enables distributed collaboration on edge networks to train machine learning models while protecting data privacy. To fully utilize the rich resources at the network edge, client-side edge federated learning (VEFL) is a viable solution.
[0058] However, VEFL's application scenarios differ from traditional FL scenarios in two ways:
[0059] ① Data collected from different geographical regions have different statistical characteristics. Therefore, there is an implicit relationship between the data collected by the client and the regions it has passed through. Data collected by clients in different regions follow different distributions, while data collected in the same region follow highly similar distributions.
[0060] ② The high mobility of the client further exacerbates statistical heterogeneity, that is, the distribution of data collected by the client may change with its location, affecting the model's performance, greatly reducing training efficiency, and making existing federated learning schemes unsuitable for VEFL application scenarios.
[0061] Based on this, this application provides a cluster federated learning method and apparatus for mobile scenarios. 1. It indirectly calculates the similarity of data collected by vehicles by uploading vehicle location trajectories to the server. Considering that location trajectories obtained from different sources may have different formats, we provide similarity measurement methods for two commonly used location trajectory formats. Considering the geographically dispersed data, we utilize vehicle mobility to link the clustered FL model with specific location areas, thereby mitigating the adverse effects of statistical heterogeneity while protecting data privacy.
[0062] Next, the technical solutions of this application and how they solve the aforementioned technical problems will be described in detail through embodiments and in conjunction with the accompanying drawings. The embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. Obviously, the described embodiments are only some, not all, of the embodiments of this application.
[0063] Figure 1 This is a flowchart illustrating an exemplary embodiment of a cluster federated learning method based on a mobile scenario.
[0064] In one exemplary embodiment, such as Figure 1 As shown, a cluster federated learning method based on mobile scenarios is provided. In this embodiment, the method may include the following steps:
[0065] Step 100: Obtain the historical trajectories of all clients, and calculate the trajectory similarity between any two clients based on the historical trajectories;
[0066] Step 200: Based on the data collected by the client and the relationships between the areas they pass through, and according to the trajectory similarity, the clients with high trajectory similarity are grouped into a cluster;
[0067] Step 300: Determine the coverage area of each cluster based on the locations traversed by the historical trajectories of all clients in each cluster, and bind the cluster FL model to a specific geographic location.
[0068] As can be seen, some embodiments of this application use location trajectories to cluster clients, thereby binding the cluster model to a specific geographical area to mitigate the adverse effects of statistical heterogeneity among clients and improve the training efficiency of VEFL.
[0069] The specific technical solution is as follows:
[0070] First, all clients upload their historical movement trajectories to the server, and the server calculates the trajectory similarity between the clients;
[0071] Secondly, the server groups clients with high trajectory similarity into a cluster, allowing clients with similar trajectories to train a shared cluster model.
[0072] In one possible implementation, some embodiments of this application employ the client's location trajectory J i When using (t) to indirectly calculate the data similarity of clients, considering that location trajectories obtained from various sources may have different formats, similarity measures were designed for two commonly used location trajectory formats.
[0073] Based on AP access logs: AP access log data records client access records and received signal strength when accessing the AP in the format of (AP ID, Client ID, RSSI, Timestamp). Clients on the same AP M... u The data collected within the coverage area of ∈M are similarly distributed; therefore, when calculating the similarity between two datasets, the overlapping areas traversed by the two clients and their corresponding dwell times should be considered. From this log data, it can be determined how much each client i stayed at each edge AP M before time t. u Total duration within the coverage area Then the dataset D of client j j (t) and D i The degree of similarity (t) is defined as:
[0074]
[0075] Based on GPS logs: The client can obtain its current coordinates at fixed time intervals using a GPS sensor, thus generating GPS log information. This log can be represented as a sequence of data including the latitude and longitude coordinates traversed by the client and their corresponding timestamps. We employ the Longest Common Subsequence (LCSS) algorithm. For two sequences A and B, the length of the longest common subsequence is defined as:
[0076]
[0077] Here, γ is the threshold for determining whether two coordinate points are approximately similar, and a and b represent the indices of sequences A and B. The position trajectories J of clients i and j are obtained through LCSS. i (t) and J j After determining the length of the longest common subsequence of (t), J i (t) and J j The calculation method of similarity (t)
[0078] The formula is as follows:
[0079] λ i,j (t)=F(J i (t),J j (t)) / min(J i (t),J j (t)), (3)
[0080] At the same time, this similarity also represents the dataset D of clients i and j. i (t) and D j The similarity of (t).
[0081] In one possible implementation, the cluster partitioning method based on location trajectories is as follows:
[0082] After server Θ calculates λ(t) based on the client's location trajectory, the client's location trajectory with high similarity λ i,j (t)≥ρ is assigned to a cluster, thus determining the number of clusters K.
[0083] We assume that data collected from different geographical regions have different statistical characteristics, but data collected within the same AP coverage area have approximately the same statistical characteristics. We then use the location trajectory coverage area and the corresponding dwell time in each cluster to obtain the coverage of all clusters.
[0084] For AP access log format traces, count the time all traces stay within the coverage area of each AP, and based on the total time traces belonging to each cluster stay within the AP coverage area, bind the coverage area of that AP to the cluster with the longest stay time.
[0085] For GPS log format tracks, the number of coordinate points within the coverage area of each AP in all tracks is counted. Based on the total number of coordinate points within the AP coverage area of tracks belonging to each cluster, the coverage area of that AP is bound to the cluster with the most APs. Thus, the location area covered by the tracks of clients in each cluster constitutes the coverage area of that cluster, thereby binding the cluster FL model to a specific geographical region.
[0086] Figure 2 This is a schematic diagram illustrating the implementation process of federated learning training in an exemplary embodiment of this application;
[0087] In one possible implementation, such as Figure 2 As shown, the training strategy for its cluster federated learning method based on mobile scenarios is as follows:
[0088] After obtaining the coverage of each cluster, federated learning training begins. In each training epoch r, the server, based on the client sampling ratio σ, targets clients N located within the coverage area of the same cluster k. k (r) Select a set of sampling clients S k (r) Distribute the latest cluster model w k (r-1), let it perform the training task, client i∈S k (r) Update the cluster model w using the local dataset k (r-1) yields the local model {w i (r)} i∈Sk(r) Then it is sent back to the server, which aggregates the received local model to obtain a new cluster model w. k(r). Following the steps above, each cluster trains its own cluster model independently until the training deadline is reached, the model converges, or the model reaches the expected accuracy.
[0089] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially as indicated, these steps are not necessarily executed in the indicated order. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps.
[0090] Corresponding to the aforementioned embodiment of a cluster federated learning method based on mobile scenarios, and employing the same technical concept, this application also provides an embodiment of a cluster federated learning device based on mobile scenarios.
[0091] Figure 4 This is a schematic diagram of the structure of a federated learning device illustrated in an exemplary embodiment of this application.
[0092] In one exemplary embodiment, such as Figure 4 As shown, this mobile-scenario-based cluster federated learning device includes:
[0093] Data acquisition module 1: used to acquire the historical trajectories of all clients and calculate the trajectory similarity between any two clients based on the historical trajectories;
[0094] Cluster partitioning module 2: It is used to group clients with high trajectory similarity into one cluster based on the data collected by the client and the relationship between the areas they pass through;
[0095] Model Training Module 3: Based on the locations traversed by the historical trajectories of all clients in each cluster, determine the coverage area of the cluster and bind the cluster FL model to a specific geographic location.
[0096] Specific limitations regarding the mobile-scenario-based cluster federated learning device can be found in the limitations of the mobile-scenario-based cluster federated learning method described above, and will not be repeated here. Each module in the aforementioned mobile-scenario-based cluster federated learning device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0097] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0098] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
[0099] Figure 3 This is a schematic diagram of a federated learning training area shown in an exemplary embodiment of this application.
[0100] Working process: In order to make the technical solutions and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below in conjunction with one implementation of this application. Obviously, the described embodiments are some of the embodiments of this application, but not all of them.
[0101] like Figure 3 As shown, suppose there is a square region with a side length of 2km. Figure 3 As shown, four access points (APs) are set up, each covering a square area with a side length of 1km. Within this area, four mobile vehicles participate in the training task as clients in federated learning.
[0102] The first step of the algorithm proposed in this patent is to calculate the similarity of the client's dataset, that is, the similarity between historical trajectories:
[0103] Based on AP access logs: Assuming that the duration of each client's stay within the coverage area of each AP is obtained through AP access logs as shown in Table 2, we refer to the coverage area of AP number x as area x, and the unit of duration is hours.
[0104] Table 2. Client dwell time within the coverage area of each AP (unit: h)
[0105] Area 1 Area 2 Area 3 Area 4 Client 0 1 0 1 0 Client 1 0.5 0 1.5 0 Client 2 0 1.2 0 0.8 Client 3 0 0.8 0 1.2
[0106] From equation (1), it can be calculated that
[0107] Based on GPS logs: Assuming the four clients record GPS coordinates at the same time intervals, the threshold for determining whether two coordinate points are approximately equal is γ = 0.3 km. The specific coordinate sequences are shown in Table 3.
[0108] Table 3. Historical GPS coordinate sequence of the client (unit: km)
[0109] Client 0 (0.5,1.8) (0.5,1.5) (0.5,1.2) (0.6,0.8) (0.6,0.4) Client 1 (1.1,1.5) (0.7,1.5) (0.6,1.2) (0.6,0.9) (0.6,0.6) Client 2 (1.4,0.4) (1.2,0.6) (1.4,0.9) (1.4,1.3) (1.4,1.7) Client 3 (1.6,0.4) (1.8,0.6) (1.6,0.9) (1.6,1.3) (1.6,1.7)
[0110] The longest common subsequence between clients is found using LCSS (equation (2)). The length of the longest common subsequence of the position trajectories of clients 0 and 1, and clients 2 and 3 is 4. The length of the longest common subsequence of the trajectories of other combinations is 0. Then, it can be calculated using equation (3).
[0111] After obtaining λ(0), the next step is to divide the clusters and determine the coverage of each cluster:
[0112] Assuming ρ = 0.7, λ i,j Two clients with a t ≥ 0.7 are assigned to one cluster; clients 0 and 1 are in one cluster, and clients 2 and 3 are in another. Therefore, the number of clusters, K = 2, is determined. The coverage area of each cluster is then determined based on the client's dwell time within the AP's coverage area.
[0113] Based on AP access logs:
[0114] The historical trajectories of clients 0 and 1 in the first cluster are distributed in regions 1 and 3, and the historical trajectories of clients 2 and 3 in the second cluster are distributed in regions 2 and 4. Thus, the coverage areas of the two clusters are regions 1 and 3, and regions 2 and 4, respectively.
[0115] Based on GPS logs:
[0116] The first cluster, namely clients 0 and 1, has the largest total number of coordinate points located in areas 1 and 3. The second cluster, namely clients 2 and 3, has the largest total number of coordinate points located in areas 2 and 4. Therefore, the coverage areas of the two clusters are areas 1 and 3, and areas 2 and 4, respectively.
[0117] Next, the algorithm will independently execute each round of training within the coverage of each cluster.
[0118] In each round r, the client first uploads its current location to the server. Assuming the last column of Table 3 represents the current locations of all clients, with clients 0 and 1 within the coverage area of the first cluster, and clients 2 and 3 within the coverage area of the second cluster, then N... 1 (r) = {0, 1}, N 2 (r) = {2, 3}. Since the number of clients in the cluster is small, we set the client sampling ratio σ = 100%, then S 1 (r)=N 1 (r), S 2 (r)=N 2 (r).
[0119] Then, following the traditional federated learning training process, the server will distribute the various cluster models w k (r-1) is sent to the respective set of sampling clients S. k (r), the sampling client uses the collected data to update the model locally and then updates the new local model. Uploaded to the server, the server handles these local models After aggregation, a new cluster model w is obtained. k (r).
[0120] The above process is executed independently and in a loop within each cluster until the training termination condition is met, such as reaching the training deadline, cluster model convergence, or the model reaching the expected accuracy.
Claims
1. A cluster federated learning method based on mobile scenarios, characterized in that, include: Obtain the historical trajectories of all clients, and calculate the trajectory similarity between any two clients based on the historical trajectories; Based on the data collected by the client and the connections between the areas they pass through, and based on the trajectory similarity, clients with high trajectory similarity are grouped into a cluster. Based on the locations traversed by the historical trajectories of all clients in each cluster, the coverage area of the cluster is determined, and the cluster FL model is bound to a specific geographic location; The step of obtaining the historical trajectories of all clients and calculating the trajectory similarity between any two clients based on the historical trajectories further includes: Obtain AP access log data from the client, including access records and received signal strength when the client accesses the AP; Since the data collected by clients within the coverage area of the same AP has a similar distribution, when calculating the similarity of the AP access log data between clients, it is necessary to consider the overlapping areas traversed by different clients and the corresponding dwell time. Based on the AP access log data, the coverage area M of each client i at each edge AP before time t can be obtained. u Total duration within And calculate the similarity between different clients.
2. The cluster federated learning method based on mobile scenarios as described in claim 1, characterized in that, The similarity between the AP access log data of two clients i and j is defined as follows: (1) Where i and j are the client IDs; M is the set of all APs, and also represents the set of coverage areas of all APs; M u It is the AP number; Before time t, client i is in AP M u The total time spent within the coverage area.
3. The cluster federated learning method based on mobile scenarios as described in claim 2, characterized in that, The process of grouping clients based on the relationships between data collected by clients and the areas they traverse, and grouping clients with high trajectory similarity into a cluster, further includes: Based on the AP access log data of all clients, the time each client spends within the coverage area of each AP is calculated. Based on the total duration of AP access log data from different clusters within the AP coverage area, the AP coverage area is bound to the cluster with the longest dwell time.
4. The cluster federated learning method based on mobile scenarios as described in claim 1, characterized in that, The step of obtaining the historical trajectories of all clients and calculating the trajectory similarity between any two clients based on the historical trajectories further includes: The GPS log data is obtained by acquiring the client's current coordinates at fixed time intervals. The GPS log data includes the client's latitude and longitude coordinates and the corresponding timestamps, represented as a set of sequence data; Based on the longest common subsequence algorithm, the length of the longest common subsequence of the GPS log data from different clients is obtained, and the similarity between different clients is calculated.
5. The cluster federated learning method based on mobile scenarios as described in claim 4, characterized in that, For the GPS log data from the two clients, the length of the longest common subsequence is defined as: (2) in, It is the threshold for determining whether two coordinate points are approximately similar, where a and b represent the indices of sequences A and B.
6. The cluster federated learning method based on mobile scenarios as described in claim 5, characterized in that, The location trajectories J of the two clients i and j i (t) and J j The similarity between (t) is calculated as follows: (3) Among them, J i (t) represents the trajectory data of client i before time t.
7. The cluster federated learning method based on mobile scenarios as described in claim 1, characterized in that, The process of grouping clients based on the relationships between data collected by clients and the areas they traverse, and grouping clients with high trajectory similarity into a cluster, further includes: Based on GPS log data from all clients, the total number of coordinate points for each client within the coverage area of each AP is counted. Based on the total number of coordinate points of the GPS log data of different clusters within the AP coverage area, the AP coverage area is bound to the cluster with the largest number of coordinate points.
8. The cluster federated learning method based on mobile scenarios as described in claim 1, characterized in that, The step of determining the coverage area of a cluster based on the locations traversed by the historical trajectories of all clients in each cluster, and binding the cluster FL model to a specific geographic location, further includes: After obtaining the coverage of each cluster, federated learning training begins. In each round of training, based on the sampling ratio of the clients, a set of sampling clients is selected from the clients within the coverage of the same cluster, and the current cluster model of each cluster is sent to all sampling clients of each cluster. The sampling client performs the training task, that is, it uses local data to update the cluster model locally, thereby obtaining the local model; The local models are aggregated to obtain a new round of cluster models. The above process is repeated to obtain the optimal cluster model for each cluster.
9. A cluster federated learning device based on mobile scenarios, the device being implemented based on the cluster federated learning method based on mobile scenarios as described in any one of claims 1 to 8, characterized in that, The device includes: Data acquisition module: used to acquire the historical trajectories of all clients and calculate the trajectory similarity between any two clients based on the historical trajectories; Cluster partitioning module: This module is used to group clients with high trajectory similarity into a cluster based on the data collected by the clients and the relationships between the regions they pass through, and also based on the trajectory similarity. Model training module: Based on the locations traversed by the historical trajectories of all clients in each cluster, the coverage area of the cluster is determined, and the cluster FL model is bound to a specific geographic location.
Citation Information
Patent Citations
User similarity calculation method and device based on sweeping robot, and storage medium
CN115456057A