Cloud side-end collaborative vehicle-mounted terminal model distributed training aggregation method

Through the distributed training aggregation method of cloud-edge-end collaboration on-vehicle terminal models, the on-vehicle terminal equipment participating in the training is dynamically selected and asynchronous weight aggregation is adopted, which solves the problems of inefficiency, insufficient stability and communication overhead of traditional centralized model training in the Internet of Vehicles environment, and realizes efficient and stable deep learning model training.

CN119558384AActive Publication Date: 2025-03-04HUNAN UNIV
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411628276.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-14
Publication Date
2025-03-04
Estimated Expiration
2044-11-14

AI Technical Summary

Technical Problem

Traditional centralized model training methods face problems in low training efficiency, insufficient stability, large communication overhead and data security in the Internet of Vehicles environment, especially due to the large differences in computing capabilities of on-board terminal equipment, complex network conditions, and high data heterogeneity.

Method used

The distributed training aggregation method of cloud-edge-end collaboration on-vehicle terminal model is adopted. By establishing a three-layer vehicle network system architecture at the cloud-edge-end, the on-vehicle terminal equipment participating in the training is dynamically selected, and the integer linear planning problem is solved, and asynchronous weight aggregation is combined with the hysteresis interference perception method to ensure efficient utilization of limited network resources.

Benefits of technology

Dynamically select the optimal device to participate in training in scenarios that limit communication overhead, and improve the training speed of distributed model for deep learning in the Internet of Vehicles and the overall performance of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119558384A_ABST
    Figure CN119558384A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a distributed training aggregation method for a vehicle-mounted terminal model based on cloud side-end cooperation, and belongs to the technical field of computing, and the method specifically comprises the steps: building a cloud side-end three-layer Internet of Vehicles network system architecture; the vehicle-mounted terminal collects a local data set; the upper layer issues the initial model; the intermediate layer constructs a target problem, converts the target problem into an integer linear programming problem and solves the integer linear programming problem; locally training the initial model and sending the trained model to an intermediate layer; asynchronous weight aggregation is carried out by adopting a hysteresis interference sensing method; returning the aggregated model, and carrying out global model asynchronous aggregation by the cloud central server by adopting a lag interference sensing method to obtain an updated global model; and after aggregation of all global rounds is completed, the upper layer issues a final global model to the middle layer, and then the middle layer forwards the final global model to all the vehicle-mounted terminals. Through the scheme disclosed by the invention, the model distributed training efficiency on the terminal equipment is improved, and the communication overhead in the training process is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The disclosed embodiments relate to the field of computing technology, and in particular to a distributed training aggregation method for vehicle terminal models in collaboration with cloud, edge and end. Background Art

[0002] At present, in the field of Internet of Vehicles, deep learning technology has been widely used in practical scenarios such as autonomous driving, intelligent navigation, and traffic flow prediction. However, traditional centralized model training methods face significant challenges in the Internet of Vehicles environment and are difficult to meet actual needs. The computing power of on-board terminal devices varies greatly, and network conditions are complex and changeable, resulting in low efficiency and insufficient stability in model training. In addition, Internet of Vehicles data has the characteristics of non-independent and identically distributed (Non-iid), and the data of different vehicles is highly heterogeneous, which further increases the difficulty of training. In addition, the centralized training method relies on uploading a large amount of user-side data to the central server for processing, which not only increases communication overhead, but also causes data security issues.

[0003] It can be seen that there is an urgent need for an efficient cloud-edge-end collaborative distributed training aggregation method for vehicle terminal models that can fully utilize the computing power of cloud servers and edge devices. Summary of the invention

[0004] In view of this, an embodiment of the present disclosure provides a distributed training aggregation method for vehicle terminal models with cloud-edge-end collaboration, which at least partially solves the problems of low training efficiency and high communication overhead during training in the prior art.

[0005] The embodiment of the present disclosure provides a distributed training aggregation method for vehicle terminal models in cloud-edge-device collaboration, including:

[0006] Step 1, establish a cloud-edge-end three-layer Internet of Vehicles network system architecture, wherein the cloud-edge-end three-layer Internet of Vehicles network system architecture includes a cloud central server, a base station, a roadside unit and a vehicle terminal, the cloud central server is the upper layer, the base station and the roadside unit are the middle layer, and the vehicle terminal is the lower layer, wherein the lower layer vehicle terminal is the model training party, the upper layer cloud central server and the middle layer base station and roadside unit are the model aggregation party, the upper layer cloud central server is communicated with all the base stations and roadside units in the middle layer, and all the vehicle terminals in the lower layer are communicated with at least one middle layer base station or roadside unit;

[0007] Step 2, the vehicle-mounted terminals collect their own local data sets, wherein the local data sets include vehicle driving data, vehicle-mounted sensor measurement information and road condition information;

[0008] Step 3: The upper layer sends the initial model to all base stations and roadside units in the middle layer, and the middle layer forwards the initial model to the vehicle terminals in their respective jurisdictions;

[0009] Step 4: The middle layer constructs a target problem for dynamically selecting the vehicle terminals to participate in the training in each global round according to the performance indicators of the vehicle terminals, converts it into an integer linear programming problem and solves it, wherein the performance indicators include the computing power, local data set and network bandwidth of each vehicle terminal;

[0010] Step 5: In each global round, the selected vehicle terminal uses the local data set to train the initial model locally and sends the trained model to the intermediate layer;

[0011] Step 6: After receiving the trained model, the middle layer uses the delayed interference perception method to perform asynchronous weight aggregation;

[0012] Step 7: After the aggregation is completed in the middle layer, the aggregated model is transmitted back to the cloud central server. The cloud central server uses the delayed interference perception method to perform asynchronous aggregation of the global model to obtain an updated global model.

[0013] Step 8: After completing all global rounds of lower-layer model training and asynchronous aggregation of the upper and middle layers, the upper layer sends the final global model to the middle layer, which then forwards it to all vehicle terminals.

[0014] According to a specific implementation method of the embodiment of the present disclosure, the expression of the integer linear programming problem is:

[0015]

[0016] Among them, u i represents the updated utility of the vehicle terminal device i selected for local training in this round, T ij is the total round delay T ij , is the update rate of vehicle terminal device i based on the intermediate base station or roadside unit node j, m is the hyperparameter selected by the device, and the constraint condition is that the total bandwidth between all vehicle terminal devices i selected to participate in the training and the intermediate base station or roadside unit node j does not exceed the bandwidth upper limit B of the intermediate base station or roadside unit node j j ;

[0017] u i =affinity i +diversity i

[0018]

[0019] in, is the gradient of the model on the vehicle terminal device i, is the local loss function g on the vehicle terminal device i iThe gradient transpose of the vehicle terminal device i is the gradient affinity i It represents the similarity between the gradient of vehicle terminal device i and the current global gradient, and the gradient diversity of vehicle terminal device i i It indicates the degree of difference between the model gradient and that of all other vehicle-mounted terminal devices in the same middle-layer node cluster;

[0020] T ij ≈t down,ij +t train,i +t up,ij

[0021] Among them, t down,ij is the model downlink transmission delay from the middle layer node j to the vehicle terminal device i, t train,i is the time delay required for the vehicle terminal device i to perform local training after receiving the model sent by the middle layer, t up,ij The time required for the vehicle terminal device i to transmit the updated model back to the middle layer node j;

