Global model optimization method and system based on split federated learning
By using the split federated learning method in the vehicle edge computing system to decompose the global model optimization problem and solve the strategy, parallel training of the global model is achieved, which solves the convergence delay and accuracy problems in traditional serial split learning and reduces energy consumption. and improved model performance.
Patent Information
- Application Number
- CN202410601576.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-15
- Publication Date
- 2024-08-23
AI Technical Summary
Traditional serial split learning fails to effectively consider network dynamics and vehicle computing capabilities in vehicle edge computing systems, resulting in convergence delays and reduced aggregation accuracy of the global model.
Using the global model optimization method based on split federated learning, the corresponding strategy is solved by constructing a global model optimization problem and decomposing it into four sub-problems: vehicle selection, global model split layer, vehicle transmission power, and vehicle computing frequency and bandwidth allocation rate. and strategy configuration to achieve parallel training of global models.
It reduces the model training delay, saves vehicle computing resources, improves the aggregation accuracy of the global model, and optimizes the global model performance.
Smart Images

Figure CN118540739A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of vehicle edge computing technology, and in particular to a global model optimization method and system based on split federated learning. Background Art
[0002] With the development of wireless communications and the Internet of Things, intelligent transportation systems (ITS) have become a promising way to improve traffic safety, traffic efficiency, and system autonomy. Researchers are paying more and more attention to vehicle edge intelligence (VEI). Vehicle edge intelligence combines artificial intelligence technology with vehicle edge computing (VEC), which can sink model inference and training to on-board terminals and edge servers that are closer to the source data. This design enables the car to process large amounts of sensor data in real time, thereby improving the car's response speed and decision-making ability. In this way, vehicle edge computing helps to enhance the capabilities of intelligent transportation systems, including improving traffic safety, traffic efficiency, and system autonomy.
[0003] Split Learning (SL) is a machine learning method that aims to improve the generalization ability of the model and protect data privacy. This method reduces overfitting by splitting the training data set into multiple subsets and then training multiple models on these subsets. The workflow of traditional serial split learning applied to the vehicle edge computing system mainly includes splitting the global model into the model of the vehicle terminal and the model of the server. The vehicle terminal downloads the model and performs forward propagation to update the model of the vehicle terminal, and sends the processed feature data to the server. The server performs back propagation, updates the server model and broadcasts the model gradient back to the vehicle, and updates the model of the vehicle terminal. Each vehicle repeats the above process in sequence until all vehicles have completed training, aggregates the model of the vehicle terminal and the model of the server, so that the global model gradually converges and the performance of the global model is improved.
[0004] However, traditional serial split learning does not take into account the vehicle communication conditions and computing power of the vehicle in network dynamics. When the vehicle leaves the coverage area of the current server, the continuous movement of the vehicle will cause the model of the split vehicle terminal to fail to be uploaded to the server in time, resulting in a delay in the convergence of the global model. Since the model of the split vehicle terminal cannot be uploaded to the server in time for model aggregation, the aggregation accuracy of the global model is also reduced.
[0005] The above are the shortcomings of the prior art. Summary of the invention
[0006] In view of the shortcomings of the prior art, the present invention provides a global model optimization method and system based on split federated learning. On the basis of the global model splitting of the vehicle edge computing system, the global model is trained in parallel through federated learning to obtain an optimized global model. While reducing the model training delay, it reduces energy consumption, saves vehicle computing resources, improves the aggregation accuracy of the global model, and optimizes the global model performance.
[0007] In a first aspect, the present invention provides a global model optimization method based on split federated learning, the method is applied to a vehicle edge computing system, the vehicle edge computing system includes an edge cloud server and several vehicles, the method includes: S1. Build the initial global model of the vehicle edge computing system; S2. Calculate the latency and energy consumption latency of vehicles in the vehicle edge computing system that can perform global model training, and calculate the total latency of all vehicles in the vehicle edge computing system that perform global model training based on the calculation results; S3. Construct a global model optimization problem based on the total latency of all vehicles trained with the global model in the vehicle edge computing system; S4. Split the global model optimization problem into four problems: vehicle selection problem, global model splitting layer problem, vehicle transmission power problem, vehicle calculation frequency, and vehicle bandwidth allocation rate problem. Solve the vehicle selection problem, global model splitting layer problem, vehicle transmission power problem, vehicle calculation frequency, and vehicle bandwidth allocation rate problem in sequence to obtain vehicle selection strategy, global model splitting layer strategy, vehicle transmission power strategy, vehicle calculation frequency, and vehicle bandwidth allocation rate strategy; S5. According to the vehicle selection strategy, select vehicles that can participate in model training, distribute the initial global model to the selected vehicles, select the optimal splitting layer of the global model corresponding to each vehicle based on the global model splitting layer strategy, split the global model of each vehicle into a server-side model and a vehicle-side model, calculate the optimal vehicle transmission power, optimal vehicle calculation frequency and optimal vehicle bandwidth allocation rate of each vehicle based on the vehicle transmission power strategy, vehicle calculation frequency and vehicle bandwidth allocation rate strategy, send the optimal vehicle transmission power, optimal vehicle calculation frequency, optimal vehicle bandwidth allocation rate and its corresponding vehicle-side model to the corresponding selected vehicle, perform iterative training of the initial global model, and obtain a trained global model, i.e., an optimized global model; the server-side models are deployed on the edge cloud server, and the vehicle-side models are deployed on the corresponding selected vehicles.
[0008] Furthermore, the edge cloud server is defined as S, and the vehicle set of the plurality of vehicles is defined as , , from the vehicle set The training vehicle set of vehicles that can participate in the global model training is selected as , , For vehicles The vehicle dataset, , Indicates vehicle No. The value of vehicle data, Indicates vehicle No. An identification tag of vehicle data, where the identification tag is the name of the vehicle data.
[0009] Furthermore, in the global model training, vehicles The delay is , vehicle in global model training The energy consumption is ; in, represents the computing frequency of the edge cloud server, Indicates vehicle The split layer of the global model, is the downlink communication speed of the edge cloud server, , W is the total bandwidth provided by the edge cloud server, is the channel gain of the downlink communication of the edge cloud server, is the transmission power of the downlink communication of the edge cloud server, For vehicles The distance to the edge cloud server, is the path loss, is the noise power, , , Indicates vehicle The amount of computation required for the forward propagation of the vehicle-side model, The unit represents the amount of computation that can be completed in one CPU cycle in the global model, that is, the number of FLOPs that can be completed in one CPU cycle in the global model. , Indicates vehicle The amount of computation required for the back propagation of the vehicle-side model, , , Represents the vehicle in the edge cloud server The amount of computation required for the forward propagation of the server-side model, , Represents the vehicle in the edge cloud server The amount of computational work done by the server-side model backpropagation, Indicates vehicle The CPU calculation frequency, represents the computing frequency of the edge operation server, is the uplink communication speed of the edge cloud server, , is the bandwidth allocation rate of vehicle n, is the channel gain of the edge cloud server uplink communication, For vehicles The transmission power, Indicates vehicle Calculate the effective capacitance coefficient of the chipset; According to the global model training The total delay of all vehicles trained with the global model is ; in, Indicates in the vehicle set A training vehicle set is selected from the vehicles that can participate in global model training.
[0010] Furthermore, in step S3, the global model optimization problem constructed is: ; ; ; ; ; ; ; in, represents the set of training vehicles that can participate in global model training, Represents the vehicle in global model training Bandwidth allocation ratio; Represents the vehicle in global model training The calculation frequency of Represents the vehicle in global model training The transmission power; Represents the vehicle in global model training Select the split layer; represents the energy constraint of vehicle energy consumption; T represents the vehicle in global model training Delay Represents the vehicle in global model training Energy consumed; A collection of split layers representing the global model; Indicates the maximum value of vehicle calculation frequency; Indicates the minimum value of vehicle calculation frequency; Indicates the minimum value of the vehicle's transmission power; represents the maximum value of the vehicle's transmission power; constraint C1 means that the sum of the bandwidth allocation rates of the training vehicles that can participate in the global model training is less than or equal to 1; constraint C2 means that the vehicle The bandwidth allocation rate of the vehicle is greater than or equal to 0 and The bandwidth allocation rate of the vehicle is less than or equal to 1; constraint C3 indicates that the vehicle The energy consumption is less than the energy constraint of the vehicle's energy consumption ; Constraint C4 represents the vehicle in global model training The selected split layer belongs to the set of split layers of the global model; constraint C5 indicates that the vehicle The calculation frequency of the vehicle is greater than or equal to the minimum value of the vehicle calculation frequency and less than or equal to the maximum value of the vehicle calculation frequency; Constraint C6 indicates that the vehicle The transmission power is greater than or equal to the minimum transmission power of the vehicle and less than or equal to the maximum transmission power of the vehicle.
[0011] Further, in step S4, the vehicle selection strategy is ; in, It represents the vehicles that can complete computing and communication within the communication range of the edge cloud server. The maximum duration for the vehicle to successfully complete computing and communication tasks, is the maximum time that the vehicle stays within the communication range of the edge cloud server, , is the speed of the vehicle, is the diameter of the edge cloud server communication range, is the distance from the vehicle to the boundary of the communication range of the edge cloud server, It is the maximum value of the sum of the time it takes for the vehicle to successfully complete the computing and communication tasks and the vehicle’s training time in the pre-set global model training.
[0012] In step S4, the vehicle calculation frequency and the vehicle bandwidth allocation rate problem It is expressed as: .
[0013] Furthermore, the global model splitting layer strategy is ; .
[0014] Further, in step S4, the vehicle transmission power strategy is ; ; The problem Convert to , then the vehicle transmission power strategy is converted to ; ; ; in, is the maximum time delay for global model training, ; ; ; Constraint C7 is in the vehicle set The time delay of selecting vehicles that can participate in global model training is less than or equal to .
[0015] Furthermore, in step S4, the vehicle calculation frequency and the vehicle bandwidth allocation rate strategy are: .
[0016] Further, step S5 includes: P1. According to the vehicle selection strategy obtained in step S4, select the vehicles that can participate in the initial global model training this time, import the vehicle data of all selected vehicles as training samples into the initial global model, calculate the optimal vehicle transmission power, optimal vehicle calculation frequency, optimal vehicle bandwidth allocation rate of all selected vehicles and the optimal splitting layer of the global model of each vehicle according to the global model splitting layer strategy, vehicle transmission power strategy, vehicle calculation frequency and vehicle bandwidth allocation rate strategy obtained in step S4, split the corresponding global model according to the optimal splitting layer of the global model of each vehicle to obtain the server-side model and vehicle-side model of each vehicle, send the optimal vehicle transmission power, optimal vehicle calculation frequency, optimal vehicle bandwidth allocation rate of each selected vehicle and the split vehicle-side model of each vehicle to the corresponding vehicle, perform forward calculation on the vehicle-side model of each selected vehicle to obtain the feature data of each vehicle-side model, and each selected vehicle uploads the obtained feature data to the server-side model corresponding to each selected vehicle in the edge cloud server; P2. The server-side model of each vehicle selected in the edge cloud server performs forward calculation according to the received feature data of the vehicle-side model of the corresponding vehicle. Each server-side model performs backward calculation based on the forward calculation result to obtain the feature data gradient of each server-side model. The edge cloud server broadcasts the feature data gradient of each server-side model to each corresponding selected vehicle. P3. The vehicle-side model of each selected vehicle performs backward calculation according to the feature data gradient of the corresponding server-side model. Each vehicle-side model updates the vehicle-side model according to the backward calculation result, and each vehicle uploads its corresponding updated vehicle-side model parameters to the edge cloud server; P4. The edge cloud server aggregates the vehicle-side model parameters of all selected vehicles with their corresponding server-side models to obtain an aggregated global model of all selected vehicles. The edge cloud server aggregates the aggregated global models of all selected vehicles to obtain a global model after this global model training. P5. Repeat steps P1-P4 to iteratively train the initial global model until the global model converges to obtain a trained global model.
[0017] In a second aspect, the present invention provides a global model optimization system based on split federated learning, the system is applied to a vehicle edge computing system, the vehicle edge computing system includes an edge cloud server and several vehicles, the system includes an initial global model construction module, a delay calculation module, an optimization problem construction module, an optimization problem solving module and a model training module; An initial global model building module, used to build an initial global model of the vehicle edge computing system; The delay and energy consumption calculation module is used to calculate the delay and energy consumption delay of vehicles in the vehicle edge computing system that can perform global model training, and calculate the total delay of all vehicles in the vehicle edge computing system that perform global model training based on the calculation results; An optimization problem building module, used to build a global model optimization problem based on the total latency of all vehicles trained with the global model in the vehicle edge computing system; The optimization problem solving module is used to split the global model optimization problem into four problems: vehicle selection problem, global model splitting layer problem, vehicle transmission power problem, vehicle calculation frequency, and vehicle bandwidth allocation rate problem. The vehicle selection problem, global model splitting layer problem, vehicle transmission power problem, vehicle calculation frequency, and vehicle bandwidth allocation rate problem are solved in sequence to obtain the vehicle selection strategy, global model splitting layer strategy, vehicle transmission power strategy, vehicle calculation frequency, and vehicle bandwidth allocation rate strategy. The model training module is used to select vehicles that can participate in model training according to the vehicle selection strategy, distribute the initial global model to the selected vehicles, select the optimal splitting layer of the global model corresponding to each vehicle based on the global model splitting layer strategy, split the global model of each vehicle into a server-side model and a vehicle-side model, calculate the optimal vehicle transmission power, optimal vehicle calculation frequency and optimal vehicle bandwidth allocation rate of each vehicle based on the vehicle transmission power strategy, vehicle calculation frequency and vehicle bandwidth allocation rate strategy, send the optimal vehicle transmission power, optimal vehicle calculation frequency, optimal vehicle bandwidth allocation rate and its corresponding vehicle-side model to the corresponding selected vehicle, perform iterative training of the initial global model, and obtain a trained global model, that is, an optimized global model; the server-side models are deployed on the edge cloud server, and the vehicle-side models are deployed on the corresponding selected vehicles.
[0018] It can be seen from the above technical solutions that the present invention has the following advantages: The present invention is based on split federated learning, constructs a global model optimization problem on the basis of global model splitting, decomposes the global model optimization problem into a vehicle selection problem, a global model splitting layer problem, a vehicle transmission power problem, a vehicle calculation frequency, and a vehicle bandwidth allocation rate problem, and solves the problem to obtain a vehicle selection strategy, a global model splitting layer strategy, a vehicle transmission power strategy, a vehicle calculation frequency, and a vehicle bandwidth allocation rate strategy. According to the global model splitting layer strategy, the vehicle transmission power strategy, the vehicle calculation frequency, and the vehicle bandwidth allocation rate strategy, the global model is parameterized, and then vehicle samples are screened according to the vehicle selection strategy. The screened vehicle data are imported as samples into the constructed initial global model for model training to obtain a trained global model, which solves the shortcomings of traditional serial split learning, realizes parallel training of the global model, reduces energy consumption while reducing model training delay, saves vehicle computing resources, improves the aggregation accuracy of the global model, and realizes optimization of the global model.
[0019] In addition, the invention has a reliable design principle, a simple structure and a very broad application prospect. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solution of the present invention, the accompanying drawings required for use in the description will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0021] Figure 1 It is a schematic flow chart of the global model optimization method based on split federated learning according to the present invention; Figure 2This is a schematic structural block diagram of the global model optimization system based on split federated learning described in the present invention. DETAILED DESCRIPTION
[0022] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0023] Federated Learning (FL) is an emerging machine learning method that allows multiple devices or computing nodes to train models without sharing original data. In federated learning, model training is performed on local devices, and only the updated parameters of the model are aggregated to a central server. This distributed learning method can solve data privacy protection and data security issues, while reducing the need to transmit data and alleviating the computational burden of the central server.
[0024] The present invention optimizes the global model by combining split learning with federated learning.
[0025] like Figure 1 As shown, the present invention provides a global model optimization method based on split federated learning, the method is applied to a vehicle edge computing system, the vehicle edge computing system includes an edge cloud server and several vehicles, the method includes: S1. Build the initial global model of the vehicle edge computing system; S2. Calculate the latency and energy consumption latency of vehicles in the vehicle edge computing system that can perform global model training, and calculate the total latency of all vehicles in the vehicle edge computing system that perform global model training based on the calculation results; S3. Construct a global model optimization problem based on the total latency of all vehicles trained with the global model in the vehicle edge computing system; S4. Split the global model optimization problem into four problems: vehicle selection problem, global model splitting layer problem, vehicle transmission power problem, vehicle calculation frequency, and vehicle bandwidth allocation rate problem. Solve the vehicle selection problem, global model splitting layer problem, vehicle transmission power problem, vehicle calculation frequency, and vehicle bandwidth allocation rate problem in sequence to obtain vehicle selection strategy, global model splitting layer strategy, vehicle transmission power strategy, vehicle calculation frequency, and vehicle bandwidth allocation rate strategy; S5. According to the vehicle selection strategy, select vehicles that can participate in model training, distribute the initial global model to the selected vehicles, select the optimal splitting layer of the global model corresponding to each vehicle based on the global model splitting layer strategy, split the global model of each vehicle into a server-side model and a vehicle-side model, calculate the optimal vehicle transmission power, optimal vehicle calculation frequency and optimal vehicle bandwidth allocation rate of each vehicle based on the vehicle transmission power strategy, vehicle calculation frequency and vehicle bandwidth allocation rate strategy, send the optimal vehicle transmission power, optimal vehicle calculation frequency, optimal vehicle bandwidth allocation rate and its corresponding vehicle-side model to the corresponding selected vehicle, perform iterative training of the initial global model, and obtain a trained global model, i.e., an optimized global model; the server-side models are deployed on the edge cloud server, and the vehicle-side models are deployed on the corresponding selected vehicles.
[0026] To facilitate understanding of the present invention, the global model optimization method based on split federated learning provided by the present invention is further described below based on the principle of the global model optimization method based on split federated learning of the present invention and in combination with the process of the global model optimization method based on split federated learning in the embodiment.
[0027] Specifically, the global model optimization method based on split federated learning includes: Step 110: Build an initial global model of the vehicle edge computing system.
[0028] The global model optimization method based on split federated learning described in this embodiment is applied to a vehicle edge computing system. The vehicle edge computing system includes an edge cloud server and several vehicles. An initial global model of the vehicle edge computing system is constructed. The initial global model includes a server-side model and its corresponding vehicle-side model. The server-side model is used to be deployed on the edge cloud server, and the vehicle-side model is used to be deployed on the vehicle. Only one vehicle-side model can be deployed on a vehicle.
[0029] Define the edge cloud server as S, and define the vehicle set of the several vehicles as , , from the vehicle set The training vehicle set of vehicles that can participate in the global model training is selected as , , For vehicles The vehicle dataset, , Indicates vehicle No. The value of vehicle data, Indicates vehicle No. The identification tag of the vehicle data is the name of the vehicle data. The vehicle data set represents the vehicle private data set of the vehicle.
[0030] Step 120: Calculate the latency and energy consumption latency of vehicles in the vehicle edge computing system that can perform global model training, and calculate the total latency of all vehicles in the vehicle edge computing system that perform global model training based on the calculation results.
[0031] Resnet18 is used as the calculation model and defined For vehicles Vehicle dataset The loss function is , For vehicles No. The loss function for vehicle data is: represents the global model. The goal of the edge cloud server is to minimize the loss function of the global model, i.e. , find the optimal model parameters , is the loss function of the global model, .
[0032] The workflow of the global model includes model offloading, vehicle-side model inference, feature data upload, server-side model inference, feature gradient transmission, vehicle-side model training, and model upload and aggregation. Select the training vehicle set of vehicles that can participate in global model training , The edge cloud server copies multiple global models according to the number of selected vehicles. The number of copied global models is consistent with the number of selected vehicles. Each global model includes a server-side model and a vehicle-side model. The optimal splitting layer of the global model of different vehicles and the vehicle parameters of the corresponding vehicles are calculated according to different vehicles. The global model corresponding to each vehicle is split according to the calculated optimal splitting layer into a server-side model and a vehicle-side model. Then, the vehicle-side model split from each global model and the calculated vehicle parameters of each vehicle are sent to the corresponding vehicle. In the vehicle-side model inference stage, the vehicle-side model performs forward calculation to obtain feature data. In the feature data uploading stage, each vehicle uses the OFDMA method to upload the feature data of the corresponding vehicle-side model to the corresponding server-side Model; In the server-side model inference phase, each server-side model on the edge cloud server performs forward calculation and backward gradient calculation based on the feature data of the corresponding vehicle to obtain the feature data gradient; In the feature gradient transmission phase, the edge cloud server broadcasts the feature data gradient calculated by each server-side model to the corresponding vehicle; In the vehicle-side model training phase, the vehicle-side model of each vehicle performs backward calculation based on the feature data gradient to obtain the vehicle-side model parameters; In the model upload and aggregation phase, each vehicle uploads the obtained vehicle-side model parameters to the edge cloud server, aggregates the vehicle-side model parameters of each vehicle with the corresponding server-side model, obtains the global model after the aggregation of each vehicle, and aggregates the global model after the aggregation of each vehicle to obtain the final updated global model. Based on the computational model of Resnet18 and the communication model of the edge cloud server uplink broadcast mode, the latency and energy consumption of each stage of the global model are calculated.
[0033] In the model unloading phase, only the vehicle The delay of the vehicle The delay in the model unloading module is ;vehicle The delay in the vehicle-side model inference phase is ,vehicle The energy consumption in the vehicle-side model inference phase is ;vehicle The delay in the feature data upload phase is ,vehicle The energy consumption in the feature data uploading stage is ;vehicle The latency of the server-side model inference phase is ;vehicle The delay in the vehicle-side model training phase is ,vehicle The energy consumption during the vehicle-side model training phase is ;vehicle The latency during model upload and aggregation is ,vehicle The energy consumption during the model upload and aggregation phase is .
[0034] in, Indicates vehicle The split layer of the global model, Indicates vehicle The size of the vehicle-side model of the global model, is the downlink communication speed of the edge cloud server, , W is the total bandwidth provided by the edge cloud server, is the channel gain of the downlink communication of the edge cloud server, is the transmission power of the downlink communication of the edge cloud server, For vehicles The distance to the edge cloud server, is the path loss, is the noise power, Indicates vehicle The vehicle-side model handles the computational workload of the forward propagation process of vehicle data; The unit represents the amount of computation that can be completed in one CPU cycle in the global model, that is, the number of FLOPs that can be completed in one CPU cycle in the global model. Indicates vehicle The CPU calculation frequency, , Indicates vehicle The effective capacitance coefficient of the calculated chipset is About the vehicle The size of the feature data of the vehicle data, is the uplink communication speed of the edge cloud server, , For vehicles The bandwidth allocation ratio, is the channel gain of the edge cloud server uplink communication, For vehicles The transmission power, Indicates the CPU frequency of the edge cloud server. , Represents the server-side model of the edge cloud server processing vehicle The computational effort of the forward propagation processing of vehicle data, , Represents the server-side model of the edge cloud server processing vehicle The computational cost of back propagation processing of vehicle data is , Indicates vehicle The vehicle-side model handles the computational complexity of back propagation of vehicle data.
[0035] According to vehicle The delay and energy consumption in each working stage of the global model are calculated to obtain the vehicle The delay is , get the vehicle in the global model training The energy consumption is ; in, represents the computing frequency of the edge cloud server, Indicates the computing frequency of the edge operation server.
[0036] According to vehicle The latency in the global model, calculates the total latency of all vehicles in the global model as the latency of the global model in the vehicle edge computing system: .
[0037] in, Indicates in the vehicle set A training vehicle set is selected from the vehicles that can participate in global model training.
[0038] Step 130: Construct a global model optimization problem based on the total delay of all vehicles trained with the global model in the vehicle edge computing system.
[0039] In order to reduce the delay of the global model, a global model optimization problem is constructed to obtain the minimum value of the delay of the global model.
[0040] The global model optimization problem is: ; ; ; ; ; ; .
[0041] in, represents the set of training vehicles that can participate in global model training, Represents the vehicle in global model training Bandwidth allocation ratio; Represents the vehicle in global model training The calculation frequency of Represents the vehicle in global model training The transmission power; Represents the vehicle in global model training Select the split layer; represents the energy constraint of vehicle energy consumption; T represents the vehicle in global model training Delay Represents the vehicle in global model training Energy consumed; A collection of split layers representing the global model; Indicates the maximum value of vehicle calculation frequency; Indicates the minimum value of vehicle calculation frequency; Indicates the minimum value of the vehicle's transmission power; represents the maximum value of the vehicle's transmission power; constraint C1 means that the sum of the bandwidth allocation rates of the training vehicles that can participate in the global model training is less than or equal to 1; constraint C2 means that the vehicle The bandwidth allocation rate of the vehicle is greater than or equal to 0 and The bandwidth allocation rate of the vehicle is less than or equal to 1; constraint C3 indicates that the vehicle The energy consumption is less than the energy constraint of the vehicle's energy consumption ; Constraint C4 represents the vehicle in global model training The selected split layer belongs to the set of split layers of the global model; constraint C5 indicates that the vehicle The calculation frequency of the vehicle is greater than or equal to the minimum value of the vehicle calculation frequency and less than or equal to the maximum value of the vehicle calculation frequency; Constraint C6 indicates that the vehicle The transmission power is greater than or equal to the minimum transmission power of the vehicle and less than or equal to the maximum transmission power of the vehicle.
[0042] Step 140, split the global model optimization problem into four problems: vehicle selection problem, global model splitting layer problem, vehicle transmission power problem, vehicle calculation frequency, and vehicle bandwidth allocation rate problem. Solve the vehicle selection problem, global model splitting layer problem, vehicle transmission power problem, vehicle calculation frequency, and vehicle bandwidth allocation rate problem in turn to obtain the vehicle selection strategy, global model splitting layer strategy, vehicle transmission power strategy, vehicle calculation frequency, and vehicle bandwidth allocation rate strategy.
[0043] The global model optimization problem is decomposed into four sub-problems, and the approximate optimal solution is solved iteratively. The four sub-problems are vehicle selection problem, global model split layer problem, vehicle transmission power problem, vehicle calculation frequency, and vehicle bandwidth allocation rate problem. These four sub-problems are solved separately, and the corresponding vehicle selection strategy, global model split layer strategy, vehicle transmission power strategy, vehicle calculation frequency, and vehicle bandwidth allocation rate strategy are obtained.
[0044] First, regarding the vehicle selection problem, due to the limited communication range of the edge cloud server, some fast vehicles have a short residence time and therefore cannot complete the training. Therefore, it is necessary to screen the vehicles and select the vehicles that can participate in the global model training. It is necessary to select vehicles based on their mobility characteristics to improve the success and effectiveness of the training. The residence time is the time that the vehicle travels within the communication range of the edge cloud server, which depends largely on the location and speed of the vehicle. Assuming that the vehicle speed remains stable, the vehicle selection strategy is , that is, when the vehicle When the vehicle is within the communication range of the edge cloud server, it can complete the calculation and communication, which means that the vehicle is a member of the vehicle cluster. The vehicle selected to participate in the global model training. When the vehicle is in other situations, it means that the vehicle cannot complete the calculation and communication within the communication range of the edge cloud server, which also means that the vehicle is a vehicle in the vehicle set. Vehicles that are not selected to participate in global model training. Medium Vehicle The probability of being selected is .
[0045] in, represents the vehicles that can complete computation and communication within the communication range of the edge cloud server, that is, represents the training vehicle that selects vehicles that can participate in the global model training. , The maximum duration for the vehicle to successfully complete computing and communication tasks, is the maximum time that the vehicle stays within the communication range of the edge cloud server, , is the speed of the vehicle, is the diameter of the edge cloud server communication range, is the distance from the vehicle to the boundary of the communication range of the edge cloud server, It is the maximum value of the sum of the time it takes for the vehicle to successfully complete the computing and communication tasks and the vehicle’s training time in the pre-set global model training.
[0046] For the convenience of representation, the global model split layer problem, vehicle transmission power problem, vehicle calculation frequency, and vehicle bandwidth allocation rate problem are all solved in terms of vehicle For example, the vehicle For vehicle set The vehicles selected to participate in the global model training, For the global model split layer problem , solve the optimal split layer in the global model training of the vehicle, then the global model split layer strategy is ; .
[0047] Calculate vehicles by traversal method The training time of the vehicle after each split point in the global model is calculated, and the split point with the smallest training time is selected as the vehicle The splitting is performed based on the splitting point of the optimal splitting layer in the global model training.
[0048] In a given vehicle of , and Based on this, the vehicle transmission power problem It can be expressed as: ; ; The upper bound of the time delay for global model training is , the problem Convert to ,but To solve the maximum time delay The minimum value of ,
[0049] ; ; ; Use the SCA optimization algorithm to calculate the minimum value of the maximum time delay for vehicle calculation and communication When, define When using the SCA optimization algorithm Vehicles in iteration The uplink power of Defined as SCA optimization algorithm Iteration Vehicle The energy consumption is , in order to solve The optimal solution of is obtained according to the first-order Taylor expansion. ,in for The first derivative of ; Iterative solution through SCA algorithm The optimal uplink power is obtained by .
[0050] in, Indicates vehicle The number of iterations to solve when calculating vehicle transfer power in global model training, ; ; ; Constraint C7 is in the vehicle set The time delay of selecting vehicles that can participate in global model training is less than or equal to .
[0051] Vehicle calculation frequency and vehicle bandwidth allocation rate issues It is expressed as: .
[0052] Regarding the vehicle calculation frequency and vehicle bandwidth allocation rate issues , It consists of three parts, including , and , the Lagrange multiplier method is used to solve the vehicle calculation frequency and the vehicle bandwidth allocation rate problem, and we get ; According to the above formula, applying KKT conditions, we can get: ; The vehicle obtained by solving the above formula The closed-form solution of the bandwidth allocation rate is then obtained by iteratively using the dual ascent method to obtain the vehicle The optimal approximate solution for the calculation frequency.
[0053] in, , , and is the Lagrange multiplier associated with the C1 and C3 constraints.
[0054] Step 150: Select vehicles that can participate in model training according to the vehicle selection strategy, distribute the initial global model to the selected vehicles, select the optimal splitting layer of the global model corresponding to each vehicle based on the global model splitting layer strategy, split the global model of each vehicle into a server-side model and a vehicle-side model, calculate the optimal vehicle transmission power, optimal vehicle calculation frequency and optimal vehicle bandwidth allocation rate of each vehicle based on the vehicle transmission power strategy, vehicle calculation frequency and vehicle bandwidth allocation rate strategy, send the optimal vehicle transmission power, optimal vehicle calculation frequency, optimal vehicle bandwidth allocation rate and its corresponding vehicle-side model to the corresponding selected vehicle, perform iterative training of the initial global model, and obtain a trained global model, that is, an optimized global model; the server-side models are deployed on the edge cloud server, and the vehicle-side models are deployed on the corresponding selected vehicles.
[0055] The specific steps include: P1. According to the vehicle selection strategy obtained in step S4, select the vehicles that can participate in the initial global model training this time, import the vehicle data of all selected vehicles as training samples into the initial global model, calculate the optimal vehicle transmission power, optimal vehicle calculation frequency, optimal vehicle bandwidth allocation rate of all selected vehicles and the optimal splitting layer of the global model of each vehicle according to the global model splitting layer strategy, vehicle transmission power strategy, vehicle calculation frequency and vehicle bandwidth allocation rate strategy obtained in step S4, split the corresponding global model according to the optimal splitting layer of the global model of each vehicle to obtain the server-side model and vehicle-side model of each vehicle, send the optimal vehicle transmission power, optimal vehicle calculation frequency, optimal vehicle bandwidth allocation rate of each selected vehicle and the split vehicle-side model of each vehicle to the corresponding vehicle, perform forward calculation on the vehicle-side model of each selected vehicle to obtain the feature data of each vehicle-side model, and each selected vehicle uploads the obtained feature data to the server-side model corresponding to each selected vehicle in the edge cloud server; P2. The server-side model of each vehicle selected in the edge cloud server performs forward calculation according to the received feature data of the vehicle-side model of the corresponding vehicle. Each server-side model performs backward calculation based on the forward calculation result to obtain the feature data gradient of each server-side model. The edge cloud server broadcasts the feature data gradient of each server-side model to each corresponding selected vehicle. P3. The vehicle-side model of each selected vehicle performs backward calculation according to the feature data gradient of the corresponding server-side model. Each vehicle-side model updates the vehicle-side model according to the backward calculation result, and each vehicle uploads its corresponding updated vehicle-side model parameters to the edge cloud server; P4. The edge cloud server aggregates the vehicle-side model parameters of all selected vehicles with their corresponding server-side models to obtain an aggregated global model of all selected vehicles. The edge cloud server aggregates the aggregated global models of all selected vehicles to obtain a global model after this global model training. P5. Repeat steps P1-P4 to iteratively train the initial global model until the global model converges to obtain a trained global model.
[0056] It should be noted that the number of vehicles selected for each model training that can participate in the initial global model training is less than or equal to the total number of vehicles. .
[0057] As an embodiment of the present invention, the present invention also provides a global model optimization system based on split federated learning, which is applied to a vehicle edge computing system. The vehicle edge computing system includes an edge cloud server and several vehicles. The system 200 performs the functions according to the global model optimization method based on split federated learning, and can be divided into multiple functional modules, such as Figure 2 As shown. The functional modules may include: an initial global model construction module 210, a delay energy consumption calculation module 220, an optimization problem construction module 230, an optimization problem solving module 240 and a model training module 250. The module referred to in the present invention refers to a series of computer program segments that can be executed by at least one processor and can complete fixed functions, which are stored in a memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.
[0058] An initial global model building module 210, for building an initial global model of the vehicle edge computing system; The delay and energy consumption calculation module 220 is used to calculate the delay and energy consumption delay of the vehicles capable of global model training in the vehicle edge computing system, and calculate the total delay of all vehicles in the global model training in the vehicle edge computing system according to the calculation results; An optimization problem construction module 230, for constructing a global model optimization problem according to the total delay of all vehicles trained by the global model in the vehicle edge computing system; The optimization problem solving module 240 is used to split the global model optimization problem into four problems: vehicle selection problem, global model splitting layer problem, vehicle transmission power problem, vehicle calculation frequency, and vehicle bandwidth allocation rate problem, and solve the vehicle selection problem, global model splitting layer problem, vehicle transmission power problem, vehicle calculation frequency, and vehicle bandwidth allocation rate problem in sequence to obtain a vehicle selection strategy, a global model splitting layer strategy, a vehicle transmission power strategy, a vehicle calculation frequency, and a vehicle bandwidth allocation rate strategy; The model training module 250 is used to select vehicles that can participate in model training according to the vehicle selection strategy, distribute the initial global model to the selected vehicles, select the optimal splitting layer of the global model corresponding to each vehicle based on the global model splitting layer strategy, split the global model of each vehicle into a server-side model and a vehicle-side model, calculate the optimal vehicle transmission power, optimal vehicle calculation frequency and optimal vehicle bandwidth allocation rate of each vehicle based on the vehicle transmission power strategy, vehicle calculation frequency and vehicle bandwidth allocation rate strategy, send the optimal vehicle transmission power, optimal vehicle calculation frequency, optimal vehicle bandwidth allocation rate and its corresponding vehicle-side model to the corresponding selected vehicle, perform iterative training of the initial global model, and obtain a trained global model, that is, an optimized global model; the server-side models are deployed on the edge cloud server, and the vehicle-side models are deployed on the corresponding selected vehicles.
[0059] The present invention is based on split federated learning, constructs a global model optimization problem on the basis of global model splitting, decomposes the global model optimization problem into a vehicle selection problem, a global model splitting layer problem, a vehicle transmission power problem, a vehicle calculation frequency, and a vehicle bandwidth allocation rate problem, and solves the problem to obtain a vehicle selection strategy, a global model splitting layer strategy, a vehicle transmission power strategy, a vehicle calculation frequency, and a vehicle bandwidth allocation rate strategy. According to the global model splitting layer strategy, the vehicle transmission power strategy, the vehicle calculation frequency, and the vehicle bandwidth allocation rate strategy, the global model is parameterized, and then vehicle samples are screened according to the vehicle selection strategy. The screened vehicle data are imported as samples into the constructed initial global model for model training to obtain a trained global model, which solves the shortcomings of traditional serial split learning, realizes parallel training of the global model, reduces energy consumption while reducing model training delay, saves vehicle computing resources, improves the aggregation accuracy of the global model, and realizes optimization of the global model.
[0060] In addition, the invention has a reliable design principle, a simple structure and a very broad application prospect.
[0061] The technical effects that can be achieved by this embodiment can be found in the above description and will not be repeated here.
[0062] Although the present invention has been described in detail by referring to the accompanying drawings and in combination with the preferred embodiments, the present invention is not limited thereto. Without departing from the spirit and essence of the present invention, a person of ordinary skill in the art may make various equivalent modifications or substitutions to the embodiments of the present invention, and these modifications or substitutions shall be within the scope of the present invention. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, and all of these shall be within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.
Claims
1. A global model optimization method based on split federated learning, the method is applied to a vehicle edge computing system, the vehicle edge computing system includes an edge cloud server and several vehicles, characterized in that: Methods include: S1. Build the initial global model of the vehicle edge computing system; S2. Calculate the latency and energy consumption latency of vehicles in the vehicle edge computing system that can perform global model training, and calculate the total latency of all vehicles in the vehicle edge computing system that perform global model training based on the calculation results; S3. Construct a global model optimization problem based on the total latency of all vehicles trained with the global model in the vehicle edge computing system; S4. Split the global model optimization problem into four problems: vehicle selection problem, global model splitting layer problem, vehicle transmission power problem, vehicle calculation frequency, and vehicle bandwidth allocation rate problem. Solve the vehicle selection problem, global model splitting layer problem, vehicle transmission power problem, vehicle calculation frequency, and vehicle bandwidth allocation rate problem in sequence to obtain vehicle selection strategy, global model splitting layer strategy, vehicle transmission power strategy, vehicle calculation frequency, and vehicle bandwidth allocation rate strategy; S5. According to the vehicle selection strategy, select vehicles that can participate in model training, distribute the initial global model to the selected vehicles, select the optimal splitting layer of the global model corresponding to each vehicle based on the global model splitting layer strategy, split the global model of each vehicle into a server-side model and a vehicle-side model, calculate the optimal vehicle transmission power, optimal vehicle calculation frequency and optimal vehicle bandwidth allocation rate of each vehicle based on the vehicle transmission power strategy, vehicle calculation frequency and vehicle bandwidth allocation rate strategy, send the optimal vehicle transmission power, optimal vehicle calculation frequency, optimal vehicle bandwidth allocation rate and its corresponding vehicle-side model to the corresponding selected vehicle, perform iterative training of the initial global model, and obtain a trained global model, i.e., an optimized global model; the server-side models are deployed on the edge cloud server, and the vehicle-side models are deployed on the corresponding selected vehicles.
2. The global model optimization method based on split federated learning according to claim 1, characterized in that: Define the edge cloud server as S, and define the vehicle set of the several vehicles as , , from the vehicle set The training vehicle set of vehicles that can participate in the global model training is selected as , , For vehicles The vehicle dataset, , Indicates vehicle No. The value of vehicle data, Indicates vehicle No. An identification tag of vehicle data, where the identification tag is the name of the vehicle data.
3. The global model optimization method based on split federated learning according to claim 2, characterized in that: Step S2 includes: Global model training vehicle The delay is , vehicle in global model training The energy consumption is ; in, represents the computing frequency of the edge cloud server, Indicates vehicle The split layer of the global model, is the downlink communication speed of the edge cloud server, , W is the total bandwidth provided by the edge cloud server, is the channel gain of the downlink communication of the edge cloud server, is the transmission power of the downlink communication of the edge cloud server, For vehicles The distance to the edge cloud server, is the path loss, is the noise power, , , Indicates vehicle The amount of computation required for the forward propagation of the vehicle-side model, The unit represents the amount of computation that can be completed in one CPU cycle in the global model, that is, the number of FLOPs that can be completed in one CPU cycle in the global model. , Indicates vehicle The amount of computation required for the back propagation of the vehicle-side model, , , Represents the vehicle in the edge cloud server The amount of computation required for the forward propagation of the server-side model, , Represents the vehicle in the edge cloud server The amount of computation required for the server-side model backpropagation processing, Indicates vehicle The CPU calculation frequency, represents the computing frequency of the edge operation server, is the uplink communication speed of the edge cloud server, , is the bandwidth allocation rate of vehicle n, is the channel gain of the edge cloud server uplink communication, For vehicles The transmission power, Indicates vehicle Calculate the effective capacitance coefficient of the chipset; According to the global model training The total delay of all vehicles trained with the global model is ; in, Indicates in the vehicle set A training vehicle set is selected from the vehicles that can participate in global model training.
4. The global model optimization method based on split federated learning according to claim 3 is characterized in that: In step S3, the global model optimization problem constructed is: ; ; ; ; ; ; ; in, represents the set of training vehicles that can participate in global model training, Represents the vehicle in global model training Bandwidth allocation ratio; Represents the vehicle in global model training The calculation frequency of Represents the vehicle in global model training The transmission power; Represents the vehicle in global model training Select the split layer; represents the energy constraint of vehicle energy consumption; T represents the vehicle in global model training Delay Represents the vehicle in global model training Energy consumed; A collection of split layers representing the global model; Indicates the maximum value of vehicle calculation frequency; Indicates the minimum value of vehicle calculation frequency; Indicates the minimum value of the vehicle's transmission power; represents the maximum value of the vehicle's transmission power; constraint C1 means that the sum of the bandwidth allocation rates of the training vehicles that can participate in the global model training is less than or equal to 1; constraint C2 means that the vehicle The bandwidth allocation rate of the vehicle is greater than or equal to 0 and The bandwidth allocation rate of the vehicle is less than or equal to 1; constraint C3 indicates that the vehicle The energy consumption is less than the energy constraint of the vehicle's energy consumption ; Constraint C4 represents the vehicle in global model training The selected split layer belongs to the set of split layers of the global model; constraint C5 indicates that the vehicle The calculation frequency of the vehicle is greater than or equal to the minimum value of the vehicle calculation frequency and less than or equal to the maximum value of the vehicle calculation frequency; Constraint C6 indicates that the vehicle The transmission power is greater than or equal to the minimum transmission power of the vehicle and less than or equal to the maximum transmission power of the vehicle.
5. The global model optimization method based on split federated learning according to claim 4, characterized in that: In step S4, the vehicle selection strategy is ; in, It represents the vehicles that can complete computing and communication within the communication range of the edge cloud server. The maximum duration for the vehicle to successfully complete computing and communication tasks, is the maximum time that the vehicle stays within the communication range of the edge cloud server, , is the speed of the vehicle, is the diameter of the edge cloud server communication range, is the distance from the vehicle to the boundary of the communication range of the edge cloud server, It is the maximum value of the sum of the time it takes for the vehicle to successfully complete the computing and communication tasks and the vehicle’s training time in the pre-set global model training.
6. The global model optimization method based on split federated learning according to claim 5, characterized in that: In step S4, the global model splitting layer strategy is ; 。 7. The global model optimization method based on split federated learning according to claim 6, characterized in that: In step S4, the vehicle transmission power strategy is ; ; The problem Convert to , then the vehicle transmission power strategy is converted to ; ; ; in, is the maximum time delay for global model training, ; ; ; Constraint C7 is in the vehicle set The time delay of selecting vehicles that can participate in global model training is less than or equal to .
8. The global model optimization method based on split federated learning according to claim 7, characterized in that: In step S4, the vehicle calculation frequency and vehicle bandwidth allocation rate strategy are: .
9. The global model optimization method based on split federated learning according to claim 1, characterized in that: Step S5 includes: P1. According to the vehicle selection strategy obtained in step S4, select the vehicles that can participate in the initial global model training this time, import the vehicle data of all selected vehicles as training samples into the initial global model, calculate the optimal vehicle transmission power, optimal vehicle calculation frequency, optimal vehicle bandwidth allocation rate of all selected vehicles and the optimal splitting layer of the global model of each vehicle according to the global model splitting layer strategy, vehicle transmission power strategy, vehicle calculation frequency and vehicle bandwidth allocation rate strategy obtained in step S4, split the corresponding global model according to the optimal splitting layer of the global model of each vehicle to obtain the server-side model and vehicle-side model of each vehicle, send the optimal vehicle transmission power, optimal vehicle calculation frequency, optimal vehicle bandwidth allocation rate of each selected vehicle and the split vehicle-side model of each vehicle to the corresponding vehicle, perform forward calculation on the vehicle-side model of each selected vehicle to obtain the feature data of each vehicle-side model, and each selected vehicle uploads the obtained feature data to the server-side model corresponding to each selected vehicle in the edge cloud server; P2. The server-side model of each vehicle selected in the edge cloud server performs forward calculation according to the received feature data of the vehicle-side model of the corresponding vehicle. Each server-side model performs backward calculation based on the forward calculation result to obtain the feature data gradient of each server-side model. The edge cloud server broadcasts the feature data gradient of each server-side model to each corresponding selected vehicle. P3. The vehicle-side model of each selected vehicle performs backward calculation according to the feature data gradient of the corresponding server-side model. Each vehicle-side model updates the vehicle-side model according to the backward calculation result, and each vehicle uploads its corresponding updated vehicle-side model parameters to the edge cloud server; P4. The edge cloud server aggregates the vehicle-side model parameters of all selected vehicles with their corresponding server-side models to obtain an aggregated global model of all selected vehicles. The edge cloud server aggregates the aggregated global models of all selected vehicles to obtain a global model after this global model training. P5. Repeat steps P1-P4 to iteratively train the initial global model until the global model converges to obtain a trained global model.
10. A global model optimization system based on split federated learning, the system is applied to a vehicle edge computing system, the vehicle edge computing system includes an edge cloud server and several vehicles, characterized in that: The system includes an initial global model building module, a time delay calculation module, an optimization problem building module, an optimization problem solving module and a model training module; An initial global model building module, used to build an initial global model of the vehicle edge computing system; The delay and energy consumption calculation module is used to calculate the delay and energy consumption delay of vehicles in the vehicle edge computing system that can perform global model training, and calculate the total delay of all vehicles in the vehicle edge computing system that perform global model training based on the calculation results; An optimization problem building module, used to build a global model optimization problem based on the total latency of all vehicles trained with the global model in the vehicle edge computing system; The optimization problem solving module is used to split the global model optimization problem into four problems: vehicle selection problem, global model splitting layer problem, vehicle transmission power problem, vehicle calculation frequency, and vehicle bandwidth allocation rate problem. The vehicle selection problem, global model splitting layer problem, vehicle transmission power problem, vehicle calculation frequency, and vehicle bandwidth allocation rate problem are solved in sequence to obtain the vehicle selection strategy, global model splitting layer strategy, vehicle transmission power strategy, vehicle calculation frequency, and vehicle bandwidth allocation rate strategy. The model training module is used to select vehicles that can participate in model training according to the vehicle selection strategy, distribute the initial global model to the selected vehicles, select the optimal splitting layer of the global model corresponding to each vehicle based on the global model splitting layer strategy, split the global model of each vehicle into a server-side model and a vehicle-side model, calculate the optimal vehicle transmission power, optimal vehicle calculation frequency and optimal vehicle bandwidth allocation rate of each vehicle based on the vehicle transmission power strategy, vehicle calculation frequency and vehicle bandwidth allocation rate strategy, send the optimal vehicle transmission power, optimal vehicle calculation frequency, optimal vehicle bandwidth allocation rate and its corresponding vehicle-side model to the corresponding selected vehicle, perform iterative training of the initial global model, and obtain a trained global model, that is, an optimized global model; the server-side models are deployed on the edge cloud server, and the vehicle-side models are deployed on the corresponding selected vehicles.
Citation Information
Cited By
Distributed AI training service-oriented 6G computing power network adaptive splitting federated learning method
CN119031415A
Split federal learning method and system based on Internet of Vehicles, and computing device
CN120258176A
Vehicle networking-based split federated learning method, system and computing device
CN120258176B
Adaptive data parallel optimization distributed training method and system in heterogeneous environment
CN120633779A
