A distributed training aggregation method for vehicle terminal models with cloud-edge-device collaboration

By adopting a distributed training and aggregation method for vehicle terminal models through cloud-edge-device collaboration, the problems of low training efficiency, insufficient stability, and high communication overhead in the vehicle network environment are solved, and efficient and secure model training and aggregation are achieved in the vehicle network environment.

CN119558384BActive Publication Date: 2025-10-28HUNAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In the context of vehicle-to-everything (V2X) environments, traditional centralized model training methods suffer from low training efficiency, insufficient stability, and high communication overhead. In particular, given the significant differences in computing power among in-vehicle terminal devices and the complex and ever-changing network conditions, the non-independent and identically distributed nature of V2X data increases the difficulty of training, and the data security issues arising from centralized training methods are difficult to resolve.

Method used

A distributed training and aggregation method for vehicle terminal models with cloud-edge-device collaboration is adopted to establish a three-layer vehicle network system architecture. The vehicle terminal devices participating in the training are dynamically selected through the middle layer, and asynchronous weight aggregation is performed by combining integer linear programming and hysteresis perception methods to achieve distributed training and asynchronous aggregation of the model.

Benefits of technology

Dynamically selecting the optimal device for training in bandwidth-constrained scenarios improves the training speed and overall performance of deep learning models, reduces communication overhead, and ensures efficient utilization and security of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119558384B_ABST
    Figure CN119558384B_ABST
Patent Text Reader

Abstract

This disclosure provides a distributed training aggregation method for vehicle-mounted terminal models using cloud-edge-device collaboration, belonging to the field of computing technology. Specifically, it includes: establishing a three-layer cloud-edge-device vehicle network system architecture; vehicle-mounted terminals collecting local datasets; the upper layer distributing an initial model; the middle layer constructing a target problem and converting it into an integer linear programming problem and solving it; training the initial model locally and sending the trained model to the middle layer; using a hysteresis perception method for asynchronous weight aggregation; transmitting the aggregated model back, where the cloud central server uses the hysteresis perception method for asynchronous global model aggregation to obtain an updated global model; after completing aggregation for all global rounds, the upper layer distributing the final global model to the middle layer, which then forwards it to all vehicle-mounted terminals. This disclosed solution improves the efficiency of distributed model training on terminal devices and reduces communication overhead during training.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computing technology, and in particular to a distributed training aggregation method for vehicle terminal models with cloud-edge-device collaboration. Background Technology

[0002] Currently, deep learning technology has been widely applied in the field of connected vehicles (V2V), including autonomous driving, intelligent navigation, and traffic flow prediction. However, traditional centralized model training methods face significant challenges in the V2V environment and struggle to meet practical needs. The varying computing capabilities of in-vehicle terminal devices and the complex and variable network conditions lead to low model training efficiency and insufficient stability. Furthermore, V2V data exhibits non-identical distribution (Non-iid) characteristics, with high data heterogeneity across different vehicles, further increasing the difficulty of training. In addition, centralized training methods rely on uploading large amounts of user-end data to a central server for processing, which not only increases communication overhead but also raises data security concerns.

[0003] It is evident that there is an urgent need for an efficient cloud-edge-device 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, the present disclosure provides a distributed training aggregation method for vehicle terminal models with cloud-edge-device collaboration, which at least partially solves the problems of low training efficiency and high communication overhead during training in the prior art.

[0005] This disclosure provides a distributed training aggregation method for vehicle terminal models with cloud-edge-device collaboration, including:

[0006] Step 1: Establish a three-layer cloud-edge-device vehicle network system architecture. The three-layer cloud-edge-device vehicle network system architecture includes a cloud central server, base stations, roadside units, and vehicle terminals. The cloud central server is the upper layer, the base stations and roadside units are the middle layer, and the vehicle terminals are the lower layer. The vehicle terminals in the lower layer are the model training party, and the cloud central server in the upper layer and the base stations and roadside units in the middle layer are the model aggregation party. The cloud central server in the upper layer communicates with all base stations and roadside units in the middle layer, and all vehicle terminals in the lower layer communicate with at least one base station or roadside unit in the middle layer.

[0007] Step 2: The vehicle-mounted terminals collect their respective local datasets, which include vehicle driving data, vehicle sensor measurement information, and road condition information.

[0008] Step 3: The upper layer distributes 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 vehicle terminals in their respective jurisdictions.

[0009] Step 4: The intermediate layer constructs the target problem of dynamically selecting vehicle terminals to participate in training in each global round based on the performance indicators of the vehicle terminals and converts it into an integer linear programming problem and solves it. The performance indicators include the computing power, local dataset and network bandwidth of each vehicle terminal.

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

[0011] Step 6: After receiving the trained model, the intermediate layer uses a hysteresis-perceived method to perform asynchronous weight aggregation.

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

[0013] Step 8: After completing the training of the lower-level model and the asynchronous aggregation of the upper and middle layers in all global rounds, 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 of this disclosure, the expression for the integer linear programming problem is:

[0015]

[0016] Among them, u i T represents the update utility of the on-board terminal device i selected for local training in this round. ij The total delay T for each round ij , Let m be the update rate of vehicle terminal device i based on intermediate layer base station or roadside unit node j, and m be the hyperparameter for device selection. The constraint is that the total bandwidth between all selected vehicle terminal devices i participating in training and intermediate layer base station or roadside unit node j does not exceed the bandwidth limit B of intermediate layer base station or roadside unit node j. j ;

[0017] u i =affinity i +diversity i

[0018]

[0019] in, The gradient of the model on vehicle terminal device i. The local loss function g on the vehicle terminal device i iThe gradient transpose of the vehicle terminal device i, and its gradient affinity. i This 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 This indicates the degree of difference between its model gradient and that of all other vehicle terminal devices belonging to the same intermediate layer node cluster;

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

[0021] Among them, t down,ij Let t be the model downlink transmission delay from intermediate layer node j to vehicle terminal device i. train,i The latency required for the vehicle terminal device i to perform local training after receiving the model from the intermediate layer is t. up,ij The time required for the vehicle terminal device i to send the updated model back to the intermediate layer node j;

