Flashing method and apparatus for vehicle system, and electronic device, vehicle and storage medium
Through partition management in the vehicle control unit and using the backup system partition for software updates, the problem of inconvenient use of the vehicle during the update process is solved, ensuring that the vehicle can still be used normally during the update period and improving the user experience.
Patent Information
- Application Number
- PCT/CN2024/088124
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-04-26
- Filing Date
- 2024-04-16
- Publication Date
- 2024-10-31
AI Technical Summary
During the vehicle software update process, the vehicle is inconvenient to use, especially during the update and upgrade period, it cannot be used normally, which affects the user experience.
Through partition management in the vehicle control unit, the backup system partition is used for software updates, while the main system partition remains active to ensure that the vehicle can still be used normally during the update process, and the update process can be interrupted at any time through breakpoint information to avoid affecting user use. .
It solves the problem of inconvenient use of vehicles during system updates and upgrades, ensures that users can park or lock their vehicles at any time, and improves user experience.
Smart Images

Figure CN2024088124_31102024_PF_FP_ABST
Abstract
Description
Vehicle system flashing method, device, electronic device, vehicle and storage medium
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on April 26, 2023, with application number 202310482676.8 and application name “Flashing method, device, electronic device, vehicle and storage medium for vehicle system”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of communication technology, and in particular to a flashing method, device, electronic device, vehicle, and storage medium for a vehicle system. Background Art
[0003] Over-the-Air Technology (OTA) is a technology that uses the air interface of mobile communications to remotely update system software using the network.
[0004] In the prior art, when updating vehicle software, an over-the-air download technology is generally used. That is, after downloading the carrier of the software update, the control system inside the vehicle is flashed to achieve the software update of the control system.
[0005] However, when existing vehicles are updating and upgrading their in-vehicle systems, there is a problem of inconvenience in using the vehicle during the update and upgrade period, which reduces the user experience.
[0006] Summary of the Invention
[0007] The present application provides a flashing method, device, electronic device, vehicle and storage medium for a vehicle system, which are used to solve the problem of inconvenience in using the vehicle during the update and upgrade of the vehicle system.
[0008] In a first aspect, the present application provides a flashing method for a vehicle system, the method comprising:
[0009] When the vehicle is in driving state, reading the partition information of the vehicle control unit;
[0010] Determine a primary system partition and a backup system partition of the vehicle control unit according to the partition information, wherein the primary system partition is an active system partition and the backup system partition is an inactive system partition;
[0011] Access the backup system partition to obtain breakpoint information, where the breakpoint information indicates the breakpoint position of the backup system partition during on-vehicle flashing and file information used for on-vehicle flashing;
[0012] According to the breakpoint location and file information, the backup system partition is flashed to obtain the target backup system partition;
[0013] When the vehicle is in a parked state, the state of the primary system partition is switched to an inactive state, and the state of the target backup system partition is switched to an active state.
[0014] In an embodiment of the present application, after determining the main system partition and the backup system partition of the vehicle control unit according to the partition information, and before accessing the backup system partition and obtaining the breakpoint information, the method further includes:
[0015] Request the backup system partition to enter session mode;
[0016] After the backup system partition enters the session mode, the step of accessing the backup system partition and obtaining breakpoint information is executed.
[0017] In an embodiment of the present application, after requesting the backup system partition to enter the session mode, after the backup system partition enters the session mode, before executing the step of accessing the backup system partition to obtain breakpoint information, the method further includes:
[0018] Check the current mode of the backup system partition;
[0019] If the current mode is the session mode, the step of accessing the backup system partition to obtain breakpoint information is executed.
[0020] In the embodiment of the present application, the backup system partition is accessed to obtain breakpoint information, including:
[0021] Access the backup system partition to obtain the status of the boot program in the backup system partition;
[0022] If the boot program is in an inactive state, the boot program is sent to the backup system partition. After the backup system partition receives the boot program, the boot program is signed and a signature is obtained. Based on the signature verification result, the backup system partition is accessed to obtain breakpoint information.
[0023] In the embodiment of the present application, after accessing the backup system partition and obtaining the status of the boot program in the backup system partition, the method further includes:
[0024] If the boot program is in a program activation state, the step of accessing the backup system partition to obtain breakpoint information is executed.
[0025] In the embodiment of the present application, the backup system partition is flashed according to the breakpoint location and file information to obtain the target backup system partition, including:
[0026] According to the breakpoint position, the backup system partition is erased to obtain the initial updated backup system partition;
[0027] According to the file information, the initial update backup system partition is flashed to obtain the target backup system partition.
[0028] In the embodiment of the present application, the initial update backup system partition is flashed according to the file information to obtain the target backup system partition, including:
[0029] Determine the file identification and file address based on the file information;
[0030] According to the file identifier and the file address, data is transmitted to the initial update backup system partition to obtain the transmitted data;
[0031] According to the transmitted data, the driving flash processing is performed at the breakpoint position to obtain the target backup system partition.
[0032] In an embodiment of the present application, the method further includes:
[0033] When a data breakpoint occurs during data transmission to the initial update backup system partition, the breakpoint information is updated according to the data breakpoint to obtain updated breakpoint information;
[0034] According to the updated breakpoint information, return to the step of determining the main system partition and the backup system partition of the vehicle control unit according to the partition information.
[0035] In an embodiment of the present application, after performing a driving flash process on the backup system partition according to the breakpoint location and file information to obtain a target backup system partition, when the vehicle is in a parked state, switching the state of the main system partition to an inactive state and before switching the state of the target backup system partition to an active state, the method further includes:
[0036] Performing software integrity and compatibility checks on the target backup system partition and obtaining check results;
[0037] If the inspection result meets the preset inspection result requirement, the steps of switching the state of the main system partition to an inactive state and switching the state of the target backup system partition to an active state are executed when the vehicle is in a parked state.
[0038] In an embodiment of the present application, the method further includes:
[0039] In the process of switching the state of the target backup system partition to the active state, the diagnostic trouble codes in the target backup system partition are cleared.
[0040] In a second aspect, the present application provides a flashing device for a vehicle system, comprising:
[0041] A reading module, used for reading the partition information of the vehicle control unit when the vehicle is in a driving state;
[0042] A determination module, configured to determine a primary system partition and a backup system partition of the vehicle control unit according to the partition information, wherein the primary system partition is an active system partition and the backup system partition is an inactive system partition;
[0043] A module is obtained for accessing the backup system partition to obtain breakpoint information, wherein the breakpoint information represents the breakpoint position of the backup system partition during the on-vehicle flashing and the file information used for the on-vehicle flashing;
[0044] The driving flashing module is used to perform driving flashing processing on the backup system partition according to the breakpoint position and file information to obtain the target backup system partition;
[0045] The switching module is used to switch the state of the main system partition to an inactive state and the state of the target backup system partition to an active state when the vehicle is in a parked state.
[0046] In a third aspect, the present application provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor;
[0047] Memory stores computer-executable instructions;
[0048] The processor executes the computer-executable instructions stored in the memory to implement the flashing method of the vehicle system of the embodiment of the present application.
[0049] In a fourth aspect, the present application provides a vehicle comprising the electronic device of an embodiment of the present application.
[0050] In a fifth aspect, the present application provides a computer-readable storage medium, which stores computer execution instructions. When the computer execution instructions are executed by a processor, they are used to implement the flashing method of the vehicle system of an embodiment of the present application.
[0051] The vehicle system flashing method, device, electronic device, vehicle and storage medium provided in the present application read the partition information of the vehicle control unit when the vehicle is in a driving state; determine the main system partition and backup system partition of the vehicle control unit according to the partition information, wherein the main system partition is the system partition in an activated state, and the backup system partition is the system partition in an inactivated state; access the backup system partition to obtain breakpoint information, which represents the breakpoint position of the backup system partition during the driving flashing, as well as the file information used for the driving flashing; perform driving flashing on the backup system partition according to the breakpoint position and the file information to obtain the target backup system partition; when the vehicle is in a parked state, switch the state of the main system partition to an inactivated state and the state of the target backup system partition to an activated state, by flashing the backup system partition, avoiding affecting the use of the main system partition, and at the same time, by obtaining the breakpoint information of the backup system partition, the backup system partition can be flashed at any time according to the user's use of the vehicle, thereby solving the problem of inconvenient use of the vehicle during system updates and upgrades. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0053] FIG1 is a schematic flow chart of a flashing method for a vehicle system according to an embodiment of the present application;
[0054] FIG2 is a flow chart of another flashing method for a vehicle system provided in an embodiment of the present application;
[0055] FIG3 is a schematic diagram of the structure of a flash writing device for a vehicle system according to an embodiment of the present application;
[0056] FIG4 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0057] The above drawings illustrate specific embodiments of the present application, which will be described in more detail below. These drawings and the textual description are not intended to limit the scope of the present application in any way, but rather to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments. DETAILED DESCRIPTION
[0058] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
[0059] In the existing technology, when using OTA to upgrade the software of the vehicle system, it is generally performed when the car is parked or locked, which takes a long time. For users, during this period, they cannot use the car or even open the door. Therefore, it is inconvenient to use and the user experience is not very good.
[0060] To address the aforementioned issues, the vehicle system flashing method provided in this application can partition the vehicle system. During a software upgrade of the vehicle system, the inactive backup system partition can be updated while the active main system partition remains in normal use, thus not affecting the normal operation of the vehicle. Furthermore, the backup system partition update process can be interrupted at any time using breakpoint information, thus preventing users from being unable to park or lock the vehicle. This solves the problem of inconvenience in vehicle use during system updates and upgrades.
[0061] The following specific embodiments describe in detail the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0062] The execution subject of the flashing method of the vehicle system provided in the embodiment of the present application can be a server. The server can be a device such as an on-board computer. This embodiment does not impose any special restrictions on the implementation method of the execution subject, as long as the execution subject can read the partition information of the vehicle control unit when the vehicle is in driving state; according to the partition information, the main system partition and the backup system partition of the vehicle control unit are determined, wherein the main system partition is an activated system partition and the backup system partition is an inactivated system partition; the backup system partition is accessed to obtain breakpoint information, which represents the breakpoint position of the backup system partition during driving flashing, as well as the file information used for driving flashing; according to the breakpoint position and the file information, the backup system partition is flashed during driving to obtain the target backup system partition; when the vehicle is in a parked state, the state of the main system partition is switched to an inactivated state, and the state of the target backup system partition is switched to an activated state.
[0063] Among them, flashing can refer to ECU data flashing or ECU data filling. Its basic principle is: the external data flashing tool sends data information to the ECU through the ECU communication network (mostly K-line and CAN bus) to realize the management and update of ECU data.
[0064] OTA Masterr acts as a diagnostic instrument during the OTA upgrade process. It has certain storage functions and can download and store a large number of upgrade packages during the upgrade process.
[0065] Figure 1 is a flow chart of a flashing method for a vehicle system provided in an embodiment of the present application. The execution subject of the method may be an OTA controller, and this embodiment is not particularly limited here. As shown in Figure 1, the method may include:
[0066] S101. When the vehicle is in driving state, read the partition information of the vehicle control unit.
[0067] The driving state may refer to the state of the vehicle when it is started, for example, the state of the vehicle after it is started, and the driving state of the vehicle after it is started.
[0068] The vehicle control unit may be an electronic control unit (ECU), which may refer to a driving computer or an onboard computer on a vehicle. The electronic control unit may be composed of a microcontroller, memory, input / output interface, analog-to-digital converter, and large-scale integrated circuits such as shaping and driving.
[0069] Partition information may refer to the AB partition information of the system in the vehicle control unit, wherein the AB partition information may include information about the primary system partition currently in use in the vehicle control unit and information about the backup system partition. In an embodiment of the present application, the partition information may represent the status of the system partition, such as whether the system partition supports AB partitions.
[0070] When the vehicle is in driving state, reading the partition information of the vehicle control unit may refer to OTA Master reading the AB partition information of the entire vehicle ECU.
[0071] S102. Determine a primary system partition and a backup system partition of the vehicle control unit according to the partition information, wherein the primary system partition is a system partition in an activated state, and the backup system partition is a system partition in an inactivated state.
[0072] The primary system partition may be a system partition in an activated state, that is, a system partition in use.
[0073] The backup system partition can be an inactive system partition, wherein the backup system partition is an unused system partition that supports on-the-go flashing by default. There can be at least one backup system partition. In an embodiment of the present application, after reading the partition information of the vehicle control unit while the vehicle is in motion, function addressing can be performed based on the partition information to select a backup system partition that supports on-the-go flashing.
[0074] In the embodiment of the present application, after determining the primary system partition and the backup system partition of the vehicle control unit according to the partition information, the method of accessing the backup system partition and obtaining the breakpoint information may further include:
[0075] Request the backup system partition to enter session mode;
[0076] After the backup system partition enters the session mode, the step of accessing the backup system partition and obtaining breakpoint information is executed.
[0077] The session mode refers to the backup system partition entering OTA session mode, which is a module dedicated to communicating with the OTA Master. When the backup system partition supports AB partition flashing, the backup system partition can enter OTA session mode to flash the backup system partition. When the backup system partition does not support AB partition flashing, it indicates that the backup system partition cannot be flashed.
[0078] In the embodiment of the present application, after requesting the backup system partition to enter the session mode, after the backup system partition enters the session mode, the method before the step of accessing the backup system partition and obtaining breakpoint information may further include:
[0079] Check the current mode of the backup system partition;
[0080] If the current mode is the session mode, the step of accessing the backup system partition to obtain breakpoint information is executed.
[0081] Among them, after entering the session mode, in order to ensure the normal use between the backup system partition and OTA and avoid the backup system partition from exiting the session mode, before accessing the backup system partition, the current mode of the backup system partition is checked again. If the current mode is the session mode, the backup system partition is accessed and the step of obtaining breakpoint information is executed.
[0082] S103: Access the backup system partition to obtain breakpoint information, where the breakpoint information represents the breakpoint position of the backup system partition during the on-vehicle flashing and file information used for the on-vehicle flashing.
[0083] Access can be secure access, which refers to an authorization method based on vehicle safety that allows diagnostic equipment to access important data within the ECU or request the ECU to perform diagnostic services that affect vehicle safety. Secure access can be achieved through a seed-key mechanism. Without secure access unlocking, the ECU is locked, preventing access to important data (DID) / storage areas and the execution of certain diagnostic services that affect vehicle safety.
[0084] The breakpoint information may include the breakpoint position of the flashing in the backup system partition, and the file information when the flashing is performed. The breakpoint position may be represented as the position when the backup system partition is flashed, wherein the position may be the position where the last flashing was not completed due to problems such as vehicle stopping during the flashing of the backup system partition, or may be the starting position when the flashing is required during the flashing of the backup system partition; the file information may include a file identifier and a file address, wherein the file identifier may be an identifier for identifying the file to be transferred, and the file address may be the address information for determining the file to be transferred. Through the file identifier and the file address, the file to be transferred can be downloaded from the cloud server, thereby flashing the backup system partition.
[0085] On-the-go flashing refers to the process of flashing the system while the vehicle is in motion.
[0086] In an embodiment of the present application, a method for accessing a backup system partition to obtain breakpoint information may include:
[0087] Access the backup system partition to obtain the status of the boot program in the backup system partition;
[0088] If the boot program is in an inactive state, the boot program is sent to the backup system partition. After the backup system partition receives the boot program, the boot program is signed and a signature is obtained. Based on the signature verification result, the backup system partition is accessed to obtain breakpoint information.
[0089] In the embodiment of the present application, after accessing the backup system partition and obtaining the status of the boot program in the backup system partition, the method may further include:
[0090] If the boot program is in a program activation state, the step of accessing the backup system partition to obtain breakpoint information is executed.
[0091] A boot loader can be a program located on a computer or other computer application that boots an operating system. A boot loader can be in an active state or an inactive state. The active state indicates that a verified boot loader already exists in the backup system partition, allowing the system to be directly updated with the file to be transferred. The inactive state indicates that a verified boot loader does not exist in the backup system partition, requiring the boot loader to be received to ensure the accuracy of the transferred file, thereby enabling the system to be updated.
[0092] In an embodiment of the present application, the bootloader can be a Flash Driver signature. The Flash Driver signature can be the code used to erase and rewrite the flash memory during an ECU OTA program upgrade. The Flash Driver signature can prevent the code from being accidentally called when the program fails, potentially damaging the software code.
[0093] In an embodiment of the present application, when it is detected that the boot program is in an inactive state, the boot program Flash Driver signature is obtained. After receiving the Flash Driver signature, the Flash Driver signature can be verified. When the verification passes, the step of accessing the backup system partition to obtain breakpoint information is executed; when it is detected that the boot program is in an active state, the step of directly accessing the backup system partition to obtain breakpoint information is executed.
[0094] S104: Perform on-the-fly flashing processing on the backup system partition according to the breakpoint position and file information to obtain a target backup system partition.
[0095] The driving flashing process may be a process of flashing the backup system partition while the vehicle is driving. The target backup system partition may refer to the system partition obtained after the driving flashing process is completed.
[0096] In the embodiment of the present application, the method of performing on-board flashing processing on the backup system partition according to the breakpoint location and file information to obtain the target backup system partition may include:
[0097] According to the breakpoint position, the backup system partition is erased to obtain the initial updated backup system partition;
[0098] According to the file information, the initial update backup system partition is flashed to obtain the target backup system partition.
[0099] The erasing process may refer to a process of erasing the code of the backup system partition starting from the breakpoint position. The initial updating of the backup system partition may refer to a system partition obtained after the erasing process is performed on the backup system partition.
[0100] In the embodiment of the present application, a method for performing a driving flash process on the initial update backup system partition according to the file information to obtain a target backup system partition may include:
[0101] Determine the file identification and file address based on the file information;
[0102] According to the file identifier and the file address, data is transmitted to the initial update backup system partition to obtain the transmitted data;
[0103] According to the transmitted data, the flashing process is performed at the breakpoint position to obtain the target backup system partition.
[0104] Among them, the file identifier can refer to the identifier of the file package to be transferred, and the file address can refer to the address of the file to be transferred. The file identifier and the file address can be used to accurately determine the file to be transferred, so as to perform the initial update of the backup system partition.
[0105] Data transfer can refer to the process of downloading the files to be transferred from the cloud server to the backup system partition for flashing.
[0106] In this embodiment of the present application, the flashing method of the vehicle system may further include:
[0107] When a data breakpoint occurs during data transmission to the initial update backup system partition, the breakpoint information is updated according to the data breakpoint to obtain updated breakpoint information;
[0108] According to the updated breakpoint information, return to the step of determining the main system partition and the backup system partition of the vehicle control unit according to the partition information.
[0109] The data breakpoint may refer to a situation when data transmission is interrupted. After the data breakpoint occurs, the breakpoint information may be updated according to the data breakpoint to obtain updated breakpoint information.
[0110] After obtaining the updated breakpoint information, the process may return to the step of determining the main system partition and the backup system partition of the vehicle control unit according to the partition information, and perform data transmission again.
[0111] In an embodiment of the present application, situations in which data transmission is interrupted may include situations in which data transmission is interrupted due to network problems during the data transmission process, and situations in which data transmission is interrupted when the vehicle is in a non-driving state.
[0112] S105 . When the vehicle is in a parked state, the state of the primary system partition is switched to an inactive state, and the state of the target backup system partition is switched to an active state.
[0113] The parking state may refer to the state of the vehicle during partition switching. In the embodiment of the present application, the parking state may be the non-use state of the vehicle after startup. When the vehicle is in the non-use state after startup, the vehicle control unit may send a request message to the user and, based on the result of the request message fed back by the user, switch the state of the primary system partition to the inactive state and switch the state of the target backup system partition to the active state.
[0114] In the embodiment of the present application, after performing a driving flash process on the backup system partition according to the breakpoint location and the file information to obtain a target backup system partition, when the vehicle is in a parked state, switching the state of the main system partition to an inactive state and before switching the state of the target backup system partition to an active state may further include:
[0115] Performing software integrity and compatibility checks on the target backup system partition and obtaining check results;
[0116] If the inspection result meets the preset inspection result requirement, the step of switching the state of the main system partition to an inactive state and switching the state of the target backup system partition to an active state is executed when the vehicle is in a parked state.
[0117] Integrity can refer to whether the software in the target backup system partition contains any missing data. Compatibility can refer to the degree of interoperability between software or hardware systems within the target backup system partition. By checking integrity and compatibility, we can determine whether the target backup system partition is usable.
[0118] When the inspection result shows that the target backup system partition can be used, the preset inspection result requirement is met, and the steps of switching the status of the main system partition to an inactive state and switching the status of the target backup system partition to an active state can be executed when the vehicle is in a parked state.
[0119] In this embodiment of the present application, the flashing method of the vehicle system may further include:
[0120] In the process of switching the state of the target backup system partition to the active state, the diagnostic trouble codes in the target backup system partition are cleared.
[0121] Wherein, the diagnostic trouble code (DTC) is a code used to identify the location and cause of the vehicle fault. Clearing processing can refer to the process of clearing the diagnostic trouble code.
[0122] The vehicle system flashing method provided in the present application can read the partition information of the vehicle control unit when the vehicle is in a driving state; determine the main system partition and the backup system partition of the vehicle control unit according to the partition information, wherein the main system partition is the system partition in an activated state, and the backup system partition is the system partition in an inactivated state; access the backup system partition to obtain breakpoint information, the breakpoint information represents the breakpoint position of the backup system partition during driving flashing, and the file information used for driving flashing; perform driving flashing on the backup system partition according to the breakpoint position and the file information to obtain the target backup system partition; when the vehicle is in a parked state, switch the state of the main system partition to an inactivated state, and switch the state of the target backup system partition to an activated state, so that the backup system partition can be flashed to avoid affecting the use of the main system partition. At the same time, by obtaining the breakpoint information of the backup system partition, the backup system partition can be flashed at any time according to the user's use of the vehicle, thereby solving the problem of inconvenient use of the vehicle during system updates and upgrades.
[0123] FIG2 is a flow chart of another flashing method for a vehicle system provided in an embodiment of the present application. The method may be executed by an OTA Master, and this embodiment is not particularly limited here. As shown in FIG2 , the method may include:
[0124] S201. Read the AB partition information of the vehicle controller and determine the target controller.
[0125] The target controller is an inactivated controller that supports flashing.
[0126] By reading the AB partition information of the vehicle controller, it is possible to determine whether the target controller supports AB partitions and whether the inactive area supports flashing.
[0127] S202: Determine a condition for the target controller to enter the OTA session mode, and request the target controller to enter the OTA session mode according to the condition.
[0128] The OTA Master checks whether the target controller can enter the OTA session mode. If the check result shows that the target controller can enter the OTA session mode, the OTA Master requests the target controller to enter the OTA session mode. After requesting the target controller to enter the OTA session mode, the OTA Master confirms the current mode of the target controller.
[0129] S203, after the target controller enters the session mode, securely access the target controller;
[0130] S204, detecting whether the target controller has a Flash Driver signature;
[0131] S205: If the Flash Driver signature exists in the target controller, the Flash Driver signature is sent to the target controller, so that the target controller verifies the validity of the Flash Driver signature and then activates the Flash Driver signature.
[0132] Among them, for the target controller with Flash Driver signature, you can use service 34, service 36, and service 37 to transmit the Flash Driver signature. After the transmission is completed, the Flash Driver signature is verified. After the verification is successful, the Flash Drive signature is activated.
[0133] In the embodiment of the present application, when using 34 / 36 / 37 to transmit the Flash Driver signature, service 34 represents a download request, 36 represents data transmission, and 37 represents a request to exit the transmission. During the Flash Driver signature transmission process, the Flash Driver signature can be transmitted block by block. After each data block is transmitted, service 36 is used again to transmit data until the Flash Driver signature transmission is complete. In the embodiment of the present application, the Flash Driver signature is transmitted using data frames.
[0134] S206, reading the breakpoint information of the target controller;
[0135] S207: Transmit the target file data to the target controller according to the breakpoint information.
[0136] After reading the breakpoint information, the file identifier, file address and breakpoint position to be written are obtained, and erasing starts from the breakpoint position according to the breakpoint information.
[0137] After erasing, the files to be flashed can be transferred through services 34, 36, and 37. During the period when the user is using the vehicle, only breakpoints are allowed in service 36. When a breakpoint occurs, it is necessary to return to step S202.
[0138] In an embodiment of the present application, when the file to be flashed consists of multiple data units, after the 37 service ends, the service 34 can be returned to continue data transmission. When the data unit consists of multiple data packets, the 36 service can be reused to transmit data. When there are other files to be flashed that need to be transmitted, the process can return to step S207.
[0139] S208, verifying the validity of the signature of the target file, obtaining a verification result, and flashing the target controller according to the verification result;
[0140] S209: After the target controller is flashed, the target controller is requested to perform a validity check on the software integrity and compatibility;
[0141] S210: After the flashing is completed, the partition switching condition is checked. If the partition switching condition meets the preset condition requirements, the partition of the vehicle in the parked state is switched, and the DTC is cleared after the switching process.
[0142] After the target controller software is updated, the switching condition is checked. When the switching condition is met, the partition is switched and the DTC during the partition switching process is cleared.
[0143] S211: If the target controller does not have the Flash Driver signature, execute step S206.
[0144] Another vehicle system flashing method provided by an embodiment of the present application can read the ECUs of the entire vehicle that support AB partitioning and in which the inactive area can be flashed, and distinguish which ECUs support flashing during driving. At the same time, by setting an OTA-specific session mode, it is possible to manage the flashing session during driving. In addition, by the location and storage of the ECU's own breakpoints, the software can be updated at any time according to the vehicle's usage, and the switching conditions can be checked before the partition switch, and the switch can be performed when the conditions are met.
[0145] FIG3 is a schematic diagram of the structure of the flash writing device of the vehicle system provided in an embodiment of the present application. As shown in FIG3 , the flash writing device 30 of the vehicle system includes: a reading module 301, a determination module 302, a obtaining module 303, a driving flash writing module 304, and a switching module 305. Among them:
[0146] The reading module 301 is used to read the partition information of the vehicle control unit when the vehicle is in a driving state;
[0147] A determination module 302 is configured to determine a primary system partition and a backup system partition of the vehicle control unit based on the partition information, wherein the primary system partition is an active system partition and the backup system partition is an inactive system partition;
[0148] Obtaining module 303, for accessing the backup system partition to obtain breakpoint information, the breakpoint information representing the breakpoint position of the backup system partition during the on-vehicle flashing, and file information for the on-vehicle flashing;
[0149] The driving flashing module 304 is used to perform driving flashing processing on the backup system partition according to the breakpoint position and file information to obtain the target backup system partition;
[0150] The switching module 305 is configured to switch the state of the primary system partition to an inactive state and the state of the target backup system partition to an active state when the vehicle is parked.
[0151] In the embodiment of the present application, the reading module 301 may also be specifically used for:
[0152] Request the backup system partition to enter session mode;
[0153] After the backup system partition enters the session mode, the step of accessing the backup system partition and obtaining breakpoint information is executed.
[0154] In the embodiment of the present application, the reading module 301 may also be specifically used for:
[0155] Check the current mode of the backup system partition;
[0156] If the current mode is the session mode, the step of accessing the backup system partition to obtain breakpoint information is executed.
[0157] In the embodiment of the present application, the determination module 302 may also be specifically configured to:
[0158] Access the backup system partition to obtain the status of the boot program in the backup system partition;
[0159] If the boot program is in an inactive state, the boot program is sent to the backup system partition. After the backup system partition receives the boot program, the boot program is signed and a signature is obtained. Based on the signature verification result, the backup system partition is accessed to obtain breakpoint information.
[0160] In the embodiment of the present application, the determination module 302 may also be specifically configured to:
[0161] If the boot program is in a program activation state, the step of accessing the backup system partition to obtain breakpoint information is executed.
[0162] In the embodiment of the present application, the driving flashing module 304 may also be specifically used for:
[0163] According to the breakpoint position, the backup system partition is erased to obtain the initial updated backup system partition;
[0164] According to the file information, the initial update backup system partition is flashed to obtain the target backup system partition.
[0165] In the embodiment of the present application, the driving flashing module 304 may also be specifically used for:
[0166] Determine the file identification and file address based on the file information;
[0167] According to the file identifier and the file address, data is transmitted to the initial update backup system partition to obtain the transmitted data;
[0168] According to the transmitted data, the driving flash processing is performed at the breakpoint position to obtain the target backup system partition.
[0169] In the embodiment of the present application, the driving flashing module 304 may also be specifically used for:
[0170] When a data breakpoint occurs during data transmission to the initial update backup system partition, the breakpoint information is updated according to the data breakpoint to obtain updated breakpoint information;
[0171] According to the updated breakpoint information, return to the step of determining the main system partition and the backup system partition of the vehicle control unit according to the partition information.
[0172] In the embodiment of the present application, the driving flashing module 304 can also be used to:
[0173] Performing software integrity and compatibility checks on the target backup system partition and obtaining check results;
[0174] If the inspection result meets the preset inspection result requirement, the steps of switching the state of the main system partition to an inactive state and switching the state of the target backup system partition to an active state are executed when the vehicle is in a parked state.
[0175] In the embodiment of the present application, the switching module 305 may also be used to:
[0176] In the process of switching the state of the target backup system partition to the active state, the diagnostic trouble codes in the target backup system partition are cleared.
[0177] As can be seen from the above, the flashing device 30 of the vehicle system of the embodiment of the present application is composed of a reading module 301, which is used to read the partition information of the vehicle control unit when the vehicle is in a driving state; a determination module 302, which is used to determine the main system partition and the backup system partition of the vehicle control unit according to the partition information, wherein the main system partition is a system partition in an activated state, and the backup system partition is a system partition in an inactivated state; an obtaining module 303, which is used to access the backup system partition to obtain breakpoint information, which represents the breakpoint position of the backup system partition during driving flashing, as well as the file information used for driving flashing; a driving flashing module 304, which is used to perform driving flashing processing on the backup system partition according to the breakpoint position and file information to obtain the target backup system partition; a switching module 305, which is used to switch the state of the main system partition to an inactivated state and the state of the target backup system partition to an activated state when the vehicle is in a parked state. Therefore, by flashing the backup system partition, the use of the main system partition is avoided from being affected. At the same time, by obtaining the breakpoint information of the backup system partition, the backup system partition can be flashed at any time according to the user's use of the vehicle, solving the problem of inconvenience in using the vehicle during system updates and upgrades.
[0178] FIG4 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. As shown in FIG4 , the electronic device 40 includes:
[0179] The electronic device 40 may include one or more processors 401 , one or more computer-readable storage media memories 402 , a communication component 403 , and other components. The processor 401 , the memory 402 , and the communication component 403 are connected via a bus 404 .
[0180] During the specific implementation process, at least one processor 401 executes the computer-executable instructions stored in the memory 402, so that the at least one processor 401 executes the above-mentioned flashing method for the vehicle system.
[0181] The specific implementation process of the processor 401 can be found in the above method embodiment. Its implementation principle and technical effects are similar and will not be repeated here in this embodiment.
[0182] In the embodiment shown in FIG. 4 , it should be understood that the processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), or application-specific integrated circuits (ASICs). A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the present invention may be directly executed by a hardware processor or by a combination of hardware and software modules within the processor.
[0183] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (NVM), such as at least one disk memory.
[0184] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. Buses can be classified into address buses, data buses, and control buses. For ease of illustration, the buses in the drawings of this application are not limited to just one bus or just one type of bus.
[0185] In some embodiments, a computer program product is further proposed, comprising a computer program or instructions, which implement the steps in any of the above-mentioned flashing methods for a vehicle system when executed by a processor.
[0186] The specific implementation of the above operations can be found in the previous embodiments and will not be repeated here.
[0187] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be accomplished by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0188] To this end, an embodiment of the present application provides a computer-readable storage medium, which stores multiple instructions that can be loaded by a processor to execute the steps in any vehicle system flashing method provided in the embodiment of the present application.
[0189] The storage medium may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0190] According to one aspect of the present application, a computer program product or a computer program is provided. The computer program product or the computer program comprises computer instructions stored in a computer-readable storage medium.
[0191] Since the instructions stored in the storage medium can execute the steps in the flashing method of any vehicle system provided in the embodiments of the present application, the beneficial effects that can be achieved by the flashing method of any vehicle system provided in the embodiments of the present application can be achieved. Please see the previous embodiments for details and will not be repeated here.
[0192] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present application that follow the general principles of the present application and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0193] It should be understood that the present application is not limited to the exact structure described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A flashing method for a vehicle system, characterized in that: The method comprises: When the vehicle is in driving state, reading the partition information of the vehicle control unit; Determine a main system partition and a backup system partition of the vehicle control unit according to the partition information, wherein the main system partition is an activated system partition, and the backup system partition is an inactivated system partition; Accessing the backup system partition to obtain breakpoint information, wherein the breakpoint information represents the breakpoint position of the backup system partition during the on-board flashing and file information used for the on-board flashing; According to the breakpoint position and the file information, the backup system partition is flashed to obtain a target backup system partition; When the vehicle is in a parking state, the state of the main system partition is switched to an inactive state, and the state of the target backup system partition is switched to an active state.
2. The method according to claim 1, characterized in that After determining the main system partition and the backup system partition of the vehicle control unit according to the partition information, and before accessing the backup system partition to obtain breakpoint information, the method further includes: Requesting the backup system partition to enter session mode; After the backup system partition enters the session mode, the step of accessing the backup system partition to obtain breakpoint information is performed.
3. The method according to claim 2, characterized in that After requesting the backup system partition to enter the session mode, and before executing the step of accessing the backup system partition to obtain breakpoint information after the backup system partition enters the session mode, the method further includes: checking the current mode of the backup system partition; If the current mode is the session mode, the step of accessing the backup system partition to obtain breakpoint information is performed.
4. The method according to claim 1, characterized in that: The accessing the backup system partition to obtain breakpoint information includes: Accessing the backup system partition to obtain the status of the boot program in the backup system partition; If the boot program is in an inactive state, the boot program is sent to the backup system partition, so that after the backup system partition receives the boot program, the boot program is signed and a signature verification result is obtained, and based on the signature verification result, the backup system partition is accessed to obtain breakpoint information.
5. The method according to claim 4, characterized in that After accessing the backup system partition and obtaining the state of the boot program in the backup system partition, the method further includes: If the boot program is in a program activation state, the step of accessing the backup system partition to obtain breakpoint information is executed.
6. The method according to claim 1, characterized in that The step of performing a flash process on the backup system partition according to the breakpoint position and the file information to obtain a target backup system partition includes: According to the breakpoint position, the backup system partition is erased to obtain an initial update backup system partition; According to the file information, the initial update backup system partition is flashed to obtain a target backup system partition.
7. The method according to claim 6, characterized in that The step of performing a driving flash process on the initial update backup system partition according to the file information to obtain a target backup system partition includes: Determine the file identifier and the file address according to the file information; According to the file identifier and the file address, data is transmitted to the initial update backup system partition, Get the transmission data; According to the transmission data, the driving flashing process is performed at the breakpoint position to obtain the target backup system partition.
8. The method according to claim 7, characterized in that The method further comprises: When a data breakpoint occurs during data transmission to the initial update backup system partition, the breakpoint information is updated according to the data breakpoint to obtain updated breakpoint information; According to the updated breakpoint information, return to the step of determining the main system partition and the backup system partition of the vehicle control unit according to the partition information.
9. The method according to claim 1, characterized in that: After the backup system partition is flashed according to the breakpoint position and the file information to obtain a target backup system partition, when the vehicle is in a parked state, the state of the main system partition is switched to an inactive state, and before the state of the target backup system partition is switched to an active state, the method further includes: Performing a software integrity and compatibility check on the target backup system partition to obtain a check result; If the inspection result meets the preset inspection result requirement, the step of switching the state of the main system partition to an inactive state and switching the state of the target backup system partition to an active state is performed when the vehicle is in a parked state.
10. The method according to claim 1, characterized in that The method further comprises: After the state of the target backup system partition is switched to an activated state, the diagnostic fault code in the target backup system partition is cleared.
11. A flashing device for a vehicle system, characterized in that: include: A reading module, used for reading the partition information of the vehicle control unit when the vehicle is in a driving state; a determination module, configured to determine a main system partition and a backup system partition of the vehicle control unit according to the partition information, wherein the main system partition is an activated system partition, and the backup system partition is an inactivated system partition; An obtaining module is used to access the backup system partition to obtain breakpoint information, wherein the breakpoint information represents the breakpoint position of the backup system partition during the on-board flashing and the file information used for the on-board flashing; A driving flashing module, used for performing driving flashing processing on the backup system partition according to the breakpoint position and the file information to obtain a target backup system partition; The switching module is used to switch the state of the main system partition to an inactive state and the state of the target backup system partition to an active state when the vehicle is in a parked state.
12. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the flashing method of the vehicle system according to any one of claims 1 to 10.
13. A vehicle, characterized in that: An electronic device comprising the electronic device described in claim 12.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the flashing method for a vehicle system as described in any one of claims 1 to 10.
Citation Information
Patent Citations
Upgrading method and device of vehicle controller, vehicle and storage medium
CN115277413A
Automobile electronic control unit parallel flashing system and method
CN115904437A
OTA upgrading method and device, electronic equipment and storage medium
CN115951914A
Brushing method and device of vehicle system, electronic equipment, vehicle and storage medium
CN116400944A
System and method of automating the addition of programmable breakpoint hardware to design models
US20070005323A1
Cited By
Method and device for calibrating initial state of functional soft switch, controller and vehicle
CN119718406A
Program flashing method and related apparatus
WO2026103768A1
