Decentralized online federated learning method based on Internet of Vehicles scene

By adopting a decentralized online federated learning method in the Internet of Vehicles scenario, and using model splitting and car correlation strategies, the problems of data privacy and resource limitations in the Internet of Vehicles are solved, the performance and reliability of the smart car system are improved, and the automotive industry is promoted. Advances and applications of networking technology.

CN119337969APending Publication Date: 2025-01-21NANJING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411399027.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-09
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

Due to data privacy and resource limitations in the Internet of Vehicles, data training samples are insufficient, learning performance is degraded, and data heterogeneity and computing resources of different vehicles are limited, making it difficult to handle large-scale data and complex model updates.

Method used

The de -central online federal learning method based on the Internet of Vehicle is adopted. Through the model split strategy and automobile association strategy, the local model updates and the coordination of marginal models, use model aggregation inside and outside the vehicle cluster, optimize training delay and improve learning performance.

Benefits of technology

Effectively solve the problem of data privacy and resource restrictions, improve the performance and reliability of smart car systems, promote the progress and application of networking technology, and speed up the learning efficiency of the federal learning system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119337969A_ABST
    Figure CN119337969A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of agent cooperative training, solves the technical problems of data privacy and resource limitation in the prior art, and particularly relates to a decentration online federated learning method based on an Internet of Vehicles scene, which comprises the following steps of: establishing a model splitting strategy for locally updating a local model; and enabling each edge server to coordinate the vehicle cluster through the split local model update, or to estimate a training delay based on contextual information based on local model aggregation within the vehicle cluster or local model aggregation between the vehicle cluster clusters; and finally, carrying out online optimization and executing model training at the same time. According to the method, the problems of data privacy and resource limitation can be solved, the performance and reliability of an intelligent automobile system can be improved, and progress and application of the Internet of Vehicles technology are promoted. And a plurality of different federal learning tasks are completed at the same time, so that the learning efficiency of the federal learning system is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent agent collaborative training technology, and in particular to a decentralized online federated learning method based on an Internet of Vehicles scenario. Background Art

[0002] The Internet of Vehicles is a network paradigm that enables information exchange between vehicles, which makes many new vehicle applications possible, such as intelligent navigation, assisted driving, in-vehicle entertainment, etc. By training a large amount of data based on artificial intelligence (AI) algorithms, a variety of intelligent applications and intelligent network management can be realized, and due to the development of the Internet of Things and intelligent transportation systems, the Internet of Vehicles has become a key technology in the field of smart cars.

[0003] The Internet of Vehicles enables real-time data sharing and intelligent services by connecting cars to cloud platforms, other vehicles, and infrastructure. However, with people's increasing concern about data privacy and security issues, it is found that the data involved in the Internet of Vehicles contains sensitive information, such as user driving habits, location information, etc. The centralized data collection and processing model is prone to privacy leakage and security risks. Therefore, they are often reluctant to upload their potentially sensitive data to a third party, resulting in insufficient training samples and reduced learning performance. In addition, the data collected by different vehicles at different times and places may be different, and the vehicle's computing resources and communication bandwidth are limited, making it difficult to handle large-scale data and complex model updates. Summary of the invention

[0004] In view of the shortcomings of the existing technology, the present invention provides a decentralized online federated learning method based on the Internet of Vehicles scenario, which solves the technical problems of data privacy and resource limitations in the existing technology.

[0005] In order to solve the above technical problems, the present invention provides the following technical solutions: a decentralized online federated learning method based on the Internet of Vehicles scenario, the method comprising the following steps:

[0006] S1. Establish a model splitting strategy I(t) for any car k to perform local model local update in response to the edge server interaction process;

[0007] S2. Establish a car association strategy A(t) that enables each edge server to coordinate vehicle clusters through split local model updates, or periodically update edge models based on local model aggregation within a vehicle cluster or local model aggregation between vehicle clusters;

[0008] S3, context information based on the current training round Estimate the training delay T of the car association policy A(t) in the forward and backward propagation k (t);

[0009] S4. According to the training delay T(t), the model splitting strategy I(t) and the car association strategy A(t) are optimized online and model training is performed simultaneously. The model training includes the training of the local model and the edge model.