[0022]

[0023] Among them, b j is the total data transmission bandwidth of the middle layer node j, b ij is the average data transmission bandwidth between the vehicle terminal device i and the middle layer node j. For each middle layer node j, the total data transmission bandwidth of all selected devices cannot exceed the total bandwidth upper limit B j .

[0024] According to a specific implementation of the embodiment of the present disclosure, step 6 specifically includes:

[0025] Step 6.1, after each vehicle terminal completes the specified round of local training, the trained model is immediately transmitted back to the middle layer node to which it belongs;

[0026] Step 6.2, after the middle-layer node receives the model transmitted back by each vehicle terminal, the middle-layer node calculates the first aggregation weight of the transmitted model based on the first lag and the first interference weight of the model transmitted back by the vehicle terminal, and immediately performs asynchronous aggregation to obtain the updated middle-layer model.

[0027] According to a specific implementation of the embodiment of the present disclosure, step 6.2 specifically includes:

[0028] The base stations and roadside units in the middle layer adopt an asynchronous aggregation method of deep learning models based on hysteresis interference. After the middle layer nodes receive the trained model from the vehicle terminal, they immediately perform asynchronous aggregation of the model in the middle layer. The trained model is asynchronously aggregated and updated through the middle layer first. The difference between the round of the current latest global model and the global round of the trained model transmitted back by the vehicle terminal is used as the first hysteresis.

[0029] S k =h-τ k

[0030] Among them, S k is the model lag of the vehicle terminal k, h is the iteration round of the global model of the cloud central server corresponding to the trained model, τ k Iteration rounds of training and updating of the global model of the cloud central server based on the vehicle terminal;

[0031] Calculate the first interference weight of the vehicle terminal k relative to the global model corresponding to the cloud central server iteration round τ during this training process

[0032]

[0033] Among them, β is a hyperparameter, is the update vector of vehicle terminal k The update w of the global model from τ-1 to τ rounds τ -w τ-1 The cosine similarity between , which indicates the similarity of two vectors in direction;

[0034] The middle layer calculates the first aggregation weight of each trained model received in the asynchronous aggregation according to the first lag and the first interference weight, and immediately performs asynchronous aggregation to obtain an updated middle layer model, where the expression of the first aggregation weight is:

[0035]

[0036] in, is the aggregate weight of the model trained by vehicle terminal k in the current round, ||D k || represents the number of data samples held by the kth vehicle terminal, ||D mid || is the sum of data samples held by all vehicle terminals of the intermediate layer nodes in this round, α is a hyperparameter between 0 and 1, (h-τ k +1) -q is a polynomial hysteresis function, h is the current global aggregation round, τ kis the round in which the k-th vehicle terminal last received the global model, q is a coefficient used to control the influence of hysteresis on weight, and its value is greater than 0;

[0037] Each time the vehicle terminal k is calculated, the updated model ω is trained k 'After the first aggregation weight, perform asynchronous aggregation of the intermediate layer model

[0038]

[0039] Among them, ω' mid is the updated weight of the model carried by the middle-layer node after this asynchronous aggregation, ω mid is the weight of the model carried by the intermediate node before aggregation, Arrived(E m ) indicates that in this round E m The vehicle terminals selected for local training transmit the model back to the middle layer.

[0040] According to a specific implementation of the embodiment of the present disclosure, step 7 specifically includes:

[0041] Step 7.1, after the aggregation is completed in the middle layer, the aggregated model is transmitted back to the cloud central server;

[0042] Step 7.2, after the cloud central server receives the models transmitted back by each base station and the roadside unit, the cloud central server calculates the second aggregation weight based on the second hysteresis and the second interference weight of the models transmitted back by the base station and the roadside unit, and immediately performs asynchronous aggregation to obtain an updated global model;

[0043] In step 7.3, if the pre-set global training aggregation round is not reached, the upper-layer cloud central server will send the updated global model to all base stations and roadside units in the middle layer. The middle layer will forward the global model sent by the upper layer to the lower-layer vehicle terminals within their respective jurisdictions, and continue the new round of training and aggregation process from step 4 to step 7.3 until all global rounds of aggregation are completed.

[0044] According to a specific implementation of the embodiment of the present disclosure, step 7.2 specifically includes:

[0045] Calculate the second interference weight of the middle layer node j relative to the global model corresponding to the cloud central server iteration round τ in this training process

[0046]

[0047] Among them, β is a hyperparameter, Θ(Δ j τ ,w τ -w τ-1) is the update vector Δ of the middle layer node j j τ The update w of the global model from τ-1 to τ rounds τ -w τ-1 The cosine similarity between , which indicates the similarity of two vectors in direction;

[0048] The upper cloud central server uses the second hysteresis and the second interference weight to define the updated model ω after the middle layer base station and roadside unit node j are aggregated mid,j 'The second aggregation weight when the model is aggregated

[0049]

[0050] Among them, p j τ is the aggregate weight of the model returned by the middle layer node in the current round, ||D mid,j || represents the local data set size of the vehicle terminal set managed by the middle layer node j, ||D global || is the sum of the data sample sets held by all vehicle terminals in the lower layer, α is a hyperparameter between 0 and 1, (h-τ j +1) -q is a polynomial hysteresis function, h is the current global aggregation round, τ j is the round in which the middle layer node j last received the global model;

[0051] After calculating the updated model ω' after the intermediate node j is aggregated mid,j After the second aggregation weight, the asynchronous aggregation of the upper global model is performed

[0052]

[0053] Among them, ω' global is the updated weight of the deep learning model held by the cloud central server after this asynchronous aggregation, ω global is the weight of the deep learning model held by the cloud central server before aggregation, p j τ It is the aggregation weight of the model after aggregation of the middle layer node j in the current global round.

[0054] The cloud-edge-end collaborative vehicle terminal model distributed training aggregation scheme in the disclosed embodiment includes: step 1, establishing a cloud-edge-end three-layer vehicle network system architecture, wherein the cloud-edge-end three-layer vehicle network system architecture includes a cloud central server, a base station, a roadside unit and a vehicle terminal, the cloud central server is the upper layer, the base station and the roadside unit are the middle layer, and the vehicle terminal is the lower layer, wherein the lower layer vehicle terminal is the model training party, the upper layer cloud central server and the middle layer base station and roadside unit are the model aggregation party, the upper layer cloud central server is communicated with all the base stations and roadside units in the middle layer, and all the vehicle terminals in the lower layer are communicated with at least one middle layer base station or roadside unit; step 2, the vehicle terminals collect their respective local data sets, wherein the local data sets include vehicle driving data, vehicle sensor measurement information and road condition information; step 3, the upper layer sends the initial model it holds to all base stations and roadside units in the middle layer, and the middle layer forwards the initial model to the vehicles within their respective jurisdictions on-board terminal; step 4, the middle layer constructs the target problem of dynamically selecting the on-board terminal to participate in the training in each global round according to the performance indicators of the on-board terminal and converts it into an integer linear programming problem and solves it, wherein the performance indicators include the computing power of each on-board terminal, the local data set and the network bandwidth; step 5, in each global round, the selected on-board terminal uses the local data set to train the initial model locally and sends the trained model to the middle layer; step 6, after receiving the trained model, the middle layer uses the delayed interference perception method to perform asynchronous weight aggregation; step 7, after the middle layer completes the aggregation, the aggregated model is transmitted back to the cloud central server, and the cloud central server uses the delayed interference perception method to perform global model asynchronous aggregation to obtain an updated global model; step 8, after completing the lower layer model training of all global rounds and the asynchronous aggregation of the upper and middle layers, the upper layer sends the final global model to the middle layer, and then the middle layer forwards it to all on-board terminals.

