Vehicle over-the-air upgrading method, electronic equipment and vehicle
By obtaining the maximum length of the vehicle controller and adjusting the target length and transmission rate before OTA upgrade, the problem of upgrade failure caused by differences in vehicle controller hardware was solved, and the success rate of OTA upgrade was improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GREAT WALL MOTOR CO LTD
- Filing Date
- 2026-01-26
- Publication Date
- 2026-05-08
AI Technical Summary
In existing technologies, the maximum data length supported by different batches of vehicle controller hardware varies, leading to a mismatch between the target length and the actual length during OTA upgrades, resulting in upgrade failures.
Upon receiving an over-the-air upgrade command, the maximum length of the write data frame supported by the vehicle controller is obtained. If the target length is not equal to the maximum length, the target length is adjusted to match the actual supported length of the vehicle controller, and the transmission rate is adjusted according to the maximum length to ensure a successful upgrade.
By adjusting the target length and transmission rate, OTA upgrades are ensured to be successful, avoiding upgrade failures caused by hardware differences and improving the success rate of OTA upgrades.
Smart Images

Figure CN121996271A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of vehicle control technology, and more particularly to an over-the-air upgrade method for a vehicle, electronic equipment, and a vehicle. Background Technology
[0002] As vehicle technology continues to evolve, vehicle functions are constantly being updated. Many new functions can be upgraded on already sold vehicles via firmware over-the-air (OTA) updates.
[0003] In related technologies, OTA upgrades of vehicle controllers are performed through the Head Unit (HUT). OTA upgrades must adhere to specific protocols and specifications. When performing an OTA upgrade, the HUT needs to verify that the maximum data length required by the header file to support the controller is the same as the maximum data length actually supported by the controller.
[0004] Vehicles of the same model but different batches may use different controller hardware during production, and their maximum supported data lengths may also differ. HUT's OTA header file only supports one flashing length, which leads to OTA upgrades intended for all sold vehicles failing on some vehicles using different controller hardware. Summary of the Invention
[0005] To address the aforementioned technical issues, this disclosure provides an over-the-air (OTA) upgrade method, electronic device, and vehicle, which can prevent OTA upgrade failures for vehicles using different controller hardware and improve the success rate of OTA upgrades.
[0006] A first aspect of this disclosure provides an over-the-air (OTA) upgrade method for a vehicle, the method comprising: Upon receiving an over-the-air upgrade command, determine the target length of the write data frame corresponding to the over-the-air upgrade command. The over-the-air upgrade command is used to instruct the vehicle controller of the vehicle to be upgraded. Get the maximum length of the write data frame supported by the vehicle controller; If the maximum length and the target length are not equal, adjust the target length based on the maximum length and perform the upgrade operation indicated by the over-the-air upgrade command for the vehicle controller.
[0007] Optionally, in some embodiments of this disclosure, after obtaining the maximum length of the write data frame supported by the vehicle controller, the method further includes: When the maximum length and the target length are not equal, the target transmission rate for transmitting the write data frame to the vehicle controller is determined based on the comparison between the maximum length and the target length. Perform the upgrade operation instructed by the over-the-air upgrade command for the vehicle controller, including: Based on the target transmission rate, the over-the-air upgrade command corresponding to the write data frame is transmitted to the vehicle controller to perform an over-the-air upgrade operation on the vehicle controller.
[0008] Optionally, in some embodiments of this disclosure, determining the target transmission rate when transmitting the write data frame to the vehicle controller based on a comparison between the maximum length and the target length includes: If the maximum length is greater than or equal to the target length, the target transmission rate is determined to be the initial transmission rate corresponding to the over-the-air upgrade command; If the maximum length is less than the target length, the target transmission rate is determined based on the initial transmission rate and the maximum length, and the target transmission rate is greater than the initial transmission rate.
[0009] Optionally, in some embodiments of this disclosure, determining the target transmission rate based on the initial transmission rate and the maximum length includes: The target rate coefficient is determined based on the maximum length; wherein the target rate coefficient is greater than or equal to 1, and the target rate coefficient is negatively correlated with the maximum length; The target transmission rate is determined by multiplying the initial transmission rate and the target rate coefficient.
[0010] Optionally, in some embodiments of this disclosure, adjusting the target length based on the maximum length includes: The header file corresponding to the over-the-air upgrade command is assigned a value; the assignment operation is used to modify the target length to be equal to the maximum length.
[0011] Optionally, in some embodiments of this disclosure, obtaining the maximum length of the flash data frame supported by the vehicle controller includes: Send an acquisition command to the vehicle controller; the acquisition command is used to instruct the vehicle controller to read the maximum length of the supported flash data frame and send the maximum length to the vehicle unit via a reply message; Receive the reply message and determine the maximum length based on the reply information.
[0012] Optionally, in some embodiments of this disclosure, after adjusting the target length based on the maximum length, the method further includes: Send the acquisition command to the vehicle controller again to obtain the maximum length of the write data frame supported by the vehicle controller; Perform the upgrade operation instructed by the over-the-air upgrade command for the vehicle controller, including: If the adjusted target length is equal to the maximum length, perform the upgrade operation indicated by the over-the-air upgrade command for the vehicle controller.
[0013] Optionally, in some embodiments of this disclosure, after the vehicle-mounted system obtains the maximum length corresponding to the vehicle controller, the method further includes: When the maximum length is equal to the target length, the vehicle controller is subjected to an over-the-air upgrade operation as instructed by the over-the-air upgrade command.
[0014] A second aspect of this disclosure provides an over-the-air upgrade device for a vehicle, comprising: The determination module is used to determine the target length of the write data frame corresponding to the over-the-air upgrade command when the over-the-air upgrade command is received. The over-the-air upgrade command is used to instruct the vehicle controller of the vehicle to be upgraded. The acquisition module is used to obtain the maximum length of the write data frame supported by the vehicle controller; The upgrade module is used to adjust the target length based on the maximum length when the maximum length is not equal to the target length, and to perform the upgrade operation indicated by the over-the-air upgrade command of the vehicle controller.
[0015] Optionally, in some embodiments of this disclosure, the determining module is further configured to determine the target transmission rate when transmitting the write data frame to the vehicle controller based on the comparison result of the maximum length and the target length, if the maximum length is not equal to the target length. The upgrade module is also used to transmit the corresponding write data frame for the over-the-air upgrade command to the vehicle controller based on the target transmission rate, so as to perform an over-the-air upgrade operation on the vehicle controller.
[0016] Optionally, in some embodiments of this disclosure, the determining module is further configured to determine the target transmission rate as the initial transmission rate corresponding to the over-the-air upgrade command when the maximum length is greater than or equal to the target length; and to determine the target transmission rate based on the initial transmission rate and the maximum length when the maximum length is less than the target length, wherein the target transmission rate is greater than the initial transmission rate.
[0017] Optionally, in some embodiments of this disclosure, the determining module is further configured to determine a target rate coefficient based on the maximum length; wherein the target rate coefficient is greater than or equal to 1, and the target rate coefficient is negatively correlated with the maximum length; and to determine a target transmission rate based on the product of the initial transmission rate and the target rate coefficient.
[0018] Optionally, in some embodiments of this disclosure, adjusting the target length based on the maximum length includes: The header file corresponding to the over-the-air upgrade command is assigned a value; the assignment operation is used to modify the target length to be equal to the maximum length.
[0019] Optionally, in some embodiments of this disclosure, the over-the-air upgrade device further includes: The sending module is used to send an acquisition command to the vehicle controller; the acquisition command is used to instruct the vehicle controller to read the maximum length of the supported flash data frame and send the maximum length to the vehicle unit through a reply message; The receiving module is used to receive reply messages and determine the maximum length based on the reply information.
[0020] Optionally, in some embodiments of this disclosure, the sending module is further configured to send the acquisition command to the vehicle controller again to obtain the maximum length; The upgrade module is also used to perform upgrade operations indicated by the over-the-air upgrade command of the vehicle controller when the adjusted target length is equal to the maximum length.
[0021] Optionally, in some embodiments of this disclosure, the upgrade module is further configured to perform an over-the-air upgrade operation on the vehicle controller according to the over-the-air upgrade command, provided that the maximum length is equal to the target length.
[0022] A third aspect of this disclosure provides an electronic device, including: processor; Memory, used to store executable instructions; The processor is used to read executable instructions from memory and execute the executable instructions to implement the over-the-air upgrade method provided in the first aspect above.
[0023] A fourth aspect of this disclosure provides a computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to implement the vehicle control method provided in the first aspect.
[0024] A fifth aspect of this disclosure provides a computer program product comprising a computer program or instructions that, when executed by a processor, implement the over-the-air update method as described in the first aspect above.
[0025] A sixth aspect of this disclosure provides a vehicle that includes electronic equipment provided in the third aspect.
[0026] The technical solution provided in this disclosure has the following advantages compared with the prior art: The over-the-air (OTA) upgrade method, electronic device, and vehicle provided in this disclosure, when performing an OTA upgrade on the vehicle controller, first obtains the target length of the flash data frame set in the OTA upgrade header file, and then obtains the maximum length of the flash data frame supported by the current vehicle controller to be upgraded. Next, it compares whether the obtained target length is equal to the maximum length supported by the vehicle controller. If the target length of the flash data frame is not equal to the maximum length supported by the vehicle controller, the target length of the flash data frame is adjusted to match the maximum length supported by the vehicle controller during the OTA upgrade, and the upgrade operation indicated by the OTA upgrade command is executed after adjusting the target length. By adding a method to adjust the target length of the flash data frame corresponding to the OTA upgrade command before executing the OTA upgrade operation, it ensures that even if the maximum length supported by the vehicle controller is different, the target length indicated by the OTA upgrade command is always equal to the actual maximum length supported by the vehicle controller. Therefore, even if the maximum length supported by the vehicle controller is different, the OTA upgrade can still be successful, and there is no need to develop separate OTA upgrade programs for each different vehicle controller hardware that may be configured in the vehicle, thus improving the success rate of OTA upgrades. Attached Figure Description
[0027] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0028] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0029] Figure 1 One of the flowcharts illustrating an over-the-air upgrade method for a vehicle according to some embodiments of this disclosure is shown; Figure 2 A second flowchart illustrating an over-the-air upgrade method for a vehicle according to some embodiments of the present disclosure is shown. Figure 3 Structural block diagrams of vehicle over-the-air upgrade devices according to some embodiments of the present disclosure are shown; Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0030] To better understand the above-mentioned objectives, features, and advantages of this disclosure, the solutions disclosed herein will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.
[0031] Numerous specific details are set forth in the following description to provide a thorough understanding of this disclosure, but this disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only a part of the embodiments of this disclosure, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without inventive effort are within the scope of protection of this invention.
[0032] Some of the nouns or terms that appear in the description of the embodiments of this disclosure shall be interpreted as follows: Over-the-Air (OTA) updates are a technology that allows for remote software or firmware upgrades to electronic devices via wireless networks. OTA updates can fix vulnerabilities, optimize performance, or add new features to devices without relying on a physical connection. For example, over-the-air updates for vehicles enable manufacturers to remotely upgrade already sold vehicles, fixing vulnerabilities and adding support for new features without requiring the vehicles to be returned to the factory.
[0033] Vehicle controller: A vehicle controller is specifically a controller responsible for one or more functions of a vehicle. Exemplarily, a vehicle controller includes a Vehicle Control Unit (VCU), an Engine Electronic Control Unit (ECU), a Body Control Module (BCM), a Battery Management System (BMS), a Motor Control Unit (MCU), an Electronic Stability Program (ESP), and an Autonomous Driving Control Unit (ADCU).
[0034] Flash data frame: In this embodiment of the disclosure, flash data frame refers to the set of data that can be sent in a single transmission command when the vehicle's HUT (vehicle unit) transmits the updated data packet to the vehicle controller during an over-the-air upgrade of the vehicle controller.
[0035] Before describing the embodiments of this disclosure in detail, the technical background involved in this disclosure will be described here so that those skilled in the art can have a clearer understanding of the embodiments of this disclosure.
[0036] Vehicles employ various vehicle controllers for different functions, such as VCU, ECU, BCM, BMS, MCU, ESP, and ADCU. These vehicle controllers are pre-programmed with firmware and software during vehicle production, and they implement vehicle functions by running these firmware and software programs.
[0037] As complex mobile vehicles, vehicles have a long service life, typically exceeding 20 or 30 years for family cars. Due to rapid advancements in vehicle technology, vehicle functions are constantly being innovated. Furthermore, as a particular model of vehicle is widely used, data accumulates during operation, providing automakers with sufficient feedback to optimize and upgrade existing vehicle functions.
[0038] To enable existing vehicles to use these new features and for them to be optimized and upgraded, it is often necessary to upgrade the vehicle controller. Over-the-air (OTA) updates are widely used for vehicle upgrades because they do not rely on the physical connection of the vehicle controller and can remotely upgrade the software or firmware of the vehicle controller via a wireless network.
[0039] In related technologies, OTA upgrades for vehicles are generally performed through a vehicle-wide HUT (Host Under Controller). This involves downloading the updated software from the internet cloud to the HUT via a wireless network connection, and then executing the over-the-air upgrade command through the HUT to update the software or firmware of the vehicle controller to be upgraded.
[0040] Because the OTA process needs to follow specific protocols and specifications, HUT needs to verify the data writing length supported by the target controller hardware before performing an OTA upgrade on the vehicle controller. This is the maximum length of the data frames that the vehicle controller can support. This parameter is written into the vehicle controller hardware and cannot be changed. Furthermore, HUT's OTA specification requires that the header file be verified before the OTA upgrade, and that the target length of the data frames set in the header file must match the maximum supported length actually read by the vehicle controller before proceeding to the next upgrade step.
[0041] However, the maximum length supported by vehicle controller hardware is constantly upgraded with technological advancements. Vehicle controller hardware may differ between production batches, and their supported maximum lengths may also vary. Since OTA upgrades are applied to all sold vehicles, but the vehicle's HUT OTA header file can only specify one target length, a comparison failure will occur when the target length does not match the maximum length actually supported by the vehicle controller, leading to flashing failure and OTA upgrade failure.
[0042] In view of this, embodiments of this disclosure provide an over-the-air upgrade method for vehicles. Figure 1 One of the flowcharts illustrating an over-the-air upgrade method for a vehicle according to some embodiments of this disclosure is shown, such as... Figure 1 As shown, the method includes: S102, upon receiving an over-the-air upgrade command, determines the target length of the write data frame corresponding to the over-the-air upgrade command, which is used to instruct the vehicle controller of the vehicle to be upgraded.
[0043] In this embodiment of the disclosure, over-the-air (OTA) update commands are used to upgrade the vehicle controller. Exemplarily, OTA update commands can be used to upgrade the transmission program of a vehicle's gearbox. Exemplarily, OTA update commands can be used to upgrade the intelligent driving algorithm of a vehicle's intelligent driving system. Exemplarily, OTA update commands can be used to upgrade the vehicle's cockpit entertainment system.
[0044] For example, the over-the-air update command is obtained by the vehicle's head unit (HUT) from an internet cloud server via a wireless network connection.
[0045] For example, over-the-air upgrade commands can be pushed to the in-vehicle infotainment system of vehicles that meet the upgrade requirements via an internet cloud server or a vehicle network edge node.
[0046] For example, the over-the-air upgrade command also carries an upgrade data package for upgrading the vehicle controller.
[0047] Taking the vehicle's infotainment system receiving an over-the-air (OTA) update command as an example, after receiving the command, the system reads the OTA header file to obtain the target length corresponding to the received command. Specifically, this target length is the maximum data length that can be sent in a single data transmission command when transmitting update data to the vehicle controller to be upgraded, as required by the OTA header file.
[0048] S104, obtain the maximum length of the write data frame supported by the vehicle controller.
[0049] In this embodiment of the disclosure, after obtaining the target length of the flash data frame required by the over-the-air upgrade command, the vehicle's in-vehicle infotainment system further obtains the maximum length of the flash data frame actually supported by the vehicle controller to be upgraded. This maximum length is written into the vehicle controller hardware and cannot be changed.
[0050] For example, the vehicle's infotainment system can instruct the vehicle controller to read the maximum length of the data frames it supports for writing by sending corresponding instructions to the vehicle controller and return the data to the infotainment system.
[0051] For example, the vehicle's infotainment system can pre-store the model and specification parameters of each vehicle controller in the vehicle, and obtain the maximum length of the flashing data frame supported by the vehicle controller to be upgraded by reading the model and specification parameters.
[0052] S106, if the maximum length is not equal to the target length, adjust the target length based on the maximum length and perform the upgrade operation indicated by the over-the-air upgrade command of the vehicle controller.
[0053] In this embodiment of the disclosure, since OTA upgrades need to follow specific protocols and specifications, the target length of the flash data frame set in the OTA header file must be consistent with the maximum length of the flash data frame actually supported by the vehicle controller.
[0054] Therefore, when the target length indicated by the over-the-air update command is not equal to the maximum length supported by the vehicle controller, the OTA update in the relevant technology will fail.
[0055] To address this issue, this embodiment of the disclosure adds a step of comparing the target length indicated by the over-the-air upgrade command with the maximum length actually supported by the vehicle controller during OTA upgrades.
[0056] If the comparison result shows that the target length is the same as the maximum length, then the upgrade operation can be performed according to the normal OTA upgrade process.
[0057] If the comparison result shows that the target length is inconsistent with the maximum length, before performing the upgrade operation, the target length specified in the over-the-air upgrade command is first adjusted based on the actual maximum length supported by the vehicle controller to be upgraded, so that the adjusted target length is equal to the actual maximum length supported by the vehicle controller.
[0058] After the adjustment is completed, the upgrade operation of the vehicle controller to be upgraded is performed based on the over-the-air upgrade command. Since the adjusted target length is equal to the maximum length actually supported by the vehicle controller to be upgraded, the OTA upgrade is guaranteed to be successful.
[0059] This embodiment of the disclosure, when performing an over-the-air (OTA) upgrade on a vehicle's controller, first obtains the target length of the data frame for flashing, as set in the OTA header file, and then obtains the maximum length of the data frame supported by the current vehicle controller to be upgraded. Next, it compares the obtained target length with the maximum length supported by the vehicle controller. If the target length of the data frame for flashing is not equal to the maximum length supported by the vehicle controller, the target length of the data frame for flashing is adjusted to match the maximum length supported by the vehicle controller during the OTA upgrade, and the upgrade operation indicated by the OTA upgrade command continues to be executed after adjusting the target length. By adding a method of adjusting the target length of the data frame corresponding to the OTA upgrade command before executing the OTA upgrade operation, it ensures that even if the maximum length supported by the vehicle controller is different, the target length indicated by the OTA upgrade command is always equal to the actual maximum length supported by the vehicle controller. Therefore, even if the maximum length supported by the vehicle controller is different, the OTA upgrade can still be guaranteed to be successful, and there is no need to develop separate OTA upgrade programs for each different vehicle controller hardware that may be configured in the vehicle, thus improving the success rate of OTA upgrades.
[0060] Optionally, in some embodiments of this disclosure, after obtaining the maximum length of the write data frame supported by the vehicle controller, the method further includes: if the maximum length is not equal to the target length, determining the target transmission rate when transmitting the write data frame to the vehicle controller based on the comparison result between the maximum length and the target length.
[0061] Execute the upgrade operation indicated by the over-the-air upgrade command for the vehicle controller, including: transmitting the write data frame corresponding to the over-the-air upgrade command to the vehicle controller based on the target transmission rate, so as to perform the over-the-air upgrade operation on the vehicle controller.
[0062] In this embodiment of the disclosure, since the OTA upgrade is for vehicles already sold, and the upgraded vehicle controller will be unusable during the OTA upgrade process, and the vehicle needs to be powered on throughout the OTA upgrade process, to ensure upgrade safety, the user needs to remain in the vehicle and the vehicle needs to be powered on during the OTA upgrade process, and all vehicle functions will be unavailable during this process.
[0063] Furthermore, since a single vehicle function often requires the coordinated control of multiple vehicle controllers, OTA upgrades for a particular function also necessitate upgrading multiple vehicle controllers sequentially. Therefore, to avoid excessively long OTA upgrade times and thus consume too much of the user's time, it is generally necessary to carefully control the duration of each upgrade process, ensuring that each upgrade step is completed within a pre-defined time window. In other words, the upgrade time for over-the-air upgrade operations on the vehicle controllers must be fixed.
[0064] The upgrade time is mainly determined by the flashing time of transmitting the flashing data frames to the vehicle controller. The flashing time is determined by the number of instructions and the amount of data transmitted by a single instruction. Assuming the size of the upgrade software for the vehicle controller being upgraded is N, the number of instructions is m, the amount of data carried by a single instruction (i.e., the target length) is L, and the flashing time is t, then the following formula (1) is satisfied: N = m × L × t; (1) By performing a simple transformation on the above formula (1), we can obtain t = N / (L×m). As can be seen from formula (1), since N is a constant, when the target length L changes, in order to ensure that t remains unchanged, the value of m needs to be adjusted. For example, if the target length L decreases, the value of the instruction number m needs to be increased to ensure that t remains unchanged.
[0065] The target transmission rate represents the number of instructions that can be transmitted per unit of time. Therefore, after adjusting the value of m, the target transmission rate when transmitting write data frames to the vehicle controller needs to be adjusted accordingly.
[0066] For example, Figure 2 A second flowchart illustrating an over-the-air upgrade method for a vehicle, as shown in some embodiments of this disclosure, is provided. Figure 2 As shown, the method includes: S202, upon receiving an over-the-air upgrade command, determines the target length of the data frame to be written corresponding to the over-the-air upgrade command; S204, obtain the maximum length of the write data frame supported by the vehicle controller; S206, when the maximum length is not equal to the target length, adjust the target length based on the maximum length.
[0067] Among them, S202, S204 and S206 are logically the same as S102, S104 and S106, and will not be elaborated further here.
[0068] S208, based on the comparison between the maximum length and the target length, determine the target transmission rate when transmitting the write data frame to the vehicle controller.
[0069] In S206, if the maximum length supported by the vehicle controller to be upgraded differs from the target length specified by the OTA, the target length is adjusted. After adjusting the target length, i.e., adjusting the amount of data that a single instruction can transmit, the number of instructions required to complete the data upgrade will also change. To ensure that the upgrade time remains constant, the target transmission rate for transmitting the write data frame to the vehicle controller is determined based on a comparison between the maximum length and the target length before adjustment.
[0070] For example, if the target length before adjustment is greater than the maximum length supported by the vehicle controller to be upgraded, the target length needs to be reduced. After reducing the target length, more commands need to be sent. Therefore, in order to keep the upgrade time the same, the number of commands sent per unit time needs to be increased, that is, the target transmission rate needs to be increased.
[0071] S210 transmits the write data frame corresponding to the over-the-air upgrade command to the vehicle controller based on the target transmission rate, so as to perform an over-the-air upgrade operation on the vehicle controller.
[0072] Specifically, after adjusting the target transmission rate, the write data frame is transmitted to the vehicle controller based on the adjusted target transmission rate.
[0073] Adjusting the target transmission rate can be done by increasing or decreasing the preset transmission rate in the OTA upgrade program, or by determining a target transmission rate that matches the adjusted target length.
[0074] This embodiment of the disclosure ensures successful OTA upgrades by adjusting the target length to be equal to the maximum length actually supported by the vehicle controller to be upgraded when the target length indicated by the over-the-air upgrade command differs from the maximum length actually supported by the vehicle controller to be upgraded. Furthermore, after adjusting the target length, the target transmission rate for transmitting write data frames to the vehicle controller to be upgraded is determined based on the adjusted target length. This ensures that regardless of whether the maximum write length supported by the vehicle controller is greater than or less than the target length, the upgrade process can always be completed within the specified time, thus maintaining a constant OTA upgrade duration while ensuring smooth OTA upgrades.
[0075] Optionally, in some embodiments of this disclosure, determining the target transmission rate when transmitting the write data frame to the vehicle controller based on a comparison between the maximum length and the target length includes: If the maximum length is greater than or equal to the target length, the target transmission rate is determined to be the initial transmission rate corresponding to the over-the-air upgrade command; If the maximum length is less than the target length, the target transmission rate is determined based on the initial transmission rate and the maximum length, and the target transmission rate is greater than the initial transmission rate.
[0076] In this embodiment of the disclosure, if the maximum length of the data frame to be written actually supported by the vehicle controller to be upgraded is greater than or equal to the target length of the data frame to be written as indicated by the over-the-air upgrade command, then adjusting the target length to be equal to the maximum length is equivalent to increasing the target length.
[0077] From the above formula (1), we can derive t = N / (L×m), where t is the upgrade duration, N is the size of the upgrade software, L is the target length, and m is the number of instructions. When L increases, even if m remains unchanged, t will only decrease.
[0078] Assume the upgrade duration specified in the over-the-air upgrade instruction is t1, the target length before adjustment is L1, the target length after adjustment is L2, and the actual upgrade duration obtained based on the adjusted target length L2 is t2.
[0079] Then t1 = N / (L1×m), t2 = N / (L2×m). Since L2 > L1, t2 < t1.
[0080] Therefore, when the target length is increased or kept constant, the upgrade time will not exceed the upgrade time specified by the over-the-air upgrade command. Thus, the initial transmission rate corresponding to the control upgrade command can be kept constant, that is, the write data frame is transmitted to the vehicle controller based on the initial transmission rate.
[0081] If the maximum length of the flash data frame supported by the vehicle controller to be upgraded is less than the target length of the flash data frame indicated by the over-the-air upgrade command, then adjusting the target length to be equal to the maximum length is equivalent to reducing the target length.
[0082] Assume the upgrade duration specified in the over-the-air upgrade instruction is t1, the target length before adjustment is L1, the target length after adjustment is L3, and the actual upgrade duration obtained based on the adjusted target length L3 is t3.
[0083] Then t1 = N / (L1×m), t3 = N / (L3×m). Since L1 > L3, t1 < t3.
[0084] Therefore, reducing the target length will result in an upgrade duration exceeding the time specified in the over-the-air upgrade command. To ensure the upgrade duration remains constant, a higher transmission rate is required. In this case, the target transmission rate is determined based on the initial transmission rate and the maximum length, and the target transmission rate is greater than the initial transmission rate.
[0085] This embodiment maintains the initial transmission rate indicated by the OTA upgrade command unchanged when the maximum length supported by the vehicle controller to be upgraded is not less than the target length indicated by the OTA upgrade command. If the maximum length supported by the vehicle controller to be upgraded is less than the target length indicated by the OTA upgrade command, a higher target transmission rate is re-determined based on the adjusted target length, thereby ensuring that the upgrade time for upgrading the vehicle controller does not exceed the upgrade time specified by the over-the-air upgrade command, thus maintaining the OTA upgrade time unchanged while ensuring the smooth progress of the OTA upgrade.
[0086] Optionally, in some embodiments of this disclosure, determining the target transmission rate based on the initial transmission rate and the maximum length includes: determining a target rate coefficient based on the maximum length; wherein the target rate coefficient is greater than or equal to 1, and the target rate coefficient is negatively correlated with the maximum length; and determining the target transmission rate based on the product of the initial transmission rate and the target rate coefficient.
[0087] In this embodiment of the disclosure, the target rate coefficient is defined as K. Then, the above formula (1) can be transformed into the following formula (2): N = m × L × K × t; (2) Where N is the size of the upgrade software, m is the number of instructions, L is the target length, K is the target rate coefficient, and t is the flashing time.
[0088] From the above formula (2), we can derive t = N / (L×K×m).
[0089] When L decreases, the number of instructions m needs to be increased to compensate. However, increasing the number of instructions m reduces the transmission rate. Therefore, the target rate coefficient K is increased to ensure the upgrade time t remains constant. Furthermore, increasing the target rate coefficient K increases the message interval within the same consecutive frame, and also correspondingly increases the instruction interval period between different consecutive frames.
[0090] For example, if the maximum length supported by the vehicle controller to be upgraded is less than the target length, the target rate coefficient is obtained by looking up a table based on the maximum length.
[0091] For example, suppose the maximum length actually supported by the vehicle controller to be upgraded is Lm. Lm is generally in the form of a hexadecimal number, and its range is generally between 0000 and 0FFF.
[0092] For ease of understanding, the hexadecimal numbers are converted to decimal numbers, and the corresponding decimal number range is 0~4095.
[0093] For example, to facilitate calculation, the aforementioned range of 0~4095 (0000~0FFF) can be divided into multiple intervals, each corresponding to a target rate coefficient K. After obtaining the maximum length Lm actually supported by the vehicle controller, the target rate coefficient K corresponding to Lm can be obtained by determining the interval corresponding to Lm.
[0094] For example, Table 1 shows the mapping relationship between the maximum length Lm and the target speed coefficient K: Table 1
[0095] For example, if the maximum length actually supported by the vehicle controller to be upgraded is 0C81, which corresponds to the decimal number 3201, then the corresponding target rate coefficient K is 1.1.
[0096] For example, if the maximum length actually supported by the vehicle controller to be upgraded is 0AF1, which corresponds to the decimal number 2801, then the corresponding target rate coefficient K is 1.2.
[0097] This embodiment of the disclosure introduces a target rate coefficient K. When the maximum length actually supported by the vehicle controller to be upgraded is less than the target length, the target rate coefficient K is determined according to the maximum length actually supported by the vehicle controller to be upgraded. The target transmission rate when transmitting the write data frame to the vehicle controller is adjusted by the target rate coefficient K, thereby ensuring that the OTA upgrade can always be completed within the specified upgrade time, thus ensuring upgrade efficiency.
[0098] Optionally, in some embodiments of this disclosure, adjusting the target length based on the maximum length includes: The header file corresponding to the over-the-air upgrade command is assigned a value; the assignment operation is used to modify the target length to be equal to the maximum length.
[0099] In this embodiment of the disclosure, the header file is the header file of the OTA upgrade program. Exemplarily, the header file is a ".h" file. The header file is used to set various parameters during the OTA upgrade process, including the target length.
[0100] When the maximum length supported by the vehicle controller to be upgraded differs from the target length indicated by the over-the-air upgrade command, the target length can be modified by reassigning the corresponding parameters in the header file of the OTA upgrade program, and the adjusted target length will be equal to the maximum length actually supported by the vehicle controller to be upgraded.
[0101] For example, if the initial value of the target length is 0C81, and the maximum length actually supported by the vehicle controller to be upgraded is found to be 0AF1, then the target length in the header file of the OTA upgrade program is adjusted to 0AF1.
[0102] This embodiment of the present disclosure reassigns the header file when the maximum length supported by the vehicle controller to be upgraded is different from the target length indicated by the over-the-air upgrade command, thereby adjusting the target length indicated by the over-the-air upgrade command to be the same as the maximum length supported by the vehicle controller to be upgraded, thus ensuring the success of the OTA upgrade.
[0103] Optionally, in some embodiments of this disclosure, obtaining the maximum length of the flash data frame supported by the vehicle controller includes: Send an acquisition command to the vehicle controller; the acquisition command is used to instruct the vehicle controller to read the maximum length of the supported flash data frame and send the maximum length to the vehicle unit via a reply message; Receive the reply message and determine the maximum length based on the reply information.
[0104] In this embodiment of the disclosure, for example, after the vehicle's in-vehicle infotainment system receives an over-the-air (OTS) upgrade command, the vehicle's in-vehicle infotainment system determines the vehicle controller to be upgraded based on the OTS upgrade command and sends an acquisition command to the vehicle controller.
[0105] After receiving the acquisition command, the vehicle controller reads the maximum length of the data frame that its hardware supports for flashing and sends a reply message to the vehicle system, which carries the aforementioned maximum length.
[0106] After receiving the reply message, the vehicle's infotainment system can determine the maximum length supported by the vehicle controller based on the reply message.
[0107] For example, upon receiving an over-the-air upgrade command, the HUT sends a request command to the corresponding vehicle controller. The vehicle controller, based on the received request command, replies to the HIT with a response message, which carries the maximum length actually supported by the vehicle controller.
[0108] This embodiment of the disclosure first obtains the maximum length of the data frames actually supported by the vehicle controller to be upgraded before performing an OTA upgrade, and then determines whether the maximum length is equal to the target length corresponding to the over-the-air upgrade command. If it is determined that the maximum length and the target length are not equal, the target length is adjusted to be equal to the maximum length actually supported by the vehicle controller to be upgraded by reassigning header values or other means before performing the OTA upgrade operation. This avoids upgrade failures caused by the difference between the actual length and the target length, and improves the upgrade success rate.
[0109] Optionally, in some embodiments of this disclosure, after adjusting the target length based on the maximum length, the method further includes: sending an acquisition command to the vehicle controller again to obtain the maximum length of the write data frame supported by the vehicle controller. Perform an upgrade operation on the vehicle controller over-the-air upgrade command, including: performing an upgrade operation on the vehicle controller over-the-air upgrade command when the adjusted target length is equal to the maximum length.
[0110] In this embodiment of the disclosure, after adjusting the target length by reassigning the header file, the vehicle's infotainment system performs the step of obtaining the maximum length of the data frame that the vehicle controller to be upgraded actually supports, that is, it sends the acquisition command to the vehicle controller again.
[0111] After obtaining the maximum length of the data frame that the vehicle controller to be upgraded actually supports by acquiring the command, the adjusted target length is compared with the maximum length to see if they are equal.
[0112] If the adjusted target length is equal to the maximum length, then the OTA upgrade operation for the vehicle controller can continue.
[0113] If the adjusted target length is not equal to the maximum length, the operation of adjusting the target length based on the maximum length is re-executed, and the number of failures is recorded.
[0114] When the number of times the target length is adjusted exceeds the preset threshold, an upgrade error message is generated and displayed on the vehicle's infotainment system or other display screens, indicating that the upgrade has failed.
[0115] For example, the number of times threshold ranges from 3 to 10 times.
[0116] For example, the threshold number of times is 5.
[0117] This embodiment of the disclosure, after adjusting the target length, determines again whether the adjusted target length is equal to the maximum length actually supported by the vehicle controller to be upgraded. If they are equal, the OTA upgrade operation can be performed normally. If they are not equal, the step of adjusting the target length is repeated, thereby ensuring the success rate of the OTA upgrade.
[0118] Optionally, in some embodiments of this disclosure, after the vehicle-mounted system obtains the maximum length corresponding to the vehicle controller, the method further includes: When the maximum length is equal to the target length, the vehicle controller is subjected to an over-the-air upgrade operation as instructed by the over-the-air upgrade command.
[0119] In this embodiment of the disclosure, if the maximum length supported by the vehicle controller to be upgraded is equal to the target length indicated by the over-the-air upgrade command, the corresponding over-the-air upgrade operation can be directly executed according to the over-the-air upgrade command.
[0120] For example, taking the vehicle's infotainment system receiving an over-the-air (OTA) upgrade command from an internet cloud server as an example, after receiving the OTA upgrade command, the vehicle's infotainment system first obtains the target length corresponding to the OTA upgrade command. Then, the vehicle's infotainment system obtains the maximum length of the data writing frame actually supported by the vehicle controller to be upgraded by sending an acquisition command to the vehicle controller to be upgraded, and compares the target length with the maximum length.
[0121] If the target length is equal to the maximum length, the over-the-air upgrade operation is executed directly. Using the initial transmission rate corresponding to the over-the-air upgrade operation, the write data frame corresponding to the over-the-air upgrade command is transmitted to the vehicle controller to be upgraded, thereby completing the over-the-air upgrade operation of the vehicle controller.
[0122] In this embodiment of the invention, when the obtained target length is equal to the maximum length actually supported by the vehicle controller, an over-the-air upgrade operation is directly performed, thereby ensuring upgrade efficiency.
[0123] This disclosure also provides an over-the-air upgrade device for vehicles. Figure 3 Structural block diagrams of vehicle over-the-air upgrade devices according to some embodiments of this disclosure are shown, such as... Figure 3 As shown, the over-the-air upgrade device 300 includes: a determination module 302, an acquisition module 304, and an upgrade module 306.
[0124] The determining module 302 is used to determine the target length of the write data frame corresponding to the over-the-air upgrade command when the over-the-air upgrade command is received. The over-the-air upgrade command is used to instruct the vehicle controller of the vehicle to be upgraded. The acquisition module 304 is used to acquire the maximum length of the flash data frame supported by the vehicle controller; The upgrade module 306 is used to adjust the target length based on the maximum length when the maximum length is not equal to the target length, and to perform the upgrade operation indicated by the over-the-air upgrade command of the vehicle controller.
[0125] This embodiment of the disclosure, when performing an over-the-air (OTA) upgrade on a vehicle's controller, first obtains the target length of the data frame for flashing, as set in the OTA header file, and then obtains the maximum length of the data frame supported by the current vehicle controller to be upgraded. Next, it compares the obtained target length with the maximum length supported by the vehicle controller. If the target length of the data frame for flashing is not equal to the maximum length supported by the vehicle controller, the target length of the data frame for flashing is adjusted to match the maximum length supported by the vehicle controller during the OTA upgrade, and the upgrade operation indicated by the OTA upgrade command continues to be executed after adjusting the target length. By adding a method of adjusting the target length of the data frame corresponding to the OTA upgrade command before executing the OTA upgrade operation, it ensures that even if the maximum length supported by the vehicle controller is different, the target length indicated by the OTA upgrade command is always equal to the actual maximum length supported by the vehicle controller. Therefore, even if the maximum length supported by the vehicle controller is different, the OTA upgrade can still be guaranteed to be successful, and there is no need to develop separate OTA upgrade programs for each different vehicle controller hardware that may be configured in the vehicle, thus improving the success rate of OTA upgrades.
[0126] Optionally, in some embodiments of this disclosure, the determining module is further configured to determine the target transmission rate when transmitting the write data frame to the vehicle controller based on the comparison result of the maximum length and the target length, if the maximum length is not equal to the target length. The upgrade module is also used to transmit the corresponding write data frame for the over-the-air upgrade command to the vehicle controller based on the target transmission rate, so as to perform an over-the-air upgrade operation on the vehicle controller.
[0127] This embodiment of the disclosure ensures successful OTA upgrades by adjusting the target length to be equal to the maximum length actually supported by the vehicle controller to be upgraded when the target length indicated by the over-the-air upgrade command differs from the maximum length actually supported by the vehicle controller to be upgraded. Furthermore, after adjusting the target length, the target transmission rate for transmitting write data frames to the vehicle controller to be upgraded is determined based on the adjusted target length. This ensures that regardless of whether the maximum write length supported by the vehicle controller is greater than or less than the target length, the upgrade process can always be completed within the specified time, thus maintaining a constant OTA upgrade duration while ensuring smooth OTA upgrades.
[0128] Optionally, in some embodiments of this disclosure, the determining module is further configured to determine the target transmission rate as the initial transmission rate corresponding to the over-the-air upgrade command when the maximum length is greater than or equal to the target length; and to determine the target transmission rate based on the initial transmission rate and the maximum length when the maximum length is less than the target length, wherein the target transmission rate is greater than the initial transmission rate.
[0129] This embodiment maintains the initial transmission rate indicated by the OTA upgrade command unchanged when the maximum length supported by the vehicle controller to be upgraded is not less than the target length indicated by the OTA upgrade command. If the maximum length supported by the vehicle controller to be upgraded is less than the target length indicated by the OTA upgrade command, a higher target transmission rate is re-determined based on the adjusted target length, thereby ensuring that the upgrade time for upgrading the vehicle controller does not exceed the upgrade time specified by the over-the-air upgrade command, thus maintaining the OTA upgrade time unchanged while ensuring the smooth progress of the OTA upgrade.
[0130] Optionally, in some embodiments of this disclosure, the determining module is further configured to determine a target rate coefficient based on the maximum length; wherein the target rate coefficient is greater than or equal to 1, and the target rate coefficient is negatively correlated with the maximum length; and to determine a target transmission rate based on the product of the initial transmission rate and the target rate coefficient.
[0131] This embodiment of the disclosure introduces a target rate coefficient K. When the maximum length actually supported by the vehicle controller to be upgraded is less than the target length, the target rate coefficient K is determined according to the maximum length actually supported by the vehicle controller to be upgraded. The target transmission rate when transmitting the write data frame to the vehicle controller is adjusted by the target rate coefficient K, thereby ensuring that the OTA upgrade can always be completed within the specified upgrade time, thus ensuring upgrade efficiency.
[0132] Optionally, in some embodiments of this disclosure, adjusting the target length based on the maximum length includes: The header file corresponding to the over-the-air upgrade command is assigned a value; the assignment operation is used to modify the target length to be equal to the maximum length.
[0133] This embodiment of the present disclosure reassigns the header file when the maximum length supported by the vehicle controller to be upgraded is different from the target length indicated by the over-the-air upgrade command, thereby adjusting the target length indicated by the over-the-air upgrade command to be the same as the maximum length supported by the vehicle controller to be upgraded, thus ensuring the success of the OTA upgrade.
[0134] Optionally, in some embodiments of this disclosure, the over-the-air upgrade device further includes: The sending module is used to send an acquisition command to the vehicle controller; the acquisition command is used to instruct the vehicle controller to read the maximum length of the supported flash data frame and send the maximum length to the vehicle unit through a reply message; The receiving module is used to receive reply messages and determine the maximum length based on the reply information.
[0135] This embodiment of the disclosure first obtains the maximum length of the data frames actually supported by the vehicle controller to be upgraded before performing an OTA upgrade, and then determines whether the maximum length is equal to the target length corresponding to the over-the-air upgrade command. If it is determined that the maximum length and the target length are not equal, the target length is adjusted to be equal to the maximum length actually supported by the vehicle controller to be upgraded by reassigning header values or other means before performing the OTA upgrade operation. This avoids upgrade failures caused by the difference between the actual length and the target length, and improves the upgrade success rate.
[0136] Optionally, in some embodiments of this disclosure, the sending module is further configured to send the acquisition command to the vehicle controller again to obtain the maximum length; The upgrade module is also used to perform upgrade operations indicated by the over-the-air upgrade command of the vehicle controller when the adjusted target length is equal to the maximum length.
[0137] This embodiment of the disclosure, after adjusting the target length, determines again whether the adjusted target length is equal to the maximum length actually supported by the vehicle controller to be upgraded. If they are equal, the OTA upgrade operation can be performed normally. If they are not equal, the step of adjusting the target length is repeated, thereby ensuring the success rate of the OTA upgrade.
[0138] Optionally, in some embodiments of this disclosure, the upgrade module is further configured to perform an over-the-air upgrade operation on the vehicle controller according to the over-the-air upgrade command, provided that the maximum length is equal to the target length.
[0139] In this embodiment of the invention, when the obtained target length is equal to the maximum length actually supported by the vehicle controller, an over-the-air upgrade operation is directly performed, thereby ensuring upgrade efficiency.
[0140] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure.
[0141] In this embodiment of the disclosure, Figure 4 The electronic device shown can be a server or a terminal. Specifically, the terminal includes in-vehicle terminals, computers, or tablets, etc., without limitation.
[0142] like Figure 4 As shown, the electronic device may include a processor 410 and a memory 420 storing computer program instructions.
[0143] Specifically, the processor 410 may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this disclosure.
[0144] Memory 420 may include a large-capacity storage device for information or instructions. For example, and not limitingly, memory 420 may include a hard disk drive (HDD), a floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or a Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 420 may include removable or non-removable (or fixed) media. Where appropriate, memory 420 may be internal or external to the integrated gateway device. In a particular embodiment, memory 420 is a non-volatile solid-state memory. In a particular embodiment, memory 420 includes read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (Electrically Programmable ROM, EPROM), an electrically erasable programmable PROM (EEPROM), an electrically alterable ROM (EAROM), or flash memory, or a combination of two or more of these.
[0145] The processor 410 reads and executes computer program instructions stored in the memory 420 to perform the steps of the data processing method provided in the embodiments of this disclosure.
[0146] In one example, the electronic device may also include a transceiver 430 and a bus 440. Wherein, as... Figure 4 As shown, the processor 410, memory 420 and transceiver 430 are connected via bus 440 and communicate with each other.
[0147] Bus 440 may include hardware, software, or both. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industrial Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses, or a combination of two or more of these. Where appropriate, bus 440 may include one or more buses.
[0148] This disclosure also provides a computer-readable storage medium that can store a computer program, which, when executed by a processor, causes the processor to implement the data processing method provided in this disclosure.
[0149] When a computer program is executed by a processor, it can perform the following steps: Upon receiving an over-the-air upgrade command, determine the target length of the write data frame corresponding to the over-the-air upgrade command. The over-the-air upgrade command is used to instruct the vehicle controller of the vehicle to be upgraded. Get the maximum length of the write data frame supported by the vehicle controller; If the maximum length and the target length are not equal, adjust the target length based on the maximum length and perform the upgrade operation indicated by the over-the-air upgrade command for the vehicle controller.
[0150] Optionally, in some embodiments of this disclosure, after obtaining the maximum length of the write data frame supported by the vehicle controller, the method further includes: When the maximum length and the target length are not equal, the target transmission rate for transmitting the write data frame to the vehicle controller is determined based on the comparison between the maximum length and the target length. Perform the upgrade operation instructed by the over-the-air upgrade command for the vehicle controller, including: Based on the target transmission rate, the over-the-air upgrade command corresponding to the write data frame is transmitted to the vehicle controller to perform an over-the-air upgrade operation on the vehicle controller.
[0151] Optionally, in some embodiments of this disclosure, determining the target transmission rate when transmitting the write data frame to the vehicle controller based on a comparison between the maximum length and the target length includes: If the maximum length is greater than or equal to the target length, the target transmission rate is determined to be the initial transmission rate corresponding to the over-the-air upgrade command; If the maximum length is less than the target length, the target transmission rate is determined based on the initial transmission rate and the maximum length, and the target transmission rate is greater than the initial transmission rate.
[0152] Optionally, in some embodiments of this disclosure, determining the target transmission rate based on the initial transmission rate and the maximum length includes: The target rate coefficient is determined based on the maximum length; wherein the target rate coefficient is greater than or equal to 1, and the target rate coefficient is negatively correlated with the maximum length; The target transmission rate is determined by multiplying the initial transmission rate and the target rate coefficient.
[0153] Optionally, in some embodiments of this disclosure, adjusting the target length based on the maximum length includes: The header file corresponding to the over-the-air upgrade command is assigned a value; the assignment operation is used to modify the target length to be equal to the maximum length.
[0154] Optionally, in some embodiments of this disclosure, obtaining the maximum length of the flash data frame supported by the vehicle controller includes: Send an acquisition command to the vehicle controller; the acquisition command is used to instruct the vehicle controller to read the maximum length of the supported flash data frame and send the maximum length to the vehicle unit via a reply message; Receive the reply message and determine the maximum length based on the reply information.
[0155] Optionally, in some embodiments of this disclosure, after adjusting the target length based on the maximum length, the method further includes: Send the acquisition command to the vehicle controller again to obtain the maximum length; Perform the upgrade operation instructed by the over-the-air upgrade command for the vehicle controller, including: If the adjusted target length is equal to the maximum length, perform the upgrade operation indicated by the over-the-air upgrade command for the vehicle controller.
[0156] Optionally, in some embodiments of this disclosure, after the vehicle-mounted system obtains the maximum length corresponding to the vehicle controller, the method further includes: When the maximum length is equal to the target length, the vehicle controller is subjected to an over-the-air upgrade operation as instructed by the over-the-air upgrade command.
[0157] This embodiment of the disclosure, when performing an over-the-air (OTA) upgrade on a vehicle's controller, first obtains the target length of the data frame for flashing, as set in the OTA header file, and then obtains the maximum length of the data frame supported by the current vehicle controller to be upgraded. Next, it compares the obtained target length with the maximum length supported by the vehicle controller. If the target length of the data frame for flashing is not equal to the maximum length supported by the vehicle controller, the target length of the data frame for flashing is adjusted to match the maximum length supported by the vehicle controller during the OTA upgrade, and the upgrade operation indicated by the OTA upgrade command continues to be executed after adjusting the target length. By adding a method of adjusting the target length of the data frame corresponding to the OTA upgrade command before executing the OTA upgrade operation, it ensures that even if the maximum length supported by the vehicle controller is different, the target length indicated by the OTA upgrade command is always equal to the actual maximum length supported by the vehicle controller. Therefore, even if the maximum length supported by the vehicle controller is different, the OTA upgrade can still be guaranteed to be successful, and there is no need to develop separate OTA upgrade programs for each different vehicle controller hardware that may be configured in the vehicle, thus improving the success rate of OTA upgrades.
[0158] The aforementioned storage medium may include a memory 420 for computer program instructions, which can be executed by a processor 410 of an electronic device to complete the data processing method provided in the embodiments of this disclosure. Optionally, the storage medium may be a non-transitory computer-readable storage medium, such as read-only memory (ROM), random access memory (RAM), external cache memory, compact disc ROM (CD-ROM), magnetic tape, floppy disk, flash memory, and optical data storage devices. By way of illustration and not limitation, RAM is available in various forms, such as static random access memory (SRAM) and dynamic random access memory (DRAM).
[0159] This disclosure also provides a vehicle that includes electronic devices that can implement the various processes and effects described in the above embodiments of this disclosure, which will not be elaborated here.
[0160] This disclosure also provides a computer program product, which includes a computer program or instructions. When the computer program or instructions are executed by a processor, they implement the data processing method provided in this disclosure and can achieve the various processes and effects in the above embodiments of this disclosure, which will not be elaborated here.
[0161] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0162] The above description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for over-the-air vehicle upgrades, characterized in that, The method includes: Upon receiving an over-the-air upgrade command, the target length of the write data frame corresponding to the over-the-air upgrade command is determined. The over-the-air upgrade command is used to instruct the vehicle controller of the vehicle to be upgraded. Obtain the maximum length of the data frame that the vehicle controller supports for writing; If the maximum length is not equal to the target length, the target length is adjusted based on the maximum length, and the upgrade operation indicated by the over-the-air upgrade command of the vehicle controller is performed.
2. The method according to claim 1, characterized in that, After obtaining the maximum length of the flash data frame supported by the vehicle controller, the method further includes: If the maximum length is not equal to the target length, the target transmission rate for transmitting the write data frame to the vehicle controller is determined based on the comparison result between the maximum length and the target length. The execution of the upgrade operation indicated by the over-the-air upgrade command to the vehicle controller includes: Based on the target transmission rate, the over-the-air upgrade command corresponding to the flash data frame is transmitted to the vehicle controller to perform an over-the-air upgrade operation on the vehicle controller.
3. The method according to claim 2, characterized in that, The step of determining the target transmission rate for transmitting the write data frame to the vehicle controller based on the comparison result between the maximum length and the target length includes: If the maximum length is greater than or equal to the target length, the target transmission rate is determined to be the initial transmission rate corresponding to the over-the-air upgrade command; If the maximum length is less than the target length, the target transmission rate is determined based on the initial transmission rate and the maximum length, wherein the target transmission rate is greater than the initial transmission rate.
4. The method according to claim 3, characterized in that, Determining the target transmission rate based on the initial transmission rate and the maximum length includes: The target rate coefficient is determined based on the maximum length; wherein the target rate coefficient is greater than or equal to 1, and the target rate coefficient is negatively correlated with the maximum length; The target transmission rate is determined by multiplying the initial transmission rate and the target rate coefficient.
5. The method according to any one of claims 1 to 4, characterized in that, Adjusting the target length based on the maximum length includes: The header file corresponding to the over-the-air upgrade command is assigned a value; wherein the assignment operation is used to modify the target length to be equal to the maximum length.
6. The method according to any one of claims 1 to 4, characterized in that, The step of obtaining the maximum length of the flash data frame supported by the vehicle controller includes: Send an acquisition command to the vehicle controller; the acquisition command is used to instruct the vehicle controller to read the maximum length of the supported flash data frame and send the maximum length to the vehicle unit through a reply message; Receive the reply message and determine the maximum length based on the reply information.
7. The method according to claim 6, characterized in that, After adjusting the target length based on the maximum length, the method further includes: Send the acquisition command to the vehicle controller again to obtain the maximum length of the write data frame supported by the vehicle controller; The execution of the upgrade operation indicated by the over-the-air upgrade command to the vehicle controller includes: If the adjusted target length is equal to the maximum length, perform the upgrade operation indicated by the over-the-air upgrade command to the vehicle controller.
8. The method according to any one of claims 1 to 4, characterized in that, After the vehicle infotainment system obtains the maximum length corresponding to the vehicle controller, the method further includes: When the maximum length is equal to the target length, the vehicle controller performs the over-the-air upgrade operation indicated by the over-the-air upgrade command according to the over-the-air upgrade command.
9. An electronic device, characterized in that, include: Memory; processor; as well as Executable program code; The executable program code is stored in the memory and configured to be executed by the processor to implement the method as described in any one of claims 1-8.
10. A vehicle, characterized in that, include: The electronic device as described in claim 9.