[0010] Through the above technical solution, the present invention provides a decentralized online federated learning method based on the Internet of Vehicles scenario, which has at least the following beneficial effects:

[0011] 1. The decentralized online federated learning method proposed in this invention can not only solve the problems of data privacy and resource limitation, but also improve the performance and reliability of intelligent vehicle systems, and promote the progress and application of Internet of Vehicles technology. It can also complete multiple different federated learning tasks at the same time, which speeds up the learning efficiency of the federated learning system and has important research significance.

[0012] 2. The present invention can solve the data privacy problem well by modifying the traditional raw data upload into collaborative local model update and multi-cycle aggregation. By sharing model updates among multiple vehicles, the experience of different vehicles can be integrated to improve the generalization ability and performance of the model. It also allows vehicles to use their own computing resources for model training and optimize resource allocation. Since the model update is distributed, even if some vehicles or servers fail, the entire system can still continue to work, improving the robustness and reliability of the system.

[0013] 3. The present invention allows the edge server to observe the contextual information of the device site, thereby estimating the training delay, and can obtain better learning performance at a lower training delay, especially when the prior information is incomplete.

[0014] 4. The present invention realizes the simultaneous execution of context-aware online optimization and model training process, so that the context information of the current training round can be used in cold start, and there is no need to continuously estimate the training delay of the car from multiple rounds of evaluation. In this way, the model splitting strategy and the car association strategy can be determined and optimized more quickly, resulting in lower training delay, so as to ensure that the car successfully participates in the training and improve the real-time expected utility. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0016] Figure 1 This is a simulation result diagram of the cumulative training delay of the decentralized online federated learning method proposed in the present invention;

[0017] Figure 2 This is a simulation result diagram of the cumulative number of associated devices of the decentralized online federated learning method proposed in the present invention. DETAILED DESCRIPTION

[0018] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific implementation methods, so that the implementation process of how the present application uses technical means to solve technical problems and achieve technical effects can be fully understood and implemented accordingly.

[0019] This embodiment proposes a decentralized online federated learning method based on the Internet of Vehicles scenario, which can not only solve the problems of data privacy and resource limitation, but also improve the performance and reliability of intelligent vehicle systems, and promote the progress and application of Internet of Vehicles technology. It can also complete multiple different federated learning tasks at the same time, speeding up the learning efficiency of the federated learning system, which has important research significance. The method includes the following steps:

[0020] S1. Establish a model splitting strategy I(t) for any car k to perform local model local update in response to the edge server interaction process. In each t rounds of training, the key steps of the decentralized online federated learning method include local model update, local model aggregation within a vehicle cluster, and local model aggregation between vehicle clusters.

[0021] Where t∈T={1,2,...,T}, T represents a given training round set. The specific process includes the following steps:

[0022] S11, define the initial parameters of the local model corresponding to car k in training as ω(t);

[0023] S12. Split the initial parameter ω(t) into three parts: a, b, and c to obtain the local model parameter ω k (t), then:

[0024]

[0025] Among them, only the gradient model parameters of part a and the gradient model parameters in part c Downloaded to car k; represents the gradient model parameters of part b;

[0026] S13, using the fast-aggregating parallel stochastic gradient descent optimization algorithm SGD to optimize the local model parameter ω k (t) is updated, and the number of local updates in a single round of training is 1, then the expression of local update is:

[0027] ω k (t) = ω k(t-1)-ηkg(ζ k (t),ω k (t-1))

[0028] In the formula, g(ζ k (t),ω k (t-1)) represents a batch of randomly sampled local training data sets ζ k The gradient model parameter calculated on (t) is ω k (t-1); η is the learning rate; κ∈K, K={1,2,...,K}, represents a vehicle cluster consisting of a number of cars k;

[0029] The Stochastic Gradient Descent (SGD) optimization algorithm accelerates this process through parallel computing. Fast aggregation means that in parallel computing, each computing node quickly aggregates their calculation results to form the final update direction and step size, so that the gradient model parameters can be optimized faster. In short, it is to use parallel computing to make the stochastic gradient descent algorithm run faster.

[0030] S14, update the gradient model parameters Execute in the local model and upload the output features to the relevant edge server to calculate the gradient model parameters Then car k downloads the output of the edge server to perform gradient model parameters

