Cluster federated learning method and device based on mobile scene

By using client historical trajectories to calculate trajectory similarity and clustering in VEFL application scenarios, the problems of statistical heterogeneity and privacy leakage in VEFL are solved, achieving more efficient model training and data privacy protection.

CN119337129AActive Publication Date: 2025-01-21TONGJI UNIV
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202311213107.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-19
Publication Date
2025-01-21
Estimated Expiration
2043-09-19

AI Technical Summary

Technical Problem

The existing federated learning method is difficult to adapt to client-edge federated learning (VEFL) application scenarios, especially when the data has geographic dispersion and high client mobility, resulting in an increase in statistical heterogeneity, affecting model effectiveness and training. efficiency.

Method used

By obtaining the historical trajectories of clients, calculating trajectory similarity, clients with similar trajectories are gathered into a cluster, and the cluster model is bound to a specific geographical area to alleviate statistical heterogeneity and protect data privacy.

Benefits of technology

It reduces the impact of statistical heterogeneity on model performance, improves VEFL training efficiency, and reduces the risk of privacy leakage to a certain extent.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119337129A_ABST
    Figure CN119337129A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of automobile auxiliary driving, in particular to a cluster federated learning method and device based on a mobile scene, and can solve the problem that an existing federated learning method cannot well adapt to a VEFL application scene to a certain extent. The method comprises the following steps: acquiring historical tracks of all clients, and calculating track similarity between any two clients according to the historical tracks; carrying out collection according to the trajectory similarity based on data collected by the clients and the relation between the regions through which the clients pass, and collecting the clients with high trajectory similarity into a cluster; and determining the coverage range of the cluster according to the positions where the historical tracks of all the clients in each cluster pass, and binding the cluster FL model with a specific geography.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of automobile assisted driving technology, and more specifically, to a cluster federated learning method and device based on mobile scenarios. Background Art

[0002] In recent years, smart connected vehicles have flourished. Their highly intelligent features rely on various machine learning applications. These applications require data to be aggregated to a central server for model training, which is difficult to achieve for client nodes with limited computing and communication resources, and also faces the risk of privacy leakage.

[0003] Federated learning (FL) is a new paradigm that enables distributed collaboration on edge networks to train machine learning models and protect data privacy. In order to make full use of the rich resources at the edge of the network, client-side edge federated learning (VEFL) is a feasible solution.

[0004] However, the application scenario of VEFL is different from the traditional FL scenario in two aspects: ① Data collected from different geographical areas have different statistical characteristics. Therefore, there is an implicit connection between the data collected by the client and the area it passes through. The data collected by clients in different regions follow different distributions, while the data collected in the same region follows a highly similar distribution; ② The high mobility of the client further aggravates the statistical heterogeneity, that is, the distribution of data collected by the client may change with its location, affecting the effect of the model and greatly reducing the training efficiency, making the existing federated learning scheme not well adapted to the VEFL application scenario. Summary of the invention

[0005] In order to solve the problem that the existing federated learning method cannot adapt well to the VEFL application scenario, the present application provides a cluster federated learning method and device based on a mobile scenario.

[0006] The embodiment of the present application is implemented as follows:

[0007] In a first aspect, the present application provides a cluster federated learning method based on a mobile scenario, comprising:

[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 relationship between the data collected by the client and the area it passes through, the clients with high trajectory similarity are grouped into one cluster;

[0010] According to the locations of the historical trajectories of all clients in each cluster, the coverage of the cluster is determined, and the cluster FL model is bound to a specific geographic location.

[0011] In a possible implementation, the acquiring of historical trajectories of all clients and calculating the trajectory similarity between any two clients according to the historical trajectories further includes:

[0012] Acquire AP access log data of the client, wherein the AP access log data includes access records and received signal strength when the client accesses the AP;

[0013] Based on the similarity of data distribution collected by clients within the coverage of the same AP, when calculating the similarity of the AP access log data between clients, it is necessary to consider the overlapping areas and corresponding stay times passed by different clients;

[0014] According to the AP access log data, it is possible to obtain the coverage range M of each edge AP where each client i stays before time t. u Total time in And calculate the similarity between different clients.

[0015] In a possible implementation, the similarity between the AP access log data of two clients i and j is defined as:

[0016]

[0017] Where i and j are the client numbers; M is the set of all APs, and also represents the set of all AP coverage areas; M u is the AP number; is the number of clients i on AP M before time t. u The total time spent within the coverage area.

[0018] In a possible implementation, the data collected by the client and the relationship between the areas it passes through are grouped according to the trajectory similarity, and the clients with high trajectory similarity are grouped into one cluster, further comprising:

[0019] Based on the AP access log data of all clients, count the time each client stays within the coverage of each AP;

[0020] According to the total length of time that the AP access log data of different clusters stay in the AP coverage area, the AP coverage area is bound to the cluster with the longest stay time.

[0021] In a possible implementation, the acquiring of historical trajectories of all clients and calculating the trajectory similarity between any two clients according to the historical trajectories further includes:

[0022] The current coordinates of the client are obtained through GPS at fixed time intervals to obtain GPS log data;

[0023] The GPS log data includes the latitude and longitude coordinates of the client and the corresponding timestamp, expressed 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 of different clients is obtained, and the similarity between different clients is calculated.

[0025] In a possible implementation, for the GPS log data of two clients, the length of the longest common subsequence is defined as:

[0026]

[0027] Among them, γ is the threshold for determining whether two coordinate points are similar, and a and b represent the indexes of sequences A and B.

[0028] In a possible implementation, the position trajectories J of the two clients i and j are 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);

[0031] Among them, J i (t) is the trajectory data of client i before time t.

[0032] In a possible implementation, the data collected by the client and the relationship between the areas it passes through are grouped according to the trajectory similarity, and the clients with high trajectory similarity are grouped into one cluster, further comprising:

[0033] Based on the GPS log data of all clients, count the total number of coordinate points of each client within the coverage of each AP;

[0034] According to 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.

[0035] In a possible implementation, determining the coverage of each cluster according to the locations of the historical trajectories of all clients in each cluster and binding the cluster FL model to a specific geographic location further includes:

[0036] After obtaining the coverage of each cluster, the federated learning training begins. In each round of training, a set of sampled clients is selected from the clients within the coverage of the same cluster according to the sampling ratio of the clients, and the current cluster model of each cluster is sent to all sampled clients of each cluster.

[0037] The sampling client performs a training task, that is, locally updates the cluster model using local data, thereby obtaining a local model;

[0038] The local models are aggregated to obtain a new round of cluster models, and the above process is repeated to obtain the optimal cluster model for each cluster.

[0039] In a second aspect, the present application provides a cluster federated learning device based on a mobile scenario, comprising:

[0040] Data collection module: used to obtain the historical trajectories of all clients, and calculate the trajectory similarity between any two clients based on the historical trajectories;

[0041] Clustering module: used to group clients with high trajectory similarity into one cluster based on the relationship between the data collected by the client and the area it passes through, and the similarity of the trajectory;

[0042] Model training module: Determine the coverage of each cluster based on the locations of the historical trajectories of all clients in each cluster, and bind the cluster FL model to a specific geographic location.

[0043] The technical solution provided by this application can at least achieve the following beneficial effects:

[0044] The present application provides a cluster federated learning method and device based on mobile scenarios. By taking into account the geographical dispersion of data, that is, data collected from different geographical areas have different statistical characteristics, corresponding strategies are formulated to reduce the impact of statistical heterogeneity. In addition, the present application can indirectly calculate the data similarity between clients through the mobile trajectory of the clients, thereby reducing the risk of privacy leakage to a certain extent. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following is a brief introduction to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0046] Figure 1 It is a flowchart of a cluster federated learning method based on a mobile scenario shown in an exemplary embodiment of the present application;

[0047] Figure 2 is a schematic diagram of the implementation process of federated learning training shown in an exemplary embodiment of the present application;

[0048] Figure 3 is a schematic diagram of a federated learning training area shown in an exemplary embodiment of the present application;

[0049] Figure 4 It is a structural diagram of a federated learning device shown in an exemplary embodiment of the present application.

[0050] Reference numerals:

[0051] 1. Data collection module; 2. Cluster division module; 3. Model training module. DETAILED DESCRIPTION

[0052] In order to make the purpose, implementation mode and advantages of the present application clearer, the exemplary implementation mode of the present application will be clearly and completely described below in conjunction with the drawings in the exemplary embodiments of the present application. Obviously, the described exemplary embodiments are only part of the embodiments of the present application, not all of the embodiments. It should be understood that the specific embodiments described here are only used to explain the present application and are not used to limit the present application.

