Software upgrade processing method for multi-core microprocessor, vehicle, and system

By employing encrypted compression processing and a partitioned address alternating mapping algorithm, the problems of long transmission time and low security during automotive software upgrades are solved, enabling fast and secure software upgrades and improving system reliability and stability.

WO2026037357A1PCT designated stage Publication Date: 2026-02-19ZHIZI AUTOMOTIVE TECHNOLOGY CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/114598
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-08-15
Filing Date
2025-08-14
Publication Date
2026-02-19

AI Technical Summary

Technical Problem

Existing automotive software upgrade processes suffer from problems such as long transmission times, low security, and low upgrade efficiency. In particular, during large-scale software upgrades, the traditional dual-zone strategy is time-consuming and poses security risks due to plaintext data transmission.

Method used

The drive files are encrypted and compressed for integrity and consistency verification. The execution area and the waiting area are switched through a partition address alternation mapping algorithm to ensure data transmission security and consistency. In case of upgrade failure, a rollback strategy is adopted to reduce data copying and writing time.

Benefits of technology

It improves the security and accuracy of software upgrades, reduces transmission time, ensures the consistency of data transmission, and provides a fast backup function in case of upgrade failure, thereby improving the reliability and stability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025114598_19022026_PF_FP_ABST
    Figure CN2025114598_19022026_PF_FP_ABST
Patent Text Reader

Abstract

A software upgrade processing method for a multi-core microprocessor, a vehicle, and a system, which are applied to an electronic control unit in a vehicle. The method comprises: downloading a driver file that has undergone encryption and compression processing from a upper-level computer; performing integrity check on the processed driver file, and if the integrity check is successful, flashing version information of a file to be upgraded, and deleting historical upgrade files in a pending execution area; downloading an encrypted and compressed file to be upgraded from the upper-level computer, storing the file to be upgraded in the pending execution area, switching the pending execution area to a new execution area, and switching a current execution area to a new pending execution area, wherein the current execution area stores an encrypted and compressed previous version of the file to be upgraded; and performing consistency check processing on a file to be upgraded in the new execution area, and, on the basis of the check result, upgrading the file to be upgraded in the new execution area. The solution reduces data copying and writing time, and improves upgrade efficiency and security.
Need to check novelty before this filing date? Find Prior Art

Description

A multi-core microprocessor software upgrade processing method, vehicle and system

[0001] The present application claims priority to Chinese Patent Application No. 2024111236100, filed on August 15, 2024. The present application incorporates the entirety of the aforementioned Chinese Patent Application. TECHNICAL FIELD

[0002] The present application relates to the technical field of vehicle control, in particular to a multi-core microprocessor software upgrade processing method, vehicle and system. BACKGROUND

[0003] With the rapid development of electrification, networking, intelligence and sharing technologies of new energy vehicles, software-defined vehicles have been widely used in practical engineering applications. However, as software plays an increasingly important role in the automotive industry, the challenges it faces have gradually emerged. Currently, the scale and overall complexity of automotive software development have increased significantly, which puts higher requirements on the software development capabilities of vehicle manufacturers and related component manufacturers.

[0004] In existing software upgrades, the transmission and flashing process of the upgrade file is time-consuming, and in the update process of the conventional controller application program, data is usually transmitted in plaintext form on the vehicle network, which is less secure. SUMMARY

[0005] The present application aims to address the deficiencies in the prior art and provide a multi-core microprocessor software upgrade processing method, vehicle and system to improve the security and accuracy of software upgrades.

[0006] To achieve the above-mentioned purpose, the technical solutions adopted by the embodiments of the present application are as follows:

[0007] In a first aspect, the embodiments of the present application provide a multi-core microprocessor software upgrade processing method applied to an electronic control unit in a vehicle, which comprises:

[0008] downloading an encrypted and compressed driver file from an upper computer;

[0009] performing integrity verification on the processed driver file, and if the integrity verification is passed, flashing the version information of the upgrade file and deleting the historical upgrade file in the execution area;

[0010] downloading an encrypted and compressed upgrade file from the upper computer and storing the upgrade file in the execution area, switching the execution area to a new execution area, and switching the current execution area to a new execution area, wherein the current execution area stores an encrypted and compressed upgrade file of the previous version of the upgrade file;

[0011] performing a consistency check on the to-be-upgraded files in the new execution area, and upgrading the to-be-upgraded files in the new execution area according to the check result.