[0031] In the interaction process between any car k and a group of edge servers S = {1,2,...,S}, s∈S, S represents an edge server cluster composed of several edge servers s, assuming that the trained local model can be split and offloaded from a part of the edge servers related to the calculation. The present invention designs a model splitting strategy without label sharing, which can be divided into three parts, namely part a, part b and part c. Specifically, when the local model parameter ω k (t) When updating, the gradient model parameters Execute locally and upload the output features to the relevant edge server to calculate the gradient model parameters Then car k downloads the output of the edge server to perform gradient model parameters Similarly, in the back propagation, the gradients of part c, part b, and part a are calculated in sequence and recorded as and

[0032] S2, establishing a car association strategy A(t) that enables each edge server to coordinate the vehicle cluster through the split local model update, or periodically update the edge model based on the local model aggregation within the vehicle cluster or the local model aggregation between the vehicle clusters; in step S2, the specific process includes the following steps:

[0033] S21, obtain the update status of the vehicle cluster K and the edge server cluster S; wherein, the car k in the vehicle cluster K corresponds to a local model, and according to the model splitting strategy I(t) in step S1, the gradient model parameter The update is performed in the local model and the output features are uploaded to the relevant edge server to calculate the gradient model parameters Then car k downloads the output of the edge server to perform gradient model parameters Therefore, the update status of the vehicle cluster K can be determined by whether the local model is updated. The update status of the edge server cluster S is determined by whether any edge server s is updated.

[0034] S22: Record the cars t that are associated with the edge server s and successfully participate as the car set V s (t), if k∈V s (t), then there exists a k ,s(t)=1, otherwise a k ,s(t)=0; in the car set V s The corresponding edge model in (t) is denoted as And the updated edge model can be broadcasted to the relevant cars for the following local model updates in the current training round;

[0035] S23, establishing a car association strategy A(t) for periodically updating the edge model according to the update status;

[0036] When the local model is updated, each car k can upload its complete or partial gradient model parameters to the associated edge server s, and perform local model aggregation within the vehicle cluster K to obtain the edge mode s(t), that is:

[0037]

[0038] Where D k For local datasets The training samples in ω k (t) is the local model parameter;

[0039] When the edge model is updated, each edge server s can update its local model parameters ω k (t) Upload to the associated edge server and perform local model aggregation among vehicle clusters K, i.e.:

[0040]

[0041] In the above formula, c s (t) edge servers that successfully placed the model interaction within the convergence region of edge server s in round t of training; represents the marginal model in the t+1 round of training; s′∈c s (t), represents another edge server other than the edge server s in the system and associated with it; k′∈v s′ (t), represents the car associated with edge server s′ and participated in the interaction with edge server s′ in the current training round t; v s′ (t) represents the set of cars that are associated with the edge server s′ and successfully participate; D k′ Indicates the number of training samples of the corresponding local model. This formula expresses the calculation of the contribution of the car to the update when performing model aggregation, that is, the influence of the car on the edge model is weighted by its local data set and current model parameters.

[0042] In the case of model splitting, the car labels do not leave the local area during the gradient descent calculation to improve privacy protection. Finally, at the end of each round of training, the updated edge model of the edge server is transferred to the relevant car for the next round of training. As the model complexity increases, multiple rounds of training are usually required to obtain the desired learning performance.

[0043] S3, contextual information based on the current training round Estimate the training delay T of the car association policy A(t) in the forward and backward propagation k (t); In step S3, the specific process includes the following steps:

[0044] S31, obtaining the context information used as the current training round in advance Includes bandwidth allocation, channel gain, transmit power, and co-channel interference in forward propagation;

[0045] S32, according to the context information of the current training round The online maximization problem of model splitting strategy I(t) and car association strategy A(t) is formulated with the goal of maximizing training efficiency. In this example, the problem considered is a sequential decision problem, whose goal is to maximize training efficiency. In order to jointly optimize learning performance and training latency, training efficiency can be evaluated by the reduction of training loss per unit time. Therefore, for each car k, the training efficiency can be defined as u k (t), that is:

[0046]