[0022]

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

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

[0025] Step 6.1: After each vehicle terminal completes a specified number of rounds of local training, the trained model is immediately sent back to its respective intermediate layer node.

[0026] Step 6.2: After receiving the models returned by each vehicle terminal, the intermediate layer node calculates the first aggregation weight of the returned model based on the first lag and the first interference weight of the model returned by the vehicle terminal, and immediately performs asynchronous aggregation to obtain the updated intermediate layer model.

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

[0028] The intermediate layer base stations and roadside units adopt an asynchronous aggregation method based on hysteresis interference deep learning models. After receiving the trained model from the vehicle terminal, the intermediate layer nodes immediately perform asynchronous aggregation of the intermediate model. The intermediate layer first updates the trained model asynchronously, and the difference between the current global model round number and the global round number of the trained model returned by the vehicle terminal is used as the first hysteresis.

[0029] S k =h-τ k

[0030] Among them, S k Let τ be the model lag of the vehicle terminal k, h be the iteration round of the global model on the cloud central server corresponding to the trained model, and τ be the model lag of the vehicle terminal k. k The iteration rounds of the global model on the cloud central server are used to train and update the vehicle terminal;

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

[0032]

[0033] Where β is a hyperparameter. It is the update vector of the vehicle terminal k. The update w of the global model from τ-1 to τ rounds τ -w τ-1 The cosine similarity between two vectors represents the similarity of the two vectors in terms of direction.

[0034] The intermediate layer calculates the first aggregation weight of each trained model it receives in the asynchronous aggregation based on the first hysteresis and the first interference weight, and immediately performs asynchronous aggregation to obtain the updated intermediate layer model. The expression for the first aggregation weight is:

[0035]

[0036] in, The aggregate weights of the model trained on the vehicle terminal k in the current round, ||D k || represents the number of data samples held by the k-th vehicle terminal, ||D mid || represents the total number of data samples held by all vehicle terminals in the intermediate layer nodes of this round, and α is a hyperparameter between 0 and 1, (h-τ) k +1) -q Let τ be a polynomial lag function, h be the current global aggregation round, and τ be the lag function. kis the last time the k-th vehicle terminal received the global model, and q is a coefficient used to control the degree of influence of lag on weights, with a value greater than 0;

[0037] Each time the model ω after training and updating of the vehicle terminal k is calculated, k After the first aggregation weight, asynchronous aggregation of the intermediate layer model is performed.

[0038]

[0039] Where, ω' mid ω represents the updated weights of the model carried by the intermediate layer nodes after this asynchronous aggregation. mid It refers to the weights of the model carried by the intermediate layer nodes before aggregation, Arrived(E m ) indicates that in this round E m The selected model is trained locally and then sent back to the vehicle terminal set in the middle layer.

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

[0041] Step 7.1: After the aggregation is completed in the intermediate layer, the aggregated model is sent back to the central server in the cloud.

[0042] Step 7.2: After receiving the models transmitted back from each base station and roadside unit, the cloud central server calculates the second aggregation weight based on the second hysteresis and second interference weight of the models transmitted back from the base stations and roadside units, and immediately performs asynchronous aggregation to obtain the updated global model.

[0043] 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 in their respective jurisdictions, and continue the training and aggregation process in a new round according to steps 4 to 7.3 until all global rounds of aggregation are completed.

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

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

[0046]

[0047] Where β is a hyperparameter, Θ(Δ j τ ,w τ -w τ-1) is the update vector Δ of the intermediate layer node j. j τ The update w of the global model from τ-1 to τ rounds τ -w τ-1 The cosine similarity between two vectors represents the similarity of the two vectors in terms of direction.

[0048] The upper-layer cloud central server uses the second hysteresis and the second interference weight to define the aggregated and updated model ω of the intermediate layer base station and roadside unit node j. mid,j 'Second aggregation weights during model aggregation'

[0049]

[0050] Where, p j τ The aggregate weights of the model in the current round, ||D, are returned by the intermediate layer nodes. mid,j || represents the size of the local dataset of the set of vehicle terminals managed by the intermediate layer node j, ||D global || represents the sum of data samples held by all vehicle-mounted terminals at the lower level, where α is a hyperparameter between 0 and 1, (h-τ) j +1) -q Let τ be a polynomial lag function, h be the current global aggregation round, and τ be the lag function. j It is the last time that intermediate layer node j received the global model;

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

[0052]

[0053] Where, ω' global ω represents the updated weights of the deep learning model held by the central cloud server after this asynchronous aggregation. global It refers to the weights of the deep learning model held by the central cloud server before aggregation, p j τ This represents the aggregation weight of the model after aggregation of intermediate layer node j in the current global round.

[0054] The cloud-edge-device collaborative distributed training and aggregation scheme for vehicle terminal models in this embodiment includes: Step 1, establishing a three-layer cloud-edge-device vehicle network system architecture, wherein the three-layer cloud-edge-device vehicle network system architecture includes a cloud central server, base stations, roadside units, and vehicle terminals. The cloud central server is the upper layer, the base stations and roadside units are the middle layer, and the vehicle terminals are the lower layer. The lower-layer vehicle terminals are the model trainers, and the upper-layer cloud central server and the middle-layer base stations and roadside units are the model aggregators. The upper-layer cloud central server is communicatively connected to all base stations and roadside units in the middle layer, and all vehicle terminals in the lower layer are communicatively connected to at least one middle-layer base station or roadside unit; Step 2, the vehicle terminals collect their respective local datasets, wherein the local datasets include vehicle driving data, vehicle sensor measurement information, and road condition information; Step 3, the upper layer distributes 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 its respective jurisdiction. Step 4: The intermediate layer constructs the target problem for each global round of training of vehicle-mounted terminals based on the performance indicators of the vehicle-mounted terminals, transforms it into an integer linear programming problem, and solves it. The performance indicators include the computing power, local dataset, and network bandwidth of each vehicle-mounted terminal. Step 5: In each global round, the selected vehicle-mounted terminal trains the initial model locally using the local dataset and sends the trained model to the intermediate layer. Step 6: After receiving the trained model, the intermediate layer performs asynchronous weight aggregation using the hysteresis perception method. Step 7: After the intermediate layer completes the aggregation, it sends the aggregated model back to the cloud central server. The cloud central server performs asynchronous global model aggregation using the hysteresis perception method to obtain the updated global model. Step 8: After completing the training of the lower-layer model and the asynchronous aggregation of the upper and intermediate layers in all global rounds, the upper layer sends the final global model to the intermediate layer, which then forwards it to all vehicle-mounted terminals.