[0012] Optionally, the switching of the to-be-executed area into the new execution area and the switching of the current execution area into the new to-be-executed area comprises:

[0013] switching the to-be-executed area into the new execution area and the current execution area into the new to-be-executed area based on a partition address alternate mapping algorithm.

[0014] Optionally, after the consistency check on the to-be-upgraded files in the new execution area and the upgrading of the to-be-upgraded files in the new execution area according to the check result, the method further comprises:

[0015] if the upgrading fails, determining whether to re-upgrade the to-be-upgraded files in the new execution area according to the validity of the to-be-upgraded files in the new execution area;

[0016] if yes, re-upgrading the to-be-upgraded files in the new execution area; otherwise, re-upgrading the to-be-upgraded files in the new execution area by using a rollback strategy.

[0017] Optionally, the process of the host computer performing the encryption and compression on the driver file comprises:

[0018] performing encryption on the driver file by using a preset encryption algorithm in the host computer, and performing compression on the encrypted driver file by using a preset compression algorithm, to obtain the driver file after the encryption and compression.

[0019] Optionally, the process of performing encryption on the driver file by using a preset encryption algorithm in the host computer, and performing compression on the encrypted driver file by using a preset compression algorithm, to obtain the driver file after the encryption and compression, comprises:

[0020] dividing the driver file into multiple data blocks according to byte number;

[0021] generating a pseudo-random byte stream corresponding to each data block;

[0022] performing encryption on each data block by using the pseudo-random byte stream, to obtain an encrypted driver file;

[0023] performing compression on the encrypted driver file, to obtain the driver file after the encryption and compression.

[0024] Optionally, the alternate mapping algorithm based on the partition address switches the to-be-executed area to a new execution area and switches the current execution area to a new to-be-executed area, and the method comprises the following steps of:

[0025] checking the to-be-upgraded file in the to-be-executed area, and if the checking is passed, updating the partition address information so that the to-be-executed area is switched to a new execution area and the current execution area is switched to a new to-be-executed area.

[0026] Optionally, the updating of the partition address information comprises the following steps of:

[0027] determining whether the current partition is a standard mapping according to attribute information of the current partition, if yes, setting attribute information of an execution area of the current partition and attribute information of a to-be-executed area to alternate mapping and performing address alternate mapping on the execution area and the to-be-executed area of the current partition;

[0028] if no, performing address alternate mapping on the execution area and the to-be-executed area of the current partition.

[0029] Optionally, before the downloading of the encrypted and compressed driver file from the host computer, the method comprises the following steps of:

[0030] determining whether the electronic control unit enters an extended session mode;

[0031] if yes, determining whether the electronic control unit meets a precondition before upgrading;

[0032] if yes, stopping a recording function and a network message function of the electronic control unit, reading current version information in the electronic control unit, and determining whether the current version information is consistent with version information of the to-be-upgraded file;

[0033] if the current version information is not consistent with the version information of the to-be-upgraded file, entering an encoding mode and upgrading the to-be-upgraded file.

[0034] In a second aspect, the embodiments of the present application further provide a vehicle comprising the electronic control unit of the first aspect, and the electronic control unit is used to execute the method steps of the first aspect.

[0035] In a third aspect, the embodiments of the present application further provide a software upgrading processing system comprising a host computer and a vehicle, the vehicle comprising an electronic control unit, the electronic control unit comprising a processor, a storage medium and a bus, the storage medium storing program instructions executable by the processor, the processor and the storage medium communicating through the bus when an application program is running, and the processor executing the program instructions to execute the steps of the multi-core microprocessor software upgrading processing method of the first aspect.

[0036] In a fourth aspect, the embodiments of the present application further provide a computer readable storage medium, which stores a computer program, and the computer program reads and executes the steps of the multi-core microprocessor software upgrade processing method of the first aspect.

[0037] The beneficial effects of the present application are:

[0038] The multi-core microprocessor software upgrade processing method, vehicle and system provided by the present application download the encrypted and compressed driver file from the host computer, perform integrity check on the processed driver file, write the version information of the to-be-upgraded file after the integrity check is passed, delete the historical upgrade file in the to-be-executed area, download the encrypted and compressed to-be-upgraded file from the host computer and store the to-be-upgraded file in the to-be-executed area, switch the to-be-executed area to a new execution area, and switch the current execution area to a new to-be-executed area. By downloading the encrypted and compressed driver file and to-be-upgraded file, the transmission of plaintext is avoided, the transmission time of data is reduced, and the security is improved. The consistency check is performed on the to-be-upgraded file in the new execution area, and the to-be-upgraded file in the new execution area is upgraded according to the check result. The integrity check and consistency check can ensure that the data is not tampered during transmission and ensure the consistency of the entire process from transmission to storage. By switching the to-be-executed area to the new execution area and switching the current execution area to the new to-be-executed area, the data copying and writing time is reduced, and the new to-be-executed area contains the encrypted and compressed to-be-upgraded file of the previous version of the to-be-upgraded file, which plays a role of rapid backup. BRIEF DESCRIPTION OF DRAWINGS

[0039] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can also be obtained without creative labor.

[0040] Fig. 1 is a flowchart of a software upgrade processing method provided by the embodiments of the present application;

[0041] Fig. 2 is a structure diagram of a dual-partition provided by the embodiments of the present application;

[0042] Fig. 3 is a flowchart of another software upgrade processing method provided by the embodiments of the present application;

[0043] Fig. 4 is a flowchart of a partition address updating method provided by the embodiments of the present application;

[0044] FIG. 5 is a flow diagram of another software upgrading method according to an embodiment of the present application. DETAILED DESCRIPTION

[0045] In order to make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. It should be understood that the drawings in the present application are only intended to illustrate and describe the present application, and should not be used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn according to the actual proportions. The flowcharts in the present application show the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowcharts can not be implemented in sequence, and the steps without logical context relationship can be reversed in sequence or implemented simultaneously. In addition, one or more other operations can be added to the flowcharts or one or more operations can be removed from the flowcharts by those skilled in the art under the guidance of the content of the present application.

[0046] In addition, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings herein can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.

[0047] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.

[0048] At present, the scale and overall complexity of automotive software development have greatly increased, and higher requirements are put forward for the software development capabilities of vehicle manufacturers and related component manufacturers. Most existing control units use single-partition storage software programs, and when upgrading, the old program needs to be cleared before writing the new program. During the upgrade process, if power failure or transmission failure occurs, the system may not work normally, which poses a great risk. In recent years, some manufacturers have begun to use a dual-zone backup strategy, which divides the FLASH storage space into two independent areas: A zone and B zone. Each zone can store a complete program. Usually, one zone is used to execute the current application program, and the other zone is used to switch to the backup zone when encountering abnormal flashing or program execution, to ensure that the software can continue to run continuously. Although this A / B dual-zone strategy improves system reliability, it still has some shortcomings in actual application. For example, when the software upgrade package is large, the dual-zone flashing strategy needs to copy and write data to two FLASH regions, resulting in a long transmission and flashing process, which requires higher working conditions for the controller, thereby reducing the upgrade efficiency. Moreover, in the process of updating the application program of a traditional general controller, the data is usually transmitted directly on the vehicle network without compression, which is inefficient. The uncompressed data is large, resulting in a long transmission time, which can cause network congestion and transmission delays in bandwidth-limited environments, thereby affecting the efficiency and stability of the update process. In the process of updating the application program of a general controller, the data is usually transmitted in plaintext form on the vehicle network, which is less secure. If the data is intercepted or leaked during transmission, it may cause serious security risks. How to achieve faster and more efficient iterative upgrades is the focus of the automotive industry. At the same time, data transmission security issues are increasingly apparent, and the conflict between data transmission speed and data security is becoming more and more prominent.

[0049] Optionally, the software upgrade processing method provided in the embodiments of the present application is applied to an electronic control unit (Electronic Control Unit, ECU) in a vehicle. The software upgrade method provided in the embodiments of the present application can be used to perform software upgrade operations in the electronic control unit, and the software upgrade method can realize remote upgrading through a unified diagnostic service protocol (Unified Diagnostic Server, UDS), so that software updating or repairing can be performed on a vehicle production line or a vehicle maintenance center.

[0050] The specific implementation process of the software upgrade provided in the embodiments of the present application will be explained below.

[0051] FIG. 1 is a flowchart of a software upgrade processing method provided in the embodiments of the present application. The execution subject of the method is the electronic control unit as described above. As shown in FIG. 1, the method includes the following steps.

[0052] S101, downloading the encrypted and compressed driver file from the host computer.

