A vehicle-mounted software upgrading method and device, electronic equipment and storage medium
By constructing and partitioning a memory-based in-vehicle software upgrade method, and combining identity field configuration and integrity verification, the problems of low upgrade efficiency, high cost, and high error rate in existing technologies are solved, achieving efficient and low-cost in-vehicle software upgrades.
Patent Information
- Application Number
- CN202411873218.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2044-12-18
AI Technical Summary
Existing in-vehicle software upgrade methods suffer from low upgrade efficiency, high cost, poor upgrade results, and a high probability of errors. In particular, the time limit for flashing prevents the addition of verification processes, making it impossible to achieve detailed differentiation.
By constructing a first bootloader, a second bootloader, an executable vehicle software program, and a backup program, and by allocating memory and configuring identity fields, a detailed upgrade process control and integrity verification is carried out. This includes memory allocation, identity field configuration, data packet backup and comparison, anomaly detection, and rollback operations, ensuring the accuracy and efficiency of the upgrade process.
It improves the efficiency of vehicle software upgrades, simplifies the upgrade process, reduces the probability of errors and costs, enhances the upgrade effect, and enables detailed differentiation and verification during the flashing process.
Smart Images

Figure CN119806583B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of vehicle software upgrade technology, and more specifically, to a vehicle software upgrade method, apparatus, electronic device, and storage medium. Background Technology
[0002] The upgrade method for in-vehicle software is usually achieved through the upgrade process itself. For example, a verification step is added to the Over-the-Air Technology (OTA) process to verify whether the flashed file is correct. Specifically, when flashing the corresponding bin file in the OTA process, the part number carried in the bin file is verified first. The upgrade is only performed when the part number is correct.
[0003] However, existing in-vehicle software upgrade methods have many drawbacks. Due to the limited flashing time, it is impossible to add too many verification processes. Furthermore, verifying all parameters would increase memory usage and costs, making it impossible to make detailed distinctions in the flashing process. However, verifying only one or a few parameters is not enough, which would lead to incorrect upgrades or poor upgrade results and low upgrade efficiency. Summary of the Invention
[0004] The purpose of this application is to provide a method, apparatus, electronic device, and storage medium for upgrading vehicle software, which can improve the efficiency of vehicle software upgrades, simplify the upgrade process, perform detailed differentiation of vehicle software during the flashing process, improve the upgrade effect of vehicle software, reduce the probability of errors, and reduce the cost of vehicle software upgrades.
[0005] In a first aspect, embodiments of this application provide a method for upgrading in-vehicle software, the method comprising:
[0006] Build a first bootloader, a second bootloader, an executable vehicle software program, and a backup program;
[0007] The second boot program is started according to the first boot program;
[0008] The vehicle software is updated according to the second boot program after startup, resulting in a first data packet;
[0009] The first data packet is stored according to the backup program to obtain the second data packet;
[0010] The second boot program, after startup, performs integrity verification on the second data packet to upgrade the vehicle software.
[0011] In the above implementation process, the vehicle software is adaptively upgraded based on the constructed first boot program, second boot program, executable vehicle software program and backup program, and the integrity of the upgraded vehicle software is verified. This can improve the upgrade efficiency of vehicle software, simplify the upgrade process, and make detailed distinctions between vehicle software during the flashing process, thereby improving the upgrade effect of vehicle software, reducing the probability of errors, and reducing the cost of vehicle software upgrade.
[0012] Furthermore, the steps of constructing the first bootloader, the second bootloader, the executable vehicle software program, and the backup program include:
[0013] The memory of the vehicle software is divided into a first memory, a second memory, a third memory, and a fourth memory.
[0014] The first bootloader, the second bootloader, the executable vehicle software program, and the backup program are respectively constructed in the first memory, the second memory, the third memory, and the fourth memory.
[0015] In the above implementation process, the first boot program, the second boot program, the executable vehicle software program and the backup program are built in the first memory, the second memory, the third memory and the fourth memory respectively, which can refine the vehicle software flashing process and improve the upgrade effect.
[0016] Furthermore, the step of constructing the second bootloader, the executable vehicle software program, and the backup program in the second memory, the third memory, and the fourth memory respectively further includes:
[0017] Obtain user usage requirements;
[0018] Configure the identity fields according to usage requirements;
[0019] The identity field is allocated to the second memory, the third memory, and the fourth memory to obtain the second memory identity field, the third memory identity field, and the fourth memory identity field. The second memory identity field, the third memory identity field, and the fourth memory identity field change with the second boot program, the executable vehicle software program, and the backup program, respectively.
[0020] In the above implementation process, the identity field is configured according to the usage requirements and allocated to the second memory, third memory and fourth memory. This allows for timely verification of parameter information in the vehicle software during the vehicle software update and upgrade process, ensuring the effectiveness of the upgrade.
[0021] Further, the step of updating the vehicle software according to the second bootloader after startup to obtain the first data packet includes:
[0022] The third data packet in the executable vehicle software program is backed up to the backup program, and the third memory identity field is updated;
[0023] The vehicle software is updated according to the second boot program after startup, resulting in a fourth data packet;
[0024] Compare the updated third memory identity field with the current fourth memory identity field to determine if the comparison result meets expectations;
[0025] If so, the fourth data packet is determined to be the first data packet.
[0026] In the above implementation process, the vehicle software is updated according to the second boot program after startup, and the updated third memory identity field is compared with the current fourth memory identity field. This can promptly confirm the accuracy of the parameter information in the identity field, avoid errors during the upgrade process, and improve upgrade efficiency.
[0027] Furthermore, after the step of storing the first data packet according to the backup program to obtain the second data packet, the method further includes:
[0028] Upgrade the executable vehicle software program and determine if there are any anomalies during the upgrade process;
[0029] If so, roll back the third data packet to the executable vehicle software program.
[0030] In the above implementation process, the executable vehicle software program is upgraded to improve the efficiency of upgrading the vehicle software, reduce errors in the upgrade process, and avoid upgrade anomalies during the vehicle software upgrade process.
[0031] Furthermore, prior to the step of rolling back the third data packet to the executable vehicle software program, the method further includes:
[0032] Determine whether the current fourth memory identity field in the backup program is correct;
[0033] If not, perform a rollback operation.
[0034] In the above implementation process, when the current fourth memory identity field in the backup program is incorrect, a rollback operation is performed to facilitate the re-upgrade of the vehicle software, reduce the probability of upgrade errors, and improve upgrade efficiency.
[0035] Furthermore, the step of upgrading the in-vehicle software further includes testing the in-vehicle software:
[0036] Obtain the identity field corresponding to the second data packet;
[0037] Extract the configuration information from the identity field;
[0038] The configuration information is parsed based on the test service information to perform testing on the vehicle software.
[0039] In the above implementation process, the configuration information in the identity field corresponding to the second data packet is extracted for testing of the vehicle software, which can quickly distinguish the different versions of the vehicle software and facilitate the external distribution of the vehicle software.
[0040] Secondly, embodiments of this application also provide an in-vehicle software upgrade device, the device comprising:
[0041] The building module is used to build the first bootloader, the second bootloader, the executable vehicle software program, and the backup program;
[0042] A startup module is used to start the second boot program according to the first boot program;
[0043] The update module is used to update the vehicle software according to the second boot program after startup, and obtain the first data packet;
[0044] The backup module is used to store the first data packet according to the backup program to obtain the second data packet;
[0045] The integrity verification module is used to perform integrity verification on the second data packet according to the second boot program after startup, so as to realize the vehicle software upgrade.
[0046] In the above implementation process, the vehicle software is adaptively upgraded based on the constructed first boot program, second boot program, executable vehicle software program and backup program, and the integrity of the upgraded vehicle software is verified. This can improve the upgrade efficiency of vehicle software, simplify the upgrade process, and make detailed distinctions between vehicle software during the flashing process, thereby improving the upgrade effect of vehicle software, reducing the probability of errors, and reducing the cost of vehicle software upgrade.
[0047] Thirdly, an electronic device provided in this application includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method as described in any of the first aspects.
[0048] Fourthly, embodiments of this application provide a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the method described in any of the first aspects.
[0049] Other features and advantages of this disclosure will be set forth in the following description, or some features and advantages may be inferred from the description or determined without doubt, or may be learned by practicing the techniques described above.
[0050] It can be implemented in accordance with the contents of the specification. The preferred embodiments of this application are described in detail below with reference to the accompanying drawings. Attached Figure Description
[0051] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation on the range. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0052] Figure 1 A flowchart illustrating the vehicle software upgrade method provided in this application embodiment;
[0053] Figure 2 This is a schematic diagram of the structural composition of the vehicle software upgrade device provided in the embodiments of this application;
[0054] Figure 3 This is a schematic diagram of the structural composition of the electronic device provided in the embodiments of this application. Detailed Implementation
[0055] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.
[0056] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this application, terms such as "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0057] The specific embodiments of this application will be described in further detail below with reference to the accompanying drawings and examples. The following examples are used to illustrate this application, but are not intended to limit the scope of this application.
[0058] Example 1
[0059] Figure 1 This is a flowchart illustrating the in-vehicle software upgrade method provided in an embodiment of this application, as shown below. Figure 1 As shown, the method includes:
[0060] S1, build the first bootloader, the second bootloader, the executable vehicle software program, and the backup program;
[0061] S2, Start the second boot program according to the first boot program;
[0062] S3, update the vehicle software according to the second boot program after startup, and obtain the first data packet;
[0063] S4, the first data packet is stored according to the backup program to obtain the second data packet;
[0064] S5 performs integrity verification on the second data packet based on the second boot program after startup, thereby upgrading the vehicle software.
[0065] In the above implementation process, the vehicle software is adaptively upgraded based on the constructed first boot program, second boot program, executable vehicle software program and backup program, and the integrity of the upgraded vehicle software is verified. This can improve the upgrade efficiency of vehicle software, simplify the upgrade process, and make detailed distinctions between vehicle software during the flashing process, thereby improving the upgrade effect of vehicle software, reducing the probability of errors, and reducing the cost of vehicle software upgrade.
[0066] Furthermore, S1 includes:
[0067] The memory of the in-vehicle software is divided into first memory, second memory, third memory, and fourth memory.
[0068] The first bootloader, the second bootloader, the executable vehicle software program, and the backup program are respectively built in the first memory, the second memory, the third memory, and the fourth memory.
[0069] In the above implementation process, the first boot program, the second boot program, the executable vehicle software program and the backup program are built in the first memory, the second memory, the third memory and the fourth memory respectively, which can refine the vehicle software flashing process and improve the upgrade effect.
[0070] To improve upgrade efficiency, this embodiment of the application re-divides the memory of the entire vehicle software into four parts, corresponding to the first memory, the second memory, the third memory, and the fourth memory, respectively. The first memory corresponds to the first boot program, which is used to upgrade the second boot program when the software starts.
[0071] The second bootloader plays a crucial role in upgrading executable vehicle software programs, backup programs, and so on.
[0072] In this application embodiment, the first boot program and the second boot program are boot loading programs, the executable vehicle software program is the executable App program, the purpose of the vehicle software upgrade is to update the executable vehicle software program, and the backup program is the backup App program.
[0073] Furthermore, the steps of constructing the second bootloader, the executable vehicle software program, and the backup program in the second memory, the third memory, and the fourth memory respectively also include:
[0074] Obtain user usage requirements;
[0075] Configure the identity fields according to usage requirements;
[0076] The identity field is allocated to the second memory, the third memory, and the fourth memory, resulting in the second memory identity field, the third memory identity field, and the fourth memory identity field. The second memory identity field, the third memory identity field, and the fourth memory identity field change with the second boot program, the executable vehicle software program, and the backup program, respectively.
[0077] In the above implementation process, the identity field is configured according to the usage requirements and allocated to the second memory, third memory and fourth memory. This allows for timely verification of parameter information in the vehicle software during the vehicle software update and upgrade process, ensuring the effectiveness of the upgrade.
[0078] This application defines identification fields to meet differentiation requirements. These fields are defined based on actual usage needs, such as "vehicle model + structural configuration + hardware configuration + software configuration," ensuring that each piece of in-vehicle software requiring differentiation has a corresponding identification field. Vehicle model refers to the vehicle model code, which is assigned differently by the OEM to different vehicle models. Structural configuration refers to the mechanical structure of the component, which varies in structural design, such as size and shape. Hardware configuration refers to differences in hardware design, such as voltage and electronic components. Software configuration refers to differences in software design, such as diagnostic IDs and control strategies.
[0079] The identity field needs to be allocated to a fixed address segment (physical address, not logical address) in each block. A separate memory segment is allocated through the linker file to store the identity field. Therefore, this application defines the identity fields stored in different memory segments as the second memory identity field, the third memory identity field, and the fourth memory identity field. These can be isolated from other programs. When multiple versions of anti-flashing vehicle software are required, only the executable file (hex / bin, etc.) needs to be modified. There is no need to repeat program changes and integration, which greatly improves work efficiency.
[0080] In S2, during actual production management, there are often inventory parts that need to be fully utilized in other vehicle models. However, if only a first bootloader exists (which is fixed and cannot be upgraded), and a design strategy to prevent erroneous upgrades is implemented, there's a situation where the inventory parts cannot be upgraded to other vehicle models. Therefore, these inventory parts are treated as scrap, resulting in significant waste. Therefore, this application constructs a second bootloader. In production management, the second bootloader can be upgraded via a CAN device, enabling the use of inventory parts from other vehicle models in those models.
[0081] Furthermore, S3 includes:
[0082] Back up the third data packet in the executable vehicle software program to the backup program and update the third memory identity field;
[0083] The vehicle software is updated according to the second boot program after startup, resulting in the fourth data packet;
[0084] Compare the updated third memory identity field with the current fourth memory identity field to determine if the comparison result meets expectations;
[0085] If so, confirm that the fourth data packet is the first data packet.
[0086] In the above implementation process, the vehicle software is updated according to the second boot program after startup, and the updated third memory identity field is compared with the current fourth memory identity field. This can promptly confirm the accuracy of the parameter information in the identity field, avoid errors during the upgrade process, and improve upgrade efficiency.
[0087] During in-vehicle software upgrades, the current app (i.e., the executable in-vehicle software program, and the third-party data package within the executable in-vehicle software program, i.e., the initial data package during or before the software upgrade) is first backed up to a backup program. Then, the program within the executable in-vehicle software program is upgraded. If an upgrade error occurs, the data package from the backup program is rolled back to the executable in-vehicle software program, ensuring that the original program can still run normally even in the event of an upgrade error.
[0088] The second bootloader will back up the current program in the executable vehicle software program to the backup program, and then upgrade the new software to the executable vehicle software program. After the new software data (the fourth data packet) has been completely written into the executable vehicle software program, its identity field is compared. If there is no problem with the identity field, the fourth data packet is determined to be the first data packet after the vehicle software upgrade.
[0089] Furthermore, after the step of storing the first data packet according to the backup procedure to obtain the second data packet, the method further includes:
[0090] Upgrade the executable vehicle software program and determine if there are any anomalies during the upgrade process;
[0091] If so, roll back the second data packet to the executable vehicle software program.
[0092] In the above implementation process, the executable vehicle software program is upgraded to improve the efficiency of upgrading the vehicle software, reduce errors in the upgrade process, and avoid upgrade anomalies during the vehicle software upgrade process.
[0093] Once the new software data (first data packet) has been completely written into or stored in the executable vehicle software program, it is necessary to determine whether there are any abnormalities during the upgrade process. If there are any abnormalities, the fault needs to be reported, and the original software data in the previously backed-up program needs to be rolled back to the executable vehicle software program.
[0094] Furthermore, before the step of rolling back the second data packet to the executable vehicle software program, the process also includes:
[0095] Determine if the current fourth memory identity field in the backup program is correct;
[0096] If not, perform a rollback operation.
[0097] In the above implementation process, when the current fourth memory identity field in the backup program is incorrect, a rollback operation is performed to facilitate the re-upgrade of the vehicle software, reduce the probability of upgrade errors, and improve upgrade efficiency.
[0098] Before rolling back the data from the backup program to the executable vehicle software program, the identity fields in the backup program are compared first. Only if the comparison is successful can the rollback operation be performed. This method avoids repeated rollbacks that could cause the program to crash when the backup program is empty or also contains errors.
[0099] Furthermore, after implementing the in-vehicle software upgrade, the process also includes testing the in-vehicle software:
[0100] Retrieve the identity field corresponding to the second data packet;
[0101] Extract configuration information from the identity field;
[0102] The system parses configuration information based on test service information to perform tests on in-vehicle software.
[0103] In the above implementation process, the configuration information in the identity field corresponding to the second data packet is extracted for testing of the vehicle software, which can quickly distinguish the different versions of the vehicle software and facilitate the external distribution of the vehicle software.
[0104] The testing method described in this application is used to quickly distinguish between multiple software versions that differ from each other. It requires transmitting the software version via a CAN bus, extracting configuration information from the identity field using an algorithm, and then retrieving the configuration information via UDS's 22 service to complete the test.
[0105] Example 2
[0106] In order to execute the method corresponding to Embodiment 1 above and achieve the corresponding functions and technical effects, an in-vehicle software upgrade device is provided below, such as... Figure 2 As shown, the device includes:
[0107] Module 1 is used to build the first bootloader, the second bootloader, the executable vehicle software program, and the backup program;
[0108] Boot module 2 is used to boot the second boot program according to the first boot program;
[0109] Update module 3 is used to update the vehicle software according to the second boot program after startup, and obtain the first data packet;
[0110] Backup module 4 is used to store the first data packet according to the backup program to obtain the second data packet;
[0111] Integrity verification module 5 is used to perform integrity verification on the second data packet according to the second boot program after startup, so as to realize the vehicle software upgrade.
[0112] In the above implementation process, the vehicle software is adaptively upgraded based on the constructed first boot program, second boot program, executable vehicle software program and backup program, and the integrity of the upgraded vehicle software is verified. This can improve the upgrade efficiency of vehicle software, simplify the upgrade process, and make detailed distinctions between vehicle software during the flashing process, thereby improving the upgrade effect of vehicle software, reducing the probability of errors, and reducing the cost of vehicle software upgrade.
[0113] Furthermore, module 1 is also used for:
[0114] The memory of the in-vehicle software is divided into first memory, second memory, third memory, and fourth memory.
[0115] The first bootloader, the second bootloader, the executable vehicle software program, and the backup program are respectively built in the first memory, the second memory, the third memory, and the fourth memory.
[0116] In the above implementation process, the first boot program, the second boot program, the executable vehicle software program and the backup program are built in the first memory, the second memory, the third memory and the fourth memory respectively, which can refine the vehicle software flashing process and improve the upgrade effect.
[0117] Furthermore, module 1 is also used for:
[0118] Obtain user usage requirements;
[0119] Configure the identity fields according to usage requirements;
[0120] The identity field is allocated to the second memory, the third memory, and the fourth memory, resulting in the second memory identity field, the third memory identity field, and the fourth memory identity field. The second memory identity field, the third memory identity field, and the fourth memory identity field change with the second boot program, the executable vehicle software program, and the backup program, respectively.
[0121] In the above implementation process, the identity field is configured according to the usage requirements and allocated to the second, third and fourth memory. This allows for timely verification of parameter information in the vehicle software during the software update and upgrade process, ensuring the effectiveness of the upgrade.
[0122] Furthermore, update module 3 is also used for:
[0123] Back up the third data packet in the executable vehicle software program to the backup program and update the third memory identity field;
[0124] The vehicle software is updated according to the second boot program after startup, resulting in the fourth data packet;
[0125] Compare the updated third memory identity field with the current fourth memory identity field to determine if the comparison result meets expectations;
[0126] If so, confirm that the fourth data packet is the first data packet.
[0127] In the above implementation process, the vehicle software is updated according to the second boot program after startup, and the updated third memory identity field is compared with the current fourth memory identity field. This can promptly confirm the accuracy of the parameter information in the identity field, avoid errors during the upgrade process, and improve upgrade efficiency.
[0128] Furthermore, the device also includes an anomaly detection module for:
[0129] Upgrade the executable vehicle software program and determine if there are any anomalies during the upgrade process;
[0130] If so, roll back the second data packet to the executable vehicle software program.
[0131] In the above implementation process, the executable vehicle software program is upgraded to improve the efficiency of upgrading the vehicle software, reduce errors in the upgrade process, and avoid upgrade anomalies during the vehicle software upgrade process.
[0132] Furthermore, the device also includes a rollback module for:
[0133] Determine if the current fourth memory identity field in the backup program is correct;
[0134] If not, perform a rollback operation.
[0135] In the above implementation process, when the current fourth memory identity field in the backup program is incorrect, a rollback operation is performed to facilitate the re-upgrade of the vehicle software, reduce the probability of upgrade errors, and improve upgrade efficiency.
[0136] Furthermore, the device also includes a testing module for testing the in-vehicle software:
[0137] Retrieve the identity field corresponding to the second data packet;
[0138] Extract configuration information from the identity field;
[0139] The system parses configuration information based on test service information to perform tests on in-vehicle software.
[0140] In the above implementation process, the configuration information in the identity field corresponding to the second data packet is extracted for testing of the vehicle software, which can quickly distinguish the different versions of the vehicle software and facilitate the external distribution of the vehicle software.
[0141] The aforementioned vehicle software upgrade device can implement the method of Embodiment 1. The options in Embodiment 1 are also applicable to this embodiment, and will not be described in detail here.
[0142] The remaining contents of this embodiment can be referred to the contents of Embodiment 1 above, and will not be repeated in this embodiment.
[0143] Example 3
[0144] This application provides an electronic device, including a memory and a processor. The memory stores a computer program, and the processor runs the computer program to enable the electronic device to perform the vehicle software upgrade method of Embodiment 1.
[0145] Alternatively, the aforementioned electronic device may be a server.
[0146] Please see Figure 3 , Figure 3This is a schematic diagram illustrating the structural composition of an electronic device provided in an embodiment of this application. The electronic device may include a processor 31, a communication interface 32, a memory 33, and at least one communication bus 34. The communication bus 34 is used to enable direct communication between these components.
[0147] Optionally, the electronic device may also include a storage controller and an input / output unit. The memory 33, storage controller, processor 31, peripheral interface, and input / output unit are electrically connected to each other directly or indirectly to realize data transmission or interaction.
[0148] Input / output units are used to enable users to create tasks and set optional start periods or preset execution times for those tasks, facilitating user-server interaction. Input / output units can be, but are not limited to, a mouse and keyboard.
[0149] Understandable. Figure 3 The structure shown is for illustrative purposes only; the electronic device may also include components that are more advanced than those shown. Figure 3 The more or fewer components shown, or having the same Figure 3 The different configurations shown. Figure 3 The components shown can be implemented using hardware, in-vehicle software, or a combination thereof.
[0150] In addition, this application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the vehicle software upgrade method of Embodiment 1.
[0151] This application also provides a computer program product that, when run on a computer, causes the computer to perform the method described in the method embodiment.
[0152] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application. It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0153] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of protection of the claims.
Claims
1. A method for upgrading vehicle software, characterized in that, The method includes: The steps for constructing the first bootloader, the second bootloader, the executable vehicle software program, and the backup program include: The memory of the vehicle software is divided into a first memory, a second memory, a third memory, and a fourth memory. The steps of constructing the first bootloader, the second bootloader, the executable vehicle software program, and the backup program in the first memory, the second memory, the third memory, and the fourth memory respectively include: Obtain user usage requirements; Configure the identity fields according to usage requirements; The identity field is allocated to the second memory, the third memory, and the fourth memory to obtain the second memory identity field, the third memory identity field, and the fourth memory identity field. The second memory identity field, the third memory identity field, and the fourth memory identity field change with the second boot program, the executable vehicle software program, and the backup program, respectively. The second boot program is started according to the first boot program; The step of updating the vehicle software according to the second boot program after startup to obtain the first data packet includes: The third data packet in the executable vehicle software program is backed up to the backup program, and the third memory identity field is updated; The vehicle software is updated according to the second boot program after startup, resulting in a fourth data packet; Compare the updated third memory identity field with the current fourth memory identity field to determine if the comparison result meets expectations; If so, determine that the fourth data packet is the first data packet; The first data packet is stored according to the backup program to obtain the second data packet; The second boot program, after startup, performs integrity verification on the second data packet to upgrade the vehicle software.
2. The vehicle software upgrade method according to claim 1, characterized in that, After the step of storing the first data packet according to the backup program to obtain the second data packet, the method further includes: Upgrade the executable vehicle software program and determine if there are any anomalies during the upgrade process; If so, the third data packet is rolled back to the executable vehicle software program.
3. The vehicle software upgrade method according to claim 2, characterized in that, Before the step of rolling back the third data packet to the executable vehicle software program, the method further includes: Determine whether the current fourth memory identity field in the backup program is correct; If not, perform a rollback operation.
4. The vehicle software upgrade method according to claim 1, characterized in that, The step of upgrading the vehicle software also includes testing the vehicle software: Obtain the identity field corresponding to the second data packet; Extract the configuration information from the identity field; The configuration information is parsed based on the test service information to perform testing on the vehicle software.
5. An in-vehicle software upgrade device, characterized in that, The device includes: The building module is used to build the first bootloader, the second bootloader, the executable vehicle software program, and the backup program; The building module is also used for: The memory of the vehicle software is divided into a first memory, a second memory, a third memory, and a fourth memory. The first bootloader, the second bootloader, the executable vehicle software program, and the backup program are respectively constructed in the first memory, the second memory, the third memory, and the fourth memory. Obtain user usage requirements; Configure the identity fields according to usage requirements; The identity field is allocated to the second memory, the third memory, and the fourth memory to obtain the second memory identity field, the third memory identity field, and the fourth memory identity field. The second memory identity field, the third memory identity field, and the fourth memory identity field change with the second boot program, the executable vehicle software program, and the backup program, respectively. A startup module is used to start the second boot program according to the first boot program; The update module is used to update the vehicle software according to the second boot program after startup, and obtain the first data packet; The update module is also used for: The third data packet in the executable vehicle software program is backed up to the backup program, and the third memory identity field is updated; The vehicle software is updated according to the second boot program after startup, resulting in a fourth data packet; Compare the updated third memory identity field with the current fourth memory identity field to determine if the comparison result meets expectations; If so, determine that the fourth data packet is the first data packet; The backup module is used to store the first data packet according to the backup program to obtain the second data packet; The integrity verification module is used to perform integrity verification on the second data packet according to the second boot program after startup, so as to realize the vehicle software upgrade.
6. An electronic device, characterized in that, The device includes a memory and a processor, the memory being used to store a computer program, and the processor running the computer program to cause the electronic device to perform the vehicle software upgrade method according to any one of claims 1 to 4.
7. A storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the vehicle software upgrade method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Complete vehicle OTA parallel flash upgrading method, device and equipment and storage medium
CN116232891A
Software upgrading method and device, equipment and storage medium
CN117111999A