[0055] The beneficial effects of the embodiments of the present disclosure are as follows: through the scheme of the present disclosure, the update utility and bandwidth limitation of the vehicle-mounted terminal are comprehensively considered, and the optimal device for each round can be dynamically selected to participate in the training in the bandwidth-limited scenario; the asynchronous aggregation of deep learning models is realized through the middle-layer base station, roadside unit and the upper-layer central cloud central server, ensuring efficient use of limited network resources to obtain the global model with the best performance, thereby reducing the communication overhead; by adopting the delayed interference perception method to dynamically adjust the asynchronous aggregation weight, the training speed of the deep learning distributed model of the Internet of Vehicles and the overall performance of the model are improved, and the network communication overhead during the training process is reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0057] Figure 1 A flowchart of a distributed training aggregation method for a vehicle terminal model in cloud-edge-device collaboration provided in an embodiment of the present disclosure;

[0058] Figure 2 A three-layer cloud-edge-end vehicle networking network system architecture diagram provided for an embodiment of the present disclosure;

[0059] Figure 3 A schematic diagram of an intermediate-layer base station and a roadside unit provided in an embodiment of the present disclosure dynamically selecting the best vehicle terminal in each round for distributed training of a deep learning model and back-transmitting it based on the update utility and bandwidth limitation constraints of the deep learning models of each vehicle terminal device in the lower layer;

[0060] Figure 4 The intermediate layer base station and roadside unit provided in the embodiment of the present disclosure calculate the first hysteresis and the first interference weight based on the model transmitted back by each vehicle-mounted terminal device, obtain the first aggregation weight, and perform intermediate layer asynchronous aggregation. The intermediate layer transmits the aggregated model back to the upper layer, and the upper layer cloud central server calculates the second hysteresis and the second interference weight, obtains the second aggregation weight, and performs global model asynchronous aggregation. DETAILED DESCRIPTION

[0061] The embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.

[0062] The following describes the embodiments of the present disclosure through specific examples, and those skilled in the art can easily understand other advantages and effects of the present disclosure from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all of the embodiments. The present disclosure can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present disclosure. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present disclosure.

[0063] It should be noted that various aspects of the embodiments within the scope of the appended claims are described below. It should be apparent that the aspects described herein may be embodied in a wide variety of forms, and any specific structure and / or function described herein is merely illustrative. Based on the present disclosure, it should be understood by those skilled in the art that an aspect described herein may be implemented independently of any other aspect, and two or more of these aspects may be combined in various ways. For example, any number of aspects described herein may be used to implement the device and / or practice the method. In addition, other structures and / or functionalities other than one or more of the aspects described herein may be used to implement this device and / or practice this method.

[0064] It should also be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present disclosure. The illustrations only show components related to the present disclosure rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the form, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.

[0065] Additionally, in the following description, specific details are provided to facilitate a thorough understanding of the examples. However, it will be understood by those skilled in the art that the aspects described may be practiced without these specific details.

[0066] With the development of intelligent connected vehicle technology, the Internet of Vehicles, as an important part of the intelligent transportation system, has built a complex network architecture through on-board terminal equipment, base stations, roadside units, and central servers, covering data communication scenarios such as vehicle-to-vehicle, vehicle-road, vehicle-person, and vehicle-cloud. With the increasing average computing power of terminal equipment and the increasing popularity of large-scale Internet of Vehicles applications, deep learning models are widely used in data processing and task decision-making of on-board terminal equipment. In addition, a large amount of data interaction will be generated in real time between the on-board sensor units and the external environment. How to effectively process and analyze these massive data while ensuring user privacy and security to realize the intelligent services of the Internet of Vehicles has become a hot topic of research in recent years.

[0067] In the field of Internet of Vehicles, deep learning technology has been widely used in practical scenarios such as autonomous driving, intelligent navigation, and traffic flow prediction. However, traditional centralized model training methods face significant challenges in the Internet of Vehicles environment and are difficult to meet actual needs. The computing power of on-board terminal devices varies greatly, and network conditions are complex and changeable, resulting in low efficiency and insufficient stability in model training. In addition, Internet of Vehicles data has the characteristics of non-independent and identically distributed (Non-iid), and the data of different vehicles is highly heterogeneous, which further increases the difficulty of training. In addition, the centralized training method relies on uploading a large amount of user-side data to the central server for processing, which not only increases communication overhead, but also causes data security issues.

[0068] It can be seen that the data in the Internet of Vehicles is highly heterogeneous. The type, quantity and quality of data collected by different vehicles in different environments vary greatly. There are significant differences in the computing and network conditions of on-board terminal devices. Devices with weaker performance or larger network latency will slow down the overall progress during training, and even affect the overall efficiency due to frequent disconnections. The Internet of Vehicles network environment is complex and changes frequently. The mobility of vehicles makes network latency and bandwidth fluctuations unpredictable, resulting in limited model convergence speed and stability. These practical problems need to be urgently addressed.

[0069] The disclosed embodiments provide a distributed training aggregation method for vehicle terminal models in a cloud-edge-end collaborative manner. The method can be applied to the vehicle terminal model training process in a vehicle networking scenario.

[0070] See also Figure 1 , is a flow chart of a distributed training aggregation method for vehicle terminal models in cloud-edge-device collaboration provided by an embodiment of the present disclosure. Figure 1 As shown, the method mainly comprises the following steps:

[0071] Step 1, establish a cloud-edge-end three-layer Internet of Vehicles network system architecture, wherein the cloud-edge-end three-layer Internet of Vehicles network system architecture includes a cloud central server, a base station, a roadside unit and a vehicle terminal, the cloud central server is the upper layer, the base station and the roadside unit are the middle layer, and the vehicle terminal is the lower layer, wherein the lower layer vehicle terminal is the model training party, the upper layer cloud central server and the middle layer base station and roadside unit are the model aggregation party, the upper layer cloud central server is communicated with all the base stations and roadside units in the middle layer, and all the vehicle terminals in the lower layer are communicated with at least one middle layer base station or roadside unit;

[0072] In specific implementation, a three-layer cloud-edge-end IoV network system architecture can be established. Figure 2As shown, the cloud central server is the upper layer, the base station and the roadside unit are the middle layer, and the vehicle-mounted terminal device is the lower layer, so as to build a complete Internet of Vehicles network system, in which the lower-layer vehicle-mounted terminal is the model training party, the upper-layer cloud central server and the middle-layer base station and roadside unit are the model aggregation party, and the upper-layer cloud central server can establish a connection path with all base stations and roadside units in the middle layer, such as using wired communication methods such as Ethernet, and all terminal devices in the lower layer can be connected to the middle-layer base station or roadside unit through wireless communication methods such as V2X. For the same terminal device, it needs to establish a connection path with one or more middle layers.

[0073] Step 2, the vehicle-mounted terminals collect their own local data sets, wherein the local data sets include vehicle driving data, vehicle-mounted sensor measurement information and road condition information;