[0053] It should be noted that the brief description of terms in this application is only for the convenience of understanding the embodiments described below, and is not intended to limit the embodiments of this application. Unless otherwise specified, these terms should be understood according to their common and usual meanings.

[0054] The terms "first", "second", "third", etc. in the specification and claims of this application and the above drawings are used to distinguish similar or similar objects or entities, and do not necessarily mean to limit a specific order or sequence, unless otherwise noted. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances.

[0055] The terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover but not exclude inclusion, for example, a product or device comprising a list of components is not necessarily limited to all the components expressly listed but may include other components not expressly listed or inherent to such product or device.

[0056] Before explaining the cluster federated learning method based on mobile scenarios provided in the embodiment of the present application, the application scenario and implementation environment of the embodiment of the present application are first introduced.

[0057] In recent years, smart connected vehicles have flourished. Their highly intelligent features rely on various machine learning applications. These applications require data to be aggregated to a central server for model training, which is difficult to achieve for client nodes with limited computing and communication resources, and also faces the risk of privacy leakage.

[0058] Federated learning (FL) is a new paradigm that enables distributed collaboration on edge networks to train machine learning models and protect data privacy. In order to make full use of the rich resources at the edge of the network, client-side edge federated learning (VEFL) is a feasible solution.

[0059] However, the application scenarios of VEFL are different from traditional FL scenarios in two aspects:

[0060] ① Data collected from different geographic regions have different statistical characteristics. Therefore, there is an implicit connection between the data collected by the client and the region it passes through. Data collected by clients in different regions follow different distributions, while data collected in the same region follows a highly similar distribution.

[0061] ② The high mobility of the client further exacerbates the statistical heterogeneity, that is, the distribution of data collected by the client may change with its location, affecting the effect of the model, greatly reducing the training efficiency, and making the existing federated learning scheme not well adapted to the VEFL application scenario.

[0062] Based on this, the present application provides a cluster federated learning method and device based on mobile scenarios. 1. The similarity of data collected by vehicles is indirectly calculated by uploading the location trajectory of the vehicle to the server. Considering that the location trajectories obtained from different sources may have different formats, we provide similarity measurement methods for two commonly used location trajectory formats respectively. Considering the geographically dispersed data, the mobility of vehicles is utilized to associate the cluster FL model with a specific location area, thereby protecting data privacy while mitigating the adverse effects of statistical heterogeneity.

[0063] Next, the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems will be described in detail through embodiments and in combination with the accompanying drawings. The embodiments may 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 part of the embodiments of the present application, not all of them.

[0064] Figure 1 It is a flowchart of a cluster federated learning method based on a mobile scenario shown in an exemplary embodiment of the present application.

[0065] In an exemplary embodiment, Figure 1 As shown, a cluster federated learning method based on a mobile scenario is provided. In this embodiment, the method may include the following steps:

[0066] Step 100: Obtain historical trajectories of all clients, and calculate the trajectory similarity between any two clients based on the historical trajectories;

[0067] Step 200: Based on the relationship between the data collected by the client and the area it passes through, the clients with high trajectory similarity are grouped into a cluster;

[0068] Step 300: Determine the coverage of each cluster based on the locations of the historical trajectories of all clients in the cluster, and bind the cluster FL model to a specific geographic location.

[0069] It can be seen that some embodiments of the present application cluster clients by location trajectories, thereby binding the cluster model to a specific geographical area to alleviate the adverse effects of statistical heterogeneity between clients and improve the VEFL training efficiency.

[0070] The specific technical solution is:

[0071] First, all clients upload their historical movement trajectories to the server, and the server calculates the trajectory similarity between clients;

[0072] Secondly, the server divides clients with high trajectory similarity into a cluster, allowing clients with similar trajectories to train a common cluster model.

[0073] In a possible implementation, some embodiments of the present application use the client's location trajectory J i (t) is used to indirectly calculate the client data similarity, considering that the location trajectories obtained from various sources may have different formats, similarity metrics are designed for two commonly used location trajectory formats.

[0074] Based on AP access log: AP access log data records the access record and received signal strength when the client accesses the AP in the format of (AP ID, client ID, RSSI, timestamp). u The data collected within the coverage of ∈M are similarly distributed, so when calculating the similarity between the two datasets, the overlapping areas and corresponding stay times of the two clients should be considered. From this log data, it can be obtained that each client i stays in each edge AP M before time t u Total time within the coverage area Then the dataset D of client j is j (t) and D i (t) The degree of similarity is defined as:

[0075]

[0076] Based on GPS log: The client can obtain the current coordinates through the GPS sensor at a fixed time interval, thereby obtaining GPS log information. The log can be represented as a set of sequence data including the longitude and latitude coordinates passed by the client and the corresponding timestamp. We use the longest common subsequence algorithm (LCSS). For two sets of sequences A and B, the length of the longest common subsequence is defined as:

[0077]

[0078] Among them, γ is the threshold for determining the approximation of two coordinate points, and a and b represent the indexes of sequences A and B. The position trajectory J of clients i and j is obtained through LCSS i (t) and J j (t) after the length of the longest common subsequence, J i (t) and J j The calculation method of the similarity of (t)

[0079] The formula is as follows:

[0080] λ i,j (t) = F(J i (t),J j (t)) / min(J i (t),J j (t)), (3).

[0082] At the same time, the similarity also represents the dataset D of clients i and j i (t) and D j (t) similarity.

[0083] In a possible implementation, the clustering method based on location trajectories is specifically as follows:

[0084] After the server Θ calculates λ(t) based on the client's location trajectory, the client location trajectory λ with high similarity i,j (t) ≥ ρ is divided into a cluster, thus the number of clusters K is also determined.

[0085] We assume that data collected from different geographic areas have different statistical characteristics, but data collected within the same AP coverage have approximately the same statistical characteristics. We thus count the area covered by the location trajectory in each cluster and the corresponding stay time to obtain the coverage of all clusters.

[0086] For AP access log format trajectories, count the time all trajectories stay within the coverage of each AP. Based on the total time that trajectories belonging to each cluster stay within the coverage of the AP, bind the coverage of the AP to the cluster with the longest stay time.

[0087] For the trajectory in GPS log format, count the number of coordinate points in all trajectories that are within the coverage of each AP, and bind the coverage of the AP to the cluster with the largest number of coordinate points in the trajectories belonging to each cluster. Thus, the location area covered by the trajectories of the clients in each cluster constitutes the coverage of the cluster, so that the cluster FL model is bound to a specific geographical area.

[0088] Figure 2 is a schematic diagram of the implementation process of federated learning training shown in an exemplary embodiment of the present application;

[0089] In one possible implementation, Figure 2 As shown in the figure, the training strategy of the cluster federated learning method based on mobile scenarios is:

[0090] After obtaining the coverage of each cluster, the federated learning training begins. In each training round r, the server samples the client N in the coverage of the same cluster k according to the client sampling ratio σ. k (r) Select a set of sampled client sets S k (r) Issue 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) Get the local model {w i (r)} i∈Sk(r) Then it is sent back to the server, and the server aggregates the received local models to obtain the new cluster model w k(r). According to the above steps, each cluster independently trains its own cluster model until the training deadline is reached, the model converges, or the model reaches the expected accuracy.

[0091] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the instructions, these steps are not necessarily executed in sequence according to the order of the instructions. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the above-mentioned embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of the steps or stages in other steps.

[0092] Corresponding to the aforementioned embodiment of a cluster federated learning method based on a mobile scenario, adopting the same technical concept, the present application also provides an embodiment of a cluster federated learning device based on a mobile scenario.

[0093] Figure 4 It is a structural diagram of a federated learning device shown in an exemplary embodiment of the present application.

[0094] In an exemplary embodiment, Figure 4 As shown, the cluster federated learning device based on the mobile scenario includes:

[0095] Data collection module 1: used to obtain the historical trajectories of all clients, and calculate the trajectory similarity between any two clients based on the historical trajectories;

[0096] Clustering module 2: used to group clients with high trajectory similarity into one cluster based on the relationship between the data collected by the client and the area it passes through and the similarity of the trajectory;

[0097] Model training module 3: Determine the coverage of each cluster based on the locations of the historical trajectories of all clients in each cluster, and bind the cluster FL model to a specific geographic location.

[0098] For the specific definition of the cluster federated learning device based on mobile scenarios, please refer to the definition of the cluster federated learning method based on mobile scenarios above, which will not be repeated here. Each module in the above-mentioned cluster federated learning device based on mobile scenarios can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0099] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, 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.

[0100] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

[0101] Figure 3 It is a schematic diagram of a federated learning training area shown in an exemplary embodiment of the present application.

