A federated learning client selection method for a heterogeneous intelligent transportation system

By modeling the client selection as a two-dimensional complete knapsack problem and employing heterogeneous perceptual clustering, the problem of low training efficiency in federated learning in heterogeneous intelligent transportation systems is solved, achieving faster model convergence and resource optimization within the deadline.

CN116011589BActive Publication Date: 2025-12-16GUANGDONG UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310035218.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-10
Publication Date
2025-12-16
Estimated Expiration
2043-01-10

AI Technical Summary

Technical Problem

In heterogeneous intelligent transportation systems, existing federated learning methods suffer from low training efficiency, long model update times, high communication latency and overhead due to heterogeneous client environments and limited communication resources, making it difficult to converge effectively within the training deadline.

Method used

The client selection problem is modeled as a two-dimensional complete knapsack problem. Clients are clustered using a heterogeneous perception clustering method, and clients with suitable computing and communication capabilities are selected during training to maximize the number of clients participating in training within the deadline. Dynamic programming is used to optimize client selection.

Benefits of technology

It improves training efficiency, shortens model update time, increases convergence speed within the same time frame, and optimizes communication resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116011589B_ABST
    Figure CN116011589B_ABST
Patent Text Reader

Abstract

The application discloses a kind of federal learning client selection methods and systems for heterogeneous intelligent transportation system, comprising the following steps: S1, establish global prediction model based on federal learning protocol, model client selection problem as two-dimensional complete knapsack problem;S2, obtain the CPU execution frequency of all clients and the physical distance between client and edge server;S3, according to the CPU execution frequency of client and the physical distance with edge server, the client is clustered by heterogeneous perception clustering method;S4, the clustering result obtained is maximized by client selection method The number of clients participating in training within the deadline.Compared with the prior art, by increasing the number of clients participating in training within the deadline, the training efficiency and prediction accuracy can be improved within a limited time.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of federated learning client selection strategy, and more particularly, to a federated learning client selection method for a heterogeneous intelligent transportation system. BACKGROUND

[0002] In the field of transportation, the intelligent transportation system (ITS) that combines deep learning with traditional transportation systems has become an important part of smart cities and is widely used. Intelligent transportation systems have made many significant achievements with the help of machine learning and deep learning technologies. Among them, traffic flow prediction (TFP) is an essential factor for a successful ITS. TFP is to predict future traffic flow by using historical traffic flow data, thereby providing such traffic flow information. For the traffic flow prediction task, the performance of neural network models depends heavily on the massive labeled data collected in a data center or server. Unfortunately, in real-world traffic scenarios, the collected data is often privacy-sensitive. For example, surveillance cameras can easily collect the location of individuals and vehicles. If these data are not strictly protected, the interests of the data owners will be harmed. And now people pay more and more attention to privacy issues, so it is not practical to directly use these private data for training. Therefore, privacy protection is very important for TFP applications in ITS. To solve the above privacy problem, McMahan proposed a federated learning protocol. Federated learning (FL) allows users to obtain the benefits of models trained from rich but sensitive data captured from mobile devices without the need to centrally store these data. Under the FL protocol, at the beginning of each round, the server randomly selects a given proportion of clients and sends the current global algorithm state to these clients (e.g., current model parameters). Then, each selected client performs local computation based on the global state and its local data set, and sends the update to the server. Then, the server applies these updates to its global state. And repeat the process until the desired accuracy or model convergence is reached. In this way, FL can obtain an excellent trained global model without obtaining the sensitive private data of the clients.

[0003] However, due to the heterogeneity of clients and limited communication resources, the direct application of federated learning in the transportation system is not efficient. A large number of heterogeneous clients collect a large amount of training data, and these clients are connected to relatively slow and unreliable networks. On the one hand, for some clients with limited computing resources, the model update process will take longer. Therefore, if we directly apply the existing federated learning solution without considering the characteristics of the heterogeneous clients, the entire training process is inefficient.