[0074] In specific implementation, the vehicle terminal can collect and process road condition information in real time through sensor devices and vehicle ECU, and store the collected information persistently in local storage media. The vehicle terminal devices constitute a network node cluster with heterogeneous systems and data.

[0075] For example, the vehicle terminal will collect vehicle driving data, vehicle sensor measurement information and road condition information in real time. The specific process is as follows:

[0076] The data collected by the vehicle terminal device through the sensor unit is usually not independent and identically distributed. Each vehicle terminal device holds a different data set and is private to it. Let D = {D1, D2, ..., D i ,…,D j ,…,D n} represents the local data distribution set held by all vehicle-mounted terminal devices, that is, for YesD i ≠D j For the data distribution D of vehicle terminal device i i , which includes n collected by the vehicle terminal device i i Data sample points

[0077] Step 3: The upper layer sends the initial model to all base stations and roadside units in the middle layer, and the middle layer forwards the initial model to the vehicle terminals in their respective jurisdictions;

[0078] In the specific implementation, considering the communication delay and bandwidth limitation of the three-layer Internet of Vehicles network system composed of the cloud, base stations, roadside units and vehicle-mounted terminal equipment, as well as the heterogeneity of the Internet of Vehicles cluster network system, the vehicle-mounted terminal is used for distributed training of deep learning models. Generally, a lightweight neural network model is adopted. Using the network connection established in step 1, the upper-layer cloud central server will send the initial neural network model held by the cloud to all base stations and roadside units in the middle layer. The middle layer will forward the neural network model sent by the upper layer to the lower-layer vehicle-mounted terminal equipment within their respective jurisdictions.

[0079] Step 4: The middle layer constructs a target problem for dynamically selecting the vehicle terminals to participate in the training in each global round according to the performance indicators of the vehicle terminals, converts it into an integer linear programming problem and solves it, wherein the performance indicators include the computing power, local data set and network bandwidth of each vehicle terminal;

[0080] Furthermore, the expression of the integer linear programming problem is

[0081]

[0082] Among them, u i represents the updated utility of the vehicle terminal device i selected for local training in this round, T ij is the total round delay T ij , is the update rate of vehicle terminal device i based on the intermediate base station or roadside unit node j, m is the hyperparameter selected by the device, and the constraint condition is that the total bandwidth between all vehicle terminal devices i selected to participate in the training and the intermediate base station or roadside unit node j does not exceed the bandwidth upper limit B of the intermediate base station or roadside unit node j j ;

[0083] u i =affinity i +diversity i

[0084]

[0085] in, is the gradient of the model on the vehicle terminal device i, is the local loss function g on the vehicle terminal device i i The gradient transpose of the vehicle terminal device i is the gradient affinity i It represents the similarity between the gradient of vehicle terminal device i and the current global gradient, and the gradient diversity of vehicle terminal device i iIt indicates the degree of difference between the model gradient and that of all other vehicle-mounted terminal devices in the same middle-layer node cluster;

[0086] T ij ≈t down,ij +t train,i +t up,ij

[0087] Among them, t down,ij is the model downlink transmission delay from the middle layer node j to the vehicle terminal device i, t train,i is the time delay required for the vehicle terminal device i to perform local training after receiving the model sent by the middle layer, t up,ij The time required for the vehicle terminal device i to transmit the updated model back to the middle layer node j;

[0088]

[0089] Among them, b j is the total data transmission bandwidth of middle-layer node j, b ij is the average data transmission bandwidth between the vehicle terminal device i and the middle layer node j. For each middle layer node j, the total data transmission bandwidth of all selected devices cannot exceed the total bandwidth upper limit B j .

[0090] In the specific implementation, the middle layer constructs the target problem of dynamically selecting the vehicle terminals participating in the training in each global round according to the computing power of the vehicle terminal, the local data set and the network bandwidth, and converts it into an integer linear programming problem and solves it.

[0091] Specifically, the communication delay of the three-layer cloud-edge-end Internet of Vehicles network architecture is:

[0092] The total delay of a round of communication, that is, the total round delay T ij The calculation formula is:

[0093] T ij =t cloud,j +t down,ij +t train,i +t up,ij

[0094] Among them, t cloud,j is the total communication delay of the model uplink and downlink transmission from the cloud to the base station and the roadside unit, t down,ij is the model downlink transmission delay from the middle layer node j to the vehicle terminal device i, t train,i is the time delay required for the vehicle terminal device i to perform local training after receiving the model sent by the middle layer, t up,ijThe time required for the vehicle terminal device i to transmit the updated model back to the intermediate node j. Since the cloud central server, base station and roadside unit usually have much greater computing power and resources than the terminal device and have a higher bandwidth connection, t cloud,j In the total delay T ij can be ignored in the calculation process, and the total round delay T ij The calculation formula is:

[0095] T ij ≈t down,ij +t train,i +t up,ij

[0096] The communication bandwidth limitations of the three-layer cloud-edge-end IoV network architecture described in step 3 are as follows:

[0097] The total data transmission bandwidth calculation formula between the middle layer node j and all its vehicle-mounted terminal devices is:

[0098]

[0099] Among them, b j is the total data transmission bandwidth of middle-layer node j, b ij is the average data transmission bandwidth between the vehicle terminal device i and the middle layer node j. For each middle layer node j, the total data transmission bandwidth of all selected devices cannot exceed the total bandwidth upper limit B j ;

[0100] The middle-layer base station or roadside unit node j selects the vehicle-mounted terminal equipment participating in the training in this round connected to it, and defines the selection criterion as an integer linear programming problem, and the formula is:

[0101]

[0102]

[0103] Among them, u i represents the updated utility of the vehicle terminal device i selected for local training in this round, T ij The total round delay T described in claim 3 ij , k is a hyperparameter for device selection, which can be adjusted according to the actual network cluster size. The constraint condition is that the total bandwidth between all vehicle-mounted terminal devices i selected for training and the intermediate base station or roadside unit node j does not exceed the bandwidth upper limit B of the intermediate base station or roadside unit node j jThe objective function aims to maximize the weighted sum of the update utility and update rate of all terminal devices selected for training under the premise of satisfying the constraints. By considering the update utility and communication delay of the vehicle-mounted terminal devices, this method can select those devices that contribute the most to the model training, while ensuring the effective use of communication resources to meet the actual application scenarios of the Internet of Vehicles with limited resources.

[0104] Update utility u of vehicle terminal device i i It is used to evaluate the contribution of the local model update on each device to the global model. The goal is to select some samples in a limited space so that these samples can retain the effective information about the data distribution to the greatest extent. This indicator is calculated by calculating the gradient affinity of the model on the vehicle terminal device i. i and gradient diversity i The sum of these two indicators is calculated as follows:

[0105] u i =affinity i +diversity i

[0106]

[0107] in, is the gradient of the model on the vehicle terminal device i, is the local loss function g on the vehicle terminal device i i The gradient transpose of the vehicle terminal device i is the gradient affinity i It represents the similarity between the gradient of vehicle terminal device i and the current global gradient. The greater the gradient affinity, the closer the gradient of vehicle terminal device i is to the global gradient, so the contribution of the vehicle terminal device to the global model is greater; Gradient diversity of vehicle terminal device i i It represents the degree of difference between the model gradient and that of all other vehicle-mounted terminal devices in the same middle-layer node cluster. The larger the value of gradient diversity, the greater the difference between the gradient of vehicle-mounted terminal device i and the gradient of other devices, that is, the data distribution of the vehicle-mounted terminal device has higher diversity.

