Vehicle OTA differential upgrading method, device and system
By generating and using differential upgrade packages in vehicle OTA upgrades, the problem of bandwidth occupancy of firmware update package transmission is solved, and faster software upgrades are achieved, especially suitable for environments with limited bandwidth or unstable connections.
Patent Information
- Application Number
- CN202411557009.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-01
- Publication Date
- 2025-02-11
AI Technical Summary
During the vehicle OTA upgrade process, the transmission and download of firmware update packets occupy a lot of network bandwidth, especially when the network bandwidth is limited or the connection is unstable, resulting in a longer upgrade time.
By obtaining the difference between the old firmware and the new firmware of the vehicle ECU in the cloud server, a differential upgrade package is generated and sent to the target ECU, the differential restore algorithm is used to merge the differential upgrade package with the old firmware to complete the software upgrade.
Reduces network bandwidth usage and download time, especially in the case of limited bandwidth or unstable connection, significantly shortens the upgrade time of ECU and improves the user experience.
Smart Images

Figure CN119415128A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of automobile technology, and more specifically, to a vehicle OTA differential upgrade method, device and system. Background Art
[0002] With the continuous development of technologies such as Internet of Vehicles and autonomous driving, the technology of vehicle OTA (Over-the-Air) upgrade is also constantly improving. Vehicle OTA upgrade refers to the remote update and upgrade of vehicle software through wireless communication technology. This technology can continuously optimize and improve the functions and performance of the vehicle, and improve user experience and satisfaction.
[0003] At present, the whole package upgrade is usually used in the vehicle OTA upgrade process. The cloud server sends the complete firmware update package to the vehicle's ECU, and the ECU realizes the vehicle OTA upgrade by installing the firmware update package.
[0004] However, the firmware update package will occupy a lot of network bandwidth during the transmission process. Especially when the network bandwidth is limited or the network connection is unstable, the transmission and download of the firmware update package will take a long time. Summary of the invention
[0005] In view of this, the present invention discloses a vehicle OTA differential upgrade method, device and system to reduce network bandwidth occupancy and download time, especially in situations where network bandwidth is limited or network connection is unstable.
[0006] A vehicle OTA differential upgrade method is applied to a cloud server, and the vehicle OTA differential upgrade method includes:
[0007] When receiving an electronic control unit ECU firmware upgrade request sent by a vehicle, obtaining an old version of firmware currently installed on the target ECU to be upgraded;
[0008] Compare the old version firmware with the new version firmware of the target ECU to obtain a differential upgrade package;
[0009] The differential upgrade package is sent to the target ECU, and the target ECU uses a differential restoration algorithm to merge the differential upgrade package and the old version firmware to obtain the new version firmware, thereby completing the software upgrade.
[0010] Optionally, comparing the new version firmware with the new version firmware of the target ECU to obtain a differential upgrade package includes:
[0011] Using a differential algorithm on the old version of the firmware and the new version of the firmware to generate an initial differential upgrade package;
[0012] The initial differential upgrade package is compressed using a compression algorithm to obtain the differential upgrade package.
[0013] A vehicle OTA differential upgrade method is applied to a target ECU to be upgraded in a vehicle, and the vehicle OTA differential upgrade method comprises:
[0014] Sending an ECU firmware upgrade request to a cloud server, so that the cloud server obtains an old version of the firmware currently installed on the target ECU;
[0015] The differential upgrade package sent by the cloud server is obtained, and a differential restoration algorithm is used to merge the differential upgrade package and the old version firmware to obtain a new version firmware, thereby completing the software upgrade, wherein the differential upgrade package is obtained by the cloud server after comparing the old version firmware with the new version firmware.
[0016] Optionally, the obtaining of the differential upgrade package sent by the cloud server, and using a differential restoration algorithm to merge the differential upgrade package and the old version firmware to obtain a new version firmware, thereby completing the software upgrade, includes:
[0017] Obtaining the differential upgrade package sent by the cloud server;
[0018] Decompressing the differential upgrade package to obtain a target differential upgrade package;
[0019] A differential restoration algorithm is adopted to merge the target differential upgrade package and the old version firmware according to the data mark in the target differential upgrade package to obtain the new version firmware, thereby completing the software upgrade.
[0020] Optionally, the adopting of a differential restoration algorithm to merge the target differential upgrade package and the old version firmware according to a data flag in the target differential upgrade package to obtain the new version firmware to complete the software upgrade includes:
[0021] Using a differential restoration algorithm, the target differential upgrade package and the old version firmware are merged according to the data flag in the target differential upgrade package to obtain the new version firmware;
[0022] Verifying the performance of the new version of the firmware obtained by fusion;
[0023] When it is determined that the performance of the new version of the firmware passes the verification, determining that the new version of the firmware can run normally on the target ECU;
[0024] Determine that the target ECU has completed the software upgrade and activate the new version of the firmware.
[0025] Optionally, the adopting of a differential restoration algorithm to merge the target differential upgrade package and the old version firmware according to a data flag in the target differential upgrade package to obtain the new version firmware to complete the software upgrade includes:
[0026] Erasing existing data in the application area used to store the new version firmware area to obtain a target application area, wherein the application area is an area divided in the Flash memory of the target ECU;
[0027] Subpackaging the target differential upgrade package and the old version firmware to obtain multiple data blocks;
[0028] Compressing each of the data blocks according to the fusion order of the target differential upgrade package and the old version firmware to obtain a compressed package;
[0029] Merge all the compressed packages into one file as the new version firmware;
[0030] Storing the new version of the firmware in the download area of the Flash memory, and writing the new version of the firmware into the BootLoader area of the Flash memory;
[0031] When the performance of the new version of the firmware passes the verification, the software is jumped to the target application area to activate the new version of the firmware and complete the software upgrade.
[0032] A vehicle OTA differential upgrade device is applied to a cloud server, and the vehicle OTA differential upgrade device comprises:
[0033] The firmware acquisition unit is used to acquire the old version of the firmware currently installed on the target ECU to be upgraded when receiving the ECU firmware upgrade request sent by the vehicle;
[0034] An upgrade package determination unit, used for comparing the old version firmware with the new version firmware of the target ECU to obtain a differential upgrade package;
[0035] The upgrade package sending unit is used to send the differential upgrade package to the target ECU, and the target ECU adopts a differential restoration algorithm to merge the differential upgrade package and the old version firmware to obtain the new version firmware, thereby completing the software upgrade.
[0036] A vehicle OTA differential upgrade device is applied to a target ECU to be upgraded in a vehicle, and the vehicle OTA differential upgrade device comprises:
[0037] A request sending unit, used to send an ECU firmware upgrade request to a cloud server, so that the cloud server obtains an old version of the firmware currently installed on the target ECU;
[0038] An upgrade package acquisition unit is used to acquire the differential upgrade package sent by the cloud server, and use a differential restoration algorithm to merge the differential upgrade package and the old version firmware to obtain the new version firmware, thereby completing the software upgrade, wherein the differential upgrade package is obtained by the cloud server after comparing the old version firmware with the new version firmware.
[0039] A vehicle OTA differential upgrade system, comprising: a cloud server and a vehicle, wherein the vehicle comprises: an on-board T-BOX and a target ECU to be upgraded;
[0040] The cloud server includes a vehicle OTA differential upgrade device;
[0041] The target ECU includes a vehicle OTA differential upgrade device;
[0042] The vehicle-mounted T-BOX is used to connect the cloud server and the target ECU.
[0043] Optionally, the cloud server includes: a remote upgrade server OTAServer;
[0044] The vehicle-mounted T-BOX includes: a remote upgrade master control node MasterOTA;
[0045] The target ECU includes: a remote upgrade slave node SubOTA;
[0046] The MasterOTA obtains the differential upgrade package from the OTAServer and sends the differential upgrade package to the SubOTA, which cooperates to complete the software upgrade of the target ECU.
[0047] It can be seen from the above technical solution that the present invention discloses a vehicle OTA differential upgrade method, device and system. When the cloud server receives an ECU firmware upgrade request sent by the vehicle, the cloud server obtains the old version of firmware currently installed on the target ECU to be upgraded, compares the old version of firmware with the new version of firmware of the target ECU to obtain a differential upgrade package, and sends the differential upgrade package to the target ECU. The target ECU uses a differential restoration algorithm to merge the differential upgrade package and the old version of firmware to obtain the new version of firmware to complete the software upgrade. In this application, the cloud server generates a differential upgrade package by extracting the difference between the old version of firmware and the new version of firmware, and sends it to the target ECU to implement the software upgrade of the target ECU. The differential upgrade package is much smaller than the complete firmware update package, which helps to reduce the network bandwidth occupancy and download time, especially when the network bandwidth is limited or the network connection is unstable. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the disclosed drawings without paying creative work.
[0049] Figure 1 A flow chart of a vehicle OTA differential upgrade method disclosed in an embodiment of the present invention;
[0050] Figure 2 A flow chart of another vehicle OTA differential upgrade method disclosed in an embodiment of the present invention;
[0051] Figure 3 A schematic diagram of area division of a Flash memory disclosed in an embodiment of the present invention;
[0052] Figure 4 A schematic diagram of the structure of a vehicle OTA differential upgrade device disclosed in an embodiment of the present invention;
[0053] Figure 5 It is a structural schematic diagram of another vehicle OTA differential upgrade device disclosed in an embodiment of the present invention;
[0054] Figure 6 A schematic diagram of the structure of another vehicle OTA differential upgrade system disclosed in an embodiment of the present invention. DETAILED DESCRIPTION
[0055] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0056] The embodiment of the present invention discloses a vehicle OTA differential upgrade method, device and system. When a cloud server receives an ECU firmware upgrade request sent by a vehicle, the cloud server obtains the old version of firmware currently installed on the target ECU to be upgraded, compares the old version of firmware with the new version of firmware of the target ECU to obtain a differential upgrade package, sends the differential upgrade package to the target ECU, and the target ECU uses a differential restoration algorithm to merge the differential upgrade package and the old version of firmware to obtain the new version of firmware to complete the software upgrade. In this application, the cloud server generates a differential upgrade package by extracting the difference between the old version of firmware and the new version of firmware, and sends it to the target ECU to implement the software upgrade of the target ECU. The differential upgrade package is much smaller than the complete firmware update package, which helps to reduce the network bandwidth occupancy and download time, especially when the network bandwidth is limited or the network connection is unstable.
[0057] See also Figure 1 , a flow chart of a vehicle OTA differential upgrade method disclosed in an embodiment of the present invention, the method is applied to a cloud server, and the vehicle OTA differential upgrade method includes:
[0058] Step S101: when an ECU firmware upgrade request sent by a vehicle is received, an old version of firmware currently installed on the target ECU to be upgraded is obtained.
[0059] Firmware in ECU refers to the software embedded in ECU, which is responsible for controlling and managing various functions and operations of the vehicle. Firmware is usually stored in non-volatile memory, such as Flash memory, to ensure that it remains unchanged after the vehicle is powered off.
[0060] When an ECU in the vehicle needs to be upgraded, the vehicle will send an ECU firmware upgrade request to the cloud server. After receiving the ECU firmware upgrade request, the cloud server determines the target ECU to be upgraded based on the ECU identifier carried in the ECU firmware upgrade request, and obtains the old version of the firmware currently installed on the target ECU from the target ECU.
[0061] Step S102: Compare the old version firmware with the new version firmware of the target ECU to obtain a differential upgrade package.
[0062] There are two ways to implement differentials: text file-based differentials and binary file-based differentials. The difference is that text file-based differentials are logical, while binary file-based differentials are physical. When performing differential upgrades, the differential package is restored and written to the memory using the restore tool corresponding to the generated differential package to ensure that the content of the restored differential package in the memory is consistent with the content of the target version.
[0063] Specifically, a differential algorithm is used for the old version firmware and the new version firmware to generate an initial differential upgrade package; and a compression algorithm is used to compress the initial differential upgrade package to obtain the differential upgrade package.
[0064] This application obtains the differences between the old version firmware and the new version firmware by adopting a differential algorithm (such as a binary comparison method). These differences may be the addition, modification or deletion of the code. For example, the old version firmware is V1.1.0, and the new version firmware is V1.1.1. The new version firmware V1.1.1 only modifies part of the content relative to the old version firmware V1.1.0. A differential algorithm is used to generate an initial differential upgrade package.
[0065] In order to reduce the size of the differential upgrade package, which helps reduce download time and network bandwidth consumption, this application uses a differential algorithm to generate an initial differential upgrade package for the old version firmware and the new version firmware, and then uses a compression algorithm to compress the initial differential upgrade package to obtain the differential upgrade package v1.0-v1.1-update.patch.
[0066] Step S103: Send the differential upgrade package to the target ECU, and the target ECU uses a differential restoration algorithm to merge the differential upgrade package and the old version firmware to obtain the new version firmware, thereby completing the software upgrade.
[0067] After the target ECU receives the differential upgrade package v1.0-v1.1-update.patch, it uses the differential restoration algorithm to merge the old version firmware V1.1.0 and the differential upgrade package v1.0-v1.1-update.patch to obtain the new version firmware V1.1.1, thereby completing the software upgrade.
[0068] The differential restoration algorithm is a time series forecasting and data processing technology that involves performing multiple differential operations on time series data and then restoring the differentiated sequence back to the original sequence.
[0069] The cloud server sends the differential upgrade package to the target ECU. After receiving the differential upgrade package, the target ECU uses the differential restoration algorithm to merge the contents of the differential upgrade package with the old version of the firmware. The fusion process may involve inserting new code into the old version of the firmware. You can choose to modify the existing code or delete the code that is no longer needed to obtain the new version of the firmware and complete the software upgrade of the target ECU.
[0070] In summary, the present invention discloses a vehicle OTA differential upgrade method. When the cloud server receives an ECU firmware upgrade request sent by the vehicle, the cloud server obtains the old version of firmware currently installed on the target ECU to be upgraded, compares the old version of firmware with the new version of firmware of the target ECU to obtain a differential upgrade package, and sends the differential upgrade package to the target ECU. The target ECU uses a differential restoration algorithm to merge the differential upgrade package and the old version of firmware to obtain the new version of firmware to complete the software upgrade. In this application, the cloud server generates a differential upgrade package by extracting the difference between the old version of firmware and the new version of firmware, and sends it to the target ECU to implement the software upgrade of the target ECU. The differential upgrade package is much smaller than the complete firmware update package, which helps to reduce the network bandwidth occupancy and download time, especially when the network bandwidth is limited or the network connection is unstable.
[0071] In addition, since the differential upgrade package is smaller, the target ECU can download and install the differential upgrade package faster, which can significantly shorten the upgrade time of the target ECU, allowing users to obtain new functions faster and improve user experience.
[0072] For the target ECU, differential upgrade does not require additional storage space to store the new version of firmware. It only needs to store the differential upgrade package based on the original old version of firmware. The differential upgrade package and the old version of firmware are merged through the differential restoration algorithm to generate a new version of firmware. This is very important for devices with limited storage space.
[0073] OTA differential upgrades can be customized according to specific needs and scenarios, and you can choose to upgrade only specific modules or functions instead of the entire firmware, which helps to more accurately control the upgrade content and reduce unnecessary updates. At the same time, smaller differential upgrade packages can greatly reduce the storage and bandwidth costs of cloud servers, and can effectively reduce the risk of device failures caused by device upgrade failures.
[0074] Corresponding to the above embodiment, the present invention also discloses another vehicle OTA differential upgrade method.
[0075] See also Figure 2 , a flow chart of a vehicle OTA differential upgrade method disclosed in an embodiment of the present invention, the method is applied to a target ECU to be upgraded in a vehicle, the vehicle OTA differential upgrade method comprising:
[0076] Step S201: Send an ECU firmware upgrade request to a cloud server, so that the cloud server obtains the currently installed old version of firmware from the target ECU;
[0077] When an ECU in a vehicle needs a software upgrade, the target ECU to be upgraded sends an ECU firmware upgrade request to the cloud server through the on-board T-BOX. After receiving the ECU firmware upgrade request, the cloud server obtains the currently installed old version of the firmware from the target ECU, and compares the old version of the firmware with the new version of the target ECU to obtain a differential upgrade package, and then sends the differential upgrade package to the target ECU.
[0078] Step S202: Obtain the differential upgrade package sent by the cloud server, use a differential restoration algorithm to merge the differential upgrade package and the old version firmware to obtain a new version firmware, and complete the software upgrade.
[0079] The differential upgrade package is obtained by the cloud server after comparing the old version firmware with the new version firmware.
[0080] The target ECU obtains the differential upgrade package sent by the cloud server, and uses the differential restoration algorithm to merge the content in the differential upgrade package with the old version of the firmware. The fusion process may involve inserting the new code into the old version of the firmware. You can choose to modify the existing code or delete the code that is no longer needed to obtain the new version of the firmware and complete the software upgrade of the target ECU.
[0081] In summary, the present invention discloses a vehicle OTA differential upgrade method. When the cloud server receives an ECU firmware upgrade request sent by the vehicle, the cloud server obtains the old version of firmware currently installed on the target ECU to be upgraded, compares the old version of firmware with the new version of firmware of the target ECU to obtain a differential upgrade package, and sends the differential upgrade package to the target ECU. The target ECU uses a differential restoration algorithm to merge the differential upgrade package and the old version of firmware to obtain the new version of firmware to complete the software upgrade. In this application, the cloud server generates a differential upgrade package by extracting the difference between the old version of firmware and the new version of firmware, and sends it to the target ECU to implement the software upgrade of the target ECU. The differential upgrade package is much smaller than the complete firmware update package, which helps to reduce the network bandwidth occupancy and download time, especially when the network bandwidth is limited or the network connection is unstable.
[0082] In addition, since the differential upgrade package is smaller, the target ECU can download and install the differential upgrade package faster, which can significantly shorten the upgrade time of the target ECU, allowing users to obtain new functions faster and improve user experience.
[0083] For the target ECU, differential upgrade does not require additional storage space to store the new version of firmware. It only needs to store the differential upgrade package based on the original old version of firmware. The differential upgrade package and the old version of firmware are merged through the differential restoration algorithm to generate a new version of firmware. This is very important for devices with limited storage space.
[0084] OTA differential upgrades can be customized according to specific needs and scenarios, and you can choose to upgrade only specific modules or functions instead of the entire firmware, which helps to more accurately control the upgrade content and reduce unnecessary updates. At the same time, smaller differential upgrade packages can greatly reduce the storage and bandwidth costs of cloud servers, and can effectively reduce the risk of device failures caused by device upgrade failures.
[0085] In one embodiment, step S202 may specifically include:
[0086] Obtaining the differential upgrade package sent by the cloud server;
[0087] Decompressing the differential upgrade package to obtain a target differential upgrade package;
[0088] A differential restoration algorithm is adopted to merge the target differential upgrade package and the old version firmware according to the data mark in the target differential upgrade package to obtain the new version firmware, thereby completing the software upgrade.
[0089] In actual applications, in order to further reduce the size of the differential upgrade package, the cloud server compresses the differential upgrade package before transmitting it. Therefore, after receiving the differential upgrade package, the target ECU first decompresses the differential upgrade package to obtain the target differential upgrade package, and then uses the differential restoration algorithm to merge the target differential upgrade package and the old version firmware according to the data flag in the target differential upgrade package to obtain the new version firmware, thereby completing the software upgrade.
[0090] After the target ECU merges the decompressed target differential upgrade package and the old version firmware to obtain the new version firmware, in order to ensure that the merged new version firmware can run normally on the target ECU, the performance of the merged new version firmware also needs to be verified.
[0091] Therefore, in one embodiment, the process of using a differential restoration algorithm to merge the target differential upgrade package and the old version firmware according to the data flag in the target differential upgrade package to obtain the new version firmware to complete the software upgrade may specifically include:
[0092] Using a differential restoration algorithm, the target differential upgrade package and the old version firmware are merged according to the data flag in the target differential upgrade package to obtain the new version firmware;
[0093] Verifying the performance of the new version of the firmware;
[0094] When it is determined that the performance of the new version of the firmware passes the verification, determining that the new version of the firmware can run normally on the target ECU;
[0095] Determine that the target ECU has completed the software upgrade and activate the new version of the firmware.
[0096] In this application, after the target ECU merges the target differential upgrade package and the old version firmware to obtain the new version firmware, the performance of the merged new version firmware is verified to ensure that the merged new version firmware can run normally on the target ECU. When the performance of the new version firmware passes the verification, it is determined that the new version firmware can run normally on the target ECU. At this time, the target ECU completes the software upgrade and activates the new version firmware, so that the new version firmware starts running on the target ECU.
[0097] In practical applications, the firmware on the ECU is usually stored in a non-volatile memory, such as Flash memory, to ensure that it remains unchanged after the vehicle is powered off.
[0098] In order to achieve vehicle OTA differential upgrade, this application pre-divided the Flash memory in the target ECU into regions, see Figure 3 The Flash memory is mainly divided into four parts: BootLoader area, application area, download area and parameter area.
[0099] Among them, the BootLoader area is used to guide the upgrade;
[0100] The application area is used to store upgraded applications;
[0101] The download area is used to download and store differential upgrade packages;
[0102] The parameter area is used to store specific parameters.
[0103] The sizes of the four areas are reasonably divided according to actual usage.
[0104] In one embodiment, a differential restoration algorithm is used to merge the target differential upgrade package and the old version firmware according to the data flag in the target differential upgrade package to obtain the new version firmware. The process of completing the software upgrade may specifically include:
[0105] Erasing existing data in the application area used to store the new version firmware area to obtain a target application area, wherein the application area is an area divided in the Flash memory of the target ECU;
[0106] Subpackaging the target differential upgrade package and the old version firmware to obtain multiple data blocks;
[0107] Compressing each of the data blocks according to the fusion order of the target differential upgrade package and the old version firmware to obtain a compressed package;
[0108] Merge all the compressed packages into one file as the new version firmware;
[0109] Storing the new version of the firmware in the download area of the Flash memory, and writing the new version of the firmware into the BootLoader area of the Flash memory;
[0110] When the performance of the new version of the firmware passes the verification, the software is jumped to the target application area to activate the new version of the firmware and complete the software upgrade.
[0111] It should be noted that the ECU's Flash upgrade is usually implemented through the Bootloader program. The Bootloader is the first piece of software code executed after the ECU is powered on and reset, and is responsible for loading and executing the program code stored in the Flash memory. In order to realize the online update function, the Bootloader program needs to operate the Flash memory. Common upgrade methods include solidifying the Flash operation program in the Flash memory as part of the Bootloader component, and copying it to the RAM (Random Access Memory) when needed; or using a two-level Bootloader solution to download the Flash erase code from the host computer to the specified RAM through the communication port and then call it.
[0112] Specifically, after the target ECU is powered on, it will first start executing from the BootLoader area, and jump to the application area after confirming that the parameters are correct. When there is a need for software upgrade, the existing data in the application area used to place the new version of the firmware is erased to obtain the target application area, and the target differential upgrade package and the old version of the firmware are packaged to obtain multiple data blocks, which are compressed in the order of the target differential upgrade package and the old version of the firmware when they are merged to obtain various compressed packages, and finally all the compressed packages are merged to obtain the new version of the firmware.
[0113] After obtaining the new version of the firmware, this application stores the new version of the firmware in the download area of the Flash memory, writes the new version of the firmware into the BootLoader area of the Flash memory, and verifies the performance of the new version of the firmware to ensure that the integrated new version of the firmware can run normally on the target ECU. When the performance of the new version of the firmware is verified (that is, the parameters in the new version of the firmware are verified to be correct), it jumps to the target application area to execute subsequent programs, thereby completing the software upgrade.
[0114] Corresponding to the above method embodiment, the present invention also discloses a vehicle OTA differential upgrade device.
[0115] See also Figure 4 , a schematic diagram of the structure of a vehicle OTA differential upgrade device disclosed in an embodiment of the present invention, the device is applied to a cloud server, and the device may include:
[0116] The firmware acquisition unit 301 is used to acquire the currently installed old version firmware from the target ECU to be upgraded when receiving an electronic control unit ECU firmware upgrade request sent by the vehicle.
[0117] Firmware in ECU refers to the software embedded in ECU, which is responsible for controlling and managing various functions and operations of the vehicle. Firmware is usually stored in non-volatile memory, such as Flash memory, to ensure that it remains unchanged after the vehicle is powered off.
[0118] When an ECU in the vehicle needs to be upgraded, the vehicle will send an ECU firmware upgrade request to the cloud server. After receiving the ECU firmware upgrade request, the cloud server determines the target ECU to be upgraded based on the ECU identifier carried in the ECU firmware upgrade request, and obtains the old version of the firmware currently installed on the target ECU from the target ECU.
[0119] The upgrade package determination unit 302 is used to compare the old version firmware with the new version firmware of the target ECU to obtain a differential upgrade package.
[0120] This application obtains the differences between the old version firmware and the new version firmware by adopting a differential algorithm (such as a binary comparison method). These differences may be the addition, modification or deletion of the code. For example, the old version firmware is V1.1.0, and the new version firmware is V1.1.1. The new version firmware V1.1.1 only modifies part of the content relative to the old version firmware V1.1.0. A differential algorithm is used to generate an initial differential upgrade package.
[0121] In order to reduce the size of the differential upgrade package, which helps reduce download time and network bandwidth consumption, this application uses a differential algorithm to generate an initial differential upgrade package for the old version firmware and the new version firmware, and then uses a compression algorithm to compress the initial differential upgrade package to obtain the differential upgrade package v1.0-v1.1-update.patch.
[0122] The upgrade package sending unit 303 is used to send the differential upgrade package to the target ECU, and the target ECU uses a differential restoration algorithm to merge the differential upgrade package and the old version firmware to obtain the new version firmware, thereby completing the software upgrade.
[0123] After the target ECU receives the differential upgrade package v1.0-v1.1-update.patch, it uses the differential restoration algorithm to merge the old version firmware V1.1.0 and the differential upgrade package v1.0-v1.1-update.patch to obtain the new version firmware V1.1.1, thereby completing the software upgrade.
[0124] The differential restoration algorithm is a time series forecasting and data processing technology that involves performing multiple differential operations on time series data and then restoring the differentiated sequence back to the original sequence.
[0125] The cloud server sends the differential upgrade package to the target ECU. After receiving the differential upgrade package, the target ECU uses the differential restoration algorithm to merge the contents of the differential upgrade package with the old version of the firmware. The fusion process may involve inserting new code into the old version of the firmware. You can choose to modify the existing code or delete the code that is no longer needed to obtain the new version of the firmware and complete the software upgrade of the target ECU.
[0126] In summary, the present invention discloses a vehicle OTA differential upgrade device. When the cloud server receives an ECU firmware upgrade request sent by the vehicle, the cloud server obtains the old version of firmware currently installed on the target ECU to be upgraded, compares the old version of firmware with the new version of firmware of the target ECU to obtain a differential upgrade package, and sends the differential upgrade package to the target ECU. The target ECU uses a differential restoration algorithm to merge the differential upgrade package and the old version of firmware to obtain the new version of firmware to complete the software upgrade. In this application, the cloud server generates a differential upgrade package by extracting the difference between the old version of firmware and the new version of firmware, and sends it to the target ECU to implement the software upgrade of the target ECU. The differential upgrade package is much smaller than the complete firmware update package, which helps to reduce the network bandwidth occupancy and download time, especially when the network bandwidth is limited or the network connection is unstable.
[0127] In addition, since the differential upgrade package is smaller, the target ECU can download and install the differential upgrade package faster, which can significantly shorten the upgrade time of the target ECU, allowing users to obtain new functions faster and improve user experience.
[0128] For the target ECU, differential upgrade does not require additional storage space to store the new version of firmware. It only needs to store the differential upgrade package based on the original old version of firmware. The differential upgrade package and the old version of firmware are merged through the differential restoration algorithm to generate a new version of firmware. This is very important for devices with limited storage space.
[0129] OTA differential upgrades can be customized according to specific needs and scenarios, and you can choose to upgrade only specific modules or functions instead of the entire firmware, which helps to more accurately control the upgrade content and reduce unnecessary updates. At the same time, smaller differential upgrade packages can greatly reduce the storage and bandwidth costs of cloud servers, and can effectively reduce the risk of device failures caused by device upgrade failures.
[0130] In one embodiment, the upgrade package determining unit 302 is specifically configured to:
[0131] Using a differential algorithm on the old version of the firmware and the new version of the firmware to generate an initial differential upgrade package;
[0132] The initial differential upgrade package is compressed using a compression algorithm to obtain the differential upgrade package.
[0133] Corresponding to the above method embodiment, the present invention also discloses another vehicle OTA differential upgrade device.
[0134] See also Figure 5 , a schematic diagram of the structure of another vehicle OTA differential upgrade device disclosed in an embodiment of the present invention, the device is applied to a target ECU to be upgraded in a vehicle, and the vehicle OTA differential upgrade device includes:
[0135] The request sending unit 401 is used to send an ECU firmware upgrade request to the cloud server, so that the cloud server obtains the currently installed old version firmware from the target ECU.
[0136] When an ECU in a vehicle needs a software upgrade, the target ECU to be upgraded sends an ECU firmware upgrade request to the cloud server through the on-board T-BOX. After receiving the ECU firmware upgrade request, the cloud server obtains the currently installed old version of the firmware from the target ECU, and compares the old version of the firmware with the new version of the target ECU to obtain a differential upgrade package, and then sends the differential upgrade package to the target ECU.
[0137] The upgrade package acquisition unit 402 is used to acquire the differential upgrade package sent by the cloud server, and use a differential restoration algorithm to merge the differential upgrade package and the old version firmware to obtain a new version firmware, thereby completing the software upgrade.
[0138] The differential upgrade package is obtained by the cloud server after comparing the old version firmware with the new version firmware.
[0139] The target ECU obtains the differential upgrade package sent by the cloud server, and uses the differential restoration algorithm to merge the content in the differential upgrade package with the old version of the firmware. The fusion process may involve inserting the new code into the old version of the firmware. You can choose to modify the existing code or delete the code that is no longer needed to obtain the new version of the firmware and complete the software upgrade of the target ECU.
[0140] In summary, the present invention discloses a vehicle OTA differential upgrade device. When the cloud server receives an ECU firmware upgrade request sent by the vehicle, the cloud server obtains the old version of firmware currently installed on the target ECU to be upgraded, compares the old version of firmware with the new version of firmware of the target ECU to obtain a differential upgrade package, and sends the differential upgrade package to the target ECU. The target ECU uses a differential restoration algorithm to merge the differential upgrade package and the old version of firmware to obtain the new version of firmware to complete the software upgrade. In this application, the cloud server generates a differential upgrade package by extracting the difference between the old version of firmware and the new version of firmware, and sends it to the target ECU to implement the software upgrade of the target ECU. The differential upgrade package is much smaller than the complete firmware update package, which helps to reduce the network bandwidth occupancy and download time, especially when the network bandwidth is limited or the network connection is unstable.
[0141] In addition, since the differential upgrade package is smaller, the target ECU can download and install the differential upgrade package faster, which can significantly shorten the upgrade time of the target ECU, allowing users to obtain new functions faster and improve user experience.
[0142] For the target ECU, differential upgrade does not require additional storage space to store the new version of firmware. It only needs to store the differential upgrade package based on the original old version of firmware. The differential upgrade package and the old version of firmware are merged through the differential restoration algorithm to generate a new version of firmware. This is very important for devices with limited storage space.
[0143] OTA differential upgrades can be customized according to specific needs and scenarios, and you can choose to upgrade only specific modules or functions instead of the entire firmware, which helps to more accurately control the upgrade content and reduce unnecessary updates. At the same time, smaller differential upgrade packages can greatly reduce the storage and bandwidth costs of cloud servers, and can effectively reduce the risk of device failures caused by device upgrade failures.
[0144] In one embodiment, the upgrade package obtaining unit 402 may include:
[0145] An upgrade package acquisition subunit, used to acquire the differential upgrade package sent by the cloud server;
[0146] A decompression subunit, used for decompressing the differential upgrade package to obtain a target differential upgrade package;
[0147] The fusion subunit is used to adopt a differential restoration algorithm to fuse the target differential upgrade package and the old version firmware according to the data mark in the target differential upgrade package to obtain the new version firmware, thereby completing the software upgrade.
[0148] In actual applications, in order to further reduce the size of the differential upgrade package, the cloud server compresses the differential upgrade package before transmitting it. Therefore, after receiving the differential upgrade package, the target ECU first decompresses the differential upgrade package to obtain the target differential upgrade package, and then uses the differential restoration algorithm to merge the target differential upgrade package and the old version firmware according to the data flag in the target differential upgrade package to obtain the new version firmware, thereby completing the software upgrade.
[0149] After the target ECU merges the decompressed target differential upgrade package and the old version firmware to obtain the new version firmware, in order to ensure that the merged new version firmware can run normally on the target ECU, the performance of the merged new version firmware also needs to be verified.
[0150] Therefore, in one embodiment, the fusion subunit can also be used to:
[0151] Using a differential restoration algorithm, the target differential upgrade package and the old version firmware are merged according to the data flag in the target differential upgrade package to obtain the new version firmware;
[0152] Verifying the performance of the new version of the firmware obtained by fusion;
[0153] When it is determined that the performance of the new version of the firmware passes the verification, determining that the new version of the firmware can run normally on the target ECU;
[0154] Determine that the target ECU has completed the software upgrade and activate the new version of the firmware.
[0155] In one embodiment, the fusion subunit can be used to:
[0156] Erasing existing data in the application area used to store the new version firmware area to obtain a target application area, wherein the application area is an area divided in the Flash memory of the target ECU;
[0157] Subpackaging the target differential upgrade package and the old version firmware to obtain multiple data blocks;
[0158] Compressing each of the data blocks according to the fusion order of the target differential upgrade package and the old version firmware to obtain a compressed package;
[0159] Merge all the compressed packages into one file as the new version firmware;
[0160] Storing the new version of the firmware in the download area of the Flash memory, and writing the new version of the firmware into the BootLoader area of the Flash memory;
[0161] When the performance of the new version of the firmware passes the verification, the software is jumped to the target application area to activate the new version of the firmware and complete the software upgrade.
[0162] It should be noted that, for the specific working principles of each component in the device embodiment, please refer to the corresponding part of the method embodiment, which will not be repeated here.
[0163] Corresponding to the above-mentioned embodiment, the present invention also discloses a vehicle OTA differential upgrade system.
[0164] See also Figure 6 , a schematic structural diagram of a vehicle OTA differential upgrade system disclosed in an embodiment of the present invention, the system includes: a cloud server 100 and a vehicle 200.
[0165] The vehicle includes: a vehicle-mounted T-BOX 201 and a target ECU 202 to be upgraded ( Figure 6 Take one ECU as an example).
[0166] The cloud server 100 includes Figure 4 The vehicle OTA differential upgrade device in the illustrated embodiment.
[0167] The target ECU 202 includes Figure 5 The vehicle OTA differential upgrade device in the illustrated embodiment.
[0168] The vehicle-mounted T-BOX 201 is used to connect the cloud server 100 and the target ECU 202 .
[0169] The vehicle-mounted T-BOX201 can be used as the core of the control system in the vehicle, and communicate with other devices (such as the target ECU202) through serial ports, networks, etc. to achieve automatic control and scheduling of the vehicle.
[0170] In the present application, the vehicle-mounted T-BOX 201 can send an ECU firmware upgrade request to the cloud server 100 , and obtain the differential upgrade package sent by the cloud server 100 to the target ECU 202 , so that the target ECU 202 uses the differential upgrade package to perform software upgrade.
[0171] In summary, the present invention discloses a vehicle OTA differential upgrade system, comprising: a cloud server 100 and a vehicle 200, the vehicle comprising: an on-board T-BOX 201 and a target ECU 202 to be upgraded, the on-board T-BOX 201 being connected to the cloud server 100 and the target ECU 202, when the cloud server 100 receives an ECU firmware upgrade request sent by the vehicle through the on-board T-BOX 201, the cloud server 100 obtains the old version firmware currently installed on the target ECU 202 to be upgraded, compares the old version firmware with the new version firmware of the target ECU 202 to obtain a differential upgrade package, sends the differential upgrade package to the target ECU 202 through the on-board T-BOX 201, and the target ECU 202 uses a differential restoration algorithm to merge the differential upgrade package and the old version firmware to obtain the new version firmware to complete the software upgrade. In the present application, the cloud server 100 generates a differential upgrade package by extracting the difference between the old version firmware and the new version firmware, and sends it to the target ECU 202 to implement the software upgrade of the target ECU. The differential upgrade package is much smaller than the complete firmware update package, which helps to reduce network bandwidth occupancy and download time, especially when the network bandwidth is limited or the network connection is unstable.
[0172] In one embodiment, the cloud server 100 includes: a remote upgrade server (OTA Server) 101 .
[0173] OTAServer101, as the main control logic module of remote upgrade, is used to complete the assembly of UDS (Unified Diagnostic Services) instructions. UDS instructions are a set of instructions on the entire upgrade link during the vehicle OTA differential upgrade process.
[0174] like Figure 6 As shown, OTAServer101 includes: OTA service and OSS (Object Storage Service) / CDN (Content Delivery Network).
[0175] The cloud server 100 also includes a PKI (Public Key Infrastructure) service 102 .
[0176] The vehicle-mounted T-BOX201 includes: a remote upgrade master control node MasterOTA2011.
[0177] like Figure 6As shown, MasterOTA2011 includes: a logic master control module (MU), an upgrade flash module (UU) and a download upgrade module (DU). The logic master control module and the download upgrade module are connected through an API (Application Programming Interface).
[0178] The logic master module and OTA service communicate through HTTPS (HyperText Transfer Protocol Secure), and the download upgrade module and OSS / CDN communicate through HTTPS.
[0179] The vehicle-mounted T-BOX 201 may further include: an interface agent (Master IA) 2012 .
[0180] The target ECU 202 includes: a remote upgrade slave node SubOTA 2021 .
[0181] The transmission protocol (TP) between the vehicle-mounted T-BOX 201 and the target ECU 202 may be CAN (Controller Area Network) or ETH (Ethernet Protocol).
[0182] The target ECU 202 further includes: an ECU APP (application program).
[0183] The MasterOTA2011 obtains the differential upgrade package from the OTAServer101, and sends the differential upgrade package to the SubOTA2021, and the SubOTA2021 cooperates to complete the software upgrade of the target ECU202.
[0184] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0185] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0186] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A vehicle OTA differential upgrade method, characterized in that: Applied to a cloud server, the vehicle OTA differential upgrade method includes: When receiving an ECU firmware upgrade request sent by a vehicle, obtaining the old version of firmware currently installed on the target ECU to be upgraded; Compare the old version firmware with the new version firmware of the target ECU to obtain a differential upgrade package; The differential upgrade package is sent to the target ECU, and the target ECU uses a differential restoration algorithm to merge the differential upgrade package and the old version firmware to obtain the new version firmware, thereby completing the software upgrade.
2. The vehicle OTA differential upgrade method according to claim 1, characterized in that: The step of comparing the new version firmware with the new version firmware of the target ECU to obtain a differential upgrade package includes: Using a differential algorithm on the old version of the firmware and the new version of the firmware to generate an initial differential upgrade package; The initial differential upgrade package is compressed using a compression algorithm to obtain the differential upgrade package.
3. A vehicle OTA differential upgrade method, characterized in that: Applied to a target ECU to be upgraded in a vehicle, the vehicle OTA differential upgrade method comprises: Sending an ECU firmware upgrade request to a cloud server, so that the cloud server obtains an old version of the firmware currently installed on the target ECU; The differential upgrade package sent by the cloud server is obtained, and a differential restoration algorithm is used to merge the differential upgrade package and the old version firmware to obtain a new version firmware, thereby completing the software upgrade, wherein the differential upgrade package is obtained by the cloud server after comparing the old version firmware with the new version firmware.
4. The vehicle OTA differential upgrade method according to claim 3, characterized in that: The obtaining of the differential upgrade package sent by the cloud server, and the merging of the differential upgrade package and the old version firmware using a differential restoration algorithm to obtain a new version firmware, thereby completing the software upgrade, includes: Obtaining the differential upgrade package sent by the cloud server; Decompressing the differential upgrade package to obtain a target differential upgrade package; A differential restoration algorithm is adopted to merge the target differential upgrade package and the old version firmware according to the data mark in the target differential upgrade package to obtain the new version firmware, thereby completing the software upgrade.
5. The vehicle OTA differential upgrade method according to claim 4, characterized in that: The differential restoration algorithm is used to merge the target differential upgrade package and the old version firmware according to the data mark in the target differential upgrade package to obtain the new version firmware, and complete the software upgrade, including: Using a differential restoration algorithm, the target differential upgrade package and the old version firmware are merged according to the data flag in the target differential upgrade package to obtain the new version firmware; Verifying the performance of the new version of the firmware obtained by fusion; When it is determined that the performance of the new version of the firmware passes the verification, determining that the new version of the firmware can run normally on the target ECU; Determine that the target ECU has completed the software upgrade and activate the new version of the firmware.
6. The vehicle OTA differential upgrade method according to claim 4, characterized in that: The differential restoration algorithm is used to merge the target differential upgrade package and the old version firmware according to the data mark in the target differential upgrade package to obtain the new version firmware, and complete the software upgrade, including: Erasing existing data in the application area used to store the new version firmware area to obtain a target application area, wherein the application area is an area divided in the Flash memory of the target ECU; Subpackaging the target differential upgrade package and the old version firmware to obtain multiple data blocks; Compressing each of the data blocks according to the fusion order of the target differential upgrade package and the old version firmware to obtain a compressed package; Merge all the compressed packages into one file as the new version firmware; Storing the new version of the firmware in the download area of the Flash memory, and writing the new version of the firmware into the BootLoader area of the Flash memory; When the performance of the new version of the firmware passes the verification, the software is jumped to the target application area to activate the new version of the firmware and complete the software upgrade.
7. A vehicle OTA differential upgrade device, characterized in that: Applied to a cloud server, the vehicle OTA differential upgrade device comprises: The firmware acquisition unit is used to acquire the old version of the firmware currently installed on the target ECU to be upgraded when receiving the ECU firmware upgrade request sent by the vehicle; An upgrade package determination unit, used for comparing the old version firmware with the new version firmware of the target ECU to obtain a differential upgrade package; The upgrade package sending unit is used to send the differential upgrade package to the target ECU, and the target ECU adopts a differential restoration algorithm to merge the differential upgrade package and the old version firmware to obtain the new version firmware, thereby completing the software upgrade.
8. A vehicle OTA differential upgrade device, characterized in that: Applied to a target ECU to be upgraded in a vehicle, the vehicle OTA differential upgrade device comprises: A request sending unit, used to send an ECU firmware upgrade request to a cloud server, so that the cloud server obtains an old version of the firmware currently installed on the target ECU; An upgrade package acquisition unit is used to acquire the differential upgrade package sent by the cloud server, and use a differential restoration algorithm to merge the differential upgrade package and the old version firmware to obtain the new version firmware, thereby completing the software upgrade, wherein the differential upgrade package is obtained by the cloud server after comparing the old version firmware with the new version firmware.
9. A vehicle OTA differential upgrade system, characterized in that: include: A cloud server and a vehicle, wherein the vehicle comprises: an on-board T-BOX and a target ECU to be upgraded; The cloud server includes the vehicle OTA differential upgrade device described in claim 7; The target ECU includes the vehicle OTA differential upgrade device according to claim 8; The vehicle-mounted T-BOX is used to connect the cloud server and the target ECU.
10. The vehicle OTA differential upgrade system according to claim 9, characterized in that: The cloud server includes: a remote upgrade server OTAServer; The vehicle-mounted T-BOX includes: a remote upgrade master control node MasterOTA; The target ECU includes: a remote upgrade slave node SubOTA; The MasterOTA obtains the differential upgrade package from the OTAServer and sends the differential upgrade package to the SubOTA, which cooperates to complete the software upgrade of the target ECU.
Citation Information
Cited By
Differential upgrading method for integrated electronic communication module
CN121614169A
Vehicle OTA differential upgrade method, apparatus and system
WO2026092709A1