Driving model training methods, devices, storage media and equipment
By distributing the training tasks among vehicle-side, edge servers, and cloud servers, the problem of heavy training burden for autonomous vehicle driving models is solved, and efficient driving model training is achieved.
Patent Information
- Application Number
- CN202411211164.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2044-08-30
AI Technical Summary
In existing technologies, the large amount of data in autonomous vehicles leads to a heavy burden on driving model training and low training efficiency.
The training burden is shared among vehicle-mounted devices, edge servers, and cloud servers. The vehicle-mounted devices perform initial training, the edge servers aggregate model parameter differences, and the cloud servers perform final aggregation to form the target driving model.
This reduces the training burden on vehicle-side, edge servers, and cloud servers, and improves the training efficiency of driving models.
Smart Images

Figure CN119322673B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of driving model training technology, specifically to a driving model training method, apparatus, storage medium, and device. Background Technology
[0002] With the rapid development of autonomous driving technology, self-driving cars are becoming increasingly common. When self-driving cars are on the road, they can collect data during their journey using cameras, sensors, and other information-gathering devices. However, because self-driving cars generate a large amount of data, using this massive amount of data for driving model training places a heavy burden on the equipment used for training, leading to low training efficiency. Therefore, existing technologies suffer from the technical drawbacks of high training burden and low training efficiency for driving models. Summary of the Invention
[0003] The purpose of this application is to overcome the shortcomings and deficiencies in the prior art and provide a driving model training method, device, storage medium and equipment that can share the burden of training driving models through vehicle terminals, edge servers and cloud servers, thereby improving the training efficiency of driving models.
[0004] The first aspect of this application provides a driving model training method, applied to a driving model training system, including multiple vehicle terminals, several edge servers, and a cloud server. The method includes:
[0005] Each of the aforementioned edge servers sends the first driving model to several corresponding vehicle terminals;
[0006] Each of the vehicle terminals trains the first driving model based on its own driving data and a preset number of training iterations to obtain a trained second driving model, and obtains a first model parameter difference based on the second driving model and the first driving model; each of the vehicle terminals uploads the first model parameter difference to the corresponding edge server;
[0007] Each edge server trains the first driving model based on the first model parameter differences uploaded by several corresponding vehicle terminals to obtain a third driving model and the number of edge aggregations. If the number of edge aggregations is less than a preset edge aggregation threshold, the third driving model is redeployed to each vehicle terminal to update the first driving model of each vehicle terminal and obtain new first model parameter differences again, until the number of edge aggregations equals the edge aggregation threshold, to obtain a fourth driving model, and a second model parameter difference is obtained based on the fourth driving model and the first driving model. Each edge server uploads the second model parameter difference to the cloud server.
[0008] The cloud server trains a first driving model based on the differences in the second model parameters uploaded by several edge servers, thereby obtaining a target vehicle driving model.
[0009] A second aspect of this application provides a driving model training method, wherein a cloud server distributes the obtained target vehicle driving model to multiple vehicle terminals through several edge servers to improve the autonomous driving performance of each vehicle terminal.
[0010] A third aspect of this application provides a driving model training device for use in a driving model training system, comprising multiple vehicle terminals, several edge servers, and a cloud server. The device includes:
[0011] The driving model distribution module is used to drive each of the edge servers to distribute the first driving model to the corresponding number of vehicle terminals;
[0012] The vehicle-side training module is used to drive each vehicle to train the first driving model based on its own driving data and a preset number of training iterations, to obtain the trained second driving model, and to obtain the first model parameter difference based on the second driving model and the first driving model; each vehicle uploads the first model parameter difference to the corresponding edge server;
[0013] An edge server training module is used to drive each edge server to train the first driving model based on the first model parameter differences uploaded by a number of corresponding vehicle terminals, to obtain a third driving model and the number of edge aggregations; if the number of edge aggregations is less than a preset edge aggregation number threshold, the third driving model is redistributed to each vehicle terminal to update the first driving model of each vehicle terminal and to re-obtain new first model parameter differences, until the number of edge aggregations equals the edge aggregation number threshold, to obtain a fourth driving model, and a second model parameter difference is obtained based on the fourth driving model and the first driving model; each edge server uploads the second model parameter difference to the cloud server;
[0014] The cloud server training module is used to drive the cloud server to train the first driving model based on the difference of the second model parameters uploaded by several edge servers, so as to obtain the target vehicle driving model.
[0015] A fourth aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the driving model training method described above.
[0016] A fifth aspect of this application provides a computer device including a storage device, a processor, and a computer program stored in the storage device and executable by the processor, wherein the processor executes the computer program to implement the steps of the driving model training method described above.
[0017] Compared to related technologies, in this application, each vehicle-end trains its model based on its own driving data. Then, the edge server performs aggregate training based on the first model parameter differences obtained from the training of each vehicle-end, until the number of edge aggregations equals the threshold, resulting in a second model parameter difference that integrates the training results of multiple vehicle-ends. The cloud server then performs aggregate training on the first driving model based on the second model parameter differences uploaded by each edge server to obtain the target vehicle driving model. By having the vehicle-end, edge server, and cloud server each responsible for a portion of the model training, the burden of training the driving model is shared among the vehicle-end, edge server, and cloud server. Moreover, the training data for each vehicle-end consists only of its own driving data, the training data for each edge server consists only of the first model parameter differences uploaded by a corresponding number of vehicle-ends, and the training data for the cloud server consists of the second model parameter differences uploaded by each edge server. Therefore, the training burden for the vehicle-end, edge server, and cloud server is very small, allowing them to quickly train the driving model with minimal burden, thus improving the training efficiency of the driving model.
[0018] To provide a clearer understanding of this application, the specific embodiments of this application will be described below in conjunction with the accompanying drawings. Attached Figure Description
[0019] Figure 1 This is a schematic diagram of the training framework of a driving model training method according to an embodiment of this application.
[0020] Figure 2 This is a flowchart of a driving model training method according to an embodiment of this application.
[0021] Figure 3 This is a schematic diagram of the module connections of a driving model training device according to an embodiment of this application.
[0022] 100. Driving model training device; 101. Driving model distribution module; 102. Vehicle-side training module; 103. Edge server training module; 104. Cloud server training module. Detailed Implementation
[0023] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0024] It should be understood that the described embodiments are merely some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of the embodiments of this application.
[0025] In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. In the description of this application, it should be understood that the terms "first," "second," "third," etc., are used only to distinguish similar objects and are not necessarily used to describe a specific order or sequence, nor should they be construed as indicating or implying relative importance. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances. The singular forms "a," "the," and "the" used in this application and the appended claims are also intended to include the plural forms, unless the context clearly indicates otherwise. The word "if" as used herein can be interpreted as "when," "when," or "in response to determination."
[0026] Furthermore, in the description of this application, unless otherwise stated, "multiple" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.
[0027] Please see Figure 1 This is a schematic diagram of the training framework of a driving model training method according to an embodiment of this application. The training framework of this application can be divided into a vehicle user terminal, an edge layer, and a cloud layer. Each vehicle user terminal trains its model based on its own driving data. Then, the edge server in the edge layer performs aggregate training based on the first model parameter differences obtained from the training of each vehicle terminal until the number of edge aggregations equals a threshold, resulting in a second model parameter difference that integrates the training results of multiple vehicle terminals. Finally, the cloud server in the cloud layer performs aggregate training on the first driving model based on the second model parameter differences uploaded by each edge server. Figure 1 In this context, Vehicle 1 and Vehicle M / N refer to vehicle-side devices. The roadside unit serves as the medium for network communication between the edge server and the cloud server; that is, the edge server can interact with both the vehicle-side device and the cloud server via the roadside unit. A roadside unit is a device with network communication capabilities located near a road, such as a base station.
[0028] Please see Figure 2 , Figure 2This is a flowchart of a driving model training method according to an embodiment of this application, applied to a driving model training system, including multiple vehicle terminals, several edge servers and cloud servers, the method including:
[0029] S1: Each of the aforementioned edge servers sends the first driving model to the corresponding number of vehicle terminals.
[0030] In this context, an edge server refers to a server device capable of training models that interacts with vehicles via roadside units. The first driving model refers to the driving model stored on the edge server. Before training begins, the first driving model is the initial driving model, and it is stored on both the edge server and the cloud server. The several vehicles corresponding to the edge server refer to vehicles that can interact with the edge server. Due to the high flexibility of vehicles, and the fact that the first driving models stored on edge servers at different road locations and terrains may not be exactly the same, storing the first driving model on the edge server reduces the storage load on vehicles storing multiple first driving models. When a vehicle enters the data interaction range of the edge server, the edge server can distribute the first driving model to the vehicle to drive the vehicle to train the first driving model based on driving data.
[0031] S2: Each of the vehicle terminals trains the first driving model based on its own driving data and a preset number of training iterations to obtain a trained second driving model, and obtains a first model parameter difference based on the second driving model and the first driving model; each of the vehicle terminals uploads the first model parameter difference to the corresponding edge server.
[0032] The preset number of training iterations can be stored on the vehicle or on an edge server. Since different road locations and terrains have different requirements for the number of training iterations, and a uniform number of training iterations is beneficial to improving the balance of training the first driving model on each vehicle, it is preferable that the number of training iterations is preset on the edge server. When the edge server sends the first driving model to the vehicle, the edge server also sends the number of training iterations to the vehicle.
[0033] The second driving model refers to the driving model obtained after training the first driving model based on the number of training sessions.
[0034] The first model parameter difference is used to represent the parameter difference between the second driving model and the first driving model, that is, to represent the difference in model parameters of the first driving model in the vehicle before and after training. The step of obtaining the first model parameter difference based on the second driving model and the first driving model includes: the vehicle determining the difference between the model parameters of the second driving model and the model parameters of the first driving model as the first model parameter difference.
[0035] For example, the parameter difference of the first model can be obtained using the following formula:
[0036] p m =w 0 -w
[0037] Where, p m w represents the parameter difference of the first model. 0 is the first driving model on the vehicle side, and w is the second driving model on the vehicle side.
[0038] S3: Each edge server trains the first driving model based on the first model parameter differences uploaded by the corresponding number of vehicle terminals to obtain a third driving model and the number of edge aggregations; if the number of edge aggregations is less than a preset edge aggregation number threshold, the third driving model is redistributed to each of the vehicle terminals to update the first driving model of each vehicle terminal and to re-obtain new first model parameter differences, until the number of edge aggregations is equal to the edge aggregation number threshold, to obtain a fourth driving model, and a second model parameter difference is obtained based on the fourth driving model and the first driving model; each edge server uploads the second model parameter difference to the cloud server.
[0039] The edge servers train the first driving model based on the differences in first model parameters uploaded by the corresponding number of vehicles, and obtain the third driving model and the number of edge aggregations, including:
[0040] S31: Each edge server obtains the optimal weight of each first model parameter difference based on a preset learning algorithm and multiple first model parameter differences.
[0041] For example, the optimal weights for the differences between the parameters of the first model can be obtained using the following formula:
[0042]
[0043] in, Let μ be the optimal weight for the m-th parameter difference of the first model, ∈ be the policy selection, ∈ ∈ [0,1], μ0 be the prior fixed weight, μ0 = 1 / m, μ m p is the initial weight for the m-th difference of the first model parameters. m This represents the difference in parameters of the m-th first model.
[0044] S32: Each of the edge servers obtains a first gradient descent coefficient based on the difference in parameters of each of the first models and their optimal weights.
[0045] For example, the first gradient descent coefficient can be obtained using the following formula:
[0046]
[0047] Where, d r This is the first gradient descent coefficient, used to indicate the direction of gradient descent during aggregate training.
[0048] S33: Each of the edge servers trains the first driving model according to the first gradient descent coefficient and the preset first training step size to obtain the third driving model, and the number of times the third driving model is obtained is determined as the number of edge aggregations.
[0049] For example, the third driving model can be obtained using the following formula:
[0050] W n (r+1)←W n (r)-η r d r
[0051] Among them, W n (r+1) represents the third driving model of the nth edge server, W n (r) represents the first driving model of the nth edge server, η r This is the first training step length.
[0052] The fourth driving model is the third driving model obtained from the last aggregation training when the number of edge aggregations equals the threshold number of edge aggregations.
[0053] The step of obtaining the second model parameter difference based on the fourth driving model and the first driving model includes: the edge server determining the difference between the model parameters of the fourth driving model and the model parameters of the first driving model as the second model parameter difference.
[0054] S4: The cloud server trains the first driving model based on the difference in the second model parameters uploaded by several edge servers to obtain the target vehicle driving model.
[0055] Step S4 may include:
[0056] The cloud server trains a first driving model based on the difference in the second model parameters uploaded by several edge servers to obtain a fifth driving model and the number of cloud aggregations. If the number of cloud aggregations is less than a preset cloud aggregation threshold, the fifth driving model is redistributed to several edge servers to update the first driving model of each edge server and re-acquire new difference in the second model parameters until the number of cloud aggregations equals the cloud aggregation threshold, thereby obtaining the target vehicle driving model.
[0057] The cloud aggregation count refers to the number of times the cloud server obtains the fifth driving model. Specifically, the cloud server trains the first driving model based on the parameter differences of the second model uploaded by several edge servers to obtain the fifth driving model and the cloud aggregation count, including:
[0058] S41: The cloud server obtains the optimal weights of each second model parameter difference based on the preset learning algorithm and multiple second model parameter differences.
[0059] S42: The cloud server obtains the second gradient descent coefficient based on the differences between the parameters of each of the second models and their optimal weights.
[0060] S43: The cloud server trains the first driving model according to the second gradient descent coefficient and the preset second training step size to obtain the fifth driving model, and the number of times the fifth driving model is obtained is determined as the number of cloud aggregations.
[0061] Therefore, each edge server performs parameter aggregation training based on the first model parameter difference values of each vehicle end, which reflect the differences between the second driving model and the first driving model, to obtain the fourth driving model. Then, each edge server uploads the second model parameter difference values, which reflect the differences between the fourth driving model and the first driving model, to the cloud server, so that the cloud server can perform parameter aggregation training to obtain the target vehicle driving model.
[0062] Specifically, when the number of cloud aggregations is less than the cloud aggregation threshold, the cloud server will redistribute the fifth driving model to each edge server as the new first driving model for each edge server. At this time, the edge aggregation count of the edge server is reset to zero. Then, the edge server will also redistribute the new first driving model to each vehicle to obtain the new first model parameter difference obtained by the local training of the new first driving model on each vehicle. The edge server will also train the stored new first driving model based on the new first model parameter difference to obtain a new third driving model and the number of edge aggregations. When the number of edge aggregations is less than the edge aggregation threshold, the new third driving model will be redistributed to each of the aforementioned vehicles for training. This process is repeated until the number of edge aggregations equals the edge aggregation threshold. The third driving model obtained from the last aggregation training is determined as the new fourth driving model. Then, the second model parameter difference is obtained based on the new fourth driving model and the new first driving model, and then uploaded to the cloud server for the next aggregation training to obtain a new fifth driving model and the cumulative number of cloud aggregations. When the number of cloud aggregations equals the cloud aggregation threshold, the fifth driving model obtained from the last aggregation training by the cloud server is the target vehicle driving model.
[0063] Compared to related technologies, in this application, each vehicle-end trains its model based on its own driving data. Then, the edge server performs aggregate training based on the first model parameter differences obtained from the training of each vehicle-end, until the number of edge aggregations equals the threshold, resulting in a second model parameter difference that integrates the training results of multiple vehicle-ends. The cloud server then performs aggregate training on the first driving model based on the second model parameter differences uploaded by each edge server to obtain the target vehicle driving model. By having the vehicle-end, edge server, and cloud server each responsible for a portion of the model training, the burden of training the driving model is shared among the vehicle-end, edge server, and cloud server. Moreover, the training data for each vehicle-end consists only of its own driving data, the training data for each edge server consists only of the first model parameter differences uploaded by a corresponding number of vehicle-ends, and the training data for the cloud server consists of the second model parameter differences uploaded by each edge server. Therefore, the training burden for the vehicle-end, edge server, and cloud server is very small, allowing them to quickly train the driving model with minimal burden, thus improving the training efficiency of the driving model.
[0064] The second embodiment of this application also provides a driving model training method, including: the cloud server distributes the obtained target vehicle driving model to multiple vehicle terminals through a plurality of edge servers, so as to improve the autonomous driving performance of each vehicle terminal.
[0065] Please see Figure 3 The third embodiment of this application provides a driving model training device 100, applied to a driving model training system, including multiple vehicle terminals, several edge servers and cloud servers. The device includes:
[0066] The driving model distribution module 101 is used to drive each of the edge servers to distribute the first driving model to the corresponding number of vehicle terminals;
[0067] The vehicle-side training module 102 is used to drive each vehicle to train the first driving model according to its own driving data and a preset number of training times, to obtain the trained second driving model, and to obtain the first model parameter difference based on the second driving model and the first driving model; each vehicle uploads the first model parameter difference to the corresponding edge server.
[0068] The edge server training module 103 is used to drive each edge server to train the first driving model based on the first model parameter differences uploaded by a number of corresponding vehicle terminals, to obtain a third driving model and the number of edge aggregations; if the number of edge aggregations is less than a preset edge aggregation number threshold, the third driving model is redistributed to each vehicle terminal to update the first driving model of each vehicle terminal and to re-obtain new first model parameter differences, until the number of edge aggregations is equal to the edge aggregation number threshold, to obtain a fourth driving model, and to obtain a second model parameter difference based on the fourth driving model and the first driving model; each edge server uploads the second model parameter difference to the cloud server;
[0069] The cloud server training module 104 is used to drive the cloud server to train the first driving model based on the difference of the second model parameters uploaded by several edge servers, so as to obtain the target vehicle driving model.
[0070] It should be noted that the driving model training device 100 provided in the third embodiment of this application is only illustrated by the above-described division of functional modules when executing the driving model training method. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the driving model training device 100 provided in the third embodiment of this application and the driving model training method of the first embodiment of this application belong to the same concept, and its implementation process is detailed in the method embodiment, which will not be repeated here.
[0071] The fourth embodiment of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the driving model training method described above.
[0072] The fifth embodiment of this application provides a computer device, including a storage device, a processor, and a computer program stored in the storage device and executable by the processor. When the processor executes the computer program, it implements the steps of the driving model training method described above.
[0073] The device embodiments described above are merely illustrative. The components described as separate parts may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this application according to actual needs. Those skilled in the art can understand and implement this without any inventive effort.
[0074] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0075] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 The computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function selected in one or more boxes.
[0076] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function selected in one or more boxes.
[0077] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0078] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0079] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0080] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0081] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A driving model training method, characterized in that, This method is applied to a driving model training system, which includes multiple vehicle terminals, several edge servers, and cloud servers. The driving model training methods include: Each of the aforementioned edge servers sends the first driving model to several corresponding vehicle terminals; Each of the vehicle terminals trains the first driving model based on its own driving data and a preset number of training iterations to obtain a trained second driving model, and obtains a first model parameter difference based on the second driving model and the first driving model; each of the vehicle terminals uploads the first model parameter difference to the corresponding edge server; Each edge server trains the first driving model based on the first model parameter differences uploaded by several corresponding vehicle terminals to obtain a third driving model and the number of edge aggregations. If the number of edge aggregations is less than a preset edge aggregation threshold, the third driving model is redeployed to each vehicle terminal to update the first driving model of each vehicle terminal and obtain new first model parameter differences again, until the number of edge aggregations equals the edge aggregation threshold, to obtain a fourth driving model, and a second model parameter difference is obtained based on the fourth driving model and the first driving model. Each edge server uploads the second model parameter difference to the cloud server. The cloud server trains a first driving model based on the differences in the second model parameters uploaded by several edge servers to obtain a target vehicle driving model, including: the cloud server trains the first driving model based on the differences in the second model parameters uploaded by several edge servers to obtain a fifth driving model and a number of cloud aggregations; if the number of cloud aggregations is less than a preset cloud aggregation threshold, the fifth driving model is redistributed to several edge servers to update the first driving model of each edge server and re-acquire new differences in the second model parameters, until the number of cloud aggregations equals the cloud aggregation threshold, and the target vehicle driving model is obtained; The cloud server trains a first driving model based on the differences in the second model parameters uploaded by several edge servers, and obtains a fifth driving model and the number of cloud aggregations, including: The cloud server obtains the optimal weights for each of the second model parameter differences based on a preset learning algorithm and multiple second model parameter differences; The cloud server obtains the second gradient descent coefficient based on the differences between the parameters of each second model and their optimal weights; The cloud server trains the first driving model based on the second gradient descent coefficient and the preset second training step size to obtain the fifth driving model, and the number of times the fifth driving model is obtained is determined as the number of cloud aggregations; The edge servers train the first driving model based on the differences in first model parameters uploaded by the corresponding number of vehicles, and obtain the third driving model and the number of edge aggregations, including: Each edge server obtains the optimal weight of each first model parameter difference based on a preset learning algorithm and multiple first model parameter differences; Each edge server obtains a first gradient descent coefficient based on the parameter differences of each of the first models and their optimal weights; the first gradient descent coefficient is obtained using the following formula: in, This is the first gradient descent coefficient, used to indicate the direction of gradient descent during aggregate training; For the first The optimal weights for the parameter differences of the first model; For the first The difference in parameters of the first model; Each edge server trains the first driving model based on the first gradient descent coefficient and a preset first training step size to obtain the third driving model. The number of times the third driving model is obtained is determined as the edge aggregation number. The third driving model is obtained using the following formula: in, For the first The third driving model of an edge server For the first The first driving model of an edge server This is the first training step length.
2. The driving model training method according to claim 1, characterized in that, The step of obtaining the second model parameter difference based on the fourth driving model and the first driving model includes: The edge server determines the difference between the model parameters of the fourth driving model and the model parameters of the first driving model as the second model parameter difference.
3. The driving model training method according to claim 1, characterized in that, The step of obtaining the first model parameter difference based on the second driving model and the first driving model includes: The vehicle terminal determines the difference between the model parameters of the second driving model and the model parameters of the first driving model as the first model parameter difference.
4. A driving model training device, characterized in that, This is applied to a driving model training system, which includes multiple vehicle terminals, several edge servers, and cloud servers. The driving model training device includes: The driving model distribution module is used to drive each of the edge servers to distribute the first driving model to the corresponding number of vehicle terminals; The vehicle-side training module is used to drive each vehicle to train the first driving model based on its own driving data and a preset number of training iterations, to obtain the trained second driving model, and to obtain the first model parameter difference based on the second driving model and the first driving model; each vehicle uploads the first model parameter difference to the corresponding edge server; An edge server training module is used to drive each edge server to train the first driving model based on the first model parameter differences uploaded by a number of corresponding vehicle terminals, to obtain a third driving model and the number of edge aggregations; if the number of edge aggregations is less than a preset edge aggregation number threshold, the third driving model is redistributed to each vehicle terminal to update the first driving model of each vehicle terminal and to re-obtain new first model parameter differences, until the number of edge aggregations equals the edge aggregation number threshold, to obtain a fourth driving model, and a second model parameter difference is obtained based on the fourth driving model and the first driving model; each edge server uploads the second model parameter difference to the cloud server; A cloud server training module is used to drive the cloud server to train a first driving model based on the difference in the second model parameters uploaded by several edge servers to obtain a target vehicle driving model. The module includes: the cloud server training the first driving model based on the difference in the second model parameters uploaded by several edge servers to obtain a fifth driving model and a cloud aggregation count; if the cloud aggregation count is less than a preset cloud aggregation count threshold, the fifth driving model is redistributed to several edge servers to update the first driving model on each edge server and re-acquire new difference in the second model parameters, until the cloud aggregation count equals the cloud aggregation count threshold, thus obtaining the target vehicle driving model. The cloud server trains a first driving model based on the differences in the second model parameters uploaded by several edge servers, and obtains a fifth driving model and the number of cloud aggregations, including: The cloud server obtains the optimal weights for each of the second model parameter differences based on a preset learning algorithm and multiple second model parameter differences; The cloud server obtains the second gradient descent coefficient based on the differences between the parameters of each second model and their optimal weights; The cloud server trains the first driving model based on the second gradient descent coefficient and the preset second training step size to obtain the fifth driving model, and the number of times the fifth driving model is obtained is determined as the number of cloud aggregations; The edge servers train the first driving model based on the differences in first model parameters uploaded by the corresponding number of vehicles, and obtain the third driving model and the number of edge aggregations, including: Each edge server obtains the optimal weight of each first model parameter difference based on a preset learning algorithm and multiple first model parameter differences; Each edge server obtains a first gradient descent coefficient based on the parameter differences of each of the first models and their optimal weights; the first gradient descent coefficient is obtained using the following formula: in, This is the first gradient descent coefficient, used to indicate the direction of gradient descent during aggregate training; For the first The optimal weights for the parameter differences of the first model; For the first The difference in parameters of the first model; Each edge server trains the first driving model based on the first gradient descent coefficient and a preset first training step size to obtain the third driving model. The number of times the third driving model is obtained is determined as the edge aggregation number. The third driving model is obtained using the following formula: in, For the first The third driving model of an edge server For the first The first driving model of an edge server This is the first training step length.
5. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by the processor, it implements the steps of the driving model training method as described in any one of claims 1 to 3.
6. A computer device, characterized in that: It includes a storage device, a processor, and a computer program stored in the storage device and executable by the processor, wherein the processor executes the computer program to implement the steps of the driving model training method as described in any one of claims 1 to 3.
Citation Information
Patent Citations
Combined learning method and device based on gradient momentum acceleration
CN110889509A
Asynchronous federated learning method, system, device and terminal for mobile vehicle
CN114116198A