[0108] If there is a connection path between the same vehicle terminal device and multiple intermediate-layer base stations and roadside units. After each aggregation is completed, the vehicle terminal device can be switched to establish a connection with another intermediate-layer node. Specifically, the integer linear programming problem can be solved to obtain the optimal solution for the subset of vehicle terminal devices participating in asynchronous training, that is, each intermediate-layer base station and roadside unit node will reselect from the lower-layer vehicle terminal devices to which they can establish connections in each global training round under the constraint of the total transmission bandwidth of the intermediate-layer nodes, maximizing the weighted sum of the update utility and the mth power of the update rate of all terminal devices selected for training. By considering the update utility and communication delay of the vehicle terminal devices, this method can select those devices that contribute most to model training.

[0109] Step 5: In each global round, the selected vehicle terminal uses the local data set to train the initial model locally and sends the trained model to the intermediate layer;

[0110] In specific implementation, in each global round, the middle layer can specify the number of rounds for the vehicle terminal device to be trained locally as a fixed value, and the selected vehicle terminal device will use the local data set to train the neural network model locally.

[0111] Step 6: After receiving the trained model, the middle layer uses the delayed interference perception method to perform asynchronous weight aggregation;

[0112] Based on the above embodiment, step 6 specifically includes:

[0113] Step 6.1, after each vehicle terminal completes the specified round of local training, the trained model is immediately transmitted back to the middle layer node to which it belongs;

[0114] Step 6.2, after the middle-layer node receives the model transmitted back by each vehicle terminal, the middle-layer node calculates the first aggregation weight of the transmitted model based on the first lag and the first interference weight of the model transmitted back by the vehicle terminal, and immediately performs asynchronous aggregation to obtain the updated middle-layer model.

[0115] Furthermore, the step 6.2 specifically includes:

[0116] The base stations and roadside units in the middle layer adopt an asynchronous aggregation method of deep learning models based on hysteresis interference. After the middle layer nodes receive the trained model from the vehicle terminal, they immediately perform asynchronous aggregation of the model in the middle layer. The trained model is asynchronously aggregated and updated through the middle layer first. The difference between the round of the current latest global model and the global round of the trained model transmitted back by the vehicle terminal is used as the first hysteresis.

[0117] S k =h-τk

[0118] Among them, S k is the model lag of the vehicle terminal k, h is the iteration round of the global model of the cloud central server corresponding to the trained model, τ k Iteration rounds of training and updating of the global model of the cloud central server based on the vehicle terminal;

[0119] Calculate the first interference weight of the vehicle terminal k relative to the global model corresponding to the cloud central server iteration round τ during this training process

[0120]

[0121] Among them, β is a hyperparameter, is the update vector of vehicle terminal k The update w of the global model from τ-1 to τ rounds τ -w τ-1 The cosine similarity between , which indicates the similarity of two vectors in direction;

[0122] The middle layer calculates the first aggregation weight of each trained model received in the asynchronous aggregation according to the first lag and the first interference weight, and immediately performs asynchronous aggregation to obtain an updated middle layer model, where the expression of the first aggregation weight is:

[0123]

[0124] in, is the aggregate weight of the model trained by vehicle terminal k in the current round, ||D k || represents the number of data samples held by the kth vehicle terminal, ||D mid || is the sum of data samples held by all vehicle terminals of the intermediate layer nodes in this round, α is a hyperparameter between 0 and 1, (h-τ k +1) -q is a polynomial hysteresis function, h is the current global aggregation round, τ k is the round in which the k-th vehicle terminal last received the global model, q is a coefficient used to control the influence of hysteresis on weight, and its value is greater than 0;

[0125] Each time the vehicle terminal k is calculated, the updated model ω is trained k 'After the first aggregation weight, perform asynchronous aggregation of the intermediate layer model

[0126]

[0127] Among them, ω' midis the updated weight of the model carried by the middle-layer node after this asynchronous aggregation, ω mid is the weight of the model carried by the intermediate node before aggregation, Arrived(E m ) indicates that in this round E m The vehicle terminals selected for local training transmit the model back to the middle layer.

[0128] In the specific implementation, due to the data heterogeneity and system heterogeneity of each vehicle-mounted terminal device, that is, the data set and computing power of each vehicle-mounted terminal device are different. In addition, the network connection status between each vehicle-mounted terminal device and the intermediate-layer base station or roadside unit node also changes with the continuous movement of the vehicle. Therefore, the end time of each vehicle-mounted terminal device using the local data set to complete the training is different. After each vehicle-mounted terminal device completes the specified round of local training, it will immediately return the trained model to the intermediate-layer base station or roadside unit node to which it belongs. After the intermediate-layer base station and the roadside unit node receive the neural network model returned by each vehicle-mounted terminal device, the intermediate-layer node will perform asynchronous aggregation of the model using the delayed interference perception method, that is, based on the first hysteresis and the first interference weight of the model returned by the vehicle-mounted terminal device, the first aggregation weight of the model returned this time is calculated at the intermediate-layer node, and asynchronous aggregation is immediately performed to obtain an updated intermediate-layer model.

[0129] Specifically, the middle-layer base stations and roadside unit nodes adopt an asynchronous aggregation method of deep learning models based on delayed interference. Asynchronous aggregation allows the middle-layer nodes to perform asynchronous aggregation of the middle-layer models immediately after receiving the models trained and transmitted back from the vehicle-mounted terminal devices, so as to update the middle-layer models. Compared with directly uploading the model parameters of the vehicle-mounted terminal devices to the cloud central server for aggregation, this method can reduce the communication overhead to a large extent. In this case, due to the differences in communication delays and device computing capabilities, the models transmitted back by the vehicle-mounted terminal devices received by the middle-layer nodes may be based on global models of different rounds for training and update. Therefore, the middle layer will calculate the weight of each received transmitted model in the asynchronous aggregation based on the difference between the round of the current latest global model and the global round of the model transmitted back from the device.

[0130] Asynchronous aggregation allows the system to perform model aggregation without global synchronization. Due to differences in communication network latency and device computing power, the models sent back by different vehicle-mounted terminal devices to the middle-layer nodes and the models received from the middle layer by the upper cloud may be updated based on global models of different rounds. The client may be trained and updated based on an outdated global model. Therefore, the weight of each model in asynchronous aggregation should be set based on the difference between the round of the current latest global model and the global round of the model sent back from the lower layer to the upper layer, that is, the model lag.

[0131] The model lag is the difference between the global iteration round of the global model that the vehicle terminal device k last received from the server and the iteration round of the current latest global model. The first lag of the model trained by client k this time is:

[0132] S k =h-τ k

[0133] Among them, S k is the model lag of client k, h is the iteration round of the server global model corresponding to the latest global model, τ k The number of iterations of the server's global model that the client is trained on.

[0134] In the aggregation process, the consistency of the client update direction and the global model update direction must also be considered. The cosine similarity is used to evaluate the consistency of the client update direction and the global model update direction. The specific formula is:

[0135]

