Distributed OTA upgrading method and device, vehicle and storage medium
By adopting a distributed OTA upgrade method in the vehicle, utilizing the master-slave control end to collaboratively allocate tasks and dynamically distribute ECU upgrade packages, the problem of long upgrade time in existing technologies is solved, and the efficiency and stability of vehicle upgrades are improved.
Patent Information
- Application Number
- CN202510723060.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-30
- Publication Date
- 2025-09-19
AI Technical Summary
The OTA upgrade method in the existing technology takes a long time to upgrade, resulting in a poor upgrade experience.
A distributed OTA upgrade method is adopted. By determining the master control terminal and multiple slave control terminals in the vehicle, the master control terminal obtains the basic information of each ECU and allocates parameter collection, download and upgrade tasks to dynamically distribute ECU upgrade packages and realize coordinated upgrade of each control terminal.
It improves the efficiency and stability of vehicle upgrades and solves the problem of long upgrade time.
Smart Images

Figure CN120676346A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the technical field of intelligent networked vehicles, and in particular to a distributed OTA upgrade method, device, vehicle, and storage medium. Background Art
[0002] Currently, whole-vehicle upgrades are the mainstream in the automotive over-the-air technology (OTA) industry. Important OTA metrics are upgrade success rate and efficiency. Traditional whole-vehicle upgrade solutions use an intelligent electronic control unit (ECU) as the master node, which incorporates an internal OTA controller (the OTA Master). The OTA Master is responsible for upgrading all ECUs. This approach typically takes a long time to complete, resulting in a poor upgrade experience. Summary of the Invention
[0003] The present invention provides a distributed OTA upgrade method, device, vehicle and storage medium to solve the problem of long upgrade time in the OTA upgrade method in the prior art.
[0004] According to one aspect of the present invention, a distributed OTA upgrade method is provided, the method comprising:
[0005] Determine a master control terminal and multiple slave control terminals, wherein the master control terminal and each of the slave control terminals are respectively deployed in different micro control units (ECUs);
[0006] Obtaining, through the master control terminal, basic information of the ECU to which the master control terminal belongs, and basic information of the corresponding ECU collected by each of the slave control terminals;
[0007] Assigning parameter collection tasks to each of the slave control terminals through the master control terminal, receiving parameter information of the ECU corresponding to the assigned parameter collection task returned by each of the slave control terminals, and collecting parameter information of the ECU belonging to the master control terminal;
[0008] Send all parameter information to the over-the-air (OTA) server through the main control terminal, and obtain the ECU upgrade packages corresponding to different ECUs returned by the OTA server;
[0009] The master control end dynamically allocates the ECU upgrade package corresponding to the ECU based on the basic information of each ECU, and allocates download tasks and upgrade tasks of the corresponding ECU upgrade package to the master control end and each of the slave control ends, so that the master control end and each of the slave control ends can complete the upgrade of the corresponding ECU based on the download tasks and upgrade tasks.
[0010] According to another aspect of the present invention, a distributed OTA upgrade device is provided, the device comprising:
[0011] A determination module, configured to determine a master control terminal and a plurality of slave control terminals, wherein the master control terminal or the slave control terminals are deployed in different micro control units (ECUs);
[0012] A collecting module, configured to obtain, through the master control terminal, basic information of the ECU to which the master control terminal belongs, and basic information of the corresponding ECU collected by each slave control terminal;
[0013] a first allocation module, configured to allocate parameter collection tasks to each of the slave control terminals through the master control terminal, receive parameter information of the ECU corresponding to the allocated parameter collection task returned by each of the slave control terminals, and collect parameter information of the ECU belonging to the master control terminal;
[0014] The second distribution module is used to send all parameter information to the over-the-air download technology OTA server through the main control terminal, and obtain the ECU upgrade packages corresponding to different ECUs returned by the OTA server;
[0015] The third allocation module is used to dynamically allocate the ECU upgrade package corresponding to the ECU based on the basic information of each ECU through the master control end, and allocate download tasks and upgrade tasks of the corresponding ECU upgrade package to the master control end and each of the slave control ends, so that the master control end and each of the slave control ends can complete the upgrade of the corresponding ECU based on the download tasks and upgrade tasks.
[0016] According to another aspect of the present invention, there is provided a vehicle comprising: at least one processor; and
[0017] a memory communicatively connected to the at least one processor; wherein,
[0018] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the distributed OTA upgrade method described in any embodiment of the present invention.
[0019] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the distributed OTA upgrade method described in any embodiment of the present invention when executed.
[0020] An embodiment of the present invention provides a distributed OTA upgrade method, device, vehicle, and storage medium, the method comprising: determining a master control terminal and multiple slave control terminals, wherein the master control terminal and each of the slave control terminals are respectively deployed in different microcontroller units (ECUs); obtaining, through the master control terminal, basic information of the ECU to which the master control terminal belongs, and basic information of the corresponding ECUs collected by each of the slave control terminals; assigning, through the master control terminal, a parameter collection task to each of the slave control terminals, receiving parameter information of the ECU corresponding to the assigned parameter collection task returned by each of the slave control terminals, and collecting parameter information of the ECU to which the master control terminal belongs; sending, through the master control terminal, all parameter information to an over-the-air (OTA) server, and obtaining ECU upgrade packages corresponding to different ECUs returned by the OTA server; dynamically allocating, through the master control terminal, ECU upgrade packages corresponding to each ECU based on the basic information of the ECU, and assigning download tasks and upgrade tasks for the corresponding ECU upgrade packages to the master control terminal and each of the slave control terminals, so that the master control terminal and each of the slave control terminals complete the upgrade of the corresponding ECU based on the download tasks and upgrade tasks. This method controls each slave control terminal through the master control terminal, and assigns parameter collection tasks, download tasks and upgrade tasks to each slave control terminal. It can improve the efficiency of vehicle upgrades and ensure the stability of upgrades, solving the problem of long upgrade time in the OTA upgrade method in the existing technology.
[0021] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0023] Figure 1 A schematic diagram of a distributed OTA upgrade method according to the first embodiment of the present invention;
[0024] Figure 2 A schematic diagram of the interaction between an OTA control terminal and a gateway provided in an embodiment of the present invention;
[0025] Figure 3 A schematic diagram of allocating parameter collection tasks provided by an embodiment of the present invention;
[0026] Figure 4A schematic diagram of allocating download tasks provided by an embodiment of the present invention;
[0027] Figure 5 A schematic diagram of allocating upgrade tasks provided by an embodiment of the present invention;
[0028] Figure 6 A schematic diagram of switching a master control terminal provided by an embodiment of the present invention;
[0029] Figure 7 A schematic diagram of a task reallocation provided by an embodiment of the present invention;
[0030] Figure 8 A schematic structural diagram of a distributed OTA upgrade device provided in the second embodiment of the present invention;
[0031] Figure 9 Schematic diagram of the structure of a vehicle according to an embodiment of the present invention. DETAILED DESCRIPTION
[0032] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions 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 only embodiments of a part of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work should fall within the scope of protection of the present invention. It should be understood that the various steps described in the method implementation mode of the present invention can be performed in different orders and / or in parallel. In addition, the method implementation mode may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this respect.
[0033] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to." The term "based on" means "based, at least in part, on." The term "one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one additional embodiment," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.
[0034] It should be noted that the terms "first," "second," and the like in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or precedence. It should be understood that the numbers used in this manner are interchangeable where appropriate so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, any variations of the terms "including" and "having" are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units that are explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to these processes, methods, products, or apparatus.
[0035] It should be noted that the modifications of "one" and "multiple" mentioned in the present invention are illustrative rather than restrictive. Those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0036] The names of the messages or information exchanged between multiple devices in the embodiments of the present invention are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0037] Example 1
[0038] Figure 1 A flow chart of a distributed OTA upgrade method provided in Example 1 of the present invention is provided. This method is applicable to the situation where the entire vehicle is upgraded. The method can be executed by a distributed OTA upgrade device, wherein the device can be implemented by software and / or hardware and is generally integrated into the vehicle. In this embodiment, the vehicle includes but is not limited to: an internet-connected smart vehicle, etc.
[0039] Compared to traditional solutions, this embodiment deploys an OTA Master on each smart ECU, one of which is the master master and the others are slave masters. The master OTA Master is responsible for communicating with the cloud and distributing tasks to other OTA Masters, while the slave masters are responsible for executing tasks distributed by the master master. If the master master fails, one of the slave masters will switch to the master master and be responsible for distributing the currently unfinished tasks. During operation, all masters can have their own independent database to store the current operation status and task information.
[0040] like Figure 1 As shown, a distributed OTA upgrade method provided by the first embodiment of the present invention includes the following steps:
[0041] S110 , determining a master control terminal and multiple slave control terminals, wherein the master control terminal and the slave control terminals are respectively deployed in different micro control units ECU.
[0042] The master control end may be an OTA control end responsible for allocating tasks, and the slave control end may be an OTA control end that executes tasks allocated by the master control end.
[0043] In this embodiment, the master control end and each slave control end can be deployed in different micro control units ECU. Before upgrading the entire vehicle, a master control end and multiple slave control ends can be determined first.
[0044] In one embodiment, the determining of a master control terminal and multiple slave control terminals includes: when the over-the-air download technology OTA control terminal in the micro control unit ECU is started, selecting an OTA control terminal from all OTA control terminals as the master control terminal, and the remaining OTA control terminals as slave control terminals.
[0045] In this embodiment, when the OTA control terminal in the ECU is started, one OTA control terminal will be selected from all OTA control terminals as the master control terminal according to the preset rules, and the remaining OTA control terminals will be selected as slave control terminals. For example, when the OTAMaster is started, it will be started according to the configuration of its own database. If a master control terminal is pre-set, the other OTA control terminals will default to being slaves after startup. If all the OTAMasters started are slaves (perhaps because the master control terminal is not pre-set, or the master control terminal starts too slowly), the master master can be negotiated out by the auxiliary master according to the algorithm after startup. If the master master has been negotiated out, the master master started later will also be automatically converted to a slave master.
[0046] Specifically, when the OTA control end in the ECU is started, it can be determined first whether there is a preset master control end; if so and the master control end is started within the preset time, the preset master control end will be used as the current master control end; otherwise, based on the auxiliary control end, negotiation is performed and an OTA control end is selected from the started OTA control ends as the master control end; and the OTA control end other than the master control end is used as the slave control end.
[0047] In this embodiment, the auxiliary control terminal can be pre-set, for example, a preset number of OTA base stations can be selected from the OTA control terminals serving as slave control terminals as auxiliary control terminals, that is, the auxiliary control terminal also belongs to the slave control terminal. Figure 2 A schematic diagram of the interaction between an OTA control terminal and a gateway provided in an embodiment of the present invention is shown in FIG. Figure 2As shown, it includes a main control terminal, two auxiliary control terminals and multiple slave control terminals. The main OTA Master can interact with the gateway through Ethernet (eth), or through a CAN channel or other methods. This embodiment does not limit this.
[0048] S120 , obtaining, through the master control terminal, basic information of the ECU to which the master control terminal belongs, and basic information of the corresponding ECU collected by each of the slave control terminals.
[0049] Among them, basic information may include ECU's networking capabilities, available storage space, hardware capabilities and other information.
[0050] In this embodiment, the master control terminal can obtain basic information about the ECUs to which it belongs, as well as basic information about the corresponding ECUs collected by each slave control terminal. That is, the master control terminal will obtain basic information about all ECUs, including its own ECU and other ECUs. For example, since not all ECUs are equipped with an OTA base station, the ECUs corresponding to the slave control terminal can refer to the ECUs to which the slave control terminal belongs, or they can include pre-assigned ECUs that are not deployed with a slave control terminal.
[0051] S130, assigning parameter collection tasks to each of the slave control terminals through the master control terminal, receiving parameter information of the ECU corresponding to the assigned parameter collection task returned by each of the slave control terminals, and collecting parameter information of the ECU belonging to the master control terminal.
[0052] Different parameter collection tasks are used to collect parameter information of different ECUs. The parameter information can be the information required to obtain the upgrade package.
[0053] In this embodiment, the master control terminal can assign parameter collection tasks to each OTA base station (master control terminal and slave control terminal), obtain parameter information of the ECU belonging to the master control terminal, and receive parameter information of the ECU corresponding to the assigned parameter collection task returned by each slave control terminal. Figure 3 A schematic diagram of allocating parameter collection tasks provided by an embodiment of the present invention is shown in FIG. Figure 3 As shown in the figure, the main master is responsible for assigning all OTAMasters to be responsible for parameter collection tasks for which ECUs based on the collected slave master information. After the slave master completes the parameter collection task for the corresponding ECU, it returns the parameter data to the main master. The main master summarizes the parameter information of all ECUs and reports it to the cloud to achieve ECU parameter synchronization and upgrade package detection.
[0054] In one embodiment, the parameter collection task is assigned to each of the slave control terminals through the master control terminal, including: for each ECU, determining whether the ECU meets the parameter collection conditions; if so, assigning the parameter collection task corresponding to the ECU to the slave control terminal corresponding to the ECU; otherwise, assigning the parameter collection task corresponding to the ECU to other slave control terminals that can collect parameters.
[0055] The parameter collection condition may be set based on actual conditions, which is not limited in this embodiment. For example, the parameter collection condition may refer to whether an OTA control terminal is deployed on the ECU. If an OTA control terminal is deployed on the ECU, the ECU meets the parameter collection condition.
[0056] In this embodiment, for each ECU, a determination is made as to whether the ECU meets the parameter collection requirements. If so, the parameter collection task corresponding to the ECU is assigned to the slave control terminal corresponding to the ECU. Otherwise, the parameter collection task corresponding to the ECU is assigned to another slave control terminal capable of collecting parameters. By dynamically assigning parameter collection tasks, this embodiment allows the collection of parameters from another slave control terminal even when the ECU is unable to actively collect its own parameters.
[0057] S140: Send all parameter information to an over-the-air (OTA) server via the main control terminal, and obtain ECU upgrade packages corresponding to different ECUs returned by the OTA server.
[0058] An ECU upgrade package is a binary file containing the ECU's new software code, configuration data, and upgrade instructions. It is used to update the ECU's firmware or software. Each ECU upgrade package corresponds to one ECU.
[0059] In this embodiment, the main control end can send parameter information of all ECUs to the OTA server, and obtain ECU upgrade packages corresponding to different ECUs returned by the OTA server.
[0060] S150. The master control terminal dynamically allocates the ECU upgrade package corresponding to the ECU based on the basic information of each ECU, and allocates download tasks and upgrade tasks of the corresponding ECU upgrade package to the master control terminal and each of the slave control terminals, so that the master control terminal and each of the slave control terminals can complete the upgrade of the corresponding ECU based on the download tasks and upgrade tasks.
[0061] The download task can be a task for downloading an ECU upgrade package, and the upgrade task can be a task for upgrading the ECU using the ECU upgrade package. Each ECU upgrade package has a corresponding download task and upgrade task.
[0062] In this embodiment, the master control end can dynamically allocate the ECU upgrade package corresponding to each ECU based on the basic information of each ECU, and allocate download tasks and upgrade tasks of the corresponding ECU upgrade package to each slave control end, so that each slave control end can complete the upgrade of the corresponding ECU based on the download tasks and upgrade tasks.
[0063] In one embodiment, the basic information includes the available storage space, networking capability and hardware capability of the ECU. Accordingly, the master control end dynamically allocates the ECU upgrade package corresponding to the ECU based on the basic information of each ECU, and allocates download tasks and upgrade tasks of the corresponding ECU upgrade package to the master control end and each of the slave control ends, so that the master control end and each of the slave control ends complete the upgrade of the corresponding ECU based on the download tasks and upgrade tasks, including: for the master control end, the master control end allocates the download tasks and allocation tasks corresponding to the ECU to which the master control end belongs to the master control end; for the slave control end, the master control end dynamically allocates the download tasks of the ECU upgrade package to the corresponding slave control end based on the available storage space and networking capability corresponding to the ECU to which the ECU upgrade package belongs; the master control end dynamically allocates the upgrade tasks of the ECU upgrade package to the corresponding slave control end based on the storage location of the ECU upgrade package and the hardware capability of the ECU to which it belongs.
[0064] The available storage space can be the remaining storage space of the ECU, the networking capability can be the network connection capability of the ECU, and the hardware capability can be the computing power of the ECU, the number of CAN channels, etc.
[0065] In this embodiment, when allocating tasks through the master control end, in addition to allocating tasks to the slave control end, it is also necessary to allocate tasks to itself (i.e., the master control end). For the master control end, the download tasks and allocation tasks corresponding to the ECU to which the master control end belongs can be directly allocated to the master control end; for the slave control end, the master control end can dynamically allocate the download tasks of the ECU upgrade package to the corresponding slave control end based on the available storage space and networking capabilities of the ECU to which the ECU upgrade package belongs; and the master control end can dynamically allocate the upgrade tasks of the ECU upgrade package to the corresponding slave control end based on the storage location of the ECU upgrade package and the hardware capabilities of the ECU to which it belongs. For example, Figure 4 A schematic diagram of allocating download tasks provided by an embodiment of the present invention is shown in FIG. Figure 4As shown in the figure, the master dynamically allocates download tasks to each slave master based on their available storage space, network capabilities, and updateable ECU upgrade packages returned by the OTA cloud. Slave masters can download upgrade packages via the content delivery network and synchronize the download progress of their ECU upgrade packages to the master master in real time. The master master can also synchronize the overall download progress to the human-machine interface for user viewing. Figure 5 A schematic diagram of allocating upgrade tasks provided by an embodiment of the present invention is shown in FIG. Figure 5 As shown, the master master can dynamically assign each master the ECU to be upgraded based on the hardware capabilities of each master (such as the number of CAN channels). All masters upgrade the ECUs they are responsible for and synchronize the ECU upgrade progress and upgrade results to the master master in real time.
[0066] A distributed OTA upgrade method provided in a first embodiment of the present invention includes: determining a master control end and multiple slave control ends, wherein the master control end and each of the slave control ends are respectively deployed in different micro-control units (ECUs); obtaining, through the master control end, basic information of the ECU to which the master control end belongs, and basic information of the corresponding ECU collected by each of the slave control ends; assigning a parameter collection task to each of the slave control ends through the master control end, receiving parameter information of the ECU corresponding to the assigned parameter collection task returned by each of the slave control ends, and collecting parameter information of the ECU to which the master control end belongs; sending all parameter information to an over-the-air (OTA) server using an over-the-air (OTA) technology through the master control end, and obtaining ECU upgrade packages corresponding to different ECUs returned by the OTA server; dynamically allocating, through the master control end, ECU upgrade packages corresponding to each ECU based on the basic information of the ECU, and assigning download tasks and upgrade tasks of the corresponding ECU upgrade packages to the master control end and each of the slave control ends, so that the master control end and each of the slave control ends complete the upgrade of the corresponding ECU based on the download tasks and upgrade tasks. This method controls each slave control terminal through the master control terminal, and assigns parameter collection tasks, download tasks and upgrade tasks to each slave control terminal. It can improve the efficiency of vehicle upgrades and ensure the stability of upgrades, solving the problem of long upgrade time in the OTA upgrade method in the existing technology.
[0067] Based on the above embodiment, a modified embodiment of the above embodiment is proposed. It should be noted that, in order to simplify the description, only the differences from the above embodiment are described in the modified embodiment.
[0068] In one embodiment, the master control end dynamically allocates the download task of the ECU upgrade package to the corresponding slave control end based on the available storage space and networking capability corresponding to the ECU to which the ECU upgrade package belongs, including: for each ECU upgrade package, the master control end determines whether the slave control end of the ECU meets the download conditions based on the available storage space and networking capability of the ECU corresponding to the ECU upgrade package; if so, allocates the download task of the ECU upgrade package corresponding to the ECU to the slave control end of the ECU; otherwise, allocates the download task of the ECU upgrade package corresponding to the ECU to other slave control ends that meet the download conditions.
[0069] In this embodiment, for each ECU upgrade package, the master control end can determine whether the slave control end of the ECU meets the download conditions based on the available storage space and networking capability of the ECU corresponding to the ECU upgrade package; if so, the download task of the ECU upgrade package corresponding to the ECU is assigned to the slave control end of the ECU; otherwise, the download task of the ECU upgrade package corresponding to the ECU is assigned to other slave control ends that meet the download conditions.
[0070] This embodiment can ensure that all ECUs can download the corresponding ECU upgrade packages by allocating the upgrade tasks of the ECU upgrade packages corresponding to the ECUs that do not meet the downloading conditions to other slave control terminals.
[0071] In one embodiment, determining whether the slave control end of the ECU has the download conditions based on the available storage space and networking capability of the ECU corresponding to the ECU upgrade package includes: determining whether the ECU can be connected to the Internet based on the networking capability of the ECU corresponding to the ECU upgrade package; if not, determining that the slave control end does not have the download conditions; if so, obtaining the designated storage space required for downloading the ECU upgrade package; judging whether the available storage space corresponding to the ECU is greater than the designated storage space; if so, determining that the slave control end has the download conditions, otherwise determining that the slave control end does not have the download conditions.
[0072] In this embodiment, if the network capability of the ECU corresponding to the ECU upgrade package indicates that the ECU cannot be connected to the network, the slave control terminal corresponding to the ECU cannot download the corresponding ECU upgrade package and does not meet the download conditions. If the available storage space corresponding to the ECU is greater than the specified storage space, the slave control terminal corresponding to the ECU meets the download conditions. Otherwise, it is determined that the slave control terminal does not meet the download conditions.
[0073] In one embodiment, the master control end dynamically allocates the upgrade task of the ECU upgrade package to the corresponding slave control end based on the storage location of the ECU upgrade package and the hardware capabilities of the ECU to which it belongs, including: for each ECU upgrade package, determining whether the ECU upgrade package is stored locally in the ECU to which the ECU upgrade package belongs; if so and the hardware capabilities of the ECU meet the upgrade conditions, allocating the upgrade task corresponding to the ECU upgrade package to the slave control end of the ECU; otherwise, based on the hardware capabilities and available storage space of other slave control ends, selecting a slave control end that can execute the upgrade task from other slave control ends.
[0074] In this embodiment, for each ECU upgrade package, the storage location of the ECU upgrade package is first determined. If the package is stored locally on the ECU to which the ECU upgrade package belongs and the ECU's hardware capabilities meet the upgrade requirements, the upgrade task corresponding to the ECU upgrade package is assigned to the ECU's slave control terminal. Otherwise, based on the hardware capabilities and available storage space of other slave control terminals, a slave control terminal capable of executing the upgrade task is selected from the other slave control terminals. Hardware capabilities meeting the upgrade requirements can include the availability of available channels or the computing power required to handle the upgrade task.
[0075] In one embodiment, the method further includes: receiving the task progress sent by each slave control terminal in real time through the master control terminal, and sending the current operating status, task allocation information and the task progress to each slave control terminal in real time; the operating status includes download status and upgrade status.
[0076] The task allocation information may be the slave control terminal to which the task is allocated, and the task progress may be the completion progress of the task.
[0077] In this embodiment, the master control terminal receives the task progress sent by each slave control terminal in real time and sends the current operating status, task allocation information, and task progress to each slave control terminal in real time. The operating status includes download status and upgrade status. During operation, the master master also synchronizes the operating status and task information with each slave master in real time, so that all slave control terminals are aware of the current operating status, task allocation information, and task progress. In the event of a master control terminal failure, the new master control terminal can continue to perform the tasks of managing the slave control terminals.
[0078] In one embodiment, the method further includes: when the master control end is restarted, sending a restart message to each slave control end, so that each slave control end prolongs a detection time for determining that the master control end has lost a response.
[0079] In this embodiment, when the master restarts, it can send a restart message to each slave, allowing each slave to extend its detection time to determine if the master has lost its response. Loss of response can refer to a period of time without receiving a heartbeat message from the master. For example, during operation, the master may notify the other slaves before upgrading and restarting. After receiving the master's startup message, the slaves may extend the master's detection time to avoid mistakenly assuming that the master has abnormally exited, thereby preventing unnecessary master-slave master switching.
[0080] In one embodiment, the method further includes: when the master control terminal exits abnormally, selecting a slave control terminal from all the slave control terminals as a new master control terminal, and continuing to manage the remaining slave control terminals through the new master control terminal.
[0081] In this embodiment, if the master control terminal exits abnormally, a slave control terminal may be selected from all the slave control terminals as a new master control terminal, and the new master control terminal continues to manage the remaining slave control terminals. Figure 6 A schematic diagram of switching a master control terminal is provided in an embodiment of the present invention, as shown in FIG. Figure 6 As shown, taking the upgrade task as an example, if the slave control end does not receive the heartbeat information sent by the master control end within a certain period of time, it will be determined that the master control end has exited abnormally, and then each slave control end (which can be an auxiliary control end) will negotiate a new master control end based on the available computing resources, hardware capabilities and other parameters of each slave control end. After negotiating a new master control end, if the new master control end stores the current operating status, task allocation information and task progress of the vehicle upgrade, the new master control end can continue to manage the remaining slave control ends based on this information, and if there are any remaining unassigned upgrade tasks, they can continue to be assigned.
[0082] In one embodiment, the method further includes: when there is a slave control terminal that exits abnormally, reallocating unfinished tasks of the slave control terminal that exits abnormally through the master control terminal.
[0083] In this embodiment, if there is a slave control terminal that exits abnormally, the unfinished tasks of the slave control terminal that exits abnormally can be reallocated through the master control terminal. Figure 7 A schematic diagram of a task reallocation provided by an embodiment of the present invention is shown in FIG. Figure 7 As shown, if the slave control end is abnormal, the master control end will reallocate the remaining tasks of the slave control end.
[0084] The technical solution of this embodiment fully utilizes the CAN channel resources of all intelligent ECUs for scenarios with numerous ECUs requiring CAN diagnostic upgrades, improving the overall vehicle upgrade process. By fully utilizing the computing power and network bandwidth of all intelligent ECUs, the upgrade package download speed is increased, reducing reliance on the storage space of a single master node ECU. This speeds up CAN diagnostic upgrades, allows for parallel upgrades of the CAN channels of multiple ECUs, and enables unified management of the slave control terminals by the master control terminal, improving the stability of vehicle upgrades.
[0085] Example 2
[0086] Figure 8 This is a structural diagram of a distributed OTA upgrade device provided in Example 2 of the present invention. The device can be used to upgrade the entire vehicle, where the device can be implemented by software and / or hardware and is generally integrated into the vehicle.
[0087] like Figure 8 As shown, the device includes:
[0088] A determination module 210 is configured to determine a master control terminal and a plurality of slave control terminals, wherein the master control terminal or the slave control terminals are deployed in different micro control units (ECUs);
[0089] The collecting module 220 is used to obtain the basic information of the ECU to which the master control terminal belongs, and the basic information of the corresponding ECU collected by each slave control terminal through the master control terminal;
[0090] The first allocation module 230 is configured to allocate parameter collection tasks to each of the slave control terminals through the master control terminal, receive parameter information of the ECU corresponding to the allocated parameter collection task returned by each of the slave control terminals, and collect parameter information of the ECU belonging to the master control terminal;
[0091] The second distribution module 240 is used to send all parameter information to the over-the-air (OTA) server through the main control terminal, and obtain the ECU upgrade packages corresponding to different ECUs returned by the OTA server;
[0092] The third allocation module 250 is used to dynamically allocate the ECU upgrade package corresponding to the ECU based on the basic information of each ECU through the master control end, and allocate download tasks and upgrade tasks of the corresponding ECU upgrade package to the master control end and each of the slave control ends, so that the master control end and each of the slave control ends can complete the upgrade of the corresponding ECU based on the download tasks and upgrade tasks.
[0093] This embodiment provides a distributed OTA upgrade device, comprising: a determination module for determining a master control terminal and multiple slave control terminals, wherein the master control terminal or the slave control terminals are deployed in different micro-control units (ECUs); a collection module for obtaining, through the master control terminal, basic information of the ECU to which the master control terminal belongs, as well as basic information of the corresponding ECUs collected by each slave control terminal; a first allocation module for assigning, through the master control terminal, a parameter collection task to each slave control terminal, receiving parameter information of the ECU corresponding to the assigned parameter collection task returned by each slave control terminal, and collecting parameter information of the ECU to which the master control terminal belongs; a second allocation module for sending all parameter information to an over-the-air (OTA) server via the master control terminal, and obtaining ECU upgrade packages corresponding to different ECUs returned by the OTA server; and a third allocation module for dynamically allocating, through the master control terminal, ECU upgrade packages corresponding to each ECU based on the basic information of the ECU, and assigning download tasks and upgrade tasks for the corresponding ECU upgrade packages to the master control terminal and each slave control terminal, so that the master control terminal and each slave control terminal complete the upgrade of the corresponding ECU based on the download tasks and upgrade tasks. By controlling each slave control terminal through the master control terminal and assigning parameter collection tasks, download tasks and upgrade tasks to each slave control terminal, the efficiency of vehicle upgrades can be improved and the stability of upgrades can be ensured, solving the problem of long upgrade time in the existing OTA upgrade method.
[0094] Furthermore, the determination module 210 includes:
[0095] When the over-the-air download technology OTA control terminal in the micro control unit ECU is started, one OTA control terminal is selected from all OTA control terminals as the master control terminal, and the remaining OTA control terminals are selected as slave control terminals.
[0096] Furthermore, the first allocation module 230 includes:
[0097] For each ECU, determining whether the ECU meets the parameter collection conditions;
[0098] If so, the parameter collection task corresponding to the ECU is allocated to the slave control terminal corresponding to the ECU; otherwise, the parameter collection task corresponding to the ECU is allocated to other slave control terminals that can collect parameters.
[0099] Furthermore, the basic information includes the available storage space, networking capability, and hardware capability of the ECU. Accordingly, the third allocation module 250 includes:
[0100] For the main control terminal, the download tasks and allocation tasks corresponding to the ECU to which the main control terminal belongs are allocated to the main control terminal through the main control terminal;
[0101] For the slave control end, the master control end dynamically allocates the download task of the ECU upgrade package to the corresponding slave control end based on the available storage space and networking capability of the ECU to which the ECU upgrade package belongs;
[0102] The master control end dynamically distributes the upgrade task of the ECU upgrade package to the corresponding slave control end based on the storage location of the ECU upgrade package and the hardware capability of the ECU to which it belongs.
[0103] Furthermore, the master control terminal dynamically assigns the download task of the ECU upgrade package to the corresponding slave control terminal based on the available storage space and networking capability of the ECU to which the ECU upgrade package belongs, including:
[0104] For each ECU upgrade package, the master control terminal determines whether the slave control terminal of the ECU has download conditions based on the available storage space and networking capability of the ECU corresponding to the ECU upgrade package;
[0105] If so, the download task of the ECU upgrade package corresponding to the ECU is assigned to the slave control end of the ECU; otherwise, the download task of the ECU upgrade package corresponding to the ECU is assigned to other slave control ends that meet the download conditions.
[0106] Furthermore, the determining whether the slave control terminal of the ECU has download conditions based on the available storage space and networking capability of the ECU corresponding to the ECU upgrade package includes:
[0107] Determining whether the ECU can be connected to the Internet based on the networking capability of the ECU corresponding to the ECU upgrade package;
[0108] If not, determining that the slave control terminal does not have the downloading condition; if so, obtaining the designated storage space required for downloading the ECU upgrade package;
[0109] Determining whether the available storage space corresponding to the ECU is greater than the specified storage space;
[0110] If so, it is determined that the slave control terminal meets the downloading condition; otherwise, it is determined that the slave control terminal does not meet the downloading condition.
[0111] Furthermore, the master control end dynamically assigns the upgrade task of the ECU upgrade package to the corresponding slave control end based on the storage location of the ECU upgrade package and the hardware capability of the ECU, including:
[0112] For each ECU upgrade package, determine whether the ECU upgrade package is stored locally on the ECU to which the ECU upgrade package belongs;
[0113] If so, and the hardware capabilities of the ECU meet the upgrade conditions, the upgrade task corresponding to the ECU upgrade package will be assigned to the slave control end of the ECU; otherwise, based on the hardware capabilities and available storage space of other slave control ends, a slave control end that can execute the upgrade task will be selected from other slave control ends.
[0114] Furthermore, the device further comprises:
[0115] The master control terminal receives the task progress sent by each slave control terminal in real time, and sends the current operation status, task allocation information and the task progress to each slave control terminal in real time; the operation status includes downloading status and upgrading status.
[0116] Furthermore, the device further comprises:
[0117] When the master control end is restarted, a restart message is sent to each slave control end, so that each slave control end prolongs the detection time for determining that the master control end loses the response.
[0118] Furthermore, the device further comprises:
[0119] When the master control terminal exits abnormally, a slave control terminal is selected from all the slave control terminals as a new master control terminal, and the remaining slave control terminals are continuously managed through the new master control terminal.
[0120] Furthermore, the device further comprises:
[0121] When there is a slave control terminal that exits abnormally, unfinished tasks of the slave control terminal that exits abnormally are reallocated through the master control terminal.
[0122] The above-mentioned distributed OTA upgrade device can execute the distributed OTA upgrade method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0123] Example 3
[0124] Figure 9 A schematic diagram of a vehicle 10 is shown that may be used to implement an embodiment of the present invention. The components shown herein, their connections and relationships, and their functions are provided as examples only and are not intended to limit implementations of the inventions described and / or claimed herein.
[0125] like Figure 9As shown, vehicle 10 includes at least one processor 11 and memory, such as read-only memory (ROM) 12 and random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor, and processor 11 can perform various appropriate actions and processes based on the computer programs stored in ROM 12 or loaded from storage unit 18 into RAM 13. RAM 13 can also store various programs and data required for the operation of vehicle 10. Processor 11, ROM 12, and RAM 13 are interconnected via bus 14. An input / output (I / O) interface 15 is also connected to bus 14.
[0126] Various components in the vehicle 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the vehicle 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0127] The processor 11 may be any general-purpose and / or specialized processing component with processing and computing capabilities. Examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a distributed OTA upgrade device.
[0128] In some embodiments, the distributed OTA upgrade device can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the vehicle 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the distributed OTA upgrade device described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to execute the distributed OTA upgrade device in any other appropriate manner (for example, by means of firmware).
[0129] Various embodiments of the systems and techniques described herein 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), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can 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.
[0130] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0131] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0132] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0133] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0134] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.
[0135] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.
[0136] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.
Claims
1. A distributed OTA upgrade method, characterized in that: The method comprises: Determine a master control terminal and multiple slave control terminals, wherein the master control terminal and each of the slave control terminals are respectively deployed in different micro control units (ECUs); Obtaining, through the master control terminal, basic information of the ECU to which the master control terminal belongs, and basic information of the corresponding ECU collected by each of the slave control terminals; Assigning parameter collection tasks to each of the slave control terminals through the master control terminal, receiving parameter information of the ECU corresponding to the assigned parameter collection task returned by each of the slave control terminals, and collecting parameter information of the ECU belonging to the master control terminal; Send all parameter information to the over-the-air (OTA) server through the main control terminal, and obtain the ECU upgrade packages corresponding to different ECUs returned by the OTA server; The master control end dynamically allocates the ECU upgrade package corresponding to the ECU based on the basic information of each ECU, and allocates download tasks and upgrade tasks of the corresponding ECU upgrade package to the master control end and each of the slave control ends, so that the master control end and each of the slave control ends can complete the upgrade of the corresponding ECU based on the download tasks and upgrade tasks.
2. The method according to claim 1, characterized in that The determining of a master control terminal and multiple slave control terminals includes: When the over-the-air download technology OTA control terminal in the micro control unit ECU is started, one OTA control terminal is selected from all OTA control terminals as the master control terminal, and the remaining OTA control terminals are selected as slave control terminals.
3. The method according to claim 1, characterized in that The allocating parameter collection tasks to each of the slave control terminals by the master control terminal includes: For each ECU, determining whether the ECU meets the parameter collection conditions; If so, the parameter collection task corresponding to the ECU is allocated to the slave control terminal corresponding to the ECU; otherwise, the parameter collection task corresponding to the ECU is allocated to other slave control terminals that can collect parameters.
4. The method according to claim 1, wherein The basic information includes available storage space, networking capability, and hardware capability of the ECU. Accordingly, the master control terminal dynamically allocates an ECU upgrade package corresponding to each ECU based on the basic information of the ECU, and allocates download tasks and upgrade tasks of the corresponding ECU upgrade package to the master control terminal and each of the slave control terminals, so that the master control terminal and each of the slave control terminals complete the upgrade of the corresponding ECU based on the download tasks and upgrade tasks, including: For the main control terminal, the download tasks and allocation tasks corresponding to the ECU to which the main control terminal belongs are allocated to the main control terminal through the main control terminal; For the slave control end, the master control end dynamically allocates the download task of the ECU upgrade package to the corresponding slave control end based on the available storage space and networking capability of the ECU to which the ECU upgrade package belongs; the master control end dynamically allocates the upgrade task of the ECU upgrade package to the corresponding slave control end based on the storage location of the ECU upgrade package and the hardware capability of the ECU to which it belongs.
5. The method according to claim 4, characterized in that The master control terminal dynamically assigns the download task of the ECU upgrade package to the corresponding slave control terminal based on the available storage space and networking capability of the ECU to which the ECU upgrade package belongs, including: For each ECU upgrade package, the master control terminal determines whether the slave control terminal of the ECU has download conditions based on the available storage space and networking capability of the ECU corresponding to the ECU upgrade package; If so, the download task of the ECU upgrade package corresponding to the ECU is assigned to the slave control end of the ECU; otherwise, the download task of the ECU upgrade package corresponding to the ECU is assigned to other slave control ends that meet the download conditions.
6. The method according to claim 5, characterized in that The determining whether the slave control terminal of the ECU has download conditions based on the available storage space and networking capability of the ECU corresponding to the ECU upgrade package includes: Determining whether the ECU can be connected to the Internet based on the networking capability of the ECU corresponding to the ECU upgrade package; If not, determining that the slave control terminal does not have the downloading condition; if so, obtaining the designated storage space required for downloading the ECU upgrade package; Determining whether the available storage space corresponding to the ECU is greater than the specified storage space; If so, it is determined that the slave control terminal meets the downloading condition; otherwise, it is determined that the slave control terminal does not meet the downloading condition.
7. The method according to claim 4, characterized in that The master control terminal dynamically assigns the upgrade task of the ECU upgrade package to the corresponding slave control terminal based on the storage location of the ECU upgrade package and the hardware capability of the ECU, including: For each ECU upgrade package, determine whether the ECU upgrade package is stored locally on the ECU to which the ECU upgrade package belongs; If so, and the hardware capabilities of the ECU meet the upgrade conditions, the upgrade task corresponding to the ECU upgrade package will be assigned to the slave control end of the ECU; otherwise, based on the hardware capabilities and available storage space of other slave control ends, a slave control end that can execute the upgrade task will be selected from other slave control ends.
8. The method according to claim 1, characterized in that The method further comprises: The master control terminal receives the task progress sent by each slave control terminal in real time, and sends the current operation status, task allocation information and the task progress to each slave control terminal in real time; the operation status includes downloading status and upgrading status.
9. The method according to claim 1, characterized in that The method further comprises: When the master control end is restarted, a restart message is sent to each slave control end, so that each slave control end prolongs the detection time for determining that the master control end loses the response.
10. The method according to claim 1, characterized in that The method further comprises: When the master control terminal exits abnormally, a slave control terminal is selected from all the slave control terminals as a new master control terminal, and the remaining slave control terminals are continuously managed through the new master control terminal.
11. The method according to claim 1, wherein The method further comprises: When there is a slave control terminal that exits abnormally, unfinished tasks of the slave control terminal that exits abnormally are reallocated through the master control terminal.
12. A distributed OTA upgrade device, characterized in that: The device comprises: A determination module, configured to determine a master control terminal and a plurality of slave control terminals, wherein the master control terminal or the slave control terminals are deployed in different micro control units (ECUs); A collecting module, configured to obtain, through the master control terminal, basic information of the ECU to which the master control terminal belongs, and basic information of the corresponding ECU collected by each slave control terminal; a first allocation module, configured to allocate parameter collection tasks to each of the slave control terminals through the master control terminal, receive parameter information of the ECU corresponding to the allocated parameter collection task returned by each of the slave control terminals, and collect parameter information of the ECU belonging to the master control terminal; The second distribution module is used to send all parameter information to the over-the-air download technology OTA server through the main control terminal, and obtain the ECU upgrade packages corresponding to different ECUs returned by the OTA server; The third allocation module is used to dynamically allocate the ECU upgrade package corresponding to the ECU based on the basic information of each ECU through the master control end, and allocate download tasks and upgrade tasks of the corresponding ECU upgrade package to the master control end and each of the slave control ends, so that the master control end and each of the slave control ends can complete the upgrade of the corresponding ECU based on the download tasks and upgrade tasks.
13. A vehicle, characterized in that: The vehicle comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor. The computer program is executed by the at least one processor to enable the at least one processor to perform the distributed OTA upgrade method according to any one of claims 1 to 11.
14. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the distributed OTA upgrade method according to any one of claims 1 to 11 when executed.