[0055] The beneficial effects of the embodiments of this disclosure are as follows: By comprehensively considering the update utility and bandwidth limitations of the vehicle terminal, the optimal device for each round of training can be dynamically selected in bandwidth-constrained scenarios; by realizing the asynchronous aggregation of deep learning models through intermediate layer base stations, roadside units and upper layer central cloud servers, the optimal performance of the global model can be obtained by efficiently utilizing limited network resources, thereby reducing communication overhead; by adopting the hysteresis interference perception method to dynamically adjust the asynchronous aggregation weights, the training speed and overall performance of the vehicle network deep learning distributed model are improved, and the network communication overhead during the training process is reduced. Attached Figure Description

[0056] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0057] Figure 1 A flowchart illustrating a cloud-edge-device collaborative distributed training aggregation method for vehicle terminal models provided in this embodiment of the disclosure;

[0058] Figure 2 A three-layer cloud-edge-device vehicle network system architecture diagram provided in this disclosure embodiment;

[0059] Figure 3 This is a schematic diagram illustrating how an intermediate-layer base station and roadside unit dynamically select the optimal vehicle terminal for each round of distributed deep learning model training based on the update utility and bandwidth constraints of the deep learning models of each vehicle-mounted terminal device in the lower layer, and then transmit the training data back.

[0060] Figure 4 The intermediate layer base station and roadside unit provided in this embodiment calculate the first hysteresis and the first interference weight based on the model returned by each vehicle terminal device, obtain the first aggregation weight, perform intermediate layer asynchronous aggregation, the intermediate layer returns the aggregated model to the upper layer, 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 Implementation

[0061] The embodiments of this disclosure will now be described in detail with reference to the accompanying drawings.

[0062] The following specific examples illustrate the implementation of this disclosure. Those skilled in the art can easily understand other advantages and effects of this disclosure from the content disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. This disclosure can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this disclosure. It should be noted that, in the absence of conflict, the following embodiments and features in the embodiments can be combined with each other. Based on the embodiments in this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.

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

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

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

[0066] With the development of intelligent connected vehicle technology, the Internet of Vehicles (IoV), as an important component of intelligent transportation systems, constructs a complex network architecture through onboard terminal equipment, base stations and roadside units, and a central server. It covers data communication scenarios involving multiple terminals such as vehicle-to-vehicle, vehicle-to-infrastructure, vehicle-to-person, and vehicle-to-cloud communication. As the average computing power of terminal equipment continues to increase and large-scale IoV applications become more widespread, deep learning models are widely used for data processing and task decision-making in onboard terminal equipment. Furthermore, a large amount of data interaction is generated in real time between onboard sensing units and the external environment. How to effectively process and analyze this massive amount of data while ensuring user privacy and security in order to realize intelligent services of the IoV has become a research hotspot in recent years.

[0067] In the field of connected vehicles, deep learning technology has been widely applied to real-world scenarios such as autonomous driving, intelligent navigation, and traffic flow prediction. However, traditional centralized model training methods face significant challenges in connected vehicle environments and struggle to meet practical needs. The varying computing capabilities of in-vehicle terminal devices and the complex and variable network conditions lead to low model training efficiency and insufficient stability. Furthermore, connected vehicle data exhibits non-identical distribution (Non-iid) characteristics, with high data heterogeneity across different vehicles, further increasing the difficulty of training. In addition, centralized training methods rely on uploading large amounts of user-end data to a central server for processing, which not only increases communication overhead but also raises data security concerns.

[0068] It is evident that data in the Internet of Vehicles (IoV) is highly heterogeneous. The types, quantities, and quality of data collected by different vehicles in different environments vary greatly. The computing and network conditions of onboard terminal devices also differ significantly. Devices with weak performance or high network latency can slow down the overall progress during training and even affect overall efficiency due to frequent disconnections. The IoV network environment is complex and dynamically changes frequently. The mobility of vehicles makes network latency and bandwidth fluctuations unpredictable, resulting in limitations on model convergence speed and stability. These practical problems urgently need to be addressed.

[0069] This disclosure provides a distributed training aggregation method for vehicle terminal models with cloud-edge-device collaboration, which can be applied to the training process of vehicle terminal models in vehicle networking scenarios.

[0070] See Figure 1 This is a flowchart illustrating a distributed training aggregation method for vehicle terminal models with cloud-edge-device collaboration, provided in an embodiment of this disclosure. Figure 1 As shown, the method mainly includes the following steps:

[0071] Step 1: Establish a three-layer cloud-edge-device vehicle network system architecture. The three-layer cloud-edge-device vehicle network system architecture includes a cloud central server, base stations, roadside units, and vehicle terminals. The cloud central server is the upper layer, the base stations and roadside units are the middle layer, and the vehicle terminals are the lower layer. The vehicle terminals in the lower layer are the model training party, and the cloud central server in the upper layer and the base stations and roadside units in the middle layer are the model aggregation party. The cloud central server in the upper layer communicates with all base stations and roadside units in the middle layer, and all vehicle terminals in the lower layer communicate with at least one base station or roadside unit in the middle layer.

[0072] In practical implementation, a three-layer vehicle-to-everything (V2X) network system architecture can be established, such as cloud, edge, and device. Figure 2As shown, the cloud-based central server is the upper layer, base stations and roadside units are the middle layer, and vehicle-mounted terminal devices are the lower layer, thus constructing a complete vehicle-to-everything (V2X) network system. The lower-layer vehicle-mounted terminals are the model trainers, while the upper-layer cloud-based central server and the middle-layer base stations and roadside units are the model aggregators. The upper-layer cloud-based central server can establish connection paths with all base stations and roadside units in the middle layer, such as using wired communication methods like Ethernet. All lower-layer terminal devices can connect to the middle-layer base stations or roadside units via wireless communication methods like V2X. For the same terminal device, it needs to establish connection paths with one or more middle layers.