[0136] in, is the first interference weight of client k relative to the global model corresponding to the server iteration round τ in this training process, which measures the consistency of the model update direction of client k and the global model update direction; β is a hyperparameter that is used to control the influence of the interference weight in the aggregation process and can be adjusted according to the actual application scenario; is the update vector of client k The update w of the global model from τ-1 to τ rounds τ -w τ-1 The cosine similarity between the two vectors indicates the similarity in direction, and its value range is between [-1,1].

[0137] The cosine similarity between client updates and global model updates is calculated and converted into a value between 0 and 1 to measure the weight of client updates in asynchronous aggregation. Specifically:

[0138] when When it is close to 1, it means that the client update is approximately consistent with the global update direction. At this time, the weight of the client update in the aggregation may be high. When it is close to 0, it means that the direction of client update is approximately opposite to that of global update. In this case, the weight of client update in aggregation may be low.

[0139] The intermediate base station and roadside unit nodes use the model hysteresis and interference weight to define the updated model ω after client k trains k 'The first aggregation weight during model aggregation, the specific formula is:

[0140]

[0141] in, is the aggregate weight of the client in the current round, ||D k || represents the number of data samples held by the kth client, ||D mid || is the sum of data samples held by all clients of the middle-layer nodes in this round, α is a hyperparameter between 0 and 1, which is used to adjust the impact of the hysteresis function on the aggregation weight and can be adjusted according to the actual application scenario; (h-τ k +1) -q is a polynomial hysteresis function, which is used to measure the timeliness of the model update of the kth client relative to the current global model update. h is the current global aggregation round, τ k is the round in which the kth client last received the global model, and q is a coefficient used to control the influence of lag on weight, and its value is greater than 0.

[0142] The aggregation weight provides a comprehensive evaluation mechanism, which uses hysteresis to consider the timeliness of client updates and interference weight to consider the consistency of the client model update direction with the global model update direction. This enables a more accurate evaluation of the actual value of client training updates to the global model, and effectively balances the contribution of different client updates to the global model, thereby optimizing the overall performance and generalization ability of the global neural network model ultimately obtained through distributed training and asynchronous aggregation.

[0143] After receiving the model sent back by the vehicle terminal device k each time, the intermediate base station and the roadside unit node calculate the updated model ω after training the client k k 'After the aggregation weights are calculated, the asynchronous aggregation of the intermediate layer model will be performed immediately. The specific formula is:

[0144]

[0145] Among them, ω' mid is the updated weight of the deep learning model carried by the middle-layer nodes after this asynchronous aggregation, ωmid is the weight of the deep learning model carried by the intermediate layer node before aggregation, Arrived(E m ) indicates that in this round E m The model is selected for local training and then sent back to the vehicle terminal device set in the middle layer. is the aggregate weight of the client in the current round. The overall formula indicates that the aggregate weight of the model transmitted by the vehicle terminal device is calculated based on the difference between the weight of the model updated after training of all vehicle terminal devices participating in this round of training and the weight of the deep learning model carried by the intermediate layer node before aggregation. Perform weighted summation to achieve asynchronous aggregation update of the deep learning model carried by the middle-layer nodes.

[0146] Step 7: After the aggregation is completed in the middle layer, the aggregated model is transmitted back to the cloud central server. The cloud central server uses the delayed interference perception method to perform asynchronous aggregation of the global model to obtain an updated global model.

[0147] Based on the above embodiment, step 7 specifically includes:

[0148] Step 7.1, after the aggregation is completed in the middle layer, the aggregated model is transmitted back to the cloud central server;

[0149] Step 7.2, after the cloud central server receives the models transmitted back by each base station and the roadside unit, the cloud central server calculates the second aggregation weight based on the second hysteresis and the second interference weight of the models transmitted back by the base station and the roadside unit, and immediately performs asynchronous aggregation to obtain an updated global model;

[0150] In step 7.3, if the pre-set global training aggregation round is not reached, the upper-layer cloud central server will send the updated global model to all base stations and roadside units in the middle layer. The middle layer will forward the global model sent by the upper layer to the lower-layer vehicle terminals within their respective jurisdictions, and continue the new round of training and aggregation process from step 4 to step 7.3 until all global rounds of aggregation are completed.

[0151] Furthermore, the step 7.2 specifically includes:

[0152] Calculate the second interference weight of the middle layer node j relative to the global model corresponding to the cloud central server iteration round τ in this training process

[0153]

[0154] Among them, β is a hyperparameter, Θ(Δ j τ ,w τ -w τ-1) is the update vector Δ of the middle layer node j j τ The update w of the global model from τ-1 to τ rounds τ -w τ-1 The cosine similarity between , which indicates the similarity of two vectors in direction;

[0155] The upper cloud central server uses the second hysteresis and the second interference weight to define the updated model ω after the middle layer base station and roadside unit node j are aggregated mid,j 'The second aggregation weight when the model is aggregated

[0156]

[0157] Among them, p j τ is the aggregate weight of the model returned by the middle layer node in the current round, ||D mid,j || represents the local data set size of the vehicle terminal set managed by the middle layer node j, ||D global || is the sum of the data sample sets held by all vehicle terminals in the lower layer, α is a hyperparameter between 0 and 1, (h-τ j +1) -q is a polynomial hysteresis function, h is the current global aggregation round, τ j is the round in which the middle layer node j last received the global model;

[0158] After calculating the updated model ω' after the intermediate node j is aggregated mid,j After the second aggregation weight, the asynchronous aggregation of the upper global model is performed

[0159]

[0160] Among them, ω' global is the updated weight of the deep learning model held by the cloud central server after this asynchronous aggregation, ω global is the weight of the deep learning model held by the cloud central server before aggregation, p j τ The aggregate weight of the model obtained by aggregating the middle layer node j in the current global round.

[0161] In specific implementation, the aggregation process at the upper layer can be as follows:

[0162] Step 7.1, after the intermediate layer base station and roadside unit node described in step 6.2 complete the intermediate layer asynchronous aggregation, the aggregated model will be immediately transmitted back to the upper layer cloud central server;

[0163] Step 7.2, after the upper-layer cloud central server receives the neural network model transmitted back by each intermediate-layer base station and roadside unit node, the upper-layer cloud central server will perform asynchronous aggregation of the global model using the delayed interference perception method, that is, calculate the second aggregation weight based on the second hysteresis and the second interference weight of the neural network model transmitted back by the intermediate-layer base station and the roadside unit node, and immediately perform asynchronous aggregation to obtain an updated global model;

[0164] The upper central server described in step 7.2 adopts a global model asynchronous aggregation method based on delayed interference perception, specifically:

[0165] After receiving the model returned from the middle layer after aggregation, the upper-layer cloud central server immediately performs asynchronous aggregation of the upper-layer global model and updates the global model immediately. When receiving the model after aggregation from the middle layer, the upper-layer cloud central server will calculate the weight of each returned model it receives in the global asynchronous aggregation based on the difference between the round of the current latest global model and the global round of the model returned by the middle layer.

[0166] The cosine similarity is used to evaluate the consistency between the update direction of the intermediate layer node model and the update direction of the global model. The specific formula is:

[0167]

[0168] Among them, Θ j τ is the second interference weight of the middle layer node j relative to the global model corresponding to the server iteration round τ in this training process; β is a hyperparameter, which is used to control the influence of the interference weight in the aggregation process and can be adjusted according to the actual application scenario; Θ(Δ j τ ,w τ -w τ-1 ) is the update vector Δ of the middle layer node j j τ The update w of the global model from τ-1 to τ rounds τ -w τ-1 The cosine similarity between the two vectors indicates the similarity in direction, and its value range is between [-1,1].