[0004] On the other hand, the clients participating in federated learning are likely to be in poor wireless channel conditions. This communication restriction will result in more delays in client model updates and subsequent model aggregation on the server. In addition, when too many clients participate in training, the communication overhead of the underlying communication infrastructure will also increase, thus reducing communication efficiency. However, previous work has shown that by selecting a higher proportion of clients in each round, the time required for the global model to reach the target performance can be reduced. It turns out that if the server can aggregate more updates from the clients, the entire training process will be more efficient. In order to improve the training efficiency of federated learning in intelligent transportation systems and guarantee the quality of the model, a new method is urgently needed to improve the training efficiency.

[0005] The prior art discloses a federated learning algorithm for traffic state estimation, which relates to the field of traffic state supervision, comprising the following steps: S1, constructing an LSTM; S2, sending to each RSU; S3, model training; S4, using an A3C algorithm reinforcement learning algorithm to upload parameters and allocate download strategies; S5, each RSU model selects whether to send model parameters to the server or download the latest model parameters from the server according to the parameter upload and download strategy to continue training; S6, parameter aggregation and cost calculation; S7, repeating steps S2-S6; S8, obtaining the prediction result and the cost. By extracting the time correlation of the traffic state through the long short-term memory (LSTM) model, the traffic flow and road speed, two traffic state indicators, are estimated, solving the problem of unreasonable network resource allocation and uneven client participation in federated learning based traffic state estimation research. The defect of this method is that the time of model training is subject to client heterogeneity and limited communication resources, and for some clients with limited computing resources, the model update process will take longer.

[0006] To this end, in combination with the above needs and the defects of the prior art, the present application proposes a federated learning client selection method for heterogeneous intelligent transportation systems. SUMMARY

[0007] The present application provides a federated learning client selection method for heterogeneous intelligent transportation systems, which takes into account the influence of the distance between the client and the server in the transportation system on the communication time while considering the heterogeneity of computing power, selects clients with appropriate computing and communication capabilities, and makes the training time of the clients participating in training in each round as close as possible. And consider maximizing the number of clients participating in training within the training deadline, converge the model faster under the same training time.

[0008] The primary object of the present application is to solve the above technical problems, and the technical solution of the present application is as follows:

[0009] The first aspect of this invention provides a method for selecting federated learning clients for heterogeneous intelligent transportation systems, the method comprising the following steps:

[0010] S1. Establish a global prediction model based on the federated learning protocol, and model the client selection problem as a two-dimensional complete knapsack problem.

[0011] S2. Obtain the CPU execution frequency of all clients and the physical distance between the clients and the edge server.

[0012] S3. Based on the client's CPU execution frequency and physical distance from the edge server, the clients are clustered using a heterogeneous perception clustering method.

[0013] S4. Maximize the number of clients participating in training within the deadline by using the client selection method to obtain the clustering results.

[0014] Furthermore, the global prediction model is trained by selecting a group of clients in each training round. Based on the federated learning protocol, during the training process, the server sends the current global algorithm state to these clients. These clients perform local calculations based on the global state and their local datasets, and send updates to the server. The server applies the updates to the global prediction model to complete one training round.

[0015] In the transportation system, due to heterogeneous clients and potentially poor wireless channel conditions, it is necessary to maximize the number of clients participating in training within the deadline to improve the training efficiency of the global prediction model.

[0016] Furthermore, modeling the client selection problem as a two-dimensional complete knapsack problem specifically involves: using the deadline and the number of training rounds as the two capacities of the knapsack, representing each type of client set as each item, and using the maximum training time in the client set and the number of clients in the client set as the value that can be obtained and the cost that needs to be paid for choosing that client set, respectively. This modeling of the client selection problem as a hybrid of the complete knapsack problem and the two-dimensional knapsack problem results in the two-dimensional complete knapsack problem.

[0017] Furthermore, the heterogeneous sensing clustering method is a K-means-based heterogeneous sensing clustering method.