[0047] In the above formula, a k , s(t) is a variable of 0 or 1, if k∈V s (t), then there exists a k ,s(t)=1, otherwise a k ,s(t)=0; Indicates that in the current edge model The training loss under Indicates the previous edge model The training loss under k (t) represents the training delay of car k in the current training round t;

[0048] when represents the reduction of local training loss under the relevant marginal model, where Represented in edge model The training loss under Indicates the previous edge model The training loss under . 0-1 is the variable a k The value of s(t) is not only related to the coordination state, but also to the successful participation in training. By setting the maximum training delay T max (t), in order to avoid the existence of cars with extremely poor performance in the system, thereby reducing the overall operating efficiency, the variable a can be defined k , the constraints of s(t), namely:

[0049] a k ,s(t)=1,k∈v s (t),T k (t)≤T max (t),

[0050] a k ,s(t)=0,k∈v s (t),T k (t)≤T max (t).

[0051] Then the method to express the training efficiency with a given system utility is:

[0052]

[0053] Finally, unlike common optimization problems, this embodiment takes into account the unknown randomness in the local computing power changes, which leads to uncertain training delays under different states of the car. Evaluation is performed, including channel status, allocated bandwidth, transmission power, and interference. Then the online maximization problem of the model splitting strategy I(t) and the car association strategy A(t) is expressed as:

[0054]

[0055]

[0056] In the above formula, K, S, and T are the number of cars, the number of edge servers, and the total number of training rounds, respectively; Represents the splitting strategy I(t), car association strategy A(t) and current context information given the model The training efficiency or utility function under , which is used to evaluate the training performance under a specific strategy; a,b k (t) represents the ratio or configuration of part a to part b in the model splitting strategy I(t) for car k in training round t; I b,c k (t) represents the ratio or configuration of part b to part c in the model splitting strategy I(t) for car k in training round t; a k,s A binary variable indicating whether car k is associated with edge server s, with a value of 0-1, 1 for association and 0 for no association; a k,s (t) represents the association status between car k and edge server s in training round t, which is used to dynamically adjust the connection between the car and the edge server; It represents the maximum number of cars that the edge server s can handle, which is a constraint to ensure that the processing capacity of the edge server is not exceeded.

[0057] S33. Calculate the transmission delay in the forward propagation and the transmission delay in the back propagation Assume that the upload delay set of car k in the forward propagation is in and They are the transmission delays of uploading the output features of part a to part b and uploading part b to part c, respectively.

[0058] In this embodiment, the content contained in the model of the number of divisible local models is represented as I max ,set up and is the breakpoint of the two segmentation models at the breakpoint of car k in training round t, and the corresponding local model is divided into three parts. In addition, if the local model of car k is not split, it can be deduced that In the forward propagation, in order to achieve fine-grained analysis, the neural network layer with the output feature size is defined as M l, 1≤l≤I max . Then for car k, As an upload delay set, where and The transmission delays of uploading the output features of part a to part b and uploading part b to part c are:

[0059]

[0060] In the above formula, Π(·) is an indicator function to determine whether there is a model split; is the delay of the local forward propagation without considering the model split; is the bandwidth allocated to the car to upload gradient model parameters to the edge server; p k (t) is the transmission power of car k; H k (t) is the channel gain between car k and its associated edge server; The tra cluster (t) is the intra-cluster reasoning caused by cars associated with the same edge server; is the intra-cluster inference caused by other elements with the same frequency in the system; σ 2 is additive Gaussian white noise; is the bandwidth allocated to the edge server to transmit the gradient model parameters to car k; is the transmission power of the edge server; is the channel gain between the edge server and its associated car k, and It is the internal reasoning between clusters and within clusters of edge servers; represents the transmission volume when car k uploads part a of the model parameters to the edge server corresponding to part b in training round t; It represents the transmission amount when the edge server transmits part b of the model parameters to part c of car k in training round t.

[0061] Similarly, the transmission delay in the back propagation is also recorded as Assuming that in the same round of training, the channel and noise environment of the system remain unchanged during feature uploading and gradient downloading, then and is the magnitude of the gradient determined by the split point of car k in training round t, then the transmission delay and The calculation formulas are:

[0062]

[0063] In the above formula, and are the magnitudes of the gradients determined by the split points of car k in round t of training.