[0169] The upper cloud central server uses the second hysteresis and the second interference weight of the model to define the updated model ω after the middle layer base station and roadside unit node j are aggregated mid,j 'The second aggregation weight during model aggregation, the specific formula is:

[0170]

[0171] Among them, pj τ is the aggregate weight of the model returned by the middle layer node in the current round, ||D mid,j || represents the local data set size of the vehicle terminal device set managed by the middle layer node j, ||D global || is the sum of the data sample sets held by all clients in the lower layer, α is a hyperparameter between 0 and 1, which is used to adjust the impact of the hysteresis function on the aggregation weight and can be adjusted according to the actual application scenario; (h-τ j +1) -q is a polynomial hysteresis function, which is used to measure the timeliness of the model update of the intermediate node j relative to the current global model update. h is the current global aggregation round, τ j is the round in which the middle layer node j last received the global model.

[0172] After receiving the model sent back by the middle-layer node j each time, the upper cloud central server calculates the updated model ω' after the middle-layer node j is aggregated. mid,j After the aggregation weights are calculated, asynchronous aggregation of the global model on the cloud will be performed immediately. The specific formula is:

[0173]

[0174] Among them, ω' global is the updated weight of the deep learning model held by the cloud central server after this asynchronous aggregation, ω global is the weight of the deep learning model held by the cloud central server before aggregation, p j τ is the aggregate weight of the middle-layer node j in the current round. The overall formula represents that according to the difference between the model weights returned by all middle-layer nodes and the weights of the global model held by the cloud before aggregation, the aggregate weight p of the middle-layer node j is calculated. j τ Perform weighted summation to achieve global asynchronous aggregation update of the deep learning model carried by the cloud central server.

[0175] Step 8: After completing all global rounds of lower-layer model training and asynchronous aggregation of the upper and middle layers, the upper layer sends the final global model to the middle layer, which then forwards it to all vehicle terminals.

[0176] In specific implementation, after completing all rounds of lower-layer model training and asynchronous aggregation of upper-layer and middle-layer models, the upper-layer cloud central server uses the global neural network model aggregated in step 7.2 to send the final global model to the middle layer, which then forwards the final neural network model to all vehicle-mounted terminal devices. The vehicle-mounted terminal devices will deploy the model locally and apply it to actual vehicle networking applications such as autonomous driving and intelligent navigation in real vehicle scenarios.

[0177] Figure 3 The schematic diagram shows the method flow of the intermediate-layer base station and roadside unit proposed in the present invention, which dynamically selects the optimal vehicle-mounted terminal device in each round for distributed training of deep learning models and transmits them back based on the update utility and bandwidth limitation of the deep learning models on the lower-layer vehicle-mounted terminals. The traditional distributed training strategy for selecting clients to participate in training in each round is based on random selection or fixed selection. Compared with other comparative algorithms, the method proposed in the present invention is based on the terminal's update utility index for selection, and can select those vehicle-mounted terminal devices that contribute the most to model training, ensuring the effective use of communication resources and meeting the scenario of limited bandwidth in the Internet of Vehicles.

[0178] Figure 4 The present invention shows that the intermediate base station and the roadside unit proposed in the present invention calculate the delayed interference and aggregation weight based on the model transmitted back by each vehicle terminal, perform asynchronous aggregation, and the upper-layer cloud central server performs asynchronous aggregation of the global model using the delayed interference perception method. When multiple terminal devices are required to collaborate to complete model training, the traditional synchronous distributed training method is inefficient. When some vehicle-mounted terminal devices are unable to upload model updates in time due to insufficient computing power or large network delays, the training processes of other devices will be forced to wait, resulting in a decrease in the overall training speed of the deep learning model. In addition, some vehicle-mounted terminal devices may frequently drop offline due to unstable communication or being in a signal blind spot, further exacerbating the "laggard" problem, that is, the vehicle-mounted terminal devices fail to complete training updates in time, resulting in a decrease in overall performance. Compared with other comparative algorithms, the method proposed in the present invention utilizes asynchronous aggregation and layered architecture, fully considers the heterogeneity of data and systems in the Internet of Vehicles scenario, uses hysteresis to consider the timeliness of client updates through asynchronous mechanisms, and uses interference weights to consider the consistency between the client model update direction and the global model update direction. The aggregation weight is calculated by considering hysteresis and interference weights at the same time, providing a comprehensive evaluation system that enables a more accurate evaluation of the actual value of client training updates to the global model, effectively balancing the contribution of different client updates to the global model, optimizing the overall performance and generalization ability of the global neural network model ultimately obtained through distributed training and asynchronous aggregation, and improving the efficiency of distributed training and asynchronous aggregation of deep learning models in the Internet of Vehicles scenario.

[0179] The cloud-edge-end collaborative distributed training aggregation method for vehicle terminal models provided in this embodiment can dynamically select the optimal device to participate in training in each round in bandwidth-constrained scenarios by comprehensively considering the update utility and bandwidth limitations of the vehicle terminals; asynchronous aggregation of deep learning models is achieved through the middle-layer base stations, roadside units and upper-layer central cloud central servers, ensuring efficient use of limited network resources to obtain a global model with optimal performance, reducing communication overhead; and dynamically adjusting the asynchronous aggregation weights by adopting a delayed interference perception method, thereby improving the training speed of the distributed deep learning model of the Internet of Vehicles and the overall performance of the model.

[0180] It should be understood that various parts of the present disclosure may be implemented in hardware, software, firmware, or a combination thereof.

[0181] The above is only a specific implementation of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present disclosure should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.

Claims

1. A distributed training aggregation method for vehicle terminal models with cloud-edge-device collaboration, characterized in that: include: Step 1, establish a cloud-edge-end three-layer Internet of Vehicles network system architecture, wherein the cloud-edge-end three-layer Internet of Vehicles network system architecture includes a cloud central server, a base station, a roadside unit and a vehicle terminal, the cloud central server is the upper layer, the base station and the roadside unit are the middle layer, and the vehicle terminal is the lower layer, wherein the lower layer vehicle terminal is the model training party, the upper layer cloud central server and the middle layer base station and roadside unit are the model aggregation party, the upper layer cloud central server is communicated with all the base stations and roadside units in the middle layer, and all the vehicle terminals in the lower layer are communicated with at least one middle layer base station or roadside unit; Step 2, the vehicle-mounted terminals collect their own local data sets, wherein the local data sets include vehicle driving data, vehicle-mounted sensor measurement information and road condition information; Step 3: The upper layer sends the initial model to all base stations and roadside units in the middle layer, and the middle layer forwards the initial model to the vehicle terminals in their respective jurisdictions; Step 4: The middle layer constructs a target problem for dynamically selecting the vehicle terminals to participate in the training in each global round according to the performance indicators of the vehicle terminals, converts it into an integer linear programming problem and solves it, wherein the performance indicators include the computing power, local data set and network bandwidth of each vehicle terminal; Step 5: In each global round, the selected vehicle terminal uses the local data set to train the initial model locally and sends the trained model to the intermediate layer; Step 6: After receiving the trained model, the middle layer uses the delayed interference perception method to perform asynchronous weight aggregation; Step 7: After the aggregation is completed in the middle layer, the aggregated model is transmitted back to the cloud central server. The cloud central server uses the delayed interference perception method to perform asynchronous aggregation of the global model to obtain an updated global model. Step 8: After completing all global rounds of lower-layer model training and asynchronous aggregation of the upper and middle layers, the upper layer sends the final global model to the middle layer, which then forwards it to all vehicle terminals.