[0073] Step 2: The vehicle-mounted terminals collect their respective local datasets, which include vehicle driving data, vehicle sensor measurement information, and road condition information.

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

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

[0076] The data collected by vehicle-mounted terminal devices through sensor units is typically non-independent and identically distributed. Each vehicle-mounted terminal device holds a different dataset, which is also its own. Let D = {D1, D2, ..., D...} i ,…,D j ,…,D n} represents the set of local data distributions held by all in-vehicle terminal devices, that is, for D i ≠D j For the data distribution D of vehicle terminal device i i This includes the data collected by the vehicle-mounted terminal device i. i Data sample points

[0077] Step 3: The upper layer distributes 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 vehicle terminals in their respective jurisdictions.

[0078] In practical implementation, considering the latency and bandwidth limitations of the three-layer vehicle-to-everything (V2X) network system consisting of cloud, base stations, roadside units, and vehicle-mounted terminal equipment, as well as the heterogeneity of the V2X cluster network system, distributed training of deep learning models is carried out using vehicle-mounted terminals. Generally, a lightweight neural network model is adopted. Using the network connection established in step 1, the upper-layer cloud central server will distribute the initial neural network model held in the cloud to all base stations and roadside units in the middle layer. The middle layer will forward the neural network model distributed by the upper layer to the lower-layer vehicle-mounted terminal equipment in its respective jurisdiction.

[0079] Step 4: The intermediate layer constructs the target problem of dynamically selecting vehicle terminals to participate in training in each global round based on the performance indicators of the vehicle terminals and converts it into an integer linear programming problem and solves it. The performance indicators include the computing power, local dataset and network bandwidth of each vehicle terminal.

[0080] Furthermore, the expression for the integer linear programming problem is as follows:

[0081]

[0082] Among them, u i T represents the update utility of the on-board terminal device i selected for local training in this round. ij The total delay T for each round ij , Let m be the update rate of vehicle terminal device i based on intermediate layer base station or roadside unit node j, and m be the hyperparameter for device selection. The constraint is that the total bandwidth between all selected vehicle terminal devices i participating in training and intermediate layer base station or roadside unit node j does not exceed the bandwidth limit B of intermediate layer base station or roadside unit node j. j ;

[0083] u i =affinity i +diversity i

[0084]

[0085] in, The gradient of the model on vehicle terminal device i. The local loss function g on the vehicle terminal device i i The gradient transpose of the vehicle terminal device i, and its gradient affinity. i This 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. iThis indicates the degree of difference between its model gradient and that of all other vehicle terminal devices belonging to the same intermediate layer node cluster;

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

[0087] Among them, t down,ij Let t be the model downlink transmission delay from intermediate layer node j to vehicle terminal device i. train,i The latency required for the vehicle terminal device i to perform local training after receiving the model from the intermediate layer is t. up,ij The time required for the vehicle terminal device i to send the updated model back to the intermediate layer node j;

[0088]

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

[0090] In practice, the middleware layer constructs a target problem for dynamically selecting participating vehicle terminals in each global round based on the computing power, local dataset, and network bandwidth of the vehicle terminals. This problem is then transformed into an integer linear programming problem and solved. The participating vehicle terminal devices are dynamically selected in each global round.

[0091] Specifically, the communication latency of the aforementioned cloud-edge-device three-layer vehicle-to-everything (V2X) network architecture is as follows:

[0092] The total delay of one round of communication, i.e., the total delay of the round 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 t represents the total communication latency of uplink and downlink transmissions of the model from the cloud to the base station and roadside unit. down,ij Let t be the model downlink transmission delay from intermediate layer node j to vehicle terminal device i. train,i The latency required for the vehicle terminal device i to perform local training after receiving the model from the intermediate layer is t. up,ijThis refers to the time required for the vehicle-mounted terminal device i to send the updated model back to the intermediate layer node j. Since cloud-based central servers, base stations, and roadside units typically possess far greater computing power and resources than terminal devices, and have higher bandwidth connections, t... cloud,j Total delay T in rounds ij The calculation process can be ignored, resulting in the total delay T for each round. ij The calculation formula is:

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

[0096] The communication bandwidth limitation of the cloud-edge-device three-layer vehicle network architecture described in step 3 is specifically as follows:

[0097] The formula for calculating the total data transmission bandwidth between intermediate layer node j and all its vehicle terminal devices is as follows:

[0098]

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

[0100] The intermediate layer base station or roadside unit node j selects the on-board terminal devices connected to it for this round of training. The selection criteria are defined as an integer linear programming problem, with the following formula:

[0101]

[0102]

[0103] Among them, u i T represents the update utility of the on-board terminal device i selected for local training in this round. ij The total delay T for the rounds is... ij k is a hyperparameter for device selection, which can be adjusted according to the actual network cluster size. The constraint is that the total bandwidth between all selected vehicle terminal devices i and intermediate layer base stations or roadside unit nodes j does not exceed the bandwidth limit B of intermediate layer base stations or roadside unit nodes j. jThe objective function aims to maximize the weighted sum of the m-th power of the update utility and update rate of all selected terminal devices participating in training, while satisfying the constraints. By considering the update utility and communication latency of the vehicle terminal devices, this method can select the devices that contribute the most to the model training, while ensuring the effective use of communication resources, thus meeting the practical application scenarios of vehicle networking with limited resources.

[0104] Update utility of vehicle terminal equipment i i This metric is used to evaluate the contribution of local model updates on each device to the global model. The goal is to select a subset of samples within a limited space that retain as much effective information about the data distribution as possible. This metric is calculated by measuring the gradient affinity of the model on the in-vehicle terminal device i. i and gradient diversity i The sum of these two indicators is calculated using the following formula:

[0105] u i =affinity i +diversity i

[0106]