[0018] Furthermore, step S2 specifically involves: using Representing N clients, the obtained client information is denoted by I = {{ω1, d1}, ..., {ω N d N} represents, where ω i Indicates the CPU execution frequency of client i, d i This indicates the physical location of the client and the server.

[0019] Further, the step S3 is specifically:

[0020] S31, in the initialization stage, a matrix clusterAssign of N x 2 is created for storing the allocation of each client, K clients in C are randomly selected as initial center points, a judgment variable clusterChanged is created for indicating whether the cluster center point is changed, where True indicates that the center point is changed, Fault indicates that there is no change, a variable minDist is created for indicating the current minimum distance, and is assigned as ∞.

[0021] S32, the Euclidean distance between each client C i and the center point j is calculated and assigned to the variable distJI, and it is judged whether the variable distJI is greater than the variable minDist, if yes, the client C i is assigned to the center point j, otherwise the matrix clusterAssign is updated to obtain the initial K client set.

[0022] S33, according to the information of each client in each client set, the center point is recalculated, and then the assignment process S32 is repeated until the assignment result no longer changes, and the K client set is obtained.

[0023] Further, in the step S32, whether the variable distJI is greater than the variable minDist is specifically: if the value of the variable distJI is greater than the value of minDist, the value of distJI is assigned to minDist, and the client C i is assigned to the center point j; if the assignment result of the current client C i is different from the existing allocation in the matrix clusterAssign, it means that the assignment has been changed, then the clusterChanged is assigned as True, and then the clusterAssign is updated to obtain the initial K client set.

[0024] Further, in the step S4, the total training round is represented as T , and the training cutoff time is represented as T deadline , and the process of the step S4 is specifically:

[0025] S41, in the initialization stage, a list m of length K+1 is created for storing the maximum training time of each client set, a list n of length K+1 is created for storing the number of each client set, and a two-dimensional array F is created for recording the client selection process.

[0026] ​S42, calculate the maximum training time of the K client sets obtained in step S3 and the number of clients in the client set, and store them in list m and list n.

[0027] S43, use dynamic programming to calculate the maximum number of clients participating in training according to list m and list n.

[0028] Further, in step S42, the maximum training time of the client set Θ k is calculated as follows:

[0029]

[0030] The maximum number of client sets Θ k participating in training is calculated as follows:

[0031]

[0032] Where T i is the training time of the client C i , M i is the bit size of the local model W i of the client C i , B is the bandwidth size, p i is the transmission power of the client C i , o i is the Rayleigh fading parameter of the client C i , N0 is the Gaussian white noise, θ is the CPU cycle number required for processing data samples, |D i | is the size of the local data of the client C i used for training.

[0033] The second aspect of the application provides a federated learning client selection system for a heterogeneous intelligent transportation system, comprising a memory and a processor, wherein the memory comprises a federated learning client selection program for a heterogeneous intelligent transportation system, and the federated learning client selection program for a heterogeneous intelligent transportation system is executed by the processor to implement the following steps:

[0034] S1, establish a global prediction model based on a federated learning protocol, and model the client selection problem as a two-dimensional complete knapsack problem.

[0035] S2, obtain the CPU execution frequency of all clients and the physical distance between the clients and the edge server.

[0036] S3, cluster the clients according to the CPU execution frequency of the clients and the physical distance between the clients and the edge server through a heterogeneous perception clustering method.

[0037] S4, the obtained clustering result is maximized by a client selection method within the training time limit.

[0038] Compared with the prior art, the beneficial effects of the technical scheme of the application are:

[0039] The application provides a federated learning client selection method for a heterogeneous intelligent transportation system, which selects clients with appropriate computing and communication capabilities to make the training time of the clients participating in training in each round as close as possible. The number of clients participating in training is maximized within the training time limit, and the model converges faster under the same training time. BRIEF DESCRIPTION OF DRAWINGS

[0040] Figure 1 A flowchart of the federated learning client selection method for the heterogeneous intelligent transportation system of the application.

[0041] Figure 2 A training loss graph of an embodiment of the application.

[0042] Figure 3 A schematic diagram of the federated learning client selection system for the heterogeneous intelligent transportation system of the application. DETAILED DESCRIPTION

[0043] In order to more clearly understand the above-mentioned purposes, features and advantages of the application, the application will be further described in detail below in combination with the drawings and specific embodiments. It should be noted that the embodiments of the application and the features in the embodiments can be combined with each other without conflict.

[0044] In the following description, many specific details are set forth in order to provide a thorough understanding of the application, but the application can also be implemented in other ways different from those described herein, therefore, the scope of protection of the application is not limited by the specific embodiments disclosed below.

[0045] Embodiment 1

[0046] As shown in the drawings, the application provides a federated learning client selection method for a heterogeneous intelligent transportation system, and the method comprises the following steps: Figure 1

[0047] S1, a global prediction model based on a federated learning protocol is established, and a client selection problem is modeled as a two-dimensional complete knapsack problem.

[0048] S2, the CPU execution frequency of all clients and the physical distance between the clients and the edge server are obtained.

[0049] S3, the clients are clustered by a heterogeneous perception clustering method according to the CPU execution frequency of the clients and the physical distance between the clients and the edge server.​

[0050] S4, maximizing the number of clients participating in training within the deadline by a client selection method.

[0051] Further, the global prediction model is trained by selecting a group of clients in each training round, based on a federated learning protocol, in which the server sends the current global algorithm state to the clients, the clients perform local computation based on the global state and their local data set, and send updates to the server, and the server applies the updates to the global prediction model to complete a training round.

[0052] In the traffic system, due to the heterogeneous clients and the possible poor wireless channel conditions, the number of clients participating in training within the deadline needs to be maximized to improve the training efficiency of the global prediction model.

[0053] Further, the client selection problem is modeled as a two-dimensional complete knapsack problem, in which the deadline and the number of training rounds are taken as the two capacities of the knapsack, each client set is taken as each kind of item, the maximum training time in the client set and the number of clients in the client set are taken as the value and the cost of selecting the client set, respectively, and the client selection problem is modeled as a mixture of complete knapsack problem and two-dimensional knapsack problem, i.e., a two-dimensional complete knapsack problem.

[0054] Further, the heterogeneous-aware clustering method is a K-means-based heterogeneous-aware clustering method.

[0055] Further, step S2 is specifically: N clients are represented by I = { {ω1, d1},..., {ωN, dN}}, where ωi represents the CPU execution frequency of client i, and d represents the physical location of the client and the server. N N i i

[0056] Further, step S3 is specifically:

[0057] S31, initialization stage, creating an N x 2 matrix clusterAssign to store the allocation of each client, randomly selecting K clients in C as initial center points, creating a judgment variable clusterChanged to represent whether the cluster center point has changed, where True represents that the center point has changed, and Fault represents that there is no change, and creating a variable minDist to represent the current minimum distance and assigning a value of ∞.

[0058] ​​​​S32, calculate the Euclidean distance between each client C i and the center point j and assign it to variable distJI, judge whether variable distJI is greater than variable minDist, yes, assign value and assign client C i to center point j, otherwise, update matrix clusterAssign to get the initial K client sets.

[0059] S33, recalculate the center point according to the information of each client in each client set, and then repeat the assignment process S32 until the assignment result no longer changes, to get K client sets.

[0060] Further, in step S32, judging whether variable distJI is greater than variable minDist is specifically: if the value of variable distJI is greater than the value of minDist, assign the value of distJI to minDist, and assign client C i to center point j; if the assignment result of current client C i is different from the existing assignment in matrix clusterAssign, it means that the assignment has been changed, then assign clusterChanged to True, and then update clusterAssign to get the initial K client sets.

[0061] Further, in step S4, let T represent the total training rounds, and let T deadline represent the training deadline, and the process of step S4 is specifically:

[0062] S41, initialization stage, create a list m of length K+1 to store the maximum training time of each client set, create a list n of length K+1 to store the number of clients in each client set, and create a two-dimensional array F to record the client selection process.

[0063] S42, calculate the maximum training time of the K client sets obtained in step S3 and the number of clients in the client set, and store them in list m and list n.

[0064] S43, use dynamic programming to calculate the maximum number of clients participating in training according to list m and list n.

[0065] Further, in step S42, the calculation of the maximum training time of client set Θ k is specifically:

[0066]

[0067] The calculation of the maximum number of clients participating in training client set Θ k ​The maximum number of the client C

[0068]

[0069] Wherein, T i is the training time of the client C i , M i is the bit size of the local model W i of the client C i , B is the bandwidth size, p i is the transmission power of the client C i , o i is the Rayleigh fading parameter of the client C i , N0 is the Gaussian white noise, and θ is the CPU cycle number required for processing data samples, |D i | is the size of the local data of the client C i used for training.

[0070] Embodiment 2

[0071] Based on the above embodiment 1, in combination Figure 2 , this embodiment details the training loss process of the federal learning client selection method, and it can be seen that the method has good convergence and stability.

[0072] In a specific embodiment, as shown in Table 1, the random strategy and the greedy strategy with selection ratios of 20%, 30% and 40% and the federal learning client selection method for the heterogeneous intelligent transportation system proposed in the present application are compared in terms of the average absolute error (MAE), the mean square error (MSE), the root mean square error (RMSE) and the mean absolute percentage error (MAPE) when the cutoff time is 18000s.

[0073] MAE MSE RMSE MAPE Random strategy (20%) 9.5961 1.7737 1.3318 24.06% Random strategy (30%) 8.9250 1.6575 1.2875 22.75% Random strategy (40%) 8.9521 1.6491 1.2842 22.19% Greedy strategy 8.9027 1.6399 1.2806 21.33% Proposed method 8.4659 1.5765 1.2556 19.48%

[0074] Table 1

[0075] It can be seen that the performance of the present application is better than that of the common random strategy and the greedy strategy.

[0076] In a specific embodiment, as shown in Table 2, the random strategy and the greedy strategy with selection ratios of 20%, 30% and 40% and the federal learning client selection method for the heterogeneous intelligent transportation system proposed in the present application are compared in terms of the number of clients participating in training when the cutoff time is 18000s.

[0077] Number Random strategy (20%) 460 Random strategy (30%) 615 Random strategy (40%) 740 Greedy strategy 900 Proposed method 1065

[0078] Table 2

[0079] It can be seen that the application has more clients participating in training than the common random strategy and greedy strategy.

[0080] Embodiment 3

[0081] As Figure 3 shown, the application also provides a federated learning client selection system for a heterogeneous intelligent transportation system, the memory includes a federated learning client selection program for a heterogeneous intelligent transportation system, and the federated learning client selection program for a heterogeneous intelligent transportation system is implemented when the processor executes the following steps:

[0082] S1, a global prediction model based on a federated learning protocol is established, and a client selection problem is modeled as a two-dimensional complete knapsack problem.

[0083] S2, the CPU execution frequency of all clients and the physical distance between the client and the edge server are obtained.

[0084] S3, the clients are clustered by a heterogeneous perception clustering method according to the CPU execution frequency of the clients and the physical distance from the edge server.

[0085] S4, the obtained clustering results are maximized by a client selection method to maximize the number of clients participating in training within a deadline.

[0086] Further, the global prediction model is trained in the manner of selecting a group of clients in each training round, based on the federated learning protocol, during the training process, the server sends the current global algorithm state to these clients, these clients perform local calculation according to the global state and their local data set, and send updates to the server, the server applies the updates to the global prediction model, and completes a training round.

[0087] Among them, in the transportation system, due to the heterogeneous clients and the possible poor wireless channel conditions, the number of clients participating in training within a deadline needs to be maximized to improve the training efficiency of the global prediction model.

[0088] Further, the client selection problem is modeled as a two-dimensional complete knapsack problem, which is to take the deadline and the number of training rounds as the two capacities of the knapsack, take each type of client set as each type of item, take the maximum training time in the client set and the number of clients in the client set as the value and the cost that can be obtained by selecting the client set, and model the client selection problem as a mixture of complete knapsack problem and two-dimensional knapsack problem, that is, a two-dimensional complete knapsack problem.

[0089] Further, the heterogeneous perception clustering method is a K-means-based heterogeneous perception clustering method.

[0090] Further, the step S2 is specifically: represents N clients, and the obtained client information is represented by I = { {ω N , d N},..., {ω i , d i}}, wherein ω i represents the CPU execution frequency of the client i, and d i represents the physical location of the client and the server.

[0091] Further, the step S3 is specifically:

[0092] S31, initialization stage, creating an N x 2 matrix clusterAssign for storing the allocation of each client, randomly selecting K clients as initial center points, creating a judgment variable clusterChanged for indicating whether the cluster center point has changed, wherein True represents that the center point has changed, and Fault represents that there is no change, and creating a variable minDist for representing the current minimum distance and assigning a value of ∞.

[0093] S32, calculating the Euclidean distance between each client C i and the center point j and assigning it to the variable distJI, judging whether the variable distJI is greater than the variable minDist, and if yes, assigning and allocating the client C i to the center point j, otherwise updating the matrix clusterAssign to obtain the initial K client set.

[0094] S33, according to the information of each client in each client set, re-computing the center point, and then repeating the allocation process S32 until the allocation result no longer changes, obtaining the K client set.

[0095] Further, in the step S32, whether the variable distJI is greater than the variable minDist is specifically: if the value of the variable distJI is greater than the value of minDist, the value of distJI is assigned to minDist, and the client C i is allocated to the center point j; if the allocation result of the current client C i is different from the existing allocation in the matrix clusterAssign, it means that the allocation has been changed, and the clusterChanged is assigned to True, and then the clusterAssign is updated to obtain the initial K client set.

[0096] Further, in the step S4, the total training rounds are represented by T , and the training round is represented by t deadlineThe training deadline is represented, and the process of step S4 is specifically as follows:

[0097] S41, in the initialization stage, a list m with a length of K+1 is created to store the maximum training time of each client set, a list n with a length of K+1 is created to store the number of clients in each client set, and a two-dimensional array F is created to record the client selection process.

[0098] S42, the maximum training time of the K client sets obtained in step S3 and the number of clients in the client set are calculated and stored in the list m and the list n.

[0099] S43, the maximum number of clients participating in training is calculated by dynamic programming according to the list m and the list n.

[0100] Further, in step S42, the maximum training time of the client set Θ k is specifically as follows:

[0101]

[0102] The maximum number of client sets Θ k participating in training is specifically as follows:

[0103]

[0104] Wherein, T i is the training time of the client C i , M i is the bit size of the local model W i of the client C i , B is the bandwidth size, p i is the transmission power of the client C i , o i is the Rayleigh fading parameter of the client C i , N0 is the Gaussian white noise, θ is the CPU cycle number required for processing data samples, and |D i | is the size of the local data of the client C i used for training.

[0105] The icons in the drawings for describing the positional relationship of the structure are only used for illustrative purposes, and cannot be understood as a limitation of the patent.

[0106] ​Obviously, the above embodiments of the present application are merely exemplary but not intended to limit the embodiments of the present application. Based on the above description, any other variations or changes can be made by those skilled in the art without departing from the spirit and principles of the present application. It is not necessary to list all the embodiments here. Any modifications, equivalent replacements, and improvements made within the spirit and principles of the present application shall fall within the scope of the claims of the present application.

Claims

1. A method for selecting a federated learning client in a heterogeneous intelligent transportation system, the method comprising: The method comprises the following steps: S1, establishing a global prediction model based on a federated learning protocol, modeling a client selection problem as a two-dimensional complete knapsack problem by balancing training time and the number of clients; S2, obtain the CPU execution frequency of all clients and the physical distance between the clients and the edge server; use to represent N clients, and use to represent the obtained client information, wherein represents the CPU execution frequency of the client , represents the physical location of the client and the server; S3, cluster the clients by heterogeneous-aware clustering method according to the CPU execution frequency of the clients and the physical distance to the edge server; in the initialization stage, create a matrix for storing the allocation of each client, randomly select K clients as the initial center points, create a judgment variable for indicating whether the cluster center point changes, where True indicates that the center point changes, and Fault indicates that there is no change, create a variable for indicating the current minimum distance, and assign it a value of ∞; calculate the Euclidean distance between each client and the center point and assign it to the variable , judge whether the variable is greater than the variable , if yes, assign the value and assign the client to the center point , otherwise update the matrix , and obtain the initial K client set; according to the information of each client in each client set, recalculate the center point, and then repeat the allocation process until the allocation result no longer changes, to obtain the final K client set; S4, maximize the number of clients participating in training within the deadline by selecting the clustering result obtained by the client selection method.

2. The federated learning client selection method for heterogeneous intelligent transportation systems according to claim 1, wherein The global prediction model is trained in a manner of selecting a group of clients in each training round, based on a federated learning protocol, in the training process, the server sends the current global algorithm state to the selected clients, the selected clients perform local calculation according to the global state and the local data set, and send updates to the server, the server applies the updates to the global prediction model, and completes a training round.

3. The federated learning client selection method for heterogeneous intelligent transportation systems according to claim 1, wherein, The client selection problem is modeled as a two-dimensional complete knapsack problem by taking the cutoff time and the number of training rounds as the two capacities of the knapsack, taking each type of client set as each type of item, taking the maximum training time in the client set and the number of clients in the client set as the value and the cost that can be obtained by selecting the client set, and modeling the client selection problem as a mixture of complete knapsack problem and two-dimensional knapsack problem, that is, a two-dimensional complete knapsack problem.

4. The federated learning client selection method for heterogeneous intelligent transportation systems according to claim 1, wherein, The heterogeneous perception clustering method is a K-means-based heterogeneous perception clustering method.

5. The federated learning client selection method for heterogeneous intelligent transportation systems according to claim 4, wherein, In step S3, it is judged whether the variable is greater than the variable . Specifically, if the value of the variable is greater than the value of the variable , the value of the variable is assigned to the variable , and the client is assigned to the center point . If the assignment result of the current client is different from the existing assignment in the matrix , it means that the assignment has been changed, the variable is assigned True, and then the variable is updated to obtain the initial K client set.

6. The federated learning client selection method for heterogeneous intelligent transportation systems according to claim 5, wherein, In step S4, the total training rounds are determined by wherein T denotes the total training rounds, and denotes the training deadline, and the process of step S4 is specifically as follows: S41, initialization phase, create a list of length K+1 A two-dimensional array F is used to record the client selection process A two-dimensional array F is used to record the client selection process A two-dimensional array F is used to record the client selection process S42, calculate the maximum training time of the K client sets obtained in step S3 and the number of clients in the client set, and store them in a list and the list ; S43, according to the list and the list Dynamic programming is employed to calculate the maximum number of clients participating in the training.

7. A federated learning client selection system for a heterogeneous intelligent transportation system, comprising a memory and a processor, the memory comprising a federated learning client selection program for a heterogeneous intelligent transportation system, the federated learning client selection program for a heterogeneous intelligent transportation system being implemented when the processor is executed to implement the following steps: S1, establishing a global prediction model based on a federated learning protocol, modeling a client selection problem as a two-dimensional complete knapsack problem by balancing training time and the number of clients; S2, obtaining the CPU execution frequency of all clients and the physical distance between the clients and the edge server; using to represent N clients, the obtained client information is represented by , wherein represents the CPU execution frequency of the client , represents the physical location of the client and the server; S3, clustering clients by heterogeneous-aware clustering method according to CPU execution frequency of clients and physical distance from edge server; in initialization stage, creating a matrix for storing allocation of each client, randomly selecting K clients as initial center points, creating a judgment variable for indicating whether center points change, where True indicates that center points change, and Fault indicates that there is no change, creating a variable for indicating current minimum distance and assigning value as ∞; calculating Euclidean distance between each client and center point and assigning to variable, judging whether variable is greater than variable, if yes, assigning value and allocating client to center point, otherwise, updating matrix, obtaining initial K client set; according to information of each client in each client set, re-computing center point, and then repeating allocation process until allocation result no longer changes, obtaining final K client set; ​​​​​​​​​​​​​ S4, maximizing the number of clients participating in training within the cutoff time by using the obtained clustering result through the client selection method.