[0053] Optionally, the electronic control unit can be connected in communication with the host computer through a CAN box, specifically, one end of the CAN box is connected with a terminal device running the host computer through a USB interface, and the other end of the CAN box is connected with the electronic control unit through a reserved flashing CAN interface. On the host computer, the driver file can be loaded in advance, and the loaded driver file can be encrypted and compressed.

[0054] Optionally, when the electronic control unit enters the main programming mode, the driver file needs to be downloaded from the host computer first, and the host computer uploads the encrypted and compressed driver file (Flash Driver file) to the electronic control unit.

[0055] Specifically, the electronic control unit can enter the mode through the 1002 service, and download the encrypted and compressed driver file through the 34-36-37 service.

[0056] S102, performing integrity check on the processed driver file.

[0057] Optionally, if the integrity check passes, S103 is executed; if the integrity check does not pass, S101 is returned. Specifically, the electronic control unit can perform integrity check on the processed driver file through 31DF02.

[0058] Optionally, the integrity check method can include cyclic redundancy check (CRC32), digital signature, checksum, hash chain, parity check and other check methods. These integrity check methods can be compared, and CRC32 with strong error detection ability and low detection cost can be selected according to actual conditions to realize high proportion of error correction information transmission, complete data check code calculation in a very short time, and quickly complete correction, so as to greatly improve the communication speed in running through the way of automatic retransmission of data packets, thereby providing guarantee for communication speed and safety.

[0059] S103, flashing the version information of the to-be-upgraded file, and deleting the historical upgrade file in the to-be-executed area.

[0060] Among them, the electronic control unit contains a to-be-executed area and an execution area, and the historical upgrade file is stored in the to-be-executed area. The historical upgrade file can be the to-be-upgraded file of the previous version, or the to-be-upgraded file of other versions.

[0061] Optionally, the version information of the to-be-upgraded file can be written to the electronic control unit from the host computer, and specifically, the version information of the to-be-upgraded file can be written by using the 2E service. For example, the version information of the to-be-upgraded file is V1.1, and the version information V1.1 is written to the electronic control unit. In addition, the historical upgrade file in the to-be-executed area is deleted, and specifically, the historical upgrade file in the to-be-executed area can be erased by using the 3101FF 00 service.

[0062] S104, downloading the encrypted and compressed to-be-upgraded file from the host computer and storing the to-be-upgraded file in the to-be-executed area, switching the to-be-executed area to a new execution area, and switching the current execution area to a new to-be-executed area.

[0063] Optionally, the version information of the to-be-upgraded file can be written to the electronic control unit from the host computer, and specifically, the version information of the to-be-upgraded file can be written by using the 2E service. For example, the version information of the to-be-upgraded file is V1.1, and the version information V1.1 is written to the electronic control unit. In addition, the historical upgrade file in the to-be-executed area is deleted, and specifically, the historical upgrade file in the to-be-executed area can be erased by using the 3101FF 00 service.

[0064] Optionally, the version information of the to-be-upgraded file can be written to the electronic control unit from the host computer, and specifically, the version information of the to-be-upgraded file can be written by using the 2E service. For example, the version information of the to-be-upgraded file is V1.1, and the version information V1.1 is written to the electronic control unit. In addition, the historical upgrade file in the to-be-executed area is deleted, and specifically, the historical upgrade file in the to-be-executed area can be erased by using the 3101FF 00 service.

[0065] S105, performing consistency check processing on the to-be-upgraded file in the new execution area, and upgrading the to-be-upgraded file in the new execution area according to the check result.

[0066] Specifically, the to-be-upgraded file in the new execution area is compared with the encrypted and compressed to-be-upgraded file in the host computer to determine the check result of the to-be-upgraded file in the new execution area. After the consistency check on the to-be-upgraded file in the new execution area, the dependency can also be checked, and specifically, the compatibility between the host computer and the electronic control unit is verified. If both the consistency result and the dependency result pass, the to-be-upgraded file in the new execution area can be upgraded.

[0067] Optionally, if either the consistency or the compatibility does not pass, the to-be-upgraded file is not upgraded, and a fault information is output.

[0068] Optionally, after the to-be-upgraded file is upgraded, the electronic control unit is reset through the 1101 service, the electronic control unit is caused to enter the default session through the 1001 service, and then the diagnostic trouble code (DTC) is cleared through the 14 service.