[0107] in, The gradient of the model on vehicle terminal device i. The local loss function g on the vehicle terminal device i i The gradient transpose of the vehicle terminal device i, and its gradient affinity. i This 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, and therefore the greater the contribution of the vehicle terminal device to the global model. The gradient diversity of vehicle terminal device i... i This indicates the degree of difference between the gradient of vehicle terminal device i and the gradients of all other vehicle terminal devices belonging to the same intermediate layer node cluster. The larger the gradient diversity value, the greater the difference between the gradient of vehicle terminal device i and the gradients of other devices, that is, the higher the diversity of the data distribution of the vehicle terminal device.

[0108] If a single vehicle-mounted terminal device has connection paths with multiple intermediate-layer base stations and roadside units, after each aggregation, the vehicle-mounted terminal device can be switched to establish a connection with another intermediate-layer node. Specifically, an integer linear programming problem can be solved to obtain the optimal solution for the subset of vehicle-mounted terminal devices participating in asynchronous training. That is, in each global training round, each intermediate-layer base station and roadside unit node will reselect from the lower-layer vehicle-mounted terminal devices that can establish connections, while satisfying the constraint of the total transmission bandwidth of the intermediate-layer nodes. This maximizes the weighted sum of the update utility and update rate raised to the power of m of all selected terminal devices participating in training. By considering the update utility and communication latency of the vehicle-mounted terminal devices, this method can select those devices that contribute the most to the model training.

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

[0110] In practice, in each global round, the intermediate layer can specify a fixed number of rounds for the vehicle terminal device to train locally. The selected vehicle terminal device will use the local dataset to train the neural network model locally.

[0111] Step 6: After receiving the trained model, the intermediate layer uses the hysteresis perception method to perform asynchronous weight aggregation.

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

[0113] Step 6.1: After each vehicle terminal completes a specified number of rounds of local training, the trained model is immediately sent back to its respective intermediate layer node.

[0114] Step 6.2: After receiving the models returned by each vehicle terminal, the intermediate layer node calculates the first aggregation weight of the returned model based on the first lag and the first interference weight of the model returned by the vehicle terminal, and immediately performs asynchronous aggregation to obtain the updated intermediate layer model.

[0115] Furthermore, step 6.2 specifically includes:

[0116] The intermediate layer base stations and roadside units adopt an asynchronous aggregation method based on hysteresis interference deep learning models. After receiving the trained model from the vehicle terminal, the intermediate layer nodes immediately perform asynchronous aggregation of the intermediate model. The intermediate layer first updates the trained model asynchronously, and the difference between the current global model round number and the global round number of the trained model returned by the vehicle terminal is used as the first hysteresis.

[0117] S k =h-τk

[0118] Among them, S k Let τ be the model lag of the vehicle terminal k, h be the iteration round of the global model on the cloud central server corresponding to the trained model, and τ be the model lag of the vehicle terminal k. k The iteration rounds of the global model on the cloud central server are used to train and update the vehicle terminal;

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

[0120]

[0121] Where β is a hyperparameter. It is the update vector of the vehicle terminal k. The update w of the global model from τ-1 to τ rounds τ -w τ-1 The cosine similarity between two vectors represents the similarity of the two vectors in terms of direction.

[0122] The intermediate layer calculates the first aggregation weight of each trained model it receives in the asynchronous aggregation based on the first hysteresis and the first interference weight, and immediately performs asynchronous aggregation to obtain the updated intermediate layer model. The expression for the first aggregation weight is:

[0123]

[0124] in, The aggregate weights of the model trained on the vehicle terminal k in the current round, ||D k || represents the number of data samples held by the k-th vehicle terminal, ||D mid || represents the total number of data samples held by all vehicle terminals in the intermediate layer nodes of this round, and α is a hyperparameter between 0 and 1, (h-τ) k +1) -q Let τ be a polynomial lag function, h be the current global aggregation round, and τ be the lag function. k is the last time the k-th vehicle terminal received the global model, and q is a coefficient used to control the degree of influence of lag on weights, with a value greater than 0;

[0125] Each time the model ω after training and updating of the vehicle terminal k is calculated, k After the first aggregation weight, asynchronous aggregation of the intermediate layer model is performed.

[0126]

[0127] Where, ω' midω represents the updated weights of the model carried by the intermediate layer nodes after this asynchronous aggregation. mid It refers to the weights of the model carried by the intermediate layer nodes before aggregation, Arrived(E m ) indicates that in this round E m The selected model is trained locally and then sent back to the vehicle terminal set in the middle layer.

[0128] In practice, due to the heterogeneity of data and systems among the vehicle-mounted terminal devices—that is, the datasets and computing capabilities of each device differ—and the changing network connections between the vehicle-mounted terminal devices and intermediate-layer base stations or roadside unit nodes as vehicles move continuously, the completion times for training using local datasets differ for each device. After completing a specified number of local training rounds, each device immediately transmits the trained model back to its corresponding intermediate-layer base station or roadside unit node. Upon receiving the neural network models transmitted from each vehicle-mounted terminal device, the intermediate-layer base station and roadside unit node perform asynchronous model aggregation using a hysteresis interference sensing method. Specifically, based on the first hysteresis and first interference weight of the model transmitted from the vehicle-mounted terminal device, the intermediate-layer node calculates the first aggregation weight of the transmitted model and immediately executes asynchronous aggregation to obtain the updated intermediate-layer model.

[0129] Specifically, the intermediate layer base station and roadside unit nodes adopt an asynchronous aggregation method based on hysteresis interference deep learning models. Asynchronous aggregation allows the intermediate layer nodes to immediately perform asynchronous aggregation of intermediate layer models after receiving the training feedback models from the vehicle terminal equipment, thereby updating the intermediate layer models. Compared with directly uploading the model parameters of the vehicle terminal equipment to the central cloud server for aggregation, this method can significantly reduce communication overhead. In this case, due to the differences in communication latency and device computing power, the models received by the intermediate layer nodes from the vehicle terminal equipment may be trained and updated based on global models in different rounds. Therefore, the intermediate layer will calculate the weight of each received feedback model in the asynchronous aggregation based on the difference between the round of the latest global model and the global round of the model returned by the device.

