Vehicle OTA upgrading method, device and equipment, storage medium and computer program product
By using shared memory and decompression algorithms in the vehicle OTA upgrade system, memory space is saved and the risk of upgrade failure is reduced. It solves the problem of the A/B partition OTA upgrade system occupying too much memory and achieves efficient OTA upgrade.
Patent Information
- Application Number
- CN202410928416.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-11
- Publication Date
- 2024-10-01
AI Technical Summary
The vehicle OTA upgrade system in the A/B partition requires twice the memory space, resulting in large storage space and a high risk of upgrade failure.
By calling the shared memory in the flash memory, determining the target sub-partition based on the storage information of the sub-partition, obtaining and decompressing the compressed program data, and uploading it to RAM, the vehicle OTA upgrade is realized, and the compressed program data is stored in the flash memory. to save memory space.
It effectively saves memory space, reduces the risk of upgrade failure, and improves the efficiency and user experience of OTA upgrade.
Smart Images

Figure CN118733095A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of smart car technology, and in particular to a vehicle OTA upgrade method, device, equipment, storage medium and computer program product. Background Art
[0002] The OTA (Over The Air) upgrade system is a technology that remotely upgrades car software through wireless networks. It can upgrade car software without affecting normal user use, greatly improving user experience and the service efficiency of car manufacturers.
[0003] The seamless OTA upgrade introduces the A / B system. At the same time, only one system is in an active state and the other system is in an inactive state. The inactive system can be upgraded, thus achieving a seamless upgrade.
[0004] The seamless OTA requires opening up two storage spaces to store the A / B systems, which takes up twice the memory space and occupies a large amount of memory space. Summary of the invention
[0005] In view of the above problems, the present application provides a vehicle OTA upgrade method, device, equipment, storage medium and computer program product to achieve the purpose of saving memory space. The specific scheme is as follows:
[0006] The first aspect of the present application provides a vehicle OTA upgrade method applied to a vehicle-mounted terminal, comprising:
[0007] In response to the ECU being powered on, calling a common memory in the flash memory, the common memory being used to identify storage information of each sub-partition in the flash memory;
[0008] Determine the target sub-partition according to the storage information of each sub-partition in the flash memory, and obtain the compressed program data from the target sub-partition;
[0009] Decompress the compressed program data;
[0010] Upload the decompressed program data to RAM to further implement vehicle OTA upgrades.
[0011] In a possible implementation, before calling the shared memory in the flash memory, the method further includes:
[0012] Receive upgrade instructions sent by the OTA server;
[0013] Upload user data to the OTA server according to the upgrade instructions;
[0014] Receiving compressed program data sent by the OTA server, which is synthesized and compressed by user data and original program data stored in the OTA server;
[0015] The compressed program data is flushed to the target sub-partition and the storage information of the shared memory is updated.
[0016] In a possible implementation, updating the storage information of the shared memory includes:
[0017] The state in the storage information of the target sub-partition in the shared memory is updated from an inactive state to an active state, and the data length before and after compression of the program data is updated to the storage information.
[0018] In one possible implementation, the shared memory is a byte segment that identifies storage information of each sub-partition in the flash memory.
[0019] In a possible implementation, the shared memory includes the data lengths of the program data in the target sub-partition before and after compression, and decompressing the compressed program data includes:
[0020] During the decompression process, whether the data length of the decompressed program data is correct is determined based on the data length of the program data before compression, and whether the compressed program data is completely decompressed is determined based on the data length after compression.
[0021] In a possible implementation, decompressing the compressed program data includes:
[0022] The ECU calls the decompression algorithm in the boot loader BT to decompress the compressed program data.
[0023] A second aspect of the present application provides a vehicle OTA upgrade device, comprising:
[0024] A calling unit, a determining unit, a decompression unit and a program data uploading unit; wherein:
[0025] A calling unit, used for calling a common memory in the flash memory in response to the ECU being powered on, wherein the common memory is used for identifying storage information of each sub-partition in the flash memory;
[0026] A determination unit, used to determine a target sub-partition according to storage information of each sub-partition in the flash memory, and obtain compressed program data from the target sub-partition;
[0027] A decompression unit, used for decompressing compressed program data;
[0028] The program data uploading unit is used to upload the decompressed program data to RAM to further realize the vehicle OTA upgrade.
[0029] A third aspect of the present application provides a vehicle OTA upgrade device, comprising at least one processor and a memory connected to the processor, wherein:
[0030] The memory is used to store computer programs;
[0031] The processor is used to execute a computer program so that the vehicle OTA upgrade device can implement the vehicle OTA upgrade method of the above-mentioned first aspect or any implementation method of the first aspect.
[0032] The fourth aspect of the present application provides a storage medium, which carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the storage medium can implement the vehicle OTA upgrade method of the above-mentioned first aspect or any implementation method of the first aspect.
[0033] The fifth aspect of the present application provides a computer program product, including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the computer program product implements the vehicle OTA upgrade method of the above-mentioned first aspect or any implementation method of the first aspect.
[0034] By means of the above technical solution, the vehicle OTA upgrade method, device, equipment, storage medium and computer program product provided by the present application, the vehicle-mounted end responds to the ECU power-on, calls the shared memory in the flash memory, determines the target sub-partition according to the storage information of each sub-partition in the flash memory, obtains the compressed program data from the target sub-partition, decompresses the compressed program data and uploads it to the RAM. In the present application, the program data used for upgrading is compressed and stored in the flash memory, which greatly saves memory space. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0036] Figure 1 A flow chart of a vehicle OTA upgrade method provided in this application;
[0037] Figure 2 An example diagram of the structure of the shared memory provided in this application;
[0038] Figure 3 A flowchart of a vehicle OTA upgrade method provided in this application;
[0039] Figure 4 A schematic diagram of a process flow of receiving program data by the vehicle-mounted terminal provided by the present application;
[0040] Figure 5 An example diagram of the process of receiving program data by the vehicle-mounted terminal provided in this application;
[0041] Figure 6 This is a structural diagram of the vehicle OTA upgrade device provided in this application;
[0042] Figure 7 This is a hardware structure block diagram of the vehicle OTA upgrade device provided in this application. DETAILED DESCRIPTION
[0043] The following describes the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. The terms used in the implementation method section of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application.
[0044] The embodiments of the present application are described below in conjunction with the accompanying drawings. Those skilled in the art will appreciate that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0045] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, which is only to describe the distinction mode adopted by the objects of the same attributes when describing in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0046] Vehicle OTA upgrades are an important milestone in the development of modern automotive technology, allowing vehicles to receive and install updates wirelessly to enhance functionality, fix vulnerabilities, and improve performance.
[0047] The introduction of A / B partitions in the vehicle OTA upgrade process allows the system to run the current system version in one partition while installing a new system version in another partition. The system can then switch to the new partition at the next startup for seamless upgrades. A / B partitions mean that the system needs to reserve enough storage space for both partitions to store two complete system images. Compared with ordinary OTA upgrades that only require one system image, OTA upgrades for A / B partitions require more storage space; and in the A / B partition system, in order to maintain data consistency, the system needs to synchronize user data and configuration information between the two partitions, which also requires additional storage space; A / B partition systems usually also have a rollback mechanism. If there is a problem with the new system version, the system will automatically roll back to the old version, which means that the system needs to retain two versions of the system image at the same time, which once again increases the demand for storage space; during the OTA upgrade process, cache and temporary files also take up a certain amount of storage space.
[0048] In summary, vehicle OTA upgrades that introduce A / B partitions usually take up twice as much memory as ordinary vehicle OTA upgrades.
[0049] For OTA upgrade packages stored in partitions, the larger the data volume of the upgrade package, the longer the upgrade takes and the greater the risk of upgrade failure.
[0050] In order to solve the above problems, the present application provides a vehicle OTA upgrade method, device, equipment, storage medium and computer program product.
[0051] Optional, see Figure 1 , a flow chart of a vehicle OTA upgrade method provided in this application.
[0052] like Figure 1 As shown, the vehicle OTA upgrade method includes the following steps:
[0053] Step 101 : In response to the ECU being powered on, calling a shared memory in the flash memory, where the shared memory is used to identify storage information of each sub-partition in the flash memory.
[0054] It should be noted that the ECU is a microcomputer embedded in the vehicle, responsible for processing data collected from sensors and other input devices, and performing corresponding control and decision-making tasks based on these data. ECU power-on is one of the triggering conditions for vehicle OTA upgrades, that is, after the ECU is powered on, the ECU is awakened and enters the working state in order to perform vehicle OTA upgrades or other operations. After receiving the vehicle OTA upgrade command, the vehicle OTA program starts.
[0055] Flash memory, or FIASH, is a non-volatile memory that is used primarily as a storage medium for firmware and new software in vehicle OTA upgrades. Moreover, FLASH can save data even when the vehicle power is turned off, making it ideal for storing software updates that need to be retained for a long time.
[0056] The flash memory in this application can be used to store compressed program data to reduce memory usage. The compressed program data can be understood as an OTA upgrade package. Specifically, the compression rate of program data is generally more than 50%, which shows that at least half of the FLASH space can be saved.
[0057] In the known technology, in the vehicle OTA upgrade with A / B partition, the flash memory is divided into A partition and B partition. The flash memory in the present application includes at least two sub-partitions and a shared memory. The shared memory is used to identify the storage information in each sub-partition. Specifically, the shared memory is a byte segment used to identify the storage information of each sub-partition in the flash memory.
[0058] The storage information includes the status of each sub-partition and the data length of the program data before compression and after compression. The status of the sub-partition can be an activated state or an inactivated state. The data length of the program data before compression in the shared memory can be used to verify the correctness of the data length of the decompressed program data; the data length of the program data after compression in the shared memory can be used to verify whether the compressed program data is decompressed during the decompression process.
[0059] Optionally, when the flash memory in the present application includes two partitions and a shared memory, the two partitions are assumed to be partition A and partition B. It can be understood that the states of partition A and partition B in the flash memory are mutually exclusive. When partition A is in an activated state, partition B must be in an inactivated state.
[0060] For example, see Figure 2 , an example diagram of the composition structure of the shared memory provided in this application.
[0061] like Figure 2 As shown, A is a byte, indicating the partition currently in the activated state, which can be set to 1 or 2. The inactivated partition is determined by this value. Generally, the compressed program data is written to the inactivated sub-partition for storage. After the writing is completed, the state of the partition that has been successfully written is changed to the activated state.
[0062] B is 4 bytes, indicating the data length of the program data stored in the A partition before compression. The data length of the program data before compression is used to verify the correctness of the data length after decompression.
[0063] C is 4 bytes, indicating the data length of the compressed program data stored in the A partition. The data length of the compressed program data is used to determine whether the compressed data has been decompressed.
[0064] D is 4 bytes, indicating the data length of the program data stored in the B partition before compression. The data length of the program data before compression is used to verify the correctness of the data length after decompression.
[0065] E is 4 bytes, indicating the data length of the compressed program data stored in the B partition. The data length of the compressed program data is used to determine whether the compressed data has been decompressed.
[0066] It should be noted that after each successful upgrade, the partition status in the shared memory will be set. For example, after flashing, the default partition is A, and the activation partition information in the shared memory is set to 1. The ECU will store the received compressed program data in the B partition. If the compressed program data is successfully flashed into the B partition, the activation partition information in the shared memory will be set to 2, otherwise it will remain 1. Each time the vehicle OTA upgrade is performed, the activation partition information in the shared memory, that is, the status information of the sub-partition, will be identified.
[0067] Optionally, the ECU is awakened and enters a working state, receives a vehicle OTA upgrade instruction, starts a vehicle OTA upgrade program, and calls information stored in a shared memory in the flash memory.
[0068] Step 102: determine a target sub-partition according to storage information of each sub-partition in the flash memory, and obtain compressed program data from the target sub-partition.
[0069] It should be noted that the target sub-partition is a sub-partition that is in an activated state and stores compressed program data.
[0070] Optionally, the shared memory in the flash memory is identified to determine the target sub-partition, thereby finding the compressed program data stored in the target sub-partition.
[0071] Step 103: decompress the compressed program data.
[0072] It should be noted that in this application, the compressed program data is decompressed by calling BT (BOOTLoader) by ECU. The decompression algorithm in BT can decompress the compressed program data in the target sub-partition. The decompression algorithm can be QuickLZ or zlib. QuickLZ has high decompression speed and low resource consumption. It can improve the decompression speed and reduce memory usage while maintaining a high compression rate. Specifically, it can be compressed and decompressed in segments to ensure that it can proceed smoothly even in memory-constrained situations; zlib combines the LZ77 algorithm and Huffman coding to provide excellent compression rate and decompression speed.
[0073] Optionally, the ECU calls the decompression algorithm in BOOTLoader to decompress the compressed program data.
[0074] Step 104: upload the decompressed program data to RAM to further implement vehicle OTA upgrade.
[0075] Optionally, the ECU controls the copying of the decompressed program data to RAM for execution.
[0076] Specifically, the decompressed program data is copied to RAM. After the program data is completely copied, the upgrade program is run to complete the vehicle OTA upgrade.
[0077] For example, see Figure 3 , a flow chart showing an example of a vehicle OTA upgrade method provided in this application.
[0078] like Figure 3 As shown, after the ECU is powered on, it identifies the activation status in the partition. After identifying the partition in the activated state, it obtains the address of the partition in the activated state, runs BT to read the data in the partition, calls the decompression function, decompresses the compressed data in the partition and copies it to RAM, runs the upgrade program, and completes the vehicle OTA upgrade.
[0079] In summary, the vehicle OTA upgrade method provided by this application is that the vehicle-mounted end responds to the ECU power-on, calls the shared memory in the flash memory, determines the target sub-partition according to the storage information of each sub-partition in the flash memory, obtains the compressed program data from the target sub-partition, decompresses the compressed program data and uploads it to the RAM. In this application, the program data used for upgrading is compressed and stored in the flash memory, which greatly saves memory space.
[0080] Optional, see Figure 4 , the present application provides a flow chart of the vehicle-mounted terminal receiving program data, for the above-mentioned vehicle OTA upgrade method, before calling the shared memory in the flash memory, it also includes the following steps:
[0081] Step 201: Receive an upgrade instruction sent by an OTA server.
[0082] It should be noted that the OTA server is the hub of the vehicle's OTA upgrade process, responsible for managing and pushing firmware updates, while the vehicle-mounted terminal is responsible for receiving and executing these updates.
[0083] Optionally, the OTA server will send a vehicle OTA upgrade instruction to the vehicle-mounted terminal.
[0084] Specifically, TBOX receives vehicle OTA upgrade instructions. TBOX is an on-board device that integrates wireless communication and vehicle network functions. TBOX provides a remote communication port and supports driving data collection, driving trajectory recording, vehicle fault monitoring, and vehicle remote control.
[0085] Step 202: Upload user data to the OTA server according to the upgrade instruction.
[0086] It should be noted that user data refers to the data in the calibration data on the vehicle side that allows the user to change.
[0087] After receiving the vehicle OTA upgrade instruction, TBOX sends the user data to the OTA server.
[0088] Step 203: Receive compressed program data sent by the OTA server, which is synthesized and compressed from user data and original program data stored in the OTA server.
[0089] It should be noted that after receiving the user data sent by the vehicle-mounted terminal, the OTA server will synthesize the user data and the original program data stored in the OTA server, and compress the synthesized program data to obtain compressed program data. Then, the compressed program data is sent to the vehicle-mounted terminal.
[0090] Optionally, after the vehicle-mounted end receives the compressed program data sent by the OTA server, it will verify the compressed program data. The verification mainly includes two parts: one is to perform CRC (Cyclic Redundancy Check) verification on the compressed program data to monitor whether the compressed program data has errors during transmission; the other is to perform checksum verification on the program data to monitor the correctness of the program data itself.
[0091] Only after the compressed program data passes the verification can the subsequent steps be continued; if the compressed program data fails the verification, the vehicle-mounted end will re-apply for the program data from the OTA server.
[0092] Step 204: Flash the compressed program data to the target sub-partition and update the storage information of the shared memory.
[0093] Optionally, after the compressed program data passes the verification, TBOX will identify the partition in the FLASH that is in an inactive state, that is, the target sub-partition. Specifically, TBOX determines the target sub-partition through the storage information of each sub-partition identified in the shared memory in the FLASH. After finding the target sub-partition, the compressed program data is flashed to the target sub-partition. At the same time, ECU will verify the correctness of the flashed compressed program data. If the transmitted program data is wrong, ECU will request TBOX to re-flash until the compressed program data is transmitted and all verifications are correct.
[0094] Afterwards, the storage information of the target sub-partition in the shared memory is updated. Specifically, the state of the target sub-partition is set to an activated state, and the data length before compression and the data length after compression of the compressed program data successfully written in the target sub-partition are updated to the storage information.
[0095] For example, see Figure 5 , the present application provides an example diagram of a process for a vehicle-mounted terminal to receive program data.
[0096] The OTA management platform sends an upgrade instruction to the TBOX on the vehicle side. After receiving the upgrade instruction, TBOX uploads the user data to the OTA management platform, which then synthesizes and compresses the data.
[0097] The OTA server of the OTA management platform sends compressed data. After receiving the compressed data, TBOX verifies the compressed data. If the compressed data verified by TBOX is wrong, it will request the OTA server to send data again until the compressed data sent by the OTA server passes the verification. TBOX will store the verified compressed data in the flash memory, identify the inactive partitions in the flash memory and flash them. While flashing, the ECU verifies the correctness of the received compressed data. If the compressed data is wrong, the ECU will request TBOX to re-flash until all the correct compressed data is flashed. Finally, the partition that has been flashed is set to the activated state.
[0098] The above introduces a vehicle OTA upgrade method provided by an embodiment of the present application, and the following will introduce a device for executing the above vehicle OTA upgrade method.
[0099] Optional, see Figure 6 , a composition diagram of the vehicle OTA upgrade device provided in this application.
[0100] The vehicle OTA upgrade device includes a calling unit 10, a determining unit 20, a decompression unit 30 and a program data uploading unit 40; wherein:
[0101] The calling unit 10 is used to call the common memory in the flash memory in response to the ECU being powered on, where the common memory is used to identify the storage information of each sub-partition in the flash memory;
[0102] A determination unit 20, configured to determine a target sub-partition according to storage information of each sub-partition in the flash memory, and obtain compressed program data from the target sub-partition;
[0103] A decompression unit 30, used for decompressing the compressed program data;
[0104] The program data uploading unit 40 is used to upload the decompressed program data to the RAM to further implement the vehicle OTA upgrade.
[0105] In one embodiment, the shared memory in the calling flash memory further includes a compressed program data acquisition unit;
[0106] The compressed program data acquisition unit is specifically used to receive the upgrade instruction sent by the OTA server;
[0107] Upload user data to the OTA server according to the upgrade instructions;
[0108] Receiving compressed program data sent by the OTA server, which is synthesized and compressed by user data and original program data stored in the OTA server;
[0109] The compressed program data is flushed to the target sub-partition and the storage information of the shared memory is updated.
[0110] In one embodiment, the compressed program data acquisition unit includes a storage information updating unit;
[0111] The storage information updating unit is specifically used to update the state in the storage information of the target sub-partition in the shared memory from an inactive state to an active state, and update the data length before and after compression of the program data to the storage information.
[0112] In one embodiment, the shared memory in the calling unit 10 is a byte segment that identifies the storage information of each sub-partition in the flash memory.
[0113] In one embodiment, the shared memory includes the data length of the program data in the target sub-partition before and after compression, and the decompression unit 30 is specifically used to: during the decompression process, determine whether the data length of the decompressed program data is correct based on the data length of the program data before compression, and determine whether the compressed program data is completely decompressed based on the data length after compression.
[0114] In one embodiment, the decompression unit 30 is specifically configured to:
[0115] The ECU calls the decompression algorithm in the boot loader BT to decompress the compressed program data.
[0116] The present application also provides a vehicle OTA upgrade device. Figure 7 As shown, it shows a schematic diagram of the structure of the vehicle OTA upgrade device suitable for implementing the embodiment of the present application. The vehicle OTA upgrade device in the embodiment of the present application may include but is not limited to fixed terminals such as mobile phones, laptops, PDAs (personal digital assistants), PADs (tablet computers), desktop computers, etc. Figure 7 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0117] like Figure 7 As shown, the vehicle OTA upgrade device may include a processing device (such as a central processing unit, a graphics processor, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 to a random access memory (RAM) 603. When the electronic device is powered on, various programs and data required for the operation of the electronic device are also stored in the RAM 603. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0118] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a memory card, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although Figure 7 An electronic device having various devices is shown, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0119] A storage medium is also provided in an embodiment of the present application, which carries one or more computer programs. When the one or more computer programs are executed by a vehicle OTA upgrade device, the vehicle OTA upgrade device can implement any vehicle OTA upgrade method provided in an embodiment of the present application.
[0120] Also provided in an embodiment of the present application is a computer program product, comprising computer-readable instructions. When the computer-readable instructions are executed on a vehicle OTA upgrade device, the vehicle OTA upgrade device implements any one of the vehicle OTA upgrade methods provided in the embodiments of the present application.
[0121] It should also be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the drawings of the device embodiments provided by the present application, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines.
[0122] Through the description of the above implementation mode, the technicians in the field can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components, etc. In general, all functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the present application, software program implementation is a better implementation mode in more cases. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, a U disk, a mobile hard disk, a ROM, a RAM, a disk or an optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, a training device, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0123] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.
[0124] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a training device, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, training device, or data center. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.
Claims
1. A vehicle OTA upgrade method, characterized in that: Applied to vehicle-mounted terminals, including: In response to the ECU being powered on, calling a shared memory in the flash memory, the shared memory being used to identify storage information of each sub-partition in the flash memory; Determine a target sub-partition according to storage information of each sub-partition in the flash memory, and obtain compressed program data from the target sub-partition; decompressing the compressed program data; The decompressed program data is uploaded to RAM to further implement vehicle OTA upgrade.
2. The vehicle OTA upgrade method according to claim 1, characterized in that: Before calling the shared memory in flash memory, it also includes: Receive upgrade instructions sent by the OTA server; Uploading user data to the OTA server according to the upgrade instruction; receiving the compressed program data sent by the OTA server, which is synthesized and compressed from the user data and the original program data stored in the OTA server; The compressed program data is flashed to the target sub-partition, and the storage information of the shared memory is updated.
3. The vehicle OTA upgrade method according to claim 2, characterized in that: The updating of the storage information of the shared memory includes: The state in the storage information of the target sub-partition in the shared memory is updated from an inactive state to an active state, and the data length before and after compression of the program data is updated to the storage information.
4. The vehicle OTA upgrade method according to claim 1, characterized in that: The shared memory is a byte segment that identifies storage information of each sub-partition in the flash memory.
5. The vehicle OTA upgrade method according to claim 1, characterized in that: The shared memory includes the data length of the program data in the target sub-partition before and after compression, and decompressing the compressed program data includes: During the decompression process, whether the data length of the decompressed program data is correct is determined based on the data length of the program data before compression, and whether the compressed program data is completely decompressed is determined based on the compressed data length.
6. The vehicle OTA upgrade method according to claim 1, characterized in that: The decompressing the compressed program data comprises: The ECU calls a decompression algorithm in the boot loader BT to decompress the compressed program data.
7. A vehicle OTA upgrade device, characterized in that: include: A calling unit, a determining unit, a decompression unit and a program data uploading unit; wherein: The calling unit is used to call the shared memory in the flash memory in response to the ECU being powered on, wherein the shared memory is used to identify storage information of each sub-partition in the flash memory; The determining unit is used to determine a target sub-partition according to storage information of each sub-partition in the flash memory, and obtain compressed program data from the target sub-partition; The decompression unit is used to decompress the compressed program data; The program data uploading unit is used to upload the decompressed program data to RAM to further realize the vehicle OTA upgrade.
8. A vehicle OTA upgrade device, characterized in that: The method comprises at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program so that the vehicle OTA upgrade device can implement the vehicle OTA upgrade method as described in any one of claims 1 to 6.
9. A storage medium, characterized in that: The storage medium carries one or more computer programs, and when the one or more computer programs are executed by an electronic device, the storage medium can implement the vehicle OTA upgrade method as described in any one of claims 1 to 6.
10. A computer program product, characterized in that It comprises computer-readable instructions, and when the computer-readable instructions are executed on an electronic device, the computer program product implements the vehicle OTA upgrade method as claimed in any one of claims 1 to 6.