[0064] S34, calculate the computational delay of parts a, b and c in the local model in forward propagation and in backward propagation, that is:

[0065] The calculation formula for the computational delay of parts a, b, and c in forward propagation is:

[0066]

[0067] The calculation formula for the computational delay of parts a, b, and c in back propagation is:

[0068]

[0069] In the above formula, C F,l and C B,l are the number of floating point operations (FLOPs) required by the l-th layer of the neural network during forward and backward propagation, respectively; f k (t) and are the computing capabilities of car k and edge server s, respectively; The model split in car k does not consider the computational delay of the forward propagation; Model split for car k, ignoring the computational latency of backpropagation.

[0070] S35, calculating the training delay T(t) according to the transmission delay and calculation delay in forward propagation and backward propagation, that is:

[0071]

[0072] in,

[0073]

[0074] In the above formula, T k (t) represents the training delay of car k in the current training round; represents the delay in computing part a on car k; represents the latency of computing part b on edge server s; represents the delay in computing part c on car k; represents the latency of uploading part a from car k to the edge server; represents the latency of uploading part b from the edge server to car k; represents the delay of downloading part b from the edge server to car k; represents the delay of downloading part c from car k to the edge server; represents the delay of model update for part c on car k; represents the delay of updating the model of part b on the edge server; represents the delay of model update for part a on car k.

[0075] In this embodiment, the model is divided into part a, part b and part c, where part a and part c are located on the device, i.e., the car, and part b is located on the edge server. It is divided into an upload and download process, uploading abc and downloading cba (because the gradient should be calculated from the last one). What is uploaded are the features of the middle layer of the model, and what is downloaded are the gradients.

[0076] This embodiment allows the edge server to observe the context information of the device site, thereby estimating the training delay, and can obtain better learning performance at a lower training delay, especially when the prior information is incomplete.

[0077] S4, optimizing the model splitting strategy I(t) and the car association strategy A(t) online according to the training delay T(t) and performing model training at the same time, the model training includes training of the local model and the edge model; in step S4, the specific process includes the following steps:

[0078] S41. Observe the context sets c(t) of all cars k and edge servers s at the beginning of each round of training, including the context c(t) of car k in training round t. k (t)∈C, and the context of edge server s C is the context space, and the expression of the context set c(t) is:

[0079]

[0080] S42, according to the random variables in the context set c(t) Rewrite the local computing power f(t) in a context-aware form, due to the local computing power of car k and edge server s is a random variable parameterized by the context Therefore, local computing capabilities can be rewritten in a context-aware form, namely:

[0081]

[0082] In the above formula, f k (t) are the computing capabilities of car k and edge server s, respectively;

[0083] S43, calculate the latest computing power Ψ(t) of the current training round according to the local computing power f(t), and determine the model splitting strategy I(t) and the car association strategy A(t), let and are the expected values ​​of the unknown local computing power of car k and edge server s respectively, then the latest computing power Ψ(t) is:

[0084]

[0085] In the above formula, Ψ k (c k (t))、 are the expected values ​​of the unknown local computing capabilities of car k and edge server s, respectively;

[0086] S44, train the local model, if Car k can update its local model locally and fully transfer the updated local model to the relevant edge server s, otherwise, a three-part training will be performed;

[0087] S45. At the end of each round of training, observe the actual local computing power between car k and edge server s, and then update the latest computing power Ψ(t) with the observed context set c(t). In particular, if the delay budget cannot be met, the relevant local computing time satisfies the upper bound T of τ k (t) = T max (t).

[0088] S46, with the goal of maximizing long-term training efficiency, from the trained edge model set Find the optimal global model ω * (T), that is:

[0089]

[0090] In the formula, is the trained edge model; D k For local datasets training samples in; κ∈K, K={1,2,...,K}, represents a vehicle cluster consisting of a number of cars k; is the local loss for car k with the marginal model (T) and can be evaluated at the end of each training round.

[0091] Since in practice, the control center does not have prior knowledge about the training delay affected by local computing power, this embodiment simulates the actual training delay by using the context set c(t) and the local computing power f(t). The model splitting strategy I(t) and the car association strategy A(t) are optimized according to the calculated training delay T(t), and the latest computing power Ψ(t) can be used in each round of training. Finally, the context-aware online optimization and model training process are executed simultaneously, so that the context information of the current training round can be used in the cold start. It is no longer necessary to continuously estimate the car’s training latency from multiple rounds of evaluation, so that the model splitting strategy I(t) can be determined and optimized more quickly, resulting in lower training latency to ensure that the car successfully participates in training and improves real-time expected utility.