[0130] Asynchronous aggregation allows the system to aggregate models without global synchronization. Due to differences in communication network latency and device computing power, the models received by the intermediate layer nodes from different vehicle terminal devices and the models received from the upper cloud from the intermediate layer may be updated based on different rounds of global models. The client may be trained and updated based on an outdated global model. Therefore, based on the difference between the round of the latest global model and the global round of the model returned from the lower layer to the upper layer, i.e., the model lag, a weight should be set individually for each model in asynchronous aggregation.

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

[0132] S k =h-τ k

[0133] Among them, S k Let τ be the model lag of client k, h be the iteration round of the server's global model corresponding to the latest global model, and τ be the model lag of client k. k The number of iterations for training and updating the server-side global model based on the client.

[0134] During the aggregation process, the consistency between the client's update direction and the global model's update direction must also be considered. Cosine similarity is used to evaluate the consistency between the client's update direction and the global model's update direction. The specific formula is as follows:

[0135]

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

[0137] The weight of client updates in asynchronous aggregation is measured by calculating the cosine similarity between client updates and global model updates, and converting it into a value between 0 and 1.

[0138] when When the value is close to 1, it indicates that the client update and the global update are approximately in the same direction. In this case, the client update may have a higher weight in the aggregation; when... When the value is close to 0, it indicates that the client update and the global update are in approximately opposite directions. In this case, the client update may have a lower weight in the aggregation.

[0139] Intermediate-layer base stations and roadside unit nodes use model hysteresis and interference weights to define client k to train the updated model ω. k The first aggregation weight during model aggregation is calculated using the following formula:

[0140]

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

[0142] Aggregation weights provide a comprehensive evaluation mechanism that uses lag to consider the timeliness of client updates and interference weights to consider the consistency between the client model update direction and the global model update direction. This enables a more accurate assessment of the actual value of client training updates to the global model, effectively balances the contributions of different client updates to the global model, and thus optimizes the overall performance and generalization ability of the global neural network model obtained through distributed training and asynchronous aggregation.

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

[0144]

[0145] Where, ω' mid ω represents the updated weights of the deep learning model mounted on the intermediate layer nodes after this asynchronous aggregation.mid It refers to the weights of the deep learning model carried by the intermediate layer nodes before aggregation, Arrived(E m ) indicates that in this round E m The selected device is used for local training and then the model is sent back to the middle layer of in-vehicle terminal devices. The aggregate weight for the client in the current round is expressed by the formula as follows: it is calculated based on the difference between the updated model weights of all participating vehicle terminal devices and the weights of the deep learning models carried by the intermediate layer nodes before aggregation, combined with the aggregate weight of the model returned by the vehicle terminal device. We perform weighted summation to achieve asynchronous aggregation and update of the deep learning model carried by the intermediate layer nodes.

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

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

[0148] Step 7.1: After the aggregation is completed in the intermediate layer, the aggregated model is sent back to the central server in the cloud.

[0149] Step 7.2: After receiving the models transmitted back from each base station and roadside unit, the cloud central server calculates the second aggregation weight based on the second hysteresis and second interference weight of the models transmitted back from the base stations and roadside units, and immediately performs asynchronous aggregation to obtain the updated global model.

[0150] 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 in their respective jurisdictions, and continue the training and aggregation process in a new round according to steps 4 to 7.3 until all global rounds of aggregation are completed.

[0151] Furthermore, step 7.2 specifically includes:

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

[0153]

[0154] Where β is a hyperparameter, Θ(Δ j τ ,w τ -w τ-1) is the update vector Δ of the intermediate layer node j. j τ The update w of the global model from τ-1 to τ rounds τ -w τ-1 The cosine similarity between two vectors represents the similarity of the two vectors in terms of direction.

[0155] The upper-layer cloud central server uses the second hysteresis and the second interference weight to define the aggregated and updated model ω of the intermediate layer base station and roadside unit node j. mid,j 'Second aggregation weights during model aggregation'

[0156]

[0157] Where, p j τ The aggregate weights of the model in the current round, ||D, are returned by the intermediate layer nodes. mid,j || represents the size of the local dataset of the set of vehicle terminals managed by the intermediate layer node j, ||D global || represents the sum of data samples held by all vehicle-mounted terminals at the lower level, where α is a hyperparameter between 0 and 1, (h-τ) j +1) -q Let τ be a polynomial lag function, h be the current global aggregation round, and τ be the lag function. j It is the last time that intermediate layer node j received the global model;

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

[0159]

[0160] Where, ω' global ω represents the updated weights of the deep learning model held by the central cloud server after this asynchronous aggregation. global It refers to the weights of the deep learning model held by the central cloud server before aggregation, p j τ The aggregation weight of the model obtained by aggregating intermediate layer node j in the current global round.

[0161] In practice, the aggregation process at the upper level can be as follows:

[0162] Step 7.1: After the intermediate layer base station and roadside unit node complete the intermediate layer asynchronous aggregation as described in step 6.2, they will immediately send the aggregated model back to the upper-layer cloud central server.

[0163] Step 7.2: After the upper-layer cloud central server receives the neural network models transmitted back from 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 hysteresis interference sensing method. That is, based on the second hysteresis and the second interference weight of the neural network model transmitted back from the intermediate layer base station and roadside unit node, the second aggregation weight is calculated, and the asynchronous aggregation is immediately executed to obtain the updated global model.

[0164] The upper-layer central server mentioned in step 7.2 adopts a global model asynchronous aggregation method based on hysteresis interference perception, specifically as follows:

[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 the upper-layer cloud central server receives the model returned from the middle layer, it will calculate the weight of each returned model in the global asynchronous aggregation based on the difference between the current round of the latest global model and the global round of the model returned by the middle layer.

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

[0167]

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

[0169] The upper-layer cloud central server uses the model's second lag and second interference weights to define the aggregated and updated model ω of the intermediate-layer base station and roadside unit node j. mid,j The second aggregation weight during model aggregation is specifically formulated as follows:

[0170]

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

[0172] After receiving the model returned by the intermediate layer node j each time, the upper-layer cloud central server calculates the aggregated and updated model ω' from the intermediate layer node j. mid,j After aggregating the weights, asynchronous aggregation of the global model in the cloud will be performed immediately. The specific formula is as follows:

[0173]

[0174] Where, ω' global ω represents the updated weights of the deep learning model held by the central cloud server after this asynchronous aggregation. global It refers to the weights of the deep learning model held by the central cloud server before aggregation, p j τ Let p be the aggregate weight of intermediate layer node j in the current round. The formula as a whole represents the difference between the model weights returned by all intermediate layer nodes and the weights of the global model held in the cloud before aggregation, combined with the calculated aggregate weight p of intermediate layer node j. j τ We perform weighted summation to achieve global asynchronous aggregation and update of the deep learning model hosted on the cloud central server.

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

[0176] In practice, after completing all rounds of lower-layer model training and asynchronous aggregation of upper-layer and intermediate-layer models, the upper-layer cloud central server uses the global neural network model obtained in step 7.2 to send the final global model to the intermediate layer, which then forwards the final neural network model to all in-vehicle terminal devices. The in-vehicle terminal devices will deploy the model locally and apply it to real-world vehicle-to-everything (V2X) applications such as autonomous driving and intelligent navigation in real-vehicle scenarios.

[0177] Figure 3 This paper illustrates the method proposed in this invention, which dynamically selects the optimal vehicle terminal device for distributed deep learning model training in each round based on the update utility and bandwidth limitations of the deep learning model on each lower-level vehicle terminal, and then transmits the results back. Traditional distributed training strategies for selecting participating clients in each round are based on random or fixed selection. Compared with other comparative algorithms, the method proposed in this invention selects based on the terminal's update utility index, enabling the selection of vehicle terminal devices that contribute the most to model training, ensuring effective utilization of communication resources, and meeting the needs of bandwidth-constrained vehicle networking scenarios.

[0178] Figure 4 This illustration demonstrates the process of calculating hysteresis interference and aggregation weights based on the models transmitted back from each vehicle-mounted terminal, performing asynchronous aggregation, and then performing global asynchronous aggregation using a hysteresis interference sensing method on the upper-layer cloud central server. When multiple terminal devices need to collaboratively complete model training, traditional synchronous distributed training methods are inefficient. When some vehicle-mounted terminal devices cannot upload model updates in time due to insufficient computing power or high network latency, the training process of other devices will be forced to wait, leading to a decrease in the overall training speed of the deep learning model. Furthermore, some vehicle-mounted terminal devices may frequently disconnect due to unstable communication or being in signal blind spots, further exacerbating the "lagging" problem, i.e., the failure of vehicle-mounted terminal devices to complete training updates in time, resulting in a decrease in overall performance. Compared with other comparative algorithms, the method proposed in this invention utilizes asynchronous aggregation and a hierarchical architecture, fully considering the heterogeneity of data and systems in the Internet of Vehicles (IoV) scenario. Through an asynchronous mechanism, it uses lag to consider the timeliness of client updates and interference weights to consider the consistency between the client model update direction and the global model update direction. Simultaneously, it calculates the aggregation weight by considering lag and interference weights, providing a comprehensive evaluation system. This enables a more accurate assessment of the actual value of client training updates to the global model, effectively balances the contributions of different client updates to the global model, optimizes the overall performance and generalization ability of the global neural network model finally obtained through distributed training and asynchronous aggregation, and improves the efficiency of distributed training and asynchronous aggregation of deep learning models in the IoV scenario.

[0179] The cloud-edge-device collaborative distributed training aggregation method for vehicle terminal models provided in this embodiment, by comprehensively considering the update utility and bandwidth limitations of vehicle terminals, can dynamically select the optimal device to participate in training in each round under bandwidth-constrained scenarios; by realizing asynchronous aggregation of deep learning models through intermediate layer base stations, roadside units and upper layer central cloud server, it ensures efficient use of limited network resources to obtain a global model with optimal performance and reduces communication overhead; by adopting a hysteresis interference perception method to dynamically adjust asynchronous aggregation weights, it improves the training speed and overall performance of distributed deep learning models for vehicle networks.

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

[0181] The above description is merely a specific embodiment of this disclosure, but the scope of protection of this disclosure is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this disclosure should be included within the scope of protection of this disclosure. Therefore, the scope of protection of this disclosure should be determined by the 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 three-layer cloud-edge-device vehicle network system architecture. The three-layer cloud-edge-device vehicle network system architecture includes a cloud central server, base stations, roadside units, and vehicle terminals. The cloud central server is the upper layer, the base stations and roadside units are the middle layer, and the vehicle terminals are the lower layer. The vehicle terminals in the lower layer are the model training party, and the cloud central server in the upper layer and the base stations and roadside units in the middle layer are the model aggregation party. The cloud central server in the upper layer communicates with all base stations and roadside units in the middle layer, and all vehicle terminals in the lower layer communicate with at least one base station or roadside unit in the middle layer. Step 2: The vehicle-mounted terminals collect their respective local datasets, which include vehicle driving data, vehicle sensor measurement information, and road condition information. Step 3: The upper layer distributes 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 vehicle terminals in their respective jurisdictions. Step 4: The intermediate layer constructs the target problem of dynamically selecting vehicle terminals to participate in training in each global round based on the performance indicators of the vehicle terminals and converts it into an integer linear programming problem and solves it. The performance indicators include the computing power, local dataset and network bandwidth of each vehicle terminal. Step 5: In each global round, the selected vehicle terminal uses the local dataset to train the initial model locally and sends the trained model to the intermediate layer. Step 6: After receiving the trained model, the intermediate layer uses the hysteresis perception method to perform asynchronous weight aggregation. Step 7: After the aggregation is completed in the intermediate layer, the aggregated model is sent back to the central cloud server. The central cloud server uses the delayed interference perception method to perform asynchronous aggregation of the global model to obtain the updated global model. Step 8: After completing the training of the lower-level model and the asynchronous aggregation of the upper and middle layers in all global rounds, 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 for the integer linear programming problem is: Among them, u i T represents the update utility of the on-board terminal device i selected for local training in this round. ij Let Ti be the total delay for each round. Let m be the update rate of vehicle terminal device i based on intermediate layer base station or roadside unit node j, and m be the hyperparameter for device selection. The constraint is that the total bandwidth between all selected vehicle terminal devices i participating in training and intermediate layer base station or roadside unit node j does not exceed the bandwidth limit B of intermediate layer base station or roadside unit node j. j ; u i =affinity i +diversity i in, The gradient of the model on vehicle terminal device i. The local loss function g on the vehicle terminal device i i The gradient transpose of the vehicle terminal device i, and its gradient affinity. i This 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 This indicates the degree of difference between its model gradient and that of all other vehicle terminal devices belonging to the same intermediate layer node cluster; T ij ≈t down,ij +t train,i +t up,ij Among them, t down,ij Let t be the model downlink transmission delay from intermediate layer node j to vehicle terminal device i. train,i The latency required for the vehicle terminal device i to perform local training after receiving the model from the intermediate layer is t. up,ij The time required for the vehicle terminal device i to send the updated model back to the intermediate layer node j; Among them, b j b is the total data transmission bandwidth of intermediate layer node j. ij The average data transmission bandwidth between vehicle terminal device i and intermediate layer node j is given. For each intermediate layer node j, the total data transmission bandwidth of all selected devices cannot exceed the total bandwidth limit B. j .

3. The method according to claim 2, characterized in that... Step 6 specifically includes: Step 6.1: After each vehicle terminal completes a specified number of rounds of local training, the trained model is immediately sent back to its respective intermediate layer node. Step 6.2: After receiving the models returned by each vehicle terminal, the intermediate layer node calculates the first aggregation weight of the returned model based on the first lag and the first interference weight of the model returned by the vehicle terminal, and immediately performs asynchronous aggregation to obtain the updated intermediate layer model.

4. The method according to claim 3, characterized in that... Step 6.2 specifically includes: The intermediate layer base stations and roadside units adopt an asynchronous aggregation method based on hysteresis interference deep learning models. After receiving the trained model from the vehicle terminal, the intermediate layer nodes immediately perform asynchronous aggregation of the intermediate model. The intermediate layer first updates the trained model asynchronously, and the difference between the current global model round number and the global round number of the trained model returned by the vehicle terminal is used as the first hysteresis. S k =h-τ k Among them, S k Let τ be the model lag of the vehicle terminal k, h be the iteration round of the global model on the cloud central server corresponding to the trained model, and τ be the model lag of the vehicle terminal k. k The iteration rounds of the global model on the cloud central server are used to train and update the vehicle terminal; Calculate the first interference weight of the vehicle terminal k relative to the global model in the cloud central server iteration τ during this training process. Where β is a hyperparameter. It is the update vector of the vehicle terminal k. The update w of the global model from τ-1 to τ rounds τ -w τ-1 The cosine similarity between two vectors represents the similarity of the two vectors in terms of direction. The intermediate layer calculates the first aggregation weight of each trained model it receives in the asynchronous aggregation based on the first hysteresis and the first interference weight, and immediately performs asynchronous aggregation to obtain the updated intermediate layer model. The expression for the first aggregation weight is: in, The aggregate weights of the model trained on the vehicle terminal k in the current round, ||D k || represents the number of data samples held by the k-th vehicle terminal, ||D mid || represents the total number of data samples held by all vehicle terminals in the intermediate layer nodes of this round, and α is a hyperparameter between 0 and 1, (h-τ) k +1) -q Let τ be a polynomial lag function, h be the current global aggregation round, and τ be the lag function. k is the last time the k-th vehicle terminal received the global model, and q is a coefficient used to control the degree of influence of lag on weights, with a value greater than 0; Each time the model ω after training and updating of the vehicle terminal k is calculated, k After the first aggregation weight, asynchronous aggregation of the intermediate layer model is performed. Where, ω' mid ω represents the updated weights of the model carried by the intermediate layer nodes after this asynchronous aggregation. mid It refers to the weights of the model carried by the intermediate layer nodes before aggregation, Arrived(E m ) indicates that in this round E m The selected model is trained locally and then sent back to the vehicle terminal set in the middle layer.

