Application program upgrading method, storage medium, vehicle control equipment and vehicle
By using a heterogeneous SOC application upgrade method, the application is executed during the upgrade process using the A core and SRAM, which solves the problem of needing external tools for upgrades in existing technologies, achieves seamless upgrades, and improves user experience and efficiency.
Patent Information
- Application Number
- CN202410867671.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2025-12-30
AI Technical Summary
In existing technologies, application upgrades require external flashing tools, which cannot achieve seamless upgrades and result in a poor user experience.
An application upgrade method based on heterogeneous SOC is adopted. The upgrade package is obtained from the cloud server through the A core, the application is executed using SRAM and written to external memory, while the M core continues to execute the application, thus achieving seamless upgrade.
During the application upgrade process, users do not need to interrupt their use, which improves the user experience and enhances upgrade efficiency and security.
Smart Images

Figure CN121233136A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of application program upgrading, and in particular to an application program upgrading method, a storage medium, a vehicle control device and a vehicle. BACKGROUND
[0002] With the rapid development of electrification and intelligentization of devices such as automobiles, controllers are increasingly used, and the corresponding application programs of the controllers are also increasing, and upgrading the application programs is an iterative step in the use of the application programs.
[0003] In the related art, a Bootloader software module is generally used to guide the upgrading, specifically including two parts of software: one part is an embedded software based on an MCU (Microcontroller Unit), and the other part is a download tool running on a PC (Personal Computer). Among them, the embedded software part of the MCU is Bootloader, which is a software running on the MCU. When the application program is lost or needs to be upgraded, the Bootloader communicates with the download tool to download the application program into the M core, and the flashing tool running on the PC. The user needs to open the flashing tool, load the application program, click the start button, and wait for the download to complete to complete the download and update of the application program.
[0004] In the related art, the upgrading of the application program needs to rely on external flashing tools, and the application program needs to be stopped during the upgrading process, which cannot realize no-sense upgrading, and the user experience is poor. SUMMARY
[0005] The present application aims to at least solve one of the technical problems in the related art. To this end, the first object of the present application is to propose an application program upgrading method based on a heterogeneous SOC (System on Chip), which can execute the application program of the controller while upgrading the application program of the controller, realize no-sense upgrading, and does not need external flashing tools, greatly improving the user experience.
[0006] The second object of the present application is to propose a computer-readable storage medium.
[0007] The third object of the present application is to propose a vehicle control device.
[0008] The fourth object of the present application is to propose a vehicle.
[0009] To achieve the above object, the embodiment of the first aspect of the present application provides a kind of application program upgrading method based on heterogeneous SOC, the heterogeneous SOC includes M core, A core and SRAM (Static Random Access Memory, static random access memory), the heterogeneous SOC is connected with cloud server and external memory respectively, the external memory is used to store the application program of the M core, the SRAM is used to execute the application program of the M core, the upgrading method includes: the application program upgrade package of the M core is obtained from the cloud server by the A core;The application program upgrade package of the M core is sent to the SRAM and the application program of the M core in the external memory is erased, so that the SRAM writes the application program upgrade package into the external memory, and the SRAM also runs the application program of the M core according to the execution instruction of the M core.ECU is powered on, and M core will move the execution program from Flash to the Sram area in SOC to execute, and in the upgrading process, update FLASH and M core running mutual interference, and ECU module can be realized without interruption.
[0010] The application program upgrading method of the embodiment is based on heterogeneous SOC, wherein the heterogeneous SOC includes M core, A core and SRAM, and the heterogeneous SOC is also connected with cloud server and external memory, the external memory stores the application program of the M core, and the SRAM can be used to execute the application program of the M core. The upgrading method first obtains the application program upgrade package of the M core from the cloud server through the A core, then the M core can send the application program upgrade package to the SRAM and erase the M core application program in the external memory, so that the M core can write the application program upgrade package into the external memory for upgrading the application program, and the M core can also execute the application program stored in the SRAM, so that the application program of the controller can be executed while the application program of the controller is upgraded, the upgrading is realized without feeling, without external writing tool, and the user's use experience is greatly improved.
[0011] In some embodiments of the present application, the SRAM includes a plurality of storage areas, wherein one storage area of the SRAM is used to store the application program upgrade package, and another storage area of the SRAM is used to copy the application program of the M core stored in the external memory when the execution instruction of the M core is received.
[0012] In some embodiments of the present application, the external memory also stores the application program backup of the M core, and the application program backup of the M core is the corresponding application program before the application program of the M core in the external memory is not upgraded.
[0013] In some embodiments of the present invention, the M core and the A core communicate with each other through an IPC communication mechanism.
[0014] In some embodiments of the present invention, the upgrade method further includes: after the A core obtains the application upgrade package of the M core, encrypting the application upgrade package, and sending the encrypted application upgrade package to the M core through the IPC (Inter Process Communication) communication mechanism.
[0015] In some embodiments of the present invention, the upgrade method further includes: after obtaining the encrypted application upgrade package, decrypting the application upgrade package, and sending the decrypted application upgrade package to the SRAM.
[0016] In some embodiments of the present invention, the encryption algorithm of the application upgrade package includes the AES encryption algorithm.
[0017] To achieve the above objectives, a second aspect of the present invention provides a computer-readable storage medium comprising an application upgrade program based on a heterogeneous SOC, wherein when the application upgrade program is executed by a processor, it implements the application upgrade method based on a heterogeneous SOC as described in any of the above embodiments.
[0018] In this embodiment of the invention, the computer-readable storage medium can implement the application upgrade method based on heterogeneous SOC in the above embodiment when the processor executes the application upgrade program stored thereon. This allows the application of the controller to be executed at the same time as the application of the controller is being upgraded, achieving seamless upgrade without the need for external flashing tools, which greatly improves the user experience.
[0019] To achieve the above objectives, a third aspect of the present invention provides a vehicle control device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. The processor executes the computer program to implement the application upgrade method based on heterogeneous SOC as described in any of the above embodiments.
[0020] The vehicle control device of this invention includes a memory and a processor. When the processor executes the application upgrade program stored in the memory, it implements the application upgrade method based on heterogeneous SOC in the above embodiments. This enables the application of the controller to be executed while the application of the controller is being upgraded, achieving seamless upgrade without the need for external flashing tools, which greatly improves the user experience.
[0021] To achieve the above objectives, a fourth aspect of the present invention provides a vehicle, the vehicle including the vehicle control device described in the above embodiments.
[0022] The vehicle of this invention, through the vehicle control device described above, can execute the controller's application while upgrading the controller's application, achieving seamless upgrades without the need for external flashing tools, thus greatly improving the user experience.
[0023] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0024] Figure 1 This is a schematic diagram of the structure of a heterogeneous SOC in one embodiment of the present invention;
[0025] Figure 2 This is a flowchart of an application upgrade method based on a heterogeneous SOC in one embodiment of the present invention;
[0026] Figure 3 This is a structural block diagram of the vehicle control device in an embodiment of the present invention;
[0027] Figure 4 This is a structural block diagram of the vehicle in an embodiment of the present invention. Detailed Implementation
[0028] Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain the present invention, and should not be construed as limiting the present invention.
[0029] The following description, with reference to the accompanying drawings, describes an application upgrade method, a storage medium, a vehicle control device, and a vehicle according to embodiments of the present invention.
[0030] Figure 1 This is a schematic diagram of the structure of a heterogeneous SOC in one embodiment of the present invention, as shown below. Figure 1 As shown, the heterogeneous SOC includes an M-core, an A-core, and SRAM. The heterogeneous SOC is connected to a cloud server (not shown in the figure) and external storage, respectively. Specifically, the application upgrade method in this embodiment can upgrade the application for the M-core. It should be noted that applications for other processing cores, such as the A-core, can also be adapted to this embodiment. Specifically, the external storage can be used to store the application for the M-core, while the SRAM can be used to store the application executing the M-core. It is understood that the applications stored in the external storage and SRAM can be the same or different.
[0031] Figure 2 This is a flowchart of an application upgrade method based on a heterogeneous SOC in one embodiment of the present invention.
[0032] like Figure 2 As shown, this invention proposes an application upgrade method based on heterogeneous SOC, which includes the following steps:
[0033] S10 obtains application upgrade packages for the M core from the cloud server via the A core.
[0034] S20 sends the application upgrade package of the M core to the SRAM and erases the application of the M core in the external memory, so that the SRAM writes the application upgrade package into the external memory. At the same time, the SRAM also runs the application of the M core according to the execution instructions of the M core.
[0035] Specifically, during the application upgrade process, developers typically upload the application upgrade code to a cloud server, which users can then download. In this embodiment, the application to be upgraded can be an M-core application. First, the A-core retrieves the application upgrade package for the M-core from the cloud server. This upgrade package usually includes multiple packages; the A-core retrieves one or more packages at a time and then transmits them to the M-core. Upon receiving the upgrade package, the M-core can first send it to the SRAM and can also erase the area in external memory where the M-core application is stored. The SRAM can then write the received upgrade package to external memory. It should be noted that the SRAM can receive the upgrade package sent by the M-core all at once, meaning the SRAM has a larger data receiving capacity, thus improving upgrade efficiency.
[0036] During the process of the SRAM receiving the application upgrade package sent by the M core and writing it to external memory, the SRAM can also receive execution instructions sent by the M core and execute the M core's application to achieve the corresponding function. It should be noted that the M core can work in a multi-threaded manner, and the SRAM also has multiple storage areas, thus not affecting the updating and running of the M core's application; both can be executed simultaneously. More specifically, the SRAM includes multiple storage areas, one of which is used to store the application upgrade package, and another storage area is used to copy the M core's application from external memory when execution instructions are received from the M core. Of course, the SRAM can also include other areas for storing other programs; this embodiment does not specifically limit this.
[0037] In some embodiments of the present invention, the external memory also stores an application backup of the M-core, which is the application corresponding to the application of the M-core in the external memory before it was upgraded.
[0038] Specifically, such as Figure 1 As shown, the external memory can include two storage areas, both of which can be used to store the complete application of the M-core. One area is used for backup, and the application stored in the backup storage area can be the application corresponding to the M-core in the other storage area before the upgrade. For example, when erasing the M-core application stored in the other storage area of the external memory, the application stored in that storage area can be copied to the backup area first, and then the application code in the other storage area can be erased and written to complete the application update. Since the SRAM needs to read the application code stored in the external memory before executing the M-core application, if the SRAM cannot read the complete application code after erasing the application stored in the other storage area of the external memory, it can read the application code stored in the backup area and then run the code. Of course, if the SRAM can normally read the complete application code from the other storage area of the SRAM, it can read it directly without reading the application code stored in the backup area. In other examples, the SRAM can also be configured to only read the application code in the backup area. In some examples, the M-core in this embodiment can be an S32G chip.
[0039] In this embodiment, the M core and the A core communicate with each other via the IPC communication mechanism.
[0040] Specifically, to improve application upgrade efficiency and complete the upgrade without the user's notice, this embodiment further specifies that the M core and A core communicate via IPC using an IPC communication mechanism. Since the IPC communication mechanism uses a proprietary protocol, it achieves more than 10 times the flashing efficiency compared to the traditional CAN UDS protocol, and the application upgrade package is transmitted with encryption throughout the process, enabling secure flashing.
[0041] In this embodiment, the application upgrade method further includes: after core A obtains the application upgrade package from core M, encrypting the application upgrade package and sending the encrypted application upgrade package to core M via an IPC communication mechanism. After core M obtains the encrypted application upgrade package, decrypting the application upgrade package and sending the decrypted application upgrade package to SRAM.
[0042] Specifically, after obtaining the application upgrade package, core A encrypts it, and core M decrypts it upon receiving the encrypted package, thus enabling secure application flashing and improving the success rate. More specifically, in this embodiment, the encryption algorithm for the application upgrade package may include the AES encryption algorithm. Optionally, this encryption algorithm may be AES (Advanced Encryption Standard, symmetric encryption algorithm) 128, AES 192, AES 256, etc.
[0043] It should be noted that different commands can represent different operations during communication between core A and core M. See Table 1 for details. When core A sends 0x10 to core M, it indicates the start of an update. This command carries data such as the number of upgrade blocks in the application and the total size of the application. When core A sends 0x20 to core M, it indicates the starting block in the application. This command carries data such as the address of the starting block and the total number of upgrade packages. When core A sends 0x21 to core M, it indicates the upgrade block in the application. This command carries data such as the sequence number of the upgrade package to ensure the upgrade code is written in the correct order. When core A sends 0x22 to core M, it indicates the ending block in the application. This command carries data such as a cyclic redundancy check (CRC) procedure for all data in the entire block to verify the data and further improve the upgrade success rate. When core A sends 0x3F to core M, it indicates the application upgrade is complete.
[0044] Table 1
[0045]
[0046] In summary, the application upgrade method based on heterogeneous SOC in this embodiment of the invention can execute the controller's application while upgrading the controller's application. It has a high upgrade speed, achieves seamless upgrade, and does not require external flashing tools, greatly improving the user experience.
[0047] Furthermore, the present invention proposes a computer-readable storage medium comprising an application upgrade program based on a heterogeneous SOC. When the application upgrade program is executed by a processor, it implements the application upgrade method based on a heterogeneous SOC according to any of the above embodiments.
[0048] In this embodiment of the invention, the computer-readable storage medium can implement the application upgrade method based on heterogeneous SOC in the above embodiment when the processor executes the application upgrade program stored thereon. This allows the application of the controller to be executed at the same time as the application of the controller is being upgraded, achieving seamless upgrade without the need for external flashing tools, which greatly improves the user experience.
[0049] Figure 3 This is a structural block diagram of the vehicle control device in an embodiment of the present invention.
[0050] Furthermore, such as Figure 3 As shown, the present invention proposes a vehicle control device 100, which includes a memory 101, a processor 102, and a computer program stored in the memory 101 and executable on the processor 102. The processor 102 executes the computer program to implement the application upgrade method based on heterogeneous SOC in any of the above embodiments.
[0051] The vehicle control device of this invention includes a memory and a processor. When the processor executes the application upgrade program stored in the memory, it implements the application upgrade method based on heterogeneous SOC in the above embodiments. This allows the application of the controller to be executed while the application of the controller is being upgraded, ensuring that the vehicle's ECU (Electronic Control Unit) can be used normally and achieving seamless upgrade without the need for external flashing tools, which greatly improves the user experience.
[0052] Figure 4 This is a structural block diagram of the vehicle in an embodiment of the present invention.
[0053] Furthermore, such as Figure 4 As shown, the present invention proposes a vehicle 200, which includes the vehicle control device 100 of the above embodiment.
[0054] The vehicle in this embodiment of the invention, through the vehicle control device described above, can execute the controller's application while upgrading the controller's application, ensuring that the vehicle's ECU can be used normally and achieving seamless upgrades without the need for external flashing tools, greatly improving the user experience.
[0055] Furthermore, other components and functions of the vehicle in the embodiments of the present invention are known to those skilled in the art, and will not be described in detail here to reduce redundancy.
[0056] It should be noted that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.
[0057] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0058] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0059] In the description of this invention, it should be understood that the terms "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," "clockwise," "counterclockwise," "axial," "radial," and "circumferential" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing this invention and simplifying the description, and are not intended to indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.
[0060] Furthermore, the terms "first," "second," etc., used in the embodiments of this invention are for descriptive purposes only and should not be construed as indicating or implying relative importance, or implicitly specifying the number of technical features indicated in this embodiment. Therefore, features defined with terms such as "first" and "second" in the embodiments of this invention can explicitly or implicitly indicate that the embodiment includes at least one of those features. In the description of this invention, the word "multiple" means at least two or more, such as two, three, four, etc., unless otherwise explicitly specified in the embodiments.
[0061] In this invention, unless otherwise explicitly specified or limited in the embodiments, the terms "installation," "connection," "joining," and "fixing" appearing in the embodiments should be interpreted broadly. For example, a connection can be a fixed connection, a detachable connection, or an integral part; it can also be a mechanical connection, an electrical connection, etc. Of course, it can also be a direct connection, or an indirect connection through an intermediate medium, or it can be the internal communication of two components, or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific implementation.
[0062] In this invention, unless otherwise explicitly specified and limited, "above" or "below" the second feature can mean that the first feature is in direct contact with the second feature, or that the first feature is in indirect contact with the second feature through an intermediate medium. Furthermore, "above," "over," and "on top" of the second feature can mean that the first feature is directly above or diagonally above the second feature, or simply that the first feature is at a higher horizontal level than the second feature. "Below," "below," and "under" the second feature can mean that the first feature is directly below or diagonally below the second feature, or simply that the first feature is at a lower horizontal level than the second feature.
[0063] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
Claims
1. A method for application upgrade based on heterogeneous SOC, characterized in that, The heterogeneous SOC includes an M core, an A core and an SRAM, the heterogeneous SOC is connected with a cloud server and an external memory respectively, the external memory is used for storing an application program of the M core, the SRAM is used for executing the application program of the M core, and the upgrading method comprises: obtaining, by the A core, an application program upgrade package of the M core from the cloud server; sending the application program upgrade package of the M core to the SRAM and erasing the application program of the M core in the external memory, so that the SRAM writes the application program upgrade package into the external memory, and the SRAM also runs the application program of the M core according to an execution instruction of the M core.
2. The application upgrade method of claim 1, wherein, The SRAM includes a plurality of storage areas, wherein one storage area of the SRAM is used for storing the application program upgrade package, and another storage area of the SRAM is used for copying the application program of the M core in the external memory when receiving the execution instruction of the M core.
3. The application upgrade method according to any one of claims 1-2, wherein, The external memory also stores an application program backup of the M core, and the application program backup of the M core corresponds to an application program of the M core before the application program is upgraded.
4. The application upgrade method according to any one of claims 1 to 3, characterized by, The M core and the A core are connected through an IPC communication mechanism.
5. The application upgrade method according to any one of claims 1 to 4, wherein The upgrading method further comprises: after the A core obtains the application program upgrade package of the M core, performing encryption processing on the application program upgrade package, and sending the encrypted application program upgrade package to the M core through the IPC communication mechanism.
6. The application upgrade method of claim 5, wherein, The upgrading method further comprises: after obtaining the encrypted application program upgrade package, performing decryption processing on the application program upgrade package, and sending the decrypted application program upgrade package to the SRAM.
7. The application upgrade method according to claim 5 or 6, wherein The encryption algorithm of the application program upgrade package includes an AES encryption algorithm.
8. A computer-readable storage medium, characterized in that, The application program upgrade procedure based on the heterogeneous SOC is executed by a processor, and the application program upgrade method based on the heterogeneous SOC in any one of claims 1-7 is realized.
9. A vehicle control apparatus characterized by comprising: The memory, the processor and the computer program stored on the memory and executable on the processor are included, the processor executes the computer program, and the application program upgrade method based on the heterogeneous SOC in any one of claims 1-7 is realized.
10. A vehicle characterized by comprising: The vehicle includes the vehicle control device in claim 9.