[0069] In this embodiment, the integrity of the processed driver file is checked by downloading the encrypted and compressed driver file from the host computer, the version information of the to-be-upgraded file is written after the integrity check is passed, the historical upgraded file in the to-be-executed area is deleted, the encrypted and compressed to-be-upgraded file is downloaded from the host computer and stored in the to-be-executed area, the to-be-executed area is switched to a new execution area, and the current execution area is switched to a new to-be-executed area. By downloading the encrypted and compressed driver file and the to-be-upgraded file, clear transmission is avoided, the transmission time of data is reduced, and the security is improved. The consistency of the to-be-upgraded file in the new execution area is checked, and the to-be-upgraded file in the new execution area is upgraded according to the check result. The integrity check and the consistency check can ensure that the data is not tampered with during transmission and ensure the consistency of the entire process from transmission to storage. By switching the to-be-executed area to the new execution area and switching the current execution area to the new to-be-executed area, the data copying and writing time is reduced, and the new to-be-executed area contains the encrypted and compressed to-be-upgraded file of the previous version of the to-be-upgraded file, which plays a role in rapid backup.

[0070] Optionally, the switching of the to-be-executed area to the new execution area and the switching of the current execution area to the new to-be-executed area in S104 can include:

[0071] Optionally, the to-be-executed area can be switched to the new execution area and the current execution area can be switched to the new to-be-executed area based on a partition address alternate mapping algorithm. Specifically, the SWAP A / B partition alternate mapping algorithm can be used.

[0072] Optionally, after the consistency of the to-be-upgraded file in the new execution area is checked and the to-be-upgraded file in the new execution area is upgraded according to the check result in S105, the following operations can be included:

[0073] Optionally, if the upgrade fails, it is determined whether to re-upgrade the to-be-upgraded file in the new execution area according to the validity of the to-be-upgraded file in the new execution area.

[0074] Optionally, if the to-be-upgraded file in the new execution area is valid, it is determined to re-upgrade the to-be-upgraded file in the new execution area, and the to-be-upgraded file in the new execution area is re-upgraded; if the to-be-upgraded file is determined to be invalid for the first time, it is determined to be invalid for the second time, and when the number of repeated times reaches a preset maximum number, it is determined that the to-be-upgraded file is invalid, and it is determined not to re-upgrade the to-be-upgraded file in the new execution area, and a rollback strategy needs to be used.

[0075] Specifically, when rolling back, it is necessary to first determine whether the last version of the to-be-upgraded file stored in the new to-be-executed area is valid, and when the number of invalid determinations reaches the maximum, the rollback fails and the upgrade fails; if the last version of the to-be-upgraded file stored in the new to-be-executed area is valid, the rollback is started.

[0076] When rolling back, the addresses of the current new to-be-executed area and the current new execution area are alternately mapped again using the partition alternation mapping algorithm, and the last version of the to-be-upgraded file is stored in the alternated new execution area, and the last version of the to-be-upgraded file in the alternated new execution area can be rolled back. By alternately mapping the addresses of the execution area and the to-be-executed area according to the partition alternation mapping algorithm when rolling back, the to-be-executed area storing the last version of the to-be-upgraded file can be mapped to the execution area, and the rollback function can be realized.

[0077] Optionally, the rollback strategy used in the embodiment is a rollback measurement of double-partition asynchronous start upgrade, which can ensure that the electronic control unit can quickly switch to the backup file that can stably run and perform replacement operation. The double-partition is composed of four parts, including a Bootloader storage area, an application program storage management partition, a to-be-executed area, and an execution area, as shown in FIG. 2.

[0078] Optionally, the Bootloader storage area is used to store the boot program after the controller is powered on; the application program storage management partition is used to store the software attribute information of the execution area and the to-be-executed area; the execution area is used to store the to-be-upgraded file being run; and the to-be-executed area is used to store the last version of the to-be-upgraded file for execution rollback.

[0079] The application program storage management partition stores software attributes, including an execution area enable bit, a to-be-executed area enable bit, a part number of the to-be-upgraded file being run, a part number of the last version of the to-be-upgraded file to be run, a maximum restart attempt threshold, and the like.

[0080] In the embodiment, when the to-be-upgraded file fails to upgrade, an automatic rollback strategy is used to roll back the to-be-upgraded file, which improves the reliability and stability of the system. Compared with the existing backup function that needs to copy data, the rollback realizes the backup function through alternation mapping, without the need for additional copying operations, thereby saving time and resources.

[0081] Optionally, the process that the host computer encrypts and compresses the driver file can include:

[0082] Optionally, the driver file can be encrypted using a preset encryption algorithm and compressed using a preset compression algorithm in the host computer to obtain the driver file after encryption and compression processing. The preset encryption algorithm can be, for example, a chacha20 encryption algorithm, and the preset compression algorithm can be, for example, a DEFLATE compression algorithm.

[0083] FIG. 3 is a flowchart of another software upgrade processing method provided by an embodiment of the present application. As shown in FIG. 3, the process that the host computer encrypts and compresses the driver file can include:

[0084] S201, block the driver file by byte number to obtain a plurality of data blocks.

[0085] For example, the binary data in the driver file can be divided into 64-byte blocks to obtain a plurality of data blocks, wherein each data block contains a plurality of bytes.

[0086] S202, generate a pseudo-random byte stream corresponding to each data block.

[0087] Specifically, for each data block, an initial state matrix and a transformed state matrix are obtained by adding a constant, a key, a counter, and an initial vector.

[0088] The key can be a 256-bit key, which is randomly generated and kept secret; the counter is a 32-bit counter, which usually starts from 0, and the purpose of the counter is to make each data block have a unique input state; the initial vector is a 96-bit initial vector, and a different initial vector is used each time to ensure security. The initial state matrix is a state matrix composed of a constant, a key, a counter, and an initial vector, and is a 512-bit state matrix. The initial state matrix is transformed for multiple rounds to perform odd and even round Quarter Round operations to obtain a transformed state matrix.

[0089] S203, encrypt each data block using the pseudo-random byte stream to obtain an encrypted driver file.

[0090] Specifically, for each data block, the data in the data block is encrypted by performing a byte-by-byte XOR operation using the pseudo-random byte stream corresponding to the data block.

[0091] S204, compress the encrypted driver file to obtain an encrypted and compressed driver file.

[0092] Specifically, the encrypted driver file is compressed using a DEFLATE data compression algorithm. The DEFLATE algorithm effectively reduces data redundancy and improves transmission efficiency by combining LZ77 sliding window algorithm and Huffman coding. The compressed driver file is smaller, reducing transmission time.

[0093] It is worth noting that the encryption and compression process is similar to the process of encrypting and compressing the driver file, which will not be repeated here.

[0094] For example, the file to be upgraded is APPV1.1. After the file to be upgraded is encrypted and compressed, APPV1.1 is downloaded to the execution area of the electronic control unit. If APPV1.1 passes the consistency check and dependency check, it is determined that APPV1.1 is a valid file. Based on the SWAP partition address alternate mapping algorithm, the execution area and the execution area are alternately mapped. Specifically, the execution area is switched to a new execution area, and the current execution area is switched to a new execution area. The new execution area stores APPV1.1, and the new execution area stores APPV1.0. The APPV1.1 in the new execution area is upgraded.

[0095] Optionally, when the APPV1.1 is upgraded, an exception is encountered or the validity of the file does not pass, an automatic rollback strategy is triggered. The automatic rollback strategy is based on the SWAP partition alternate mapping technology to alternately map the execution area and the execution area.

[0096] Optionally, the above S104 based on the partition address alternate mapping algorithm, the execution area is switched to a new execution area, and the current execution area is switched to a new execution area, which can include:

[0097] Optionally, the file to be upgraded in the execution area is checked. If the check passes, the partition address information is updated so that the execution area is switched to a new execution area, and the current execution area is switched to a new execution area.

[0098] Specifically, after the file to be upgraded is downloaded to the execution area of the electronic control unit, the validity of the file to be upgraded in the execution area can be checked. If the validity of the file to be upgraded in the execution area passes, the partition address information is updated.

[0099] Figure 4 is a flowchart of a partition address updating method provided by an embodiment of the application. As shown in Figure 4, the above-mentioned specific process of updating the partition address information can include:

[0100] S301, determining whether the current partition is a standard mapping according to attribute information of the current partition.

[0101] Optionally, before determining whether the current partition is a standard mapping, it is further needed to determine whether a string swap function (SWAP) of the current partition is enabled. If the SWAP is enabled, it is determined whether the current partition is a standard mapping according to attribute information of the current partition. If the SWAP is not enabled, the process ends. The current partition contains an execution area and a standby execution area, and the standby execution area contains a file to be upgraded.

[0102] Optionally, if it is determined that the current partition is a standard mapping, S302 is performed; otherwise, S303 is performed.

[0103] S302, setting attribute information of an execution area of the current partition and attribute information of a standby execution area as alternate mapping, and performing address alternate mapping on the execution area and the standby execution area of the current partition.