5. The method according to claim 4, characterized in that... Step 7 specifically includes: Step 7.1: After the aggregation is completed in the intermediate layer, the aggregated model is sent back to the central server in the cloud. Step 7.2: After receiving the models transmitted back from each base station and roadside unit, the cloud central server calculates the second aggregation weight based on the second hysteresis and second interference weight of the models transmitted back from the base stations and roadside units, and immediately performs asynchronous aggregation to obtain the updated global model. 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 in their respective jurisdictions, and continue the training and aggregation process in a new round according to steps 4 to 7.3 until all global rounds of aggregation are completed.

6. The method according to claim 5, characterized in that... Step 7.2 specifically includes: Calculate the second interference weight of intermediate layer node j relative to the global model corresponding to the cloud central server iteration τ in this training process. Where β is a hyperparameter, Θ(Δ j τ ,w τ -w τ-1 ) is the update vector Δ of the intermediate layer node j. j τ The update w of the global model from τ-1 to τ rounds τ -w τ-1 The cosine similarity between two vectors represents the similarity of the two vectors in terms of direction. The upper-layer cloud central server uses the second hysteresis and the second interference weight to define the aggregated and updated model ω of the intermediate layer base station and roadside unit node j. mid,j 'Second aggregation weights during model aggregation' in, The aggregate weights of the model in the current round, ||D, are returned by the intermediate layer nodes. mid,j || represents the size of the local dataset of the set of vehicle terminals managed by the intermediate layer node j, ||D global || represents the sum of data samples held by all vehicle-mounted terminals at the lower level, where α is a hyperparameter between 0 and 1, (h-τ) j +1) -q Let τ be a polynomial lag function, h be the current global aggregation round, and τ be the lag function. j It is the last time that intermediate layer node j received the global model; After calculating the aggregated update of the intermediate layer node j, the model ω' is updated. mid,j After the second aggregation weight, asynchronous aggregation of the upper-level global model is performed. Where, ω' global ω represents the updated weights of the deep learning model held by the central cloud server after this asynchronous aggregation. global It refers to the weights of the deep learning model held by the central cloud server before aggregation, p j τ The aggregation weight of the model obtained by aggregating intermediate 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