Internet of vehicles multi-model training method for cloud edge-end collaborative hierarchical federated learning
By applying improved particle swarm optimization algorithm, genetic algorithm and greedy algorithm in the cloud edge collaborative hierarchical federated learning architecture, combined with hybrid synchronous-asynchronous aggregation rules, the task allocation and training sequence of multi-model training in the Internet of Vehicles is optimized, and the problems of low training efficiency and high communication cost in dynamic IoV environments are solved, achieving global time cost minimization and training balance between tasks are achieved.
Patent Information
- Application Number
- CN202411934672.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-05-13
AI Technical Summary
In dynamic IoV environments, traditional multi-model training methods face the problems of high communication costs and low overall training efficiency, especially in terms of multi-task balanced scheduling and model training optimization.
Using a method of collaborative hierarchical federated learning for cloud edge-end, the allocation and training order of training tasks is optimized through improved particle swarm optimization algorithms, genetic algorithms and greedy algorithms, and model aggregation is performed according to the hybrid synchronous-asynchronous aggregation rules, and the scheduling strategy is dynamically adjusted to reduce global time costs.
It effectively reduces communication costs, improves the efficiency of multi-model training, ensures the global time cost minimization, and achieves training balance between tasks, avoiding the risk of model obsoleteness.
Smart Images