[0104] Specifically, the attribute information of the execution area and the attribute information of the standby execution area of the current partition are configured from standard mapping to alternate mapping. This indicates that the standby execution area and the execution area of the current partition can be alternately mapped by swapping addresses, that is, the address of the standby execution area of the current partition is mapped to the address of the execution area, and the address of the execution area of the current partition is mapped to the address of the standby execution area, so that the address of the execution area and the address of the standby execution area of the current partition are alternately mapped.

[0105] For example, if the address of the execution area of the current partition is 0x80600000 and the execution area stores V1.0, the address of the standby execution area is 0x80200000 and the standby execution area stores V1.1, after address alternate mapping, the address of the new standby execution area is 0x80600000 and the new standby execution area stores V1.0, and the address of the new execution area is 0x80200000 and the new execution area stores V1.1.

[0106] S303, performing address alternate mapping on the execution area and the standby execution area of the current partition.

[0107] Optionally, if the attribute information of the execution area and the attribute information of the standby execution area of the current partition are not standard mapping, it indicates that the attribute information of the execution area and the attribute information of the standby execution area of the current partition are alternate mapping at this time, so that the execution area and the standby execution area of the current partition can be directly alternately mapped by addresses without further configuration of attribute information.

[0108] In the embodiment, by configuring the attribute information of the to-be-executed area and the executed area in the current partition, the accuracy and the speed of the partition alternate mapping can be ensured by configuring the alternate mapping to perform the mapping according to the configured attribute information when the partition alternate mapping is performed.

[0109] Fig. 5 is a flow diagram of another software upgrade processing method provided by the embodiment of the application. As shown in Fig. 5, before the encrypted and compressed driver file is downloaded from the host computer, the above-mentioned method can include the following steps:

[0110] S401, determining whether the electronic control unit enters an extended session mode.

[0111] Optionally, when the electronic control unit enters the extended session mode, it indicates that the electronic control unit can enter the network preparation condition before the upgrade of the to-be-upgraded file at this time, and the following S402 is executed. When the electronic control unit does not enter the extended session mode, it indicates that the network preparation condition before the upgrade has not been entered at this time, and the process ends.

[0112] S402, determining whether the electronic control unit satisfies the pre-condition before the upgrade.

[0113] The pre-condition before the upgrade refers to checking whether the vehicle speed information and the like of the vehicle in which the electronic control unit is arranged satisfy the upgrade condition. If the pre-condition before the upgrade is satisfied, the following S403 is executed. Otherwise, the process ends.

[0114] S403, stopping the recording function and the network message function of the electronic control unit, and reading the current version information of the electronic control unit.

[0115] S404, determining whether the current version information is consistent with the version information of the to-be-upgraded file.

[0116] If the current version information is not consistent with the version information of the to-be-upgraded file, the following S405 is executed. If the current version information is consistent with the version information of the to-be-upgraded file, the process ends.

[0117] S405, entering an encoding mode and upgrading the to-be-upgraded file.

[0118] The embodiment of the application further provides a vehicle, which comprises an electronic control unit.

[0119] The embodiment of the application further provides a software upgrade processing system, which can comprise a host computer and a vehicle, and the vehicle comprises an electronic control unit.

[0120] The embodiment of the application further provides a computer readable storage medium, which stores a computer program. When the computer program is run by a processor, the method steps in the software upgrade processing method of the multi-core microprocessor are executed.​​​​​​​​​​​​

[0121] Those skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working process of the system and device described above can refer to the corresponding process in the method embodiment, and will not be repeated in the present application. In the several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented by other means. The above-described device embodiments are only schematic, for example, the division of the modules is only a logical function division, and the actual implementation can have another division manner, for example, a plurality of modules or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the shown or discussed mutual elements can be indirect coupling or communication connection through some communication interface, device or module, which can be electrical, mechanical or other forms.

[0122] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. When the functions are realized in the form of software functional units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or say the parts that make contributions to the prior art or parts of the technical solutions can be embodied in the form of software products, which are stored in a storage medium and include a number of instructions for making a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in each embodiment of the present application. The foregoing storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk, and various program code storage media.

[0123] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application.

Claims