[0102] Working process: In order to make the technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in combination with an implementation method of the present application. Obviously, the described embodiment is an embodiment of a part of the present application, not all of the embodiments.

[0103] like Figure 3 As shown, suppose there is a square area with a side length of 2km such as Figure 3 As shown in the figure, four APs are set up, and the coverage range of each AP is a square area with a side length of 1 km. There are also four mobile cars in the entire area as clients in federated learning to participate in the training task.

[0104] The first step of the algorithm proposed in this patent is to calculate the similarity of the client's data set, that is, the similarity between historical trajectories:

[0105] Based on AP access logs: Assume that the duration that each client stays within the coverage of each AP is obtained through AP access logs as shown in Table 2. We refer to the coverage of AP No. x as area No. x, and the unit of duration is hours.

[0106] Table 2 The time the client stays within the coverage of each AP (unit: h)

[0107] Area 1 Area 2 Area 3 Area 4 Client No. 0 1 0 1 0 Client No. 1 0.5 0 1.5 0 Client No. 2 0 1.2 0 0.8 Client No. 3 0 0.8 0 1.2

[0108] From formula (1), we can calculate:

[0109] Based on GPS logs: Assuming that the four clients record GPS coordinates at the same time interval, the threshold for determining whether two coordinate points are similar is γ = 0.3 km. The specific coordinate sequence is shown in Table 3:

[0110] Table 3 Historical GPS coordinate sequence of the client (unit: km)

[0111] Client No. 0 (0.5,1.8) (0.5,1.5) (0.5,1.2) (0.6,0.8) (0.6,0.4) Client No. 1 (1.1,1.5) (0.7,1.5) (0.6,1.2) (0.6,0.9) (0.6,0.6) Client No. 2 (1.4,0.4) (1.2,0.6) (1.4,0.9) (1.4,1.3) (1.4,1.7) Client No. 3 (1.6,0.4) (1.8,0.6) (1.6,0.9) (1.6,1.3) (1.6,1.7)