Figure CN119987960A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of hierarchical federated learning, and in particular to a multi-model training method for Internet of Vehicles (IoV) for cloud-edge-device collaborative hierarchical federated learning. Background Art
[0002] With the rapid development of artificial intelligence (AI) and vehicle manufacturing technology, the integration of machine learning (ML)-based applications and Internet of Vehicles (IoV) has gradually become a research hotspot. However, the data generated by IoV has a distributed nature, and the dynamic nature of vehicles leads to low data utilization during training. Federated learning (FL), as an innovative distributed learning framework, has received widespread attention while protecting privacy. Nevertheless, FL still faces the problems of low communication efficiency and communication failure. To address these issues, hierarchical federated learning (HFL), as a multi-layer extension of FL, has attracted increasing research interest by achieving a balance between communication efficiency and computational overhead. Traditional IoV systems mainly focus on single-task federated learning (FL), which has limited effects in terms of learning accuracy and resource utilization. To this end, multi-model training, as a promising alternative, can train multiple machine learning models simultaneously on distributed computing nodes. However, although multi-model training has been explored in connected vehicle scenarios, its implementation often faces large communication overhead. Therefore, in a dynamic IoV environment, how to reduce the communication cost and accelerate the overall multi-model training process has become a key issue that needs to be addressed. Some early studies have made efforts to address the above issues. For example, some studies have used vehicle-side resources to reduce the number of global iterations and ensure timely and efficient model training. These studies reduce the frequency of communication with the cloud server by waiting for all local models to complete before transmitting. In addition, some studies emphasize the importance of selecting appropriate clients to participate in training and effective aggregation of multi-task results. Although the above studies have achieved results to a certain extent, they generally ignore the impact of balanced scheduling on the convergence of global models when dealing with multiple tasks. In addition, if the trained model fails to complete aggregation in time, it may face the risk of model obsolescence. At the same time, if the task training priority of the vehicle as a client is not set properly, it may also lead to longer aggregation waiting time, further exacerbating the problem of model obsolescence.
[0003] In summary, current research has made some progress in reducing communication costs and improving the efficiency of multi-model training, but there are still obvious shortcomings in multi-task balanced scheduling and model training optimization in dynamic IoV environments. Summary of the invention
[0004] In a first aspect, an embodiment of the present invention provides a multi-model training method for Internet of Vehicles for cloud-edge-end collaborative hierarchical federated learning. The method is applied to a cloud-edge-end collaborative hierarchical federated learning architecture. The cloud-edge-end collaborative hierarchical federated learning architecture includes: a cloud server, an edge server, and an intelligent vehicle. The cloud server serves as a global aggregator, the edge server serves as an intermediate layer aggregator, and the intelligent vehicle serves as a model training client. The method includes:
[0005] Get multiple training tasks for multi-model training of Internet of Vehicles;
[0006] Assign initial intelligent vehicles and training sequence to each training task;
[0007] Use improved particle swarm optimization algorithm and genetic algorithm to schedule training tasks and optimize the allocation of training tasks;
[0008] Optimize the training order of training tasks through greedy algorithm;
[0009] Perform model aggregation of edge servers and cloud servers according to hybrid synchronous-asynchronous aggregation rules;
[0010] Dynamically adjust the scheduling strategy according to the training status of the training task to ensure that the global time cost is minimized;
[0011] When the global training task reaches the preset accuracy or time requirement, the final global model is output.
[0012] In some implementations of the first aspect, the hybrid synchronous-asynchronous aggregation rule includes:
[0013] Adopt synchronization aggregation rules in edge servers;
[0014] Asynchronous aggregation rules are adopted in cloud servers.
[0015] In some implementations of the first aspect, a synchronization aggregation rule is adopted in the edge server, including:
[0016] The edge server performs model aggregation after waiting for all smart vehicles assigned to a specific training task to complete uploading their local models.
[0017] In some implementations of the first aspect, an asynchronous aggregation rule is adopted in the cloud server, including:
[0018] After receiving the models from some edge servers, the cloud server immediately starts to perform global aggregation and update the global model.
[0019] In some implementable methods of the first aspect, the optimization goal is to minimize the global time cost, and its corresponding constraints include: balanced scheduling constraints for multiple training tasks, time constraints for task training and model parameter upload of intelligent vehicles, and time constraints for model parameter upload of intelligent vehicles.
[0020] In the second aspect, an embodiment of the present invention provides a multi-model training device for Internet of Vehicles for cloud-edge-end collaborative hierarchical federated learning, which is applied to a cloud-edge-end collaborative hierarchical federated learning architecture. The cloud-edge-end collaborative hierarchical federated learning architecture includes: a cloud server, an edge server, and an intelligent vehicle. The cloud server serves as a global aggregator, the edge server serves as an intermediate layer aggregator, and the intelligent vehicle serves as a model training client. The device includes:
[0021] The acquisition module is used to obtain multiple training tasks for multi-model training of Internet of Vehicles;
[0022] An allocation module, used to allocate initial intelligent vehicles and training order for each training task;
[0023] The optimization module is used to schedule the training tasks using the improved particle swarm optimization algorithm and genetic algorithm to optimize the allocation of training tasks;
[0024] The optimization module is also used to optimize the training order of training tasks through a greedy algorithm;
[0025] An aggregation module, for performing model aggregation of edge servers and cloud servers according to a hybrid synchronous-asynchronous aggregation rule;
[0026] The adjustment module is used to dynamically adjust the scheduling strategy according to the training status of the training task to ensure that the global time cost is minimized;
[0027] The output module is used to output the final global model when the global training task reaches the preset accuracy or time requirements.
[0028] In a third aspect, an embodiment of the present invention provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method described above.
[0029] In a fourth aspect, an embodiment of the present invention provides a non-transitory computer-readable storage medium storing computer instructions, where the computer instructions are used to enable a computer to execute the method described above.
[0030] In an embodiment of the present invention, a hybrid synchronous-asynchronous aggregation rule is proposed. Based on this rule, synchronous aggregation can be used to reduce the risk of local training data loss, and asynchronous aggregation can be combined to improve the global model convergence speed. On this basis, efficient training task allocation and training priority optimization can be achieved through improved particle swarm optimization algorithm, genetic algorithm and greedy algorithm, thereby being able to cope with multi-model training problems in dynamic IoV environments, while achieving global time cost minimization and training balance between tasks.
[0031] It should be understood that the contents described in the summary of the invention are not intended to limit the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The above and other features, advantages and aspects of the embodiments of the present invention will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. The accompanying drawings are used to better understand the present invention and do not constitute a limitation of the present invention. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:
[0033] Figure 1 A flowchart of a multi-model training method for Internet of Vehicles for cloud-edge-device collaborative hierarchical federated learning provided by an embodiment of the present invention;
[0034] Figure 2 A schematic diagram of a cloud-edge-device collaborative hierarchical federated learning architecture provided for an embodiment of the present invention;
[0035] Figure 3 A schematic diagram of a hybrid synchronous-asynchronous aggregation rule provided by an embodiment of the present invention;
[0036] Figure 4 A schematic diagram of a training task allocation balance performance comparison provided by an embodiment of the present invention;
[0037] Figure 5 A schematic diagram of a convergence performance comparison provided by an embodiment of the present invention;
[0038] Figure 6 A schematic diagram of time performance comparison provided by an embodiment of the present invention;
[0039] Figure 7 A structural diagram of a multi-model training device for Internet of Vehicles for cloud-edge-device collaborative hierarchical federated learning provided by an embodiment of the present invention;
[0040] Figure 8 The figure is a structural diagram of an exemplary electronic device capable of implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0041] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0042] In addition, the term "and / or" in the present invention is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in the present invention generally indicates that the associated objects before and after are in an "or" relationship.
[0043] In order to solve the technical problems arising from the background technology, the embodiments of the present invention provide a multi-model training method, device, equipment and storage medium for cloud-edge-end collaborative hierarchical federated learning of the Internet of Vehicles. Below, in conjunction with the accompanying drawings, a multi-model training method, device, equipment and storage medium for cloud-edge-end collaborative hierarchical federated learning of the Internet of Vehicles provided by the embodiments of the present invention are described in detail through specific embodiments.
[0044] Figure 1 A flowchart of a multi-model training method for Internet of Vehicles for cloud-edge-device collaborative hierarchical federated learning provided by an embodiment of the present invention, such as Figure 1 As shown, the multi-model training method 100 for Internet of Vehicles is applied to a cloud-edge-device collaborative hierarchical federated learning architecture, which may include:
[0045] S110, obtaining multiple training tasks for multi-model training of Internet of Vehicles.
[0046] S120, allocating an initial intelligent vehicle and a training sequence to each training task.
[0047] S130, using an improved particle swarm optimization algorithm and a genetic algorithm to schedule the training tasks and optimize the allocation of the training tasks.
[0048] S140, optimizing the training order of the training tasks by using a greedy algorithm.
[0049] S150, performing model aggregation of the edge server and the cloud server according to the hybrid synchronous-asynchronous aggregation rule.
[0050] S160, dynamically adjust the scheduling strategy according to the training status of the training task to ensure that the global time cost is minimized.
[0051] S170: When the global training task reaches the preset accuracy or time requirement, the final global model is output.
[0052] In an embodiment of the present invention, a hybrid synchronous-asynchronous aggregation rule is proposed. Based on this rule, synchronous aggregation can be used to reduce the risk of local training data loss, and asynchronous aggregation can be combined to improve the global model convergence speed. On this basis, efficient training task allocation and training priority optimization can be achieved through improved particle swarm optimization algorithm, genetic algorithm and greedy algorithm, thereby being able to cope with multi-model training problems in dynamic IoV environments, while achieving global time cost minimization and training balance between tasks.
[0053] In order to facilitate further understanding, the above content is described in detail below in conjunction with specific embodiments:
[0054] (1) Cloud-edge-device collaborative hierarchical federated learning architecture
[0055] like Figure 2 As shown in the figure, the cloud-edge-device collaborative hierarchical federated learning architecture (VEC-HFL) includes:
[0056] Cloud Server (CS): acts as a global aggregator;
[0057] Edge Servers (ESs): Acting as Middle-tier Aggregators
[0058] Intelligent Vehicle (IoV) as a model training client
[0059] The smart vehicle moves within the coverage of the edge server and completes the model training and uploading tasks at a stable speed. The architecture supports multiple training tasks The training tasks can be distributed between edge servers and smart vehicles.
[0060] (2) Hybrid synchronous-asynchronous aggregation rules
[0061] like Figure 3 As shown, the hybrid synchronous-asynchronous aggregation rules include:
[0062] Edge synchronization aggregation: The edge server waits for all smart vehicles assigned to a specific training task to complete uploading their local models before performing synchronization aggregation.
[0063] Cloud asynchronous aggregation: After receiving the models uploaded by some edge servers, the cloud server performs asynchronous aggregation and updates the global model.
[0064] The following formula (1) defines the local loss function of intelligent vehicle n on training task j:
[0065]
[0066] Among them, l i is a single sample loss function, is the local model parameter of the intelligent vehicle. The process of updating the local model is expressed by formula (2):
[0067]
[0068] Where h is the number of local iterations and η is the learning rate. The model update process of edge server m on training task j is expressed by formula (3):
[0069]
[0070] in, is the union of all intelligent vehicle datasets participating in training task j within the coverage area of edge server m, is the set of intelligent vehicles participating in the training under the coverage of edge server m.
[0071] The global aggregation formula is as follows:
[0072]
[0073] in, is the set of edge servers participating in the training of model j in the g-th global aggregation, is the global model parameter, is the sum of data about model j in the g-th global aggregation.
[0074] (3) Time cost modeling
[0075] Here, the computation time of intelligent vehicle n in training task j is expressed as:
[0076]
[0077] Among them, k * represents the number of edge iterations, h * represents the number of local iterations, is a binary variable. If 1 is equal to 1, it means that the training task j is sent to the intelligent vehicle n for training. represents the training time of training task j on smart vehicle n. In addition, the communication time for smart vehicle n to upload model parameters to edge server m is:
[0078]
[0079] in, is the last model uploaded on smart vehicle n in this round of edge iteration, is the transmission time from smart vehicle to edge server, is the transmission time of the model from the edge server to the smart vehicle, = Waiting time (because it is multi-model training, if the edge is synchronized and aggregated, the edge server needs to wait for all the task parameters of the same type to be aggregated together before sending them down, so there may be waiting time on the smart vehicle side). Therefore, the total time for training and uploading multiple models on the smart vehicle side is:
[0080]
[0081] Therefore, completing a round of global aggregation depends on the last vehicle uploading its latest completed local model to the edge server, which is defined as:
[0082]
[0083] in, represents the set of vehicles covered by edge server m under the g-th round of global aggregation.
[0084] (4) Constraints
[0085] Balanced scheduling constraints for multiple training tasks:
[0086]
[0087] Among them, ξ1 represents a balance factor.
[0088] Time constraints:
[0089] Time constraints for task training and model parameter upload of smart vehicles (used to indicate that during task training and model parameter upload of smart vehicles, smart vehicles must be within the coverage of the edge server):
[0090]
[0091] in, is the total time for training and uploading multiple models on the smart vehicle side, is the residence time of the smart vehicle within the coverage of the edge server.
[0092] Intelligent vehicle model parameter upload time constraint (used to indicate that the model parameter upload time needs to be less than a tolerance value):
[0093]
[0094] in, is the transmission time from smart vehicle to edge server, t max is the tolerance value.
[0095] The optimization goal is to optimize the time performance under the above constraints, that is, to minimize the global time cost:
[0096]
[0097] Among them, λ k,m,n For the execution order of training tasks, since each intelligent vehicle has multiple training tasks to train, it is necessary to determine a reasonable training order to reduce latency.
[0098] (5) Algorithm design
[0099] The multi-model training method for Internet of Vehicles proposed in this paper is implemented by the improved hybrid heuristic and greedy algorithm (ImpH2GM), which aims to solve the multi-model task scheduling problem in the VEC-HFL architecture. In order to efficiently handle multi-task training, the present invention proposes a two-stage algorithm design. The design and implementation of the algorithm are introduced in detail below.
[0100] (5.1) Hybrid synchronous-asynchronous aggregation rules
[0101] In order to achieve efficient multi-model training, a hybrid synchronous-asynchronous aggregation rule is designed here, which combines the advantages of synchronous and asynchronous aggregation. The specific rules are as follows:
[0102] The synchronous aggregation rule is adopted in the edge server: the edge server waits for all smart vehicles assigned to a specific training task to complete the local model upload before performing model aggregation. This ensures the integrity of all vehicle models participating in the training.
[0103] Adopt asynchronous aggregation rules in cloud servers: After receiving the models from some edge servers, cloud servers immediately start to perform global aggregation and update the global model, reducing latency and increasing the convergence speed of the global model. Although asynchronous aggregation starts working after some tasks are completed, it can significantly speed up the update of the global model.
[0104] Through this hybrid synchronous-asynchronous aggregation rule, we can ensure the synchronization of edge servers and utilize the asynchronous aggregation of cloud servers to optimize the entire training process.
[0105] (5.2) Task scheduling design
[0106] In order to achieve balanced scheduling, the present invention proposes a two-stage optimization method. In the first stage, the balanced scheduling of training tasks is achieved by combining the improved particle swarm optimization algorithm (PSO) and the genetic algorithm (GA); in the second stage, the order of training tasks on the intelligent vehicle is optimized through a strategy based on the greedy algorithm, further reducing the training time and waiting time.
[0107] (5.2.1) Phase 1: Training Task Scheduling (Training Task Allocation)
[0108] At this stage, training tasks need to be reasonably allocated to intelligent vehicles while ensuring that the load of each training task is balanced among different intelligent vehicles. To this end, a hybrid heuristic method is adopted, combining an improved particle swarm optimization algorithm (PSO) and a genetic algorithm (GA). The PSO algorithm can globally search for the optimal training task allocation scheme and perform local optimization to ensure that the distribution of training tasks among intelligent vehicles is as balanced as possible. The introduction of the GA algorithm enhances the ability of global search, which can further optimize the allocation scheme of training tasks and avoid falling into the local optimal solution.
[0109] Particle swarm optimization finds the optimal allocation solution by adjusting the speed and position of particles, while genetic algorithm enhances search capabilities through crossover and mutation operations, explores a wider solution space, and optimizes task scheduling.
[0110] (5.2.2) Second stage: training order optimization (training ranking)
[0111] In the second stage, the training tasks have been assigned to the corresponding intelligent vehicles. Now it is necessary to further optimize the training order of the training tasks to improve the training efficiency and reduce the waiting time. To this end, a strategy based on the greedy algorithm is adopted:
[0112] a. Greedy algorithm: Sort the training tasks according to their training priorities based on the computing power of each intelligent vehicle and the training time of the training tasks. Each time, the training task with the shortest training time is selected for training, thereby reducing the total training time of the training tasks.
[0113] b. Task reordering: After each round of training, the greedy algorithm dynamically adjusts the priority of training tasks to ensure the optimal training order to speed up the training process.
[0114] Through the greedy algorithm, training tasks are prioritized according to the shortest training time, thereby reducing training and waiting time and accelerating the overall efficiency of multi-model training.
[0115] (5.3) ImpH2GM algorithm core process
[0116] 1. Initial stage: Get multiple training tasks for multi-model training of Internet of Vehicles.
[0117] 2. Initialization: Assign initial intelligent vehicles and training sequences to each training task.
[0118] 3. Phase 1: Task Scheduling: Use the improved particle swarm optimization algorithm and genetic algorithm to schedule the training tasks, optimize the distribution of training tasks, and ensure load balance.
[0119] 4. The second stage: training order optimization: optimize the training order of training tasks through the greedy algorithm to reduce training time and waiting time.
[0120] 5. Model aggregation: Perform model aggregation of edge servers and cloud servers according to the hybrid synchronous-asynchronous aggregation rules.
[0121] 6. Iterative update: Dynamically adjust the scheduling strategy according to the training status of the training task to ensure that the global time cost is minimized.
[0122] 7. Output the final model: When the global training task reaches the preset accuracy or time requirements, the final global model is output.
[0123] (6) Experimental results and comparative analysis
[0124] (6.1) Experimental parameters
[0125] The experimental simulation environment includes:
[0126] 1 cloud server, 5 edge servers, 25-50 smart vehicles;
[0127] Coverage: 5km radius for cloud servers and 1km radius for edge servers;
[0128] Task types: Cifar (VGG16), Mnist (CNN), Driver Yawning (ResNet-18) and 20Newsgroups (LSTM);
[0129] The key parameters are shown in Table 1.
[0130] Table 1
[0131] parameter value parameter value Number of tasks 4 Learning rate η 0.001 <![CDATA[Local iteration h * > 6 <![CDATA[Edge iteration k * > 8 <![CDATA[CPU cycle count c n > 20-30 <![CDATA[Clock frequency f n > 1-10GHz
[0132] (6.2) Experimental results
[0133] (6.2.1) Balance of task allocation
[0134] like Figure 4 As shown, the balanced performance of different methods on task allocation is demonstrated.
[0135] ImpH2GM: The distribution is more balanced and the difference between tasks is significantly smaller than other methods.
[0136] Traditional methods (such as TSPSO and TSGA) are prone to fall into local optimality, resulting in over- or under-allocation of certain tasks.
[0137] (6.2.2) Training Convergence Performance
[0138] like Figure 5As shown, the convergence performance of different methods is demonstrated.
[0139] ImpH2GM shows good convergence on multiple tasks.
[0140] Although traditional methods converge faster on individual tasks, the unbalanced task allocation leads to a decrease in overall performance.
[0141] (6.2.3) Time cost comparison
[0142] like Figure 6 As shown, the global time cost of different methods is shown:
[0143] Compared with TSGA, TSPSO, TSSO and TSGD, ImpH2GM saves 17.2%, 24.9% and 30.6% of time respectively.
[0144] As the number of vehicles increases, ImpH2GM's advantage in reducing communication delay becomes more significant.
[0145] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described order of actions, because according to the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present invention.
[0146] The above is an introduction to a method embodiment. The following is a further explanation of the solution of the present invention through an apparatus embodiment.
[0147] Figure 7 A structural diagram of a multi-model training device for Internet of Vehicles for cloud-edge-device collaborative hierarchical federated learning provided by an embodiment of the present invention, such as Figure 7 As shown, the IoV multi-model training device 700 is applied to a cloud-edge-end collaborative hierarchical federated learning architecture, which may include:
[0148] An acquisition module 710 is used to acquire multiple training tasks for multi-model training of Internet of Vehicles;
[0149] An allocation module 720, for allocating an initial intelligent vehicle and a training sequence to each training task;
[0150] An optimization module 730 is used to schedule the training tasks using an improved particle swarm optimization algorithm and a genetic algorithm to optimize the allocation of the training tasks;
[0151] The optimization module 730 is further used to optimize the training order of the training tasks by using a greedy algorithm;
[0152] Aggregation module 740, for performing model aggregation of edge servers and cloud servers according to hybrid synchronous-asynchronous aggregation rules;
[0153] An adjustment module 750 is used to dynamically adjust the scheduling strategy according to the training situation of the training task to ensure that the global time cost is minimized;
[0154] The output module 760 is used to output the final global model when the global training task reaches the preset accuracy or time requirement.
[0155] Understandably, Figure 7 Each module / unit in the multi-model training device 700 shown in the Internet of Vehicles has the following functions: Figure 1 The functions of each step in the multi-model training method 100 for the Internet of Vehicles shown can achieve their corresponding technical effects, and for the sake of brevity, they will not be repeated here.
[0156] Figure 8 800 is a block diagram of an exemplary electronic device capable of implementing an embodiment of the present invention. Electronic device 800 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic device 800 may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown in the present invention, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required in the present invention.
[0157] like Figure 8 As shown, the electronic device 800 may include a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the electronic device 800 may also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0158] Multiple components in the electronic device 800 are connected to the I / O interface 805, including: an input unit 806, such as a keyboard, a mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a disk, an optical disk, etc.; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 809 allows the electronic device 800 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0159] The computing unit 801 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 801 performs the various methods and processes described above, such as method 100. For example, in some embodiments, the method 100 may be implemented as a computer program product, including a computer program, which is tangibly contained in a computer-readable medium, such as a storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 800 via ROM 802 and / or a communication unit 809. When the computer program is loaded into RAM 803 and executed by the computing unit 801, one or more steps of the method 100 described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to perform the method 100 in any other appropriate manner (e.g., by means of firmware).
[0160] The various embodiments described above in the present invention can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: being implemented in one or more computer programs, which may be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general programmable processor, which may receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0161] The program code for implementing the method of the present invention can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code can be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.
[0162] In the context of the present invention, a computer-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. A computer-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. A more specific example of a computer-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0163] It should be noted that the present invention also provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute method 100 and achieve the corresponding technical effect achieved by executing the method in an embodiment of the present invention. For the sake of concise description, they will not be repeated here.
[0164] In addition, the present invention also provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the method 100 is implemented.
[0165] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution disclosed in the present invention can be achieved, and the present invention is not limited here.
[0166] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A multi-model training method for Internet of Vehicles for cloud-edge-device collaborative hierarchical federated learning, characterized in that: The method is applied to a cloud-edge-end collaborative hierarchical federated learning architecture, which includes: a cloud server, an edge server, and an intelligent vehicle. The cloud server serves as a global aggregator, the edge server serves as an intermediate layer aggregator, and the intelligent vehicle serves as a model training client. The method includes: Get multiple training tasks for multi-model training of Internet of Vehicles; Assign initial intelligent vehicles and training sequence to each training task; Use improved particle swarm optimization algorithm and genetic algorithm to schedule training tasks and optimize the allocation of training tasks; Optimize the training order of training tasks through greedy algorithm; Perform model aggregation of edge servers and cloud servers according to hybrid synchronous-asynchronous aggregation rules; Dynamically adjust the scheduling strategy according to the training status of the training task to ensure that the global time cost is minimized; When the global training task reaches the preset accuracy or time requirement, the final global model is output.
2. The method according to claim 1, characterized in that The hybrid synchronous-asynchronous aggregation rules include: Adopt synchronization aggregation rules in edge servers; Asynchronous aggregation rules are adopted in cloud servers.
3. The method according to claim 2, characterized in that The synchronous aggregation rule is adopted in the edge server, including: The edge server performs model aggregation after waiting for all smart vehicles assigned to a specific training task to complete uploading their local models.
4. The method according to claim 2, characterized in that: The asynchronous aggregation rule is adopted in the cloud server, including: After receiving the models from some edge servers, the cloud server immediately starts to perform global aggregation and update the global model.
5. The method according to claim 1, characterized in that: The optimization goal is to minimize the global time cost, and its corresponding constraints include: balanced scheduling constraints for multiple training tasks, time constraints for task training and model parameter upload of intelligent vehicles, and time constraints for model parameter upload of intelligent vehicles.
6. A multi-model training device for Internet of Vehicles for cloud-edge-device collaborative hierarchical federated learning, characterized in that: The device is applied to a cloud-edge-end collaborative hierarchical federated learning architecture, which includes: a cloud server, an edge server, and an intelligent vehicle. The cloud server serves as a global aggregator, the edge server serves as an intermediate layer aggregator, and the intelligent vehicle serves as a model training client. The device includes: The acquisition module is used to obtain multiple training tasks for multi-model training of Internet of Vehicles; An allocation module, used to allocate initial intelligent vehicles and training order for each training task; The optimization module is used to schedule the training tasks using the improved particle swarm optimization algorithm and genetic algorithm to optimize the allocation of training tasks; The optimization module is further used to optimize the training order of the training tasks through a greedy algorithm; An aggregation module, for performing model aggregation of edge servers and cloud servers according to a hybrid synchronous-asynchronous aggregation rule; The adjustment module is used to dynamically adjust the scheduling strategy according to the training status of the training task to ensure that the global time cost is minimized; The output module is used to output the final global model when the global training task reaches the preset accuracy or time requirements.
7. An electronic device, characterized in that: The electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method described in any one of claims 1 to 5.
8. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 5.