1. A method of software upgrade processing for a multi-core microprocessor, the method comprising: An electronic control unit applied to a vehicle, the method comprising: downloading an encrypted and compressed driver file from a host computer; performing integrity verification on the processed driver file, and if the integrity verification passes, writing the version information of the to-be-upgraded file and deleting the historical upgrade file in the to-be-executed area; downloading the encrypted and compressed to-be-upgraded file from the host computer and storing the to-be-upgraded file in the to-be-executed area, switching the to-be-executed area to a new execution area, and switching the current execution area to a new to-be-executed area, wherein the current execution area stores the encrypted and compressed to-be-upgraded file of the previous version of the to-be-upgraded file; performing consistency verification processing on the to-be-upgraded file in the new execution area, and upgrading the to-be-upgraded file in the new execution area according to the verification result.

2. The multi-core microprocessor software upgrade processing method of claim 1, wherein, The switching of the to-be-executed area to the new execution area and the switching of the current execution area to the new to-be-executed area comprises: switching the to-be-executed area to the new execution area and switching the current execution area to the new to-be-executed area based on a partition address alternate mapping algorithm.

3. The multi-core microprocessor software upgrade processing method of claim 1, wherein, After the consistency verification processing on the to-be-upgraded file in the new execution area and the upgrading of the to-be-upgraded file in the new execution area according to the verification result, it comprises: if the upgrade fails, determining whether to re-upgrade the to-be-upgraded file in the new execution area according to the validity of the to-be-upgraded file in the new execution area; if yes, re-upgrading the to-be-upgraded file in the new execution area; otherwise, re-upgrading the to-be-upgraded file in the new execution area using a rollback strategy.

4. The multi-core microprocessor software upgrade processing method of claim 1, wherein, The process of the host computer performing encrypted and compressed processing on the driver file comprises: encrypting the driver file using a preset encryption algorithm in the host computer, and compressing the encrypted driver file using a preset compression algorithm to obtain the encrypted and compressed driver file.

5. The multi-core microprocessor software upgrade processing method of claim 3, wherein, The process of the host computer performing encrypted and compressed processing on the driver file comprises: blocking the driver file by byte number to obtain a plurality of data blocks; generating a pseudo-random byte stream corresponding to each data block; encrypting each data block through the pseudo-random byte stream to obtain an encrypted driver file; compressing the encrypted driver file to obtain an encrypted and compressed driver file.

6. The multi-core microprocessor software upgrade processing method of claim 2, wherein, The switching of the to-be-executed area to the new execution area and the switching of the current execution area to the new to-be-executed area based on the partition address alternate mapping algorithm comprises: verifying the to-be-upgraded file in the to-be-executed area, and if the verification passes, updating the partition address information to switch the to-be-executed area to the new execution area and the current execution area to the new to-be-executed area.

7. The multi-core microprocessor software upgrade processing method of claim 6, wherein, The updating of the partition address information comprises: According to attribute information of the current partition, it is determined whether the current partition is a standard mapping, if yes, attribute information of an execution area and attribute information of a to-be-executed area of the current partition are set as an alternate mapping, and the execution area and the to-be-executed area of the current partition are subjected to address alternate mapping; If not, the execution area and the to-be-executed area of the current partition are subjected to address alternate mapping.

8. The multi-core microprocessor software upgrade processing method of claim 1, wherein, Before downloading the encrypted and compressed driver file from the upper computer, the method comprises: It is determined whether the electronic control unit enters an extended session mode; If yes, it is determined whether the electronic control unit satisfies a precondition before upgrading; If yes, the recording function and the network message function of the electronic control unit are stopped, current version information in the electronic control unit is read, and it is determined whether the current version information is consistent with version information of the to-be-upgraded file; If the current version information is not consistent with the version information of the to-be-upgraded file, an encoding mode is entered and the to-be-upgraded file is upgraded.

9. A vehicle characterized by comprising: The electronic control unit is used to execute the method steps in any one of claims 1-8.

10. A software upgrade processing system characterized by comprising: The method comprises: The upper computer and the vehicle in claim 9, and the vehicle comprises the electronic control unit. The electronic control unit is used to execute the method steps in any one of claims 1-8.

Citation Information

Patent Citations

  • Software upgrading method, vehicle and computer readable storage medium

    CN113805926A

  • OTA upgrade package generation method and device, equipment and storage medium

    CN117251194A

  • Application program upgrading method and electronic equipment

    CN117539518A

  • Multi-core microprocessor software upgrading processing method, vehicle and system

    CN119105780A

  • Vehicle-mounted device upgrade method and related device

    US20200264864A1