[0112] The longest common subsequence between clients is obtained by LCSS (formula (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, formula (3) can be used to calculate:

[0113] After obtaining λ(0), the next step is to divide the clusters and determine the coverage of each cluster:

[0114] Assume ρ = 0.7, λ i,j The two clients with (t)≥0.7 are divided into one cluster, that is, clients 0 and 1 are in one cluster, and clients 2 and 3 are in another cluster, thus determining the number of clusters K=2. Then, the coverage of the cluster is determined based on the time the client stays in the coverage area of ​​the AP.

[0115] Based on AP access log:

[0116] The historical trajectories of clients 0 and 1 in the first cluster are distributed in areas 1 and 3, and the historical trajectories of clients 2 and 3 in the second cluster are distributed in areas 2 and 4. Therefore, the coverage of the two clusters is areas 1 and 3, and areas 2 and 4 respectively.

[0117] Based on GPS logs:

[0118] The first cluster, i.e., clients No. 0 and No. 1, has the largest number of coordinate points located in areas No. 1 and No. 3, and the second cluster, i.e., clients No. 2 and No. 3, has the largest number of coordinate points located in areas No. 2 and No. 4. Therefore, the coverage of the two clusters are areas No. 1 and No. 3, and areas No. 2 and No. 4, respectively.

[0119] Next, the algorithm will loop through each round of training independently within the coverage area of ​​each cluster.

[0120] In each round r, the client first uploads its current location to the server. Assuming that the last column of Table 3 is the location of all current clients, clients 0 and 1 are within the coverage of the first cluster, and clients 2 and 3 are within the coverage 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).

[0121] Afterwards, according to the traditional federated learning training process, the server will k (r-1) sent to their respective sampling client set S k (r), the sampling client uses the collected data to update the model locally and then sends the new local model Upload to the server, the server will After aggregation, we get the new cluster model w k (r).

[0122] The above process is executed independently in each cluster in a loop until the end condition of training is reached, such as reaching the training deadline, cluster model convergence, or the model reaches 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 relationship between the data collected by the client and the area it passes through, the clients with high trajectory similarity are grouped into one cluster; According to the locations of the historical trajectories of all clients in each cluster, the coverage of the cluster is determined, and the cluster FL model is bound to a specific geographic location.

2. The cluster federated learning method based on mobile scenarios as claimed in claim 1, characterized in that: The obtaining of historical trajectories of all clients and calculating the trajectory similarity between any two clients according to the historical trajectories further includes: Acquire AP access log data of the client, wherein the AP access log data includes access records and received signal strength when the client accesses the AP; Based on the similarity of data distribution collected by clients within the coverage of the same AP, when calculating the similarity of the AP access log data between clients, it is necessary to consider the overlapping areas and corresponding stay times passed by different clients; According to the AP access log data, it is possible to obtain the coverage range M of each edge AP where each client i stays before time t. u Total time in And calculate the similarity between different clients.

3. The cluster federated learning method based on mobile scenarios as claimed in claim 2, characterized in that: The similarity between the AP access log data of two clients i and j is defined as: Where i and j are the client numbers; M is the set of all APs, and also represents the set of all AP coverage areas; M u is the AP number; is the number of clients i on AP M before time t. u The total time spent within the coverage area.

4. The cluster federated learning method based on mobile scenarios as claimed in claim 3, characterized in that: The method is based on the relationship between the data collected by the client and the area it passes through, and is grouped according to the trajectory similarity, and the clients with high trajectory similarity are grouped into a cluster, further comprising: Based on the AP access log data of all clients, count the time each client stays within the coverage of each AP; According to the total length of time that the AP access log data of different clusters stay in the AP coverage area, the AP coverage area is bound to the cluster with the longest stay time.

5. The cluster federated learning method based on mobile scenarios as claimed in claim 1, characterized in that: The obtaining of historical trajectories of all clients and calculating the trajectory similarity between any two clients according to the historical trajectories further includes: The current coordinates of the client are obtained through GPS at fixed time intervals to obtain GPS log data; The GPS log data includes the latitude and longitude coordinates of the client and the corresponding timestamp, expressed 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 of different clients is obtained, and the similarity between different clients is calculated.

6. The cluster federated learning method based on mobile scenarios as claimed in claim 5, characterized in that: For the GPS log data of two clients, the length of the longest common subsequence is defined as: Among them, γ is the threshold for determining whether two coordinate points are similar, and a and b represent the indexes of sequences A and B.

7. The cluster federated learning method based on mobile scenarios as claimed in claim 5, characterized in that: The position trajectories J of the two clients i and j i (t) and J j The similarity between (t) is calculated as follows: Among them, J i (t) is the trajectory data of client i before time t.

8. The cluster federated learning method based on mobile scenarios as claimed in claim 1, characterized in that: The method is based on the relationship between the data collected by the client and the area it passes through, and is grouped according to the trajectory similarity, and the clients with high trajectory similarity are grouped into a cluster, further comprising: Based on the GPS log data of all clients, count the total number of coordinate points of each client within the coverage of each AP; According to 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.

9. The cluster federated learning method based on mobile scenarios as claimed in claim 1, characterized in that: The method further includes: determining the coverage of the cluster according to the locations of the historical trajectories of all clients in each cluster, and binding the cluster FL model to a specific geographic location. After obtaining the coverage of each cluster, the federated learning training begins. In each round of training, a set of sampled clients is selected from the clients within the coverage of the same cluster according to the sampling ratio of the clients, and the current cluster model of each cluster is sent to all sampled clients of each cluster. The sampling client performs a training task, that is, locally updates the cluster model using local data, thereby obtaining a local model; The local models are aggregated to obtain a new round of cluster models, and the above process is repeated to obtain the optimal cluster model for each cluster.

10. A cluster federated learning device based on a mobile scenario, comprising: Data collection module: used to obtain the historical trajectories of all clients, and calculate the trajectory similarity between any two clients based on the historical trajectories; Clustering module: used to group clients with high trajectory similarity into one cluster based on the relationship between the data collected by the client and the area it passes through, and the similarity of the trajectory; Model training module: Determine the coverage of each cluster based on the locations of the historical trajectories of all clients in each cluster, and bind the cluster FL model to a specific geographic location.

Citation Information

Patent Citations

  • Hotspot region popularity analysis method based on indoor moving object track analysis

    CN107071719A

  • Mobile perception caching method based on asynchronous federated learning

    CN113283177A

  • Pedestrian trajectory prediction method, apparatus and device, and storage medium

    CN114155270A

  • Training method of machine learning model, control method of unmanned vehicle and unmanned vehicle

    CN115130680A

  • User similarity calculation method and device based on sweeping robot, and storage medium

    CN115456057A