[0092] This example evaluates the performance of the proposed decentralized online federation method based on the CC-MAB framework. Experiments were conducted on various baselines and datasets to confirm its effectiveness. The simulation process was completed based on Pytorch and GeForce RTX4080. At the same time, two important parameters of the federated learning system were quantitatively analyzed to analyze their impact on the number of global iterations.

[0093] Simulation parameter settings

[0094] For the simulation results, it is assumed that there are S = 5 edge servers and K = 25 devices (if not specified) randomly located in a square area of ​​size 500m × 500m. In addition, each edge server can be associated with up to 5 devices, In addition, the context space has two more dimensions: “task workload of edge servers” and “wireless communication environment”. For example, the context “task workload of edge servers” represents the situation where the device and edge server take on other computing tasks and only a portion of the local computing power can be used for training. “Wireless communication environment” refers to the communication rate between the device and the edge server. Then, to describe the unknown local computing power under different contexts, we can assume that the local computing power of device k and edge server s is uniformly distributed in the interval where the actual computing power of the device is of order 10 9 cycles / second, the actual computing capacity of the edge server is usually 10 cycles / second, and the upper and lower limits of the computing capacity vary with the change of context information. In particular, in order to reduce the complexity of the simulation, this embodiment considers 4 context situations that occur at the same interval in 1000 rounds of training. In addition, for each device and edge server pair, the elements in the threshold set O(t) are set to 50.

[0095] For the learning task, non-iid local training data between devices is considered, and the CIFAR-10 dataset is used for experiments. By default, the training is based on the AlexNet learning model, which includes 5 convolutional layers, 3 fully connected layers, and finally a Softmax classification layer, where the batch size is set to 64. And the learning rate is set to 0.01. The number of training rounds is set to T = 1000, and the number of model split points is I max =8. In addition, to simulate the imbalance of digital distribution, only a partial number of types are considered for each terminal.

[0096] Finally, the proposed decentralized online federated learning method is compared with the following five benchmark algorithms: 1) Ideal algorithm: The delay value between the device and the edge server is known in advance, and the optimal delay value is evaluated when all terminals can be successfully associated. 2) UCB algorithm: The expected utility of each local computing power is gradually evaluated by enumerating all splitting and association decisions without considering contextual information. 3) Greedy algorithm: Based on existing experience, the device is associated with the edge server with the lowest training delay and set to K = T, that is, the KM algorithm (Proposed (Greedy+KM)) is not used to optimize the association strategy. 4) Non-cooperative algorithm: Regardless of the model split, the device performs model training locally. 5) Random: Each device is randomly associated with an edge server. When the edge server association constraint is not met, the device with a large training delay will be removed.

[0097] Figure 1-Figure 2 The cumulative performance of the proposed decentralized online federated learning method and the baseline algorithm is shown. Figure 1 The cumulative training delay is compared in The results show that, except for the Orale algorithm, the proposed algorithm can achieve the lowest training latency. In addition, it is interesting that the proposed algorithm has no obvious advantage in the initial training rounds compared with the greedy algorithm and the UCB algorithm. This is because the method proposed in this embodiment also completes device association in a greedy manner in the exploration phase in order to reduce complexity, and has the same execution process as the baseline algorithm. In particular, when the KM algorithm is considered, the advantages of the proposed algorithm in different contexts are continuously magnified. Figure 2 The cumulative number of participating devices is compared in That is, the cumulative number of associated devices. It can be observed that, in addition to the Orale algorithm, the method proposed in this embodiment is also the best, because the maximum total match can be achieved through the KM algorithm in the use phase. Other benchmark algorithms cannot handle the maximum number of association constraints, so when the association strategies conflict, more devices cannot participate in training.

