Automobile software upgrading method and in-vehicle infotainment
By chunking the entire software upgrade package into multiple upgrade chunk packages and merging and upgrading, the stability and efficiency problems of OTA transmission when the network is poor is solved, and a more efficient software upgrade process is achieved.
Patent Information
- Application Number
- CN202411394025.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-08
- Publication Date
- 2025-03-21
AI Technical Summary
In the case of too large software upgrade package or poor network environment, OTA transmission can easily lead to abnormal download or interruption, and poor stability and efficiency.
By chunking the software upgrade package into multiple upgrade packages and equipped with a storage record table, the vehicle machine merges the software upgrade package to upgrade after receiving each upgrade package.
Block transmission avoids download abnormalities or interruptions caused by poor network quality, improves the stability and efficiency of OTA, and improves the quality of software upgrades.
Smart Images

Figure CN119676079A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of intelligent connected vehicles, and in particular to a method for upgrading vehicle software and a vehicle computer. Background Art
[0002] With the development of automobile networking technology, Over-the-Air Technology (OTA) can automatically download the entire software upgrade package from the cloud server to the vehicle for local upgrade. For example, the Electronic Control Unit (ECU) of each control unit on the car, such as the power chassis domain ECU, body domain ECU, intelligent driving domain ECU, cockpit domain ECU, etc., can all be remotely upgraded through OTA.
[0003] However, when the software upgrade package is too large or the network environment is poor, the use of related technologies for OTA transmission can easily lead to download anomalies or interruptions, and the stability and efficiency of OTA are poor. Summary of the invention
[0004] The embodiment of the present application provides a method for upgrading automobile software and a vehicle computer. The technical solution is as follows:
[0005] On the one hand, an embodiment of the present application provides a method for upgrading automobile software, which is applied to a vehicle computer and includes:
[0006] Send software upgrade request to the server;
[0007] Receiving an upgrade block package and a storage record table sent by the server, wherein the upgrade block package is obtained based on the software upgrade whole package requested by the software upgrade request, and the storage record table is used to record the block identifiers of each upgrade block package in the software upgrade whole package;
[0008] When each of the upgrade block packages in the software upgrade whole package is received, the vehicle software is upgraded based on the software upgrade whole package obtained by merging each of the upgrade block packages.
[0009] On the other hand, an embodiment of the present application provides a vehicle software upgrade device, the device comprising:
[0010] A request module, used to send a software upgrade request to the server;
[0011] A receiving module, used for receiving an upgrade block package and a storage record table sent by the server, wherein the upgrade block package is obtained based on the software upgrade whole package requested by the software upgrade request, and the storage record table is used for recording the block identifiers of each upgrade block package in the software upgrade whole package;
[0012] The upgrade module is used to upgrade the automobile software based on the software upgrade whole package obtained by merging the upgrade block packages in the software upgrade whole package after receiving the upgrade block packages in the software upgrade whole package.
[0013] On the other hand, an embodiment of the present application provides a method for upgrading automobile software, which is applied to a server and includes:
[0014] In case of receiving a software upgrade request sent by the vehicle computer, sending an upgrade block package and a storage record table to the vehicle computer, wherein the upgrade block package is obtained based on the software upgrade whole package requested by the software upgrade request, and the storage record table is used to record the block identifiers of each upgrade block package in the software upgrade whole package;
[0015] The vehicle computer is used to upgrade the vehicle software based on the software upgrade whole package obtained by merging the upgrade block packages when receiving the upgrade block packages in the software upgrade whole package.
[0016] On the other hand, an embodiment of the present application provides a vehicle computer, which includes a processor and a memory, wherein the memory stores at least one computer instruction, and the at least one computer instruction is loaded and executed by the processor to implement the automobile software upgrade method applied to the vehicle computer as described in the above aspects.
[0017] On the other hand, an embodiment of the present application provides a server, which includes a processor and a memory, wherein at least one program code is stored in the memory, and the at least one program code is loaded and executed by the processor to implement the automobile software upgrade method applied to the server as described in the above aspects.
[0018] In an embodiment of the present application, the vehicle computer sends a software upgrade request to the server to receive the upgrade block package and storage record table sent by the server. Since the upgrade block package is obtained based on the software upgrade whole package requested by the software upgrade request, for a software upgrade whole package that is too large, download anomalies or interruptions caused by factors such as poor network quality during the movement of the car can be avoided by blocking, thereby improving the stability and efficiency of OTA and improving the quality of software upgrades. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0020] Figure 1is a flow chart of a method for upgrading automobile software provided by an exemplary embodiment of the present application;
[0021] Figure 2 is a schematic diagram of a method for upgrading automobile software provided by an exemplary embodiment of the present application;
[0022] Figure 3 It is a schematic diagram of encrypting an upgrade block package by a server provided by an exemplary embodiment of the present application;
[0023] Figure 4 It is a schematic diagram of a vehicle computer decrypting an encrypted upgrade block package provided by an exemplary embodiment of the present application;
[0024] Figure 5 is a structural block diagram of a vehicle software upgrade device provided by an exemplary embodiment of the present application;
[0025] Figure 6 It is a structural block diagram of a vehicle computer provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0026] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0027] First, the terms involved in the embodiments of the present application are introduced.
[0028] Over-the-Air Technology (OTA): A technology that remotely manages mobile terminal devices and SIM card data through the air interface of mobile communications. Specifically in the automotive software OTA scenario, the car includes a gateway for the networking module to implement online system updates, data transmission, software and hardware upload, download, code update and other functions.
[0029] Vehicle-side upgrade management module (OTA Manager): A management module responsible for connecting the vehicle with the cloud upgrade management platform. It implements secure communication with the cloud, including protocol communication link management, upgrade command reception and upgrade status sending, upgrade package download, upgrade package decryption, differential package reconstruction and other functions.
[0030] Cloud upgrade management platform (OTA Server): responsible for software upgrade management such as upgrade strategy, upgrade tasks, software version, data analysis, etc. The connection between the vehicle and the cloud can be at least one of WiFi, cellular network, near field communication (Bluetooth, LoRa, ZigBee, etc.) to enable the upgrade package and vehicle flashing strategy to be sent to the vehicle for execution, thus completing the ultimate goal of vehicle software upgrade.
[0031] Software upgrade task: It is a set of upgrade activities that the vehicle-side upgrade management module uses to execute and monitor a group of equipment. Software upgrade tasks may include the management of the entire group of activities such as upgrade task creation, distribution, monitoring, and status maintenance for a specific range of equipment using corresponding upgrade packages and upgrade strategies. In related technologies, in the event of an abnormality during the firmware upgrade or software update process, rollback management is provided to return to the previous version to ensure user use.
[0032] SM2 algorithm: A public key cryptographic algorithm based on elliptic curves, whose security mainly depends on the difficulty of the elliptic curve discrete logarithm problem. The SM2 algorithm mainly includes three parts: digital signature, key exchange and public key encryption. The SM2 algorithm is an asymmetric encryption algorithm independently developed by my country. It is based on the principles of elliptic curve cryptography and has significant advantages. It is widely used in the fields of national information security and commercial cryptography.
[0033] SM4 algorithm: A block cipher algorithm, mainly composed of a key expansion algorithm and a round function. The SM4 algorithm is a symmetric encryption algorithm and an important component of my country's commercial cryptographic system. Similar to the widely used AES and other algorithms internationally, the SM4 algorithm is also used to protect the confidentiality of data and ensure that information is not stolen or tampered with by unauthorized third parties during transmission.
[0034] During the OTA upgrade process of a car, if the software upgrade package is too large or the network environment is poor (for example, the vehicle's signal is unstable or other factors that cause the network quality to deteriorate), download abnormalities or interruptions may occur.
[0035] In order to avoid download anomalies or interruptions caused by software upgrade packages being too large or poor network conditions and to improve the transmission reliability of automobile OTA upgrades, this application proposes an automobile software upgrade method.
[0036] See also Figure 1 , Figure 1 1 is a flow chart of a method for upgrading automobile software provided by an exemplary embodiment of the present application. In some embodiments, the method for upgrading automobile software is applied to a vehicle computer, and the method includes the following steps.
[0037] Step 101: Send a software upgrade request to a server.
[0038] In some embodiments, the vehicle computer can establish a network connection with the server through at least one of WiFi, cellular network, near field communication (Bluetooth, LoRa, ZigBee, etc.), without limitation.
[0039] In one possible scenario, when there is a need for software upgrade, the vehicle computer may display a reminder of software upgrade on the vehicle computer screen, and when the user authorizes the software upgrade, the vehicle computer sends a software upgrade request to the server.
[0040] Optionally, the software upgrade request is used to request to update any possible software or upgrade the firmware in the car. For example, the software or firmware in different vehicle-side functional domains such as the power system domain, body system domain, audio and video entertainment domain, ADAS active safety domain, and autonomous driving domain can be updated and upgraded without restriction.
[0041] Optionally, the software upgrade request includes identification information corresponding to the software or firmware requested to be upgraded, or the software upgrade request may also include vehicle computer information (such as vehicle computer model, vehicle computer identification, etc.).
[0042] In one possible scenario, the vehicle computer manages the vehicle-side public key. When sending a software upgrade request to the server, the vehicle computer can also send the vehicle-side public key to the server so that the server can use the vehicle-side public key for subsequent encryption processes.
[0043] Step 102, receiving the upgrade block package and storage record table sent by the server, the upgrade block package is obtained based on the software upgrade whole package requested by the software upgrade request, and the storage record table is used to record the block identifiers of each upgrade block package in the software upgrade whole package.
[0044] In some embodiments, upon receiving a software upgrade request sent by the vehicle, the server determines the latest software upgrade package that matches the vehicle model based on the software upgrade request.
[0045] In a possible implementation, the server pre-stores the software upgrade package blocks to obtain the upgrade block packages.
[0046] For example only, for a software upgrade package of 1000M, the server pre-stores 10 upgrade block packages obtained by dividing the software upgrade package into 100M blocks in the database. When receiving the software upgrade request sent by the vehicle computer, the server obtains the 10 upgrade block packages from the database and sends them to the vehicle computer.
[0047] In another possible implementation, upon receiving a software upgrade request sent by the vehicle computer, the server may also segment the entire software upgrade package into blocks. For example, the amount of block data may be determined according to the real-time network performance, and the entire software upgrade package may be segmented according to the amount of block data to obtain an upgrade block package.
[0048] Optionally, when dividing the entire software upgrade package into blocks, the server may number each upgrade block package. For example, the upgrade block package may be represented by a block identifier, and the block identifier of each upgrade block package may be recorded in the storage record table.
[0049] Optionally, when the server divides the software upgrade package into blocks, it may also record the number of block packages, the size of the block packages, and the block identifiers corresponding to the upgrade block packages obtained by dividing the software upgrade package into blocks in the storage record table.
[0050] Optionally, the server can also calculate the whole package verification value based on the software upgrade package (for example, the MD5 value corresponding to the whole software upgrade package), and calculate the block verification value based on the upgrade block package (for example, the MD5 value corresponding to the upgrade block package), and record the whole package verification value and the block verification value in the storage record table.
[0051] In addition, the storage record table may also include other information related to the software upgrade package and the upgrade block package, such as file size, segmentation point position when segmenting, starting address of the upgrade block package in the software upgrade package, etc., without limitation.
[0052] Step 103 , when receiving the upgrade block packages in the software upgrade package, the vehicle software is upgraded based on the software upgrade package obtained by merging the upgrade block packages.
[0053] In some embodiments, when receiving the individual upgrade block packages in the entire software upgrade package, the vehicle computer can first perform a security check and an integrity check on each upgrade block package. If the check passes, based on the block identifiers of each upgrade block package in the storage record table, the individual upgrade block packages can be merged to obtain the entire software upgrade package.
[0054] Regarding the method for determining whether all upgrade block packages in the entire software upgrade package have been received, in one possible implementation, the vehicle computer can match the identifiers contained in the upgrade block packages received within the time threshold with the block identifiers of each upgrade block package in the storage record table. When the one-to-one matching is successful, the vehicle computer determines that all upgrade block packages in the entire software upgrade package have been received.
[0055] In a possible implementation, after the software upgrade package is merged, the vehicle computer can run the software upgrade package to upgrade the vehicle software.
[0056] To summarize, the vehicle computer sends a software upgrade request to the server to receive the upgrade block package and storage record table sent by the server. Since the upgrade block package is obtained based on the software upgrade whole package requested by the software upgrade request, for a software upgrade whole package that is too large, download anomalies or interruptions caused by factors such as poor network quality during the movement of the car can be avoided by blocking, thereby improving the stability and efficiency of OTA and improving the quality of software upgrades.
[0057] Regarding the method for the vehicle computer to determine whether it has received each upgrade block package in the entire software upgrade package, in some embodiments, the vehicle computer determines that each upgrade block package in the entire software upgrade package has been received when the identifier contained in the received upgrade block package matches the block identifier corresponding to each upgrade block package in the entire software upgrade package in the storage record table one by one.
[0058] Exemplarily, the entire software upgrade package is divided into 10 upgrade block packages, and the block identifiers corresponding to the 10 upgrade block packages are block identifier 1, block identifier 2, ..., block identifier 10, then when the identifiers contained in the 10 upgrade block packages received by the vehicle computer are also block identifiers 1 to 10, the vehicle computer determines that it has received each upgrade block package in the entire software upgrade package.
[0059] In some embodiments, when each upgrade block package in the software upgrade package is not received within the time threshold, the vehicle computer sends a retransmission request to the server.
[0060] The retransmission request is used to request the server to retransmit the upgrade block package.
[0061] Optionally, when the current upgrade block package is received and the next upgrade block package is not received within a time threshold, the vehicle computer sends a retransmission request to the server.
[0062] For example only, the duration threshold is a value preset by the vehicle computer, such as 10s.
[0063] It should be noted that, in order to reduce the retransmission time and network overhead, in some embodiments, the server does not retransmit all the upgrade block packets, but resumes the transmission from the first upgrade block packet that has not been received.
[0064] In some embodiments, the storage record table is also used to record the starting addresses corresponding to each upgrade block package in the software upgrade package. When each upgrade block package in the software upgrade package is not received within the time threshold, the vehicle computer determines the breakpoint upgrade block package based on the storage record table, and the breakpoint upgrade block package is the first upgrade block package that has not been received.
[0065] Exemplarily, the vehicle computer receives the upgrade block packages corresponding to block identifiers 1 to 5 sent by the server in sequence, but when the sixth upgrade block package corresponding to block identifier 6 is not received within the time threshold, the vehicle computer determines that the breakpoint upgrade block package is the sixth upgrade block package corresponding to block identifier 6.
[0066] In some embodiments, the vehicle computer sends a breakpoint resume request to the server, and the breakpoint resume request is used to request the server to resume the breakpoint upgrade block package and the subsequent upgrade block package based on the starting address corresponding to the breakpoint upgrade block package and the subsequent upgrade block package.
[0067] Exemplarily, when the breakpoint upgrade block package is the 6th upgrade block package corresponding to block identifier 6, the vehicle computer sends a breakpoint resume request to the server to request the server to retransmit the 6th to 10th upgrade block packages according to the starting addresses of the upgrade block packages corresponding to block identifiers 6 to 10.
[0068] To ensure data security and improve software upgrade quality, in some embodiments, the storage record table is also used to record the block verification values corresponding to the upgrade block packages and the whole package verification values corresponding to the software upgrade whole package.
[0069] Exemplarily, the server may calculate an MD5 checksum value for each upgrade block package as a block checksum value, and calculate an MD5 checksum value for the entire software upgrade package as a whole package checksum value.
[0070] In some embodiments, when receiving the upgrade block package, the vehicle computer can determine the block verification result of the upgrade block package based on the block verification value.
[0071] For example, the vehicle computer calculates the MD5 check value based on the received upgrade block package. If the calculated check value is consistent with the block check value corresponding to the upgrade block package in the storage record table, it is determined that the block check result of the upgrade block package indicates a successful verification; if they are inconsistent, it is determined that the block check result of the upgrade block package indicates a failed verification.
[0072] In some embodiments, when receiving the individual upgrade block packages in the software upgrade whole package, the vehicle computer determines the whole package verification result of the software upgrade whole package obtained by merging the individual upgrade block packages based on the whole package verification value.
[0073] For example, when the vehicle computer receives the individual upgrade block packages in the software upgrade whole package, it merges the individual upgrade block packages to obtain the software upgrade whole package, and calculates the MD5 check value for the software upgrade whole package. If the calculated check value is consistent with the whole block check value corresponding to the software upgrade whole package in the storage record table, then the whole block check result of the software upgrade whole package is determined to indicate a successful verification; if they are inconsistent, then the whole block check result is determined to indicate a failed verification.
[0074] In some embodiments, when the block verification results of each upgrade block package indicate successful verification, and the whole package verification result of the software upgrade whole package also indicates successful verification, the vehicle software is upgraded based on the software upgrade whole package.
[0075] In some embodiments, when the verification result of the entire package indicates a verification failure, or when the block verification result of at least one upgraded block package indicates a verification failure, the vehicle computer feeds back a verification failure message to the server.
[0076] See also Figure 2 , Figure 2 It is a schematic diagram of a method for upgrading automobile software provided by an exemplary embodiment of the present application.
[0077] like Figure 2 As shown, when the server's cloud upgrade management platform 210 (OTA Server) receives a software upgrade request sent by the vehicle computer, the OTA Server determines the latest software upgrade package that matches the vehicle model, and divides the software upgrade package into blocks to obtain individual upgrade block packages (such as pack1, pack2, pack3 and pack4).
[0078] Based on the block status of the software upgrade package, the OTA Server determines the storage record table. Optionally, the storage record table can be used to record the block identifiers of each upgrade block package in the software upgrade package, the corresponding starting addresses of the upgrade block packages in the software upgrade package, the block check values corresponding to the upgrade block packages, and the whole package check value corresponding to the software upgrade package, etc.
[0079] The OTA Server encrypts the upgrade block package based on the SM2 algorithm and the SM4 algorithm to obtain the encrypted upgrade block package, and sends the encrypted upgrade block package to the TCU / T-Box module of the vehicle computer.
[0080] The vehicle computer receives the encrypted upgrade block package and storage record table sent by the server through the TCU / T-Box module, and decrypts the encrypted upgrade block package to obtain the decrypted upgrade block package. The TCU / T-Box module downloads the decrypted upgrade block package to the vehicle-side upgrade management module 220 (OTA Manager).
[0081] When all upgrade sub-packages in the software upgrade package are downloaded, OTA Manager merges the sub-packages to obtain the software upgrade package, and distributes the software upgrade package to the corresponding ECUs (for example, power chassis domain ECUs, body domain ECUs, intelligent driving domain ECUs, cockpit domain ECUs) when the verification result of the whole package indicates that the verification is successful. If the verification result of the whole package indicates that the verification fails, OTA Manager feedbacks the data tampering information to TCU / T-Box, so that TCU / T-Box requests the server to retransmit the upgrade sub-package.
[0082] If there are upgrade blocks that have not been downloaded in the software upgrade package, the OTA Manager determines whether to continue downloading based on network performance. If it is determined to continue downloading, the OTA Manager sends a breakpoint resume request to the breakpoint resume module in the OTA Server to enable the OTA Server to retransmit the breakpoint upgrade block package and its subsequent upgrade block packages. If it is determined not to continue downloading, the upgrade task is canceled.
[0083] To improve security, in some embodiments, the upgrade block package sent by the server to the vehicle computer is an encrypted upgrade block package encrypted by an encryption algorithm. After receiving the encrypted upgrade block package, the vehicle computer needs to obtain the upgrade block package by decryption.
[0084] In some embodiments, the vehicle computer receives the encrypted upgrade block package and the storage record table sent by the server, the encrypted upgrade block package is encrypted by the server based on the upgrade block package, and the vehicle computer decrypts the encrypted upgrade block package to obtain the decrypted upgrade block package.
[0085] See also Figure 3 , Figure 3 It is a schematic diagram of encrypting upgrade block packages by a server provided by an exemplary embodiment of the present application.
[0086] The process of encrypting the upgrade block package includes the following steps.
[0087] Step 3.1, the vehicle sends a software upgrade request and the vehicle public key to the server.
[0088] In step 3.2, the cloud upgrade management platform 310 (OTA Server) in the server 301 requests the server private key, server public key and symmetric key (k) from the key management system 320 (KMS), wherein the server public key is determined based on the server public key digital certificate.
[0089] Step 3.3, the OTA Server performs SM2 encryption on the symmetric key k based on the received vehicle-side public key to obtain an encrypted symmetric key (k*).
[0090] In step 3.4, the OTA Server determines the latest software upgrade package that matches the vehicle model based on the received software upgrade request, and divides the software upgrade package into blocks to obtain upgrade block packages.
[0091] In step 3.5, the OTA Server adds each upgrade block package to the distribution queue.
[0092] In step 3.6, the OTA Server performs SM4 encryption on the upgrade block package (A) based on the symmetric key (k) to obtain an encrypted upgrade block package (A*).
[0093] In step 3.7, the OTA Server uses a hash function to obtain the digest value (Z) corresponding to the upgrade block package (A), and performs SM2 encryption on the digest value (Z) based on the server private key to obtain a digital signature (Z*).
[0094] Step 3.8: The server sends the encrypted upgrade block package, digital signature, encrypted symmetric key and server public key to the vehicle computer.
[0095] See also Figure 4 , Figure 4 It is a schematic diagram of decrypting an encrypted upgrade block package by a vehicle computer provided by an exemplary embodiment of the present application.
[0096] The vehicle computer decrypts the encrypted upgrade block package including the following steps.
[0097] Step 4.1, the vehicle receives the encrypted upgrade block package, digital signature, encrypted symmetric key, server public key and storage record table sent by the server through TCU / T-Box (410).
[0098] Among them, the encrypted upgrade block package (A*) is obtained by SM4 encryption of the upgrade block package (A) based on the symmetric key (k), the digital signature (Z*) is obtained by SM2 encryption of the summary value (Z) of the upgrade block package based on the server private key, and the encrypted symmetric key (k*) is obtained by SM2 encryption of the symmetric key (k) based on the vehicle-side public key.
[0099] Step 4.2, decrypt the encrypted upgrade block package (A*) to obtain the decrypted upgrade block package (A).
[0100] Specifically, step 4.2 includes step 4.2.1 and step 4.2.2.
[0101] Step 4.2.1, perform SM2 decryption on the encrypted symmetric key (k*) based on the vehicle-side private key to obtain the symmetric key (k).
[0102] Step 4.2.2, perform SM4 decryption on the encrypted upgrade block package (A*) based on the symmetric key (k) to obtain the decrypted upgrade block package (A).
[0103] Step 4.3, based on the digital signature (Z*), determine whether the decrypted upgrade block package (A) has been tampered with.
[0104] Specifically, step 4.3 includes step 4.3.1, step 4.3.2 and step 4.3.3.
[0105] Step 4.3.1, perform SM2 decryption on the digital signature (Z*) based on the server public key to obtain the decrypted digital signature.
[0106] Step 4.3.2, determine the decryption digest value of the decrypted upgrade block package (A) based on the hash function.
[0107] Step 4.3.3, when the decrypted digital signature is consistent with the decrypted summary value, it is determined that the decrypted upgrade block package has not been tampered with; when the decrypted digital signature is inconsistent with the decrypted summary value, it is determined that the decrypted upgrade block package has been tampered with.
[0108] In some embodiments, when the decrypted upgrade block package indicates that it has not been tampered with, the vehicle computer determines that the upgrade block package has been received, and the OTA Manager (420) executes subsequent steps (including downloading the upgrade block package to the storage unit, verifying and merging the upgrade block package; or, resuming the download in the event of an unexpected interruption).
[0109] In some embodiments, when the tampering condition of the decrypted upgrade block package indicates that it has been tampered with, the vehicle computer uploads an information security warning to the server to feedback that the data in the upgrade block package has been tampered with.
[0110] In this embodiment, the entire software upgrade package is divided into blocks, combined with breakpoint resume technology and SM4 and SM2 multi-layer encryption and decryption technology, which can improve the stability and efficiency of file transmission. Especially in the case of large file transmission or unstable network, the method of this embodiment can reduce the time and network overhead of retransmission, and significantly improve the speed and reliability of transmission.
[0111] Regarding the specific method of dividing the software upgrade package into blocks to obtain upgrade block packages, in some embodiments, the block data volume of the blocks can be determined according to the real-time network performance, so that the block data volume of the transmitted upgrade block package is more in line with the real-time network performance, thereby improving the real-time transmission quality.
[0112] In a possible implementation, the vehicle computer and the server establish a network transmission test.
[0113] The network transmission performance obtained from the network transmission test is used to indicate the amount of data blocks that the server divides into blocks for the entire software upgrade package, and the amount of data blocks is positively correlated to the network transmission performance.
[0114] For example only, when the network transmission performance is good, the block data volume can be 200M; when the network transmission performance is average, the block data volume can be 100M; when the network transmission performance is poor, the block data volume can be 50M.
[0115] Optionally, the vehicle computer can send a test data packet to the server through a network connection, and determine the real-time network performance based on the reception time of the reception message of the test data packet returned by the server.
[0116] In some embodiments, the vehicle computer may send real-time network performance to the server, and the server may determine the corresponding block data volume based on the real-time network performance; in other embodiments, the vehicle computer may directly send the corresponding block data volume determined by the real-time network performance to the server.
[0117] In some embodiments, when the amount of block data is less than the data amount threshold, the vehicle computer displays a delayed upgrade prompt.
[0118] The delayed upgrade prompt is used to prompt the receiving server to send an upgrade block package when the network transmission performance meets the performance requirements.
[0119] For example, a delayed upgrade reminder can prompt users to upgrade their software when they move to a location with better network performance.
[0120] In some embodiments, when the block data volume is greater than or equal to the data volume threshold, an upgrade block package of the block data volume sent by the receiving server is received.
[0121] For example only, the data volume threshold may be a value preset by the vehicle computer, such as 40M.
[0122] In this embodiment, by determining the amount of block data corresponding to the network transmission performance through network transmission testing, the upgrade block packages divided by the server can be made suitable for transmission in the real-time network, thereby further improving the transmission quality of the upgrade block packages and improving the quality of automobile software upgrades.
[0123] In one possible scenario, in order to improve the quality of software upgrades, the vehicle computer can also determine a time period and location suitable for software upgrades based on the network conditions and location within a historical period.
[0124] In some embodiments, the vehicle computer predicts at least one target time period in which the network transmission performance reaches the first performance requirement based on the vehicle computer networking data within a historical time period.
[0125] Optionally, the vehicle networking data includes at least one of vehicle video playback data, vehicle audio playback data, vehicle radio playback data, and vehicle navigation data.
[0126] For example, the vehicle computer can obtain different vehicle computer networking data such as the smoothness of the vehicle computer video playback, the smoothness of the audio or radio playback, or the navigation result search speed in different historical time periods (such as 7:00-9:00 in the morning, 12:00-1:00 in the afternoon, or 9:00-10:00 in the evening) to determine the network transmission performance in different historical time periods.
[0127] For example only, the first performance requirement is a performance requirement preset by the vehicle computer, such as 100 Mbps.
[0128] In a possible implementation, the vehicle computer may collect data from multiple dates, and determine a historical period in which the date when the network transmission performance reaches the first performance requirement exceeds a date quantity threshold as a target period.
[0129] In another possible implementation, the vehicle computer can also input the vehicle computer networking data of different historical time periods on multiple dates and the first performance requirement into the machine learning model, and the machine learning model predicts at least one target time period in which the network transmission performance reaches the first performance requirement.
[0130] In some embodiments, the vehicle computer predicts at least one target location where the network transmission performance reaches a second performance requirement based on the vehicle computer positioning information within at least one target time period, and the second performance requirement is higher than the first performance requirement.
[0131] For example only, the second performance requirement is a performance requirement preset by the vehicle computer, such as 200 Mbps.
[0132] Optionally, the target location can be a specific map point or an area range.
[0133] In one possible implementation, the vehicle computer may directly determine all locations during the target period when the network transmission performance reaches the second performance requirement as target locations; in another possible implementation, the vehicle computer may also select several locations with the highest frequency from the locations during the target period when the network transmission performance reaches the second performance requirement and determine them as target locations.
[0134] In some embodiments, when there is a need for automobile software upgrade, the vehicle computer sends a software upgrade request to the server when the current time period belongs to one of the at least one target time period and the current location is located at one of the at least one target location. Based on the received software upgrade request, the server uses the block data volume corresponding to the second performance requirement as the preset data volume, and blocks the entire software upgrade package based on the preset data volume to obtain an upgrade block package.
[0135] In some embodiments, the vehicle computer receives an upgrade block package with a preset data volume sent by the server.
[0136] In this embodiment, the vehicle computer determines the time period and location suitable for software upgrade based on the network conditions and location in the historical period. The server divides the software upgrade package into blocks according to the preset data volume to obtain individual upgrade block packages, and transmits the upgrade block packages to the vehicle computer, which can further improve the network transmission quality and ensure OTA stability.
[0137] The embodiment of the present application provides a method for upgrading automobile software, which is applied to a server and includes:
[0138] In case of receiving a software upgrade request sent by the vehicle computer, sending an upgrade block package and a storage record table to the vehicle computer, wherein the upgrade block package is obtained based on the software upgrade whole package requested by the software upgrade request, and the storage record table is used to record the block identifiers of each upgrade block package in the software upgrade whole package;
[0139] The vehicle computer is used to upgrade the vehicle software based on the software upgrade whole package obtained by merging the upgrade block packages when receiving the upgrade block packages in the software upgrade whole package.
[0140] For content that applies to the server side, see above. Figure 1 The corresponding embodiments and related descriptions are not repeated here.
[0141] See also Figure 5 , Figure 5 This is a structural block diagram of a vehicle software upgrade device provided by an exemplary embodiment of the present application. The device includes:
[0142] Request module 501, used to send a software upgrade request to the server;
[0143] A receiving module 502 is used to receive an upgrade block package and a storage record table sent by the server, wherein the upgrade block package is obtained based on the software upgrade whole package requested by the software upgrade request, and the storage record table is used to record the block identifiers of each upgrade block package in the software upgrade whole package;
[0144] The upgrade module 503 is used to upgrade the vehicle software based on the software upgrade whole package obtained by merging the upgrade block packages in the software upgrade whole package when the upgrade block packages are received.
[0145] Optionally, the device further includes a retransmission module, configured to:
[0146] When the identifiers contained in the received upgrade block packages match the block identifiers corresponding to the upgrade block packages in the software upgrade whole package in the storage record table one by one, determining that the upgrade block packages in the software upgrade whole package are received;
[0147] When each of the upgrade block packages in the software upgrade whole package is not received within a time threshold, a retransmission request is sent to the server, wherein the retransmission request is used to request the server to retransmit the upgrade block package.
[0148] Optionally, the storage record table is further used to record the starting address corresponding to each of the upgrade block packages in the software upgrade package, and the retransmission module is used to:
[0149] In the case that each of the upgrade block packages in the software upgrade package is not received within the time threshold, determining a breakpoint upgrade block package based on the storage record table, the breakpoint upgrade block package being the first upgrade block package that has not been received;
[0150] Send a breakpoint resume request to the server, wherein the breakpoint resume request is used to request the server to resume the breakpoint upgrade block package and the subsequent upgrade block package based on the starting address corresponding to the breakpoint upgrade block package and the subsequent upgrade block package.
[0151] Optionally, the storage record table is further used to record the block check values corresponding to the upgrade block packages and the whole package check values corresponding to the software upgrade whole package; the upgrade module 503 is used to:
[0152] When receiving the upgrade block package, determining a block verification result of the upgrade block package based on the block verification value;
[0153] When receiving each of the upgrade block packages in the software upgrade whole package, determining a whole package verification result of the software upgrade whole package obtained by merging each of the upgrade block packages based on the whole package verification value;
[0154] When the block verification results of each of the upgrade block packages indicate successful verification, and the whole package verification result of the software upgrade whole package also indicates successful verification, upgrading the vehicle software based on the software upgrade whole package;
[0155] When the verification result of the entire package indicates a verification failure, or when the verification result of the block of at least one of the upgrade block packages indicates a verification failure, a verification failure message is fed back to the server.
[0156] Optionally, the receiving module 502 is configured to:
[0157] Receiving the encrypted upgrade block package and the storage record table sent by the server, wherein the encrypted upgrade block package is encrypted by the server based on the upgrade block package;
[0158] Decrypting the encrypted upgrade block package to obtain a decrypted upgrade block package;
[0159] In a case where the tampering condition of the decrypted upgrade block package indicates that the decrypted upgrade block package has not been tampered with, determining that the upgrade block package has been received;
[0160] When the tampering status representation of the decrypted upgrade block package is tampered with, an information security warning is uploaded to the server.
[0161] Optionally, the request module 501 is used to:
[0162] Sending a software upgrade request to a server includes: sending the software upgrade request and a vehicle-side public key to the server;
[0163] Optionally, the receiving module 502 is configured to:
[0164] Receiving the encrypted upgrade block package, digital signature, encrypted symmetric key, server public key and storage record table sent by the server, wherein the encrypted upgrade block package is obtained by SM4 encrypting the upgrade block package based on the symmetric key, the digital signature is obtained by SM2 encrypting the summary value of the upgrade block package based on the server private key, and the encrypted symmetric key is obtained by SM2 encrypting the symmetric key based on the vehicle-side public key;
[0165] Perform SM2 decryption on the encrypted symmetric key based on the vehicle-side private key to obtain the symmetric key;
[0166] Perform SM4 decryption on the encrypted upgrade block package based on the symmetric key to obtain the decrypted upgrade block package;
[0167] The tampering status of the decrypted upgrade block package is determined based on the digital signature.
[0168] Optionally, the receiving module 502 is configured to:
[0169] Perform SM2 decryption on the digital signature based on the server public key to obtain a decrypted digital signature;
[0170] Determine the decryption summary value of the decryption upgrade block package based on a hash function;
[0171] In the case where the decrypted digital signature is consistent with the decrypted summary value, determining that the tampering status representation of the decrypted upgrade block package has not been tampered with;
[0172] When the decrypted digital signature is inconsistent with the decrypted summary value, it is determined that the tampering condition of the decrypted upgrade block package indicates that the decrypted upgrade block package has been tampered with.
[0173] Optionally, the receiving module 502 is configured to:
[0174] Establishing a network transmission test with the server, wherein the network transmission performance obtained by the network transmission test is used to indicate the amount of data blocks of the entire software upgrade package divided by the server, and the amount of data blocks is positively correlated with the network transmission performance;
[0175] When the block data volume is less than the data volume threshold, displaying a delayed upgrade prompt, wherein the delayed upgrade prompt is used to prompt receiving the upgrade block package sent by the server when the network transmission performance meets the performance requirement;
[0176] When the block data volume is greater than or equal to the data volume threshold, the upgrade block package of the block data volume sent by the server is received.
[0177] Optionally, the request module 501 is used to:
[0178] Based on the vehicle-machine networking data in the historical period, predicting at least one target period in which the network transmission performance reaches the first performance requirement, the vehicle-machine networking data including at least one of vehicle-machine video playback data, vehicle-machine audio playback data, vehicle-machine radio playback data, and vehicle-machine navigation data;
[0179] Based on the vehicle positioning information within at least one of the target time periods, predict at least one target location where the network transmission performance meets a second performance requirement, where the second performance requirement is higher than the first performance requirement;
[0180] When the current time period belongs to one of the at least one target time period and the current location is located at one of the at least one target location, sending the software upgrade request to the server;
[0181] Optionally, the receiving module 502 is configured to:
[0182] The upgrade block package of the preset data volume sent by the server is received, where the preset data volume is the block data volume corresponding to the second performance requirement.
[0183] See also Figure 6 , Figure 66 is a structural block diagram of a vehicle computer provided by an exemplary embodiment of the present application. The vehicle computer is also called a vehicle-mounted central computer vehicle computer, and includes a processor 601 and a memory 602, wherein the memory 602 stores at least one computer instruction, and the at least one computer instruction is loaded and executed by the processor 601 to implement the automobile software upgrade method applied to the vehicle computer as described in the above embodiment.
[0184] Optionally, the processor 601 uses various interfaces and lines to connect various parts of the entire vehicle computer, and executes various functions of the vehicle computer and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 602, and calling data stored in the memory 602. Optionally, the processor 601 can be implemented in at least one hardware form of digital signal processing (DSP), field programmable gate array (FPGA), and programmable logic array (PLA). The processor 601 can integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), a neural network processor (NPU), and a baseband chip. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the touch display; the NPU is used to implement artificial intelligence (AI) functions; and the baseband chip is used to process wireless communications. It is understandable that the above baseband chip may not be integrated into the processor 601, but may be implemented by a separate chip.
[0185] The memory 602 may include a random access memory (RAM) or a read-only memory (ROM). Optionally, the memory 602 includes a non-transitory computer-readable storage medium. The memory 602 may be used to store instructions, programs, codes, code sets, or instruction sets. The memory 602 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the following various method embodiments, etc.; the data storage area may store data created according to the use of the vehicle computer (such as audio data, a phone book), etc.
[0186] In addition, those skilled in the art can understand that the structure of the vehicle computer shown in the above drawings does not constitute a limitation on the vehicle computer, and the vehicle computer may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.
[0187] An embodiment of the present application also provides a vehicle, which is equipped with a vehicle computer as described in the above embodiment.
[0188] A person skilled in the art will appreciate that all or part of the steps to implement the above embodiments may be accomplished by hardware, or may be accomplished by a program to guide the relevant hardware. The program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk, or an optical disk, etc.
[0189] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method for upgrading automobile software, characterized in that: The method is applied to a vehicle computer, and the method includes: Send software upgrade request to the server; Receiving an upgrade block package and a storage record table sent by the server, wherein the upgrade block package is obtained based on the software upgrade whole package requested by the software upgrade request, and the storage record table is used to record the block identifiers of each upgrade block package in the software upgrade whole package; When each of the upgrade block packages in the software upgrade whole package is received, the vehicle software is upgraded based on the software upgrade whole package obtained by merging each of the upgrade block packages.
2. The method according to claim 1, characterized in that The method further comprises: When the identifiers contained in the received upgrade block packages match the block identifiers corresponding to the upgrade block packages in the software upgrade whole package in the storage record table one by one, determining that the upgrade block packages in the software upgrade whole package are received; When each of the upgrade block packages in the software upgrade whole package is not received within a time threshold, a retransmission request is sent to the server, wherein the retransmission request is used to request the server to retransmit the upgrade block package.
3. The method according to claim 2, characterized in that The storage record table is further used to record the starting address corresponding to each upgrade block package in the software upgrade whole package, and when each upgrade block package in the software upgrade whole package is not received within the time length threshold, sending a retransmission request to the server includes: In the case that each of the upgrade block packages in the software upgrade package is not received within the time threshold, determining a breakpoint upgrade block package based on the storage record table, the breakpoint upgrade block package being the first of the upgrade block packages that are not received; Send a breakpoint resume request to the server, wherein the breakpoint resume request is used to request the server to resume the breakpoint upgrade block package and the subsequent upgrade block package based on the starting address corresponding to the breakpoint upgrade block package and the subsequent upgrade block package.
4. The method according to claim 1, characterized in that: The storage record table is also used to record the block check value corresponding to the upgrade block package, and the whole package check value corresponding to the software upgrade whole package; When receiving each of the upgrade block packages in the software upgrade package, upgrading the vehicle software based on the software upgrade package obtained by merging each of the upgrade block packages includes: When receiving the upgrade block package, determining a block verification result of the upgrade block package based on the block verification value; When receiving each of the upgrade block packages in the software upgrade whole package, determining a whole package verification result of the software upgrade whole package obtained by merging each of the upgrade block packages based on the whole package verification value; When the block verification results of each of the upgrade block packages indicate successful verification, and the whole package verification result of the software upgrade whole package also indicates successful verification, upgrading the vehicle software based on the software upgrade whole package; The method further comprises: When the verification result of the entire package indicates a verification failure, or when the verification result of the block of at least one of the upgrade block packages indicates a verification failure, a verification failure message is fed back to the server.
5. The method according to any one of claims 1 to 4, characterized in that: The receiving the upgrade block package and the storage record table sent by the server includes: Receiving the encrypted upgrade block package and the storage record table sent by the server, wherein the encrypted upgrade block package is encrypted by the server based on the upgrade block package; Decrypting the encrypted upgrade block package to obtain a decrypted upgrade block package; In a case where the tampering condition of the decrypted upgrade block package indicates that the decrypted upgrade block package has not been tampered with, determining that the upgrade block package has been received; When the tampering status representation of the decrypted upgrade block package is tampered with, an information security warning is uploaded to the server.
6. The method according to claim 5, characterized in that The sending of the software upgrade request to the server comprises: sending the software upgrade request and the vehicle-side public key to the server; The receiving the encrypted upgrade block package and the storage record table sent by the server includes: Receiving the encrypted upgrade block package, digital signature, encrypted symmetric key, server public key and storage record table sent by the server, wherein the encrypted upgrade block package is obtained by SM4 encrypting the upgrade block package based on the symmetric key, the digital signature is obtained by SM2 encrypting the summary value of the upgrade block package based on the server private key, and the encrypted symmetric key is obtained by SM2 encrypting the symmetric key based on the vehicle-side public key; The decrypting the encrypted upgrade block package to obtain the decrypted upgrade block package includes: Perform SM2 decryption on the encrypted symmetric key based on the vehicle-side private key to obtain the symmetric key; Perform SM4 decryption on the encrypted upgrade block package based on the symmetric key to obtain the decrypted upgrade block package; The method further comprises: The tampering status of the decrypted upgrade block package is determined based on the digital signature.
7. The method according to claim 6, characterized in that The determining the tampering status of the decrypted upgrade block package based on the digital signature includes: Perform SM2 decryption on the digital signature based on the server public key to obtain a decrypted digital signature; Determine the decryption summary value of the decryption upgrade block package based on a hash function; In the case where the decrypted digital signature is consistent with the decrypted summary value, determining that the tampering status representation of the decrypted upgrade block package has not been tampered with; When the decrypted digital signature is inconsistent with the decrypted summary value, it is determined that the tampering condition of the decrypted upgrade block package indicates that the decrypted upgrade block package has been tampered with.
8. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: Establishing a network transmission test with the server, wherein the network transmission performance obtained by the network transmission test is used to indicate the amount of data blocks of the entire software upgrade package divided by the server, and the amount of data blocks is positively correlated with the network transmission performance; The receiving the upgrade block package sent by the server includes: When the block data volume is less than the data volume threshold, displaying a delayed upgrade prompt, wherein the delayed upgrade prompt is used to prompt receiving the upgrade block package sent by the server when the network transmission performance meets the performance requirement; When the block data volume is greater than or equal to the data volume threshold, the upgrade block package of the block data volume sent by the server is received.
9. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: Based on the vehicle-machine networking data in the historical period, predicting at least one target period in which the network transmission performance reaches the first performance requirement, the vehicle-machine networking data including at least one of vehicle-machine video playback data, vehicle-machine audio playback data, vehicle-machine radio playback data, and vehicle-machine navigation data; Based on the vehicle positioning information within at least one of the target time periods, predict at least one target location where the network transmission performance meets a second performance requirement, where the second performance requirement is higher than the first performance requirement; The sending of a software upgrade request to the server includes: When the current time period belongs to one of the at least one target time period and the current location is located at one of the at least one target location, sending the software upgrade request to the server; The receiving the upgrade block package sent by the server includes: The upgrade block package of the preset data volume sent by the server is received, where the preset data volume is the block data volume corresponding to the second performance requirement.
10. A vehicle computer, characterized in that: The vehicle computer includes a processor and a memory; the memory stores at least one computer instruction, and the at least one computer instruction is used to be executed by the processor to implement the vehicle software upgrade method as described in any one of claims 1 to 9.