2. The method according to claim 1, characterized in that , the expression of the integer linear programming problem is Among them, u i represents the updated utility of the vehicle terminal device i selected for local training in this round, T ij is the total round delay Tij, is the update rate of vehicle terminal device i based on the intermediate base station or roadside unit node j, m is the hyperparameter selected by the device, and the constraint condition is that the total bandwidth between all vehicle terminal devices i selected to participate in the training and the intermediate base station or roadside unit node j does not exceed the bandwidth upper limit B of the intermediate base station or roadside unit node j j ; u i =affinity i +diversity i in, is the gradient of the model on the vehicle terminal device i, is the local loss function g on the vehicle terminal device i i The gradient transpose of the vehicle terminal device i is the gradient affinity i It represents the similarity between the gradient of vehicle terminal device i and the current global gradient, and the gradient diversity of vehicle terminal device i i It indicates the degree of difference between the model gradient and that of all other vehicle-mounted terminal devices in the same middle-layer node cluster; T ij ≈t down,ij +t train,i +t up,ij Among them, t down,ij is the model downlink transmission delay from the middle layer node j to the vehicle terminal device i, t train,i is the time delay required for the vehicle terminal device i to perform local training after receiving the model sent by the middle layer, t up,ij The time required for the vehicle terminal device i to transmit the updated model back to the middle layer node j; Among them, b j is the total data transmission bandwidth of the middle layer node j, b ij is the average data transmission bandwidth between the vehicle terminal device i and the middle layer node j. For each middle layer node j, the total data transmission bandwidth of all selected devices cannot exceed the total bandwidth upper limit B j .

3. The method according to claim 2, characterized in that , the step 6 specifically includes: Step 6.1: After each vehicle terminal completes the specified round of local training, the trained model is immediately transmitted back to the middle layer node to which it belongs; Step 6.2, after the middle-layer node receives the model transmitted back by each vehicle terminal, the middle-layer node calculates the first aggregation weight of the transmitted model based on the first lag and the first interference weight of the model transmitted back by the vehicle terminal, and immediately performs asynchronous aggregation to obtain the updated middle-layer model.

4. The method according to claim 3, characterized in that , the step 6.2 specifically includes: The base stations and roadside units in the middle layer adopt an asynchronous aggregation method of deep learning models based on hysteresis interference. After the middle layer nodes receive the trained model from the vehicle terminal, they immediately perform asynchronous aggregation of the model in the middle layer. The trained model is asynchronously aggregated and updated through the middle layer first. The difference between the round of the current latest global model and the global round of the trained model transmitted back by the vehicle terminal is used as the first hysteresis. S k =h-τ k Among them, S k is the model lag of the vehicle terminal k, h is the iteration round of the global model of the cloud central server corresponding to the trained model, τ k Iteration rounds of training and updating of the global model of the cloud central server based on the vehicle terminal; Calculate the first interference weight of the vehicle terminal k relative to the global model corresponding to the cloud central server iteration round τ in this training process Among them, β is a hyperparameter, is the update vector of vehicle terminal k The update w of the global model from τ-1 to τ rounds τ -w τ-1 The cosine similarity between , which indicates the similarity of two vectors in direction; The middle layer calculates the first aggregation weight of each trained model received in the asynchronous aggregation according to the first lag and the first interference weight, and immediately performs asynchronous aggregation to obtain an updated middle layer model, where the expression of the first aggregation weight is: in, is the aggregate weight of the model trained by vehicle terminal k in the current round, ||D k || represents the number of data samples held by the kth vehicle terminal, ||D mid || is the sum of data samples held by all vehicle terminals of the intermediate layer nodes in this round, α is a hyperparameter between 0 and 1, (h-τ k +1) -q is a polynomial hysteresis function, h is the current global aggregation round, τ k is the round in which the k-th vehicle terminal last received the global model, q is a coefficient used to control the influence of hysteresis on weight, and its value is greater than 0; Each time the vehicle terminal k is calculated, the updated model ω is trained k 'After the first aggregation weight, perform asynchronous aggregation of the intermediate layer model Among them, ω' mid is the updated weight of the model carried by the middle-layer node after this asynchronous aggregation, ω mid is the weight of the model carried by the intermediate node before aggregation, Arrived(E m ) indicates that in this round E m The vehicle terminals selected for local training transmit the model back to the middle layer.

5. The method according to claim 4, characterized in that , the step 7 specifically includes: Step 7.1, after the aggregation is completed in the middle layer, the aggregated model is transmitted back to the cloud central server; Step 7.2, after the cloud central server receives the models transmitted back by each base station and the roadside unit, the cloud central server calculates the second aggregation weight based on the second hysteresis and the second interference weight of the models transmitted back by the base station and the roadside unit, and immediately performs asynchronous aggregation to obtain an updated global model; In step 7.3, if the pre-set global training aggregation round is not reached, the upper-layer cloud central server will send the updated global model to all base stations and roadside units in the middle layer. The middle layer will forward the global model sent by the upper layer to the lower-layer vehicle terminals within their respective jurisdictions, and continue the new round of training and aggregation process from step 4 to step 7.3 until all global rounds of aggregation are completed.

6. The method according to claim 5, characterized in that , the step 7.2 specifically includes: Calculate the second interference weight of the middle layer node j relative to the global model corresponding to the cloud central server iteration round τ in this training process Among them, β is a hyperparameter, Θ(Δ j τ ,w τ -w τ-1 ) is the update vector Δ of the middle layer node j j τ The update w of the global model from τ-1 to τ rounds τ -w τ-1 The cosine similarity between , which indicates the similarity of two vectors in direction; The upper cloud central server uses the second hysteresis and the second interference weight to define the updated model ω after the middle layer base station and roadside unit node j are aggregated mid,j 'The second aggregation weight when the model is aggregated in, is the aggregate weight of the model returned by the middle layer node in the current round, ||D mid,j || represents the local data set size of the vehicle terminal set managed by the middle layer node j, ||D global || is the sum of the data sample sets held by all vehicle terminals in the lower layer, α is a hyperparameter between 0 and 1, (h-τ j +1) -q is a polynomial hysteresis function, h is the current global aggregation round, τ j is the round in which the middle layer node j last received the global model; After calculating the updated model ω' after the intermediate node j is aggregated mid,j After the second aggregation weight, the asynchronous aggregation of the upper global model is performed Among them, ω' global is the updated weight of the deep learning model held by the cloud central server after this asynchronous aggregation, ω global is the weight of the deep learning model held by the cloud central server before aggregation, p j τ The aggregate weight of the model obtained by aggregating the middle layer node j in the current global round.

Citation Information

Patent Citations

  • Federal learning method based on client selection and gradient compression

    CN115796271A

  • Personalized layered federated learning environment monitoring method based on heterogeneous model recombination

    CN118211086A

  • Cloud edge-end collaborative federated learning method and system based on computing power network

    CN118798319A

  • Federated learning method, computing device and storage medium

    US20220366320A1