[0098] Those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, so the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0099] Each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the above embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0100] The above implementation methods have been described in detail. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A decentralized online federated learning method based on the Internet of Vehicles scenario, characterized in that: The method comprises the following steps: S1. Establish a model splitting strategy I(t) for any car k to perform local model local update in response to the edge server interaction process; S2. Establish a car association strategy A(t) that enables each edge server to coordinate vehicle clusters through split local model updates, or periodically update edge models based on local model aggregation within a vehicle cluster or local model aggregation between vehicle clusters; S3, context information based on the current training round Estimate the training delay T of the car association policy A(t) in the forward and backward propagation k (t); S4. According to the training delay T(t), the model splitting strategy I(t) and the car association strategy A(t) are optimized online and model training is performed simultaneously. The model training includes the training of the local model and the edge model.

2. The decentralized online federated learning method according to claim 1, characterized in that: In step S1, the specific process includes the following steps: S11, define the initial parameters of the local model corresponding to car k in training as ω(t); S12. Split the initial parameter ω(t) into three parts: a, b, and c to obtain the local model parameter ω k (t), then: Among them, only the gradient model parameters of part a and the gradient model parameters in part c Downloaded to car k; represents the gradient model parameters of part b; S13, using the fast-aggregating parallel stochastic gradient descent optimization algorithm SGD to optimize the local model parameter ω k (t) is updated, and the number of local updates in a single round of training is 1, then the expression of local update is: oh k (t)=ω k (t-1)-ηkg(ζ k (t),ω k (t-1)) In the formula, g(ζ k (t),ω k (t-1)) represents a batch of randomly sampled local training data sets ζ k The gradient model parameter calculated on (t) is ω k (t-1); η is the learning rate; κ∈K, K={1,2,...,K}, represents a vehicle cluster consisting of a number of cars k; S14, update the gradient model parameters Execute in the local model and upload the output features to the relevant edge server to calculate the gradient model parameters Then car k downloads the output of the edge server to perform gradient model parameters 3. The decentralized online federated learning method according to claim 1, characterized in that: In step S2, the specific process includes the following steps: S21, obtaining the update status of the vehicle cluster K and the edge server cluster S; S22: Record the cars t that are associated with the edge server s and successfully participate as the car set V s (t), in the car set V s The corresponding edge model in (t) is denoted as And the updated edge model can be broadcast to the relevant cars; S23, establishing a car association strategy A(t) for periodically updating the edge model according to the update status; When the local model is updated, each car k can upload its complete or partial gradient model parameters to the associated edge server s, and perform local model aggregation within the vehicle cluster K to obtain the edge mode s(t), that is: Where D k For local datasets The training samples in ω k (t) is the local model parameter; When the edge model is updated, each edge server s can update its local model parameters ω k (t) Upload to the associated edge server and perform local model aggregation among vehicle clusters K, i.e.: In the above formula, c s (t) edge servers that successfully placed the model interaction within the convergence region of edge server s in round t of training; represents the marginal model in the t+1 round of training; s′∈c s (t), represents another edge server other than the edge server s in the system and associated with it; k′∈v s′ (t), represents the car associated with the edge server s′; v s′ (t) represents the set of cars that are associated with the edge server s′ and successfully participate; D k′ Indicates the number of training samples of the corresponding local model.

4. The decentralized online federated learning method according to claim 1, characterized in that: In step S3, the specific process includes the following steps: S31, obtaining the context information used as the current training round in advance Includes bandwidth allocation, channel gain, transmit power, and co-channel interference in forward propagation; S32, according to the context information of the current training round Formulate the online maximization problem of model splitting strategy I(t) and car association strategy A(t) with the goal of maximizing training efficiency; S33. Calculate the transmission delay in the forward propagation and the transmission delay in the back propagation S34, calculating the computational delays of parts a, b, and c in the local model in forward propagation and in backward propagation; S35, calculating the training delay T(t) according to the transmission delay and calculation delay in forward propagation and backward propagation, that is: in, In the above formula, T k (t) represents the training delay of car k in the current training round; represents the delay in computing part a on car k; represents the latency of computing part b on edge server s; represents the delay in computing part c on car k; represents the latency of uploading part a from car k to the edge server; represents the latency of uploading part b from the edge server to car k; represents the delay of downloading part b from the edge server to car k; represents the delay of downloading part c from car k to the edge server; represents the delay of model update for part c on car k; represents the delay of updating the model of part b on the edge server; represents the delay of model update for part a on car k.

5. The decentralized online federated learning method according to claim 4, characterized in that: In step S32, the online maximization problem of the model splitting strategy I(t) and the car association strategy A(t) is expressed as: In the above formula, K, S, and T are the number of cars, the number of edge servers, and the total number of training rounds, respectively; Represents the splitting strategy I(t), car association strategy A(t) and current context information given the model The training efficiency or utility function under , which is used to evaluate the training performance under a specific strategy; a,b k (t) represents the ratio or configuration of part a to part b in the model splitting strategy I(t) for car k in training round t; I b,c k (t) represents the ratio or configuration of part b to part c in the model splitting strategy I(t) for car k in training round t; a k,s A binary variable indicating whether car k is associated with edge server s, with a value of 0-1, 1 for association and 0 for no association; a k,s (t) represents the association status between car k and edge server s in training round t, which is used to dynamically adjust the connection between the car and the edge server; represents the maximum number of cars that the edge server s can handle.

6. The decentralized online federated learning method according to claim 5, characterized in that: In step S33, the transmission delay in the forward propagation The calculation formula is: In the above formula, Π(·) is an indicator function to determine whether there is a model split; is the delay of the local forward propagation without considering the model split; is the bandwidth allocated to the car to upload gradient model parameters to the edge server; p k (t) is the transmission power of car k; H k (t) is the channel gain between car k and its associated edge server; The tra cluster (t) is the intra-cluster reasoning caused by cars associated with the same edge server; is the intra-cluster inference caused by other elements with the same frequency in the system; σ 2 is additive Gaussian white noise; ) is the bandwidth allocated to the edge server for transmitting gradient model parameters to car k; is the transmission power of the edge server; is the channel gain between the edge server and its associated car k, and It is the internal reasoning between clusters and within clusters of edge servers; represents the transmission volume when car k uploads part a of the model parameters to the edge server corresponding to part b in training round t; represents the amount of transmission when the edge server transmits part b of the model parameters to part c of car k in training round t; Transmission delay in backpropagation The calculation formula is: In the above formula, and are the magnitudes of the gradients determined by the split points of car k in round t of training.

7. The decentralized online federated learning method according to claim 6, characterized in that: In step S32, the calculation formula for the calculation delay of part a, part b and part c in the forward propagation is: The calculation formula for the computational delay of parts a, b, and c in back propagation is: In the above formula, C F,l and C B,l are the number of floating-point operations required by the l-th layer of the neural network during forward and backward propagation; f k (t) and are the computing capabilities of car k and edge server s, respectively; The model split in car k does not consider the computational delay of the forward propagation; Model split for car k, ignoring the computational latency of backpropagation.

8. The decentralized online federated learning method according to claim 1, characterized in that: In step S4, the specific process includes the following steps: S41. Observe the context sets c(t) of all cars k and edge servers s at the beginning of each round of training, including the context c(t) of car k in training round t. k (t)∈C, and the context of edge server s C is the context space, and the expression of the context set c(t) is: S42, according to the random variables in the context set c(t) Rewrite the local computation capability f(t) in a context-aware form, namely: In the above formula, f k (t) are the computing capabilities of car k and edge server s, respectively; S43. Calculate the latest computing power Ψ(t) of the current training round according to the local computing power f(t), and determine the model splitting strategy I(t) and the car association strategy A(t). Then the latest computing power Ψ(t) is: In the above formula, Ψ k (c k (t))、 are the expected values ​​of the unknown local computing capabilities of car k and edge server s, respectively; S44, train the local model, if Car k can update its local model locally and fully transfer the updated local model to the relevant edge server s, otherwise, a three-part training will be performed; S45. At the end of each round of training, observe the actual local computing power between car k and edge server s, and then update the latest computing power Ψ(t) with the observed context set c(t); S46, with the goal of maximizing long-term training efficiency, from the trained edge model set Find the optimal global model ω * (T), that is: In the formula, is the trained edge model; D k For local datasets training samples in; κ∈K, K={1,2,...,K}, represents a vehicle cluster consisting of a number of cars k; is the local loss for car k with the marginal model (T) and can be evaluated at the end of each training round.