File downloading and vehicle terminal device software upgrading method and device, computer storage medium

By splitting the OTA upgrade package into multiple segmented files and processing download, signature verification, and decryption in parallel, the problem of excessive processing time for large OTA upgrade packages is solved, improving efficiency and saving resources.

CN115080079BActive Publication Date: 2025-11-11SAIC MOTOR
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202110280756.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-16
Publication Date
2025-11-11
Estimated Expiration
2041-03-16

AI Technical Summary

Technical Problem

Existing technologies take too long to download, verify signatures, and decrypt large OTA upgrade packages, failing to meet user needs, and the read/write speed of the memory becomes a performance bottleneck.

Method used

The target file is split into multiple segments, and the download, signature verification, and decryption processes are performed in parallel in the client's memory. After completion, the files are persisted to avoid repeated read and write operations.

Benefits of technology

It improves file download processing efficiency, reduces the number of read and write operations on the storage device, shortens processing time, and saves system resource consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115080079B_ABST
    Figure CN115080079B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a file downloading method and device, a vehicle terminal device software upgrading method and device, a computer storage medium and a client, which comprise performing encryption and signature processing and splitting processing on a target file to obtain a configuration file and a plurality of target segment files, performing downloading processing and decryption and signature verification processing on the configuration file and each target segment file to obtain the target file, wherein the downloading processing and the decryption and signature verification processing of the configuration file and each target segment file are performed in parallel in a memory of the client, and the configuration file and each target segment file that have completed the decryption and signature verification processing are stored persistently in a storage of the client. Thus, the present application can provide efficient file downloading processing efficiency and ensure the security of information transmission.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of file transfer technology, and in particular to a method, apparatus, computer storage medium, and client for file downloading and vehicle-side device software upgrade. Background Technology

[0002] Existing OTA upgrade packages are generally small in size, ranging from tens of kilobytes (KB) to several megabytes (MB). Therefore, the processes of downloading, verifying, and decrypting the OTA upgrade package on the vehicle side are usually handled separately, with the processing order being download, verification, and decryption.

[0003] Specifically, the OTA upgrade packages for first-generation (e.g., distributed ECU) and second-generation (e.g., domain-centralized) vehicle electronic and electrical architectures are generally no larger than 10 MB (ranging from tens of KB to several MB). Therefore, when downloading OTA upgrade packages on the vehicle side, a single-core, single-threaded approach is typically used. If the upgrade package is downloaded via a 4G wireless cellular network, with an average estimated speed of 1.5 MB / s to 2.5 MB / s (download speeds vary depending on the region), the download can be completed in a few seconds at most. However, for the currently popular third-generation electronic and electrical architecture (e.g., multi-domain fusion + hardware-software decoupling + SOA + SomeIP + Autosar), the size of its OTA upgrade package (especially the full vehicle upgrade package) can typically reach 5 GB to 20 GB. If the single-core, single-threaded download method combined with a 4G network is still used, the average download time will be as long as 1.5 hours. Even when downloading OTA upgrade packages via a 5G network, with a network speed of 60 MB / s, the average download time will reach approximately 3 minutes.

[0004] Furthermore, the current vehicle-side processing flow for OTA upgrade packages typically includes: first, writing the downloaded OTA upgrade package to the embedded multimedia controller (eMMC) for persistent storage; and then performing independent signature verification and decryption processes on the downloaded OTA upgrade package. Both signature verification and decryption are independent computational processes, requiring separate read and write operations to the eMMC memory. Therefore, the total number of read operations to the eMMC memory is 2 (one for signature verification and one for decryption), and the total number of write operations is also 2 (one for download and one for decryption). Since the read and write speeds of current eMMC memory are generally not fast (e.g., write speed of 33.46MB / s and read speed of 25.16MB / s), for a 10GB OTA upgrade package, the total time spent reading and writing files to the eMMC memory will reach 24 minutes. If the OTA upgrade package is downloaded via a 5G network, the read and write operations of large-size upgrade packages on the vehicle-side eMMC memory will become a performance bottleneck.

[0005] Furthermore, currently, the signature verification and decryption processing of OTA upgrade packages on the vehicle side is generally completed using a single-core, single-threaded approach. This approach is more suitable for smaller OTA upgrade packages (ranging from tens of KB to several MB). However, for larger upgrade packages (e.g., 10GB-20GB) of third-generation electronic and electrical architectures, the following main problems exist:

[0006] First, the device used for signature verification and decryption on the vehicle side has limited memory and cannot load such a large amount of data at once. Second, using a single core and single thread for signature verification and decryption will result in considerable time consumption. For example, considering the OpenSSL software algorithm library, for a 10GB upgrade package file, signature verification using the national cryptographic SM3 algorithm takes approximately 5.12 minutes, while decryption using the national cryptographic SM4 algorithm takes approximately 15.36 minutes.

[0007] In conclusion, the traditional method of downloading, verifying, and decrypting OTA upgrade packages is too time-consuming and cannot adequately handle the download and processing of large OTA files, leading to a decrease in user satisfaction. Summary of the Invention

[0008] In view of this, one of the technical problems solved by the embodiments of the present invention is to provide a method, apparatus, computer storage medium and client for downloading files and upgrading vehicle-mounted equipment software, which can provide efficient download processing of large files and ensure the security of information transmission.

[0009] According to a first aspect of the present invention, a file download method is provided, comprising performing encryption and signature processing and segmentation processing on a target file to obtain a configuration file and a plurality of target segment files of the target file; and performing download processing and decryption and signature verification processing on the configuration file and each of the target segment files to obtain the target file; wherein the download processing of the configuration file and each of the target segment files and the decryption and signature verification processing are executed in parallel by means of the memory of the client, and the configuration file and each of the target segment files after the decryption and signature verification processing are persistently stored in the memory of the client.

[0010] According to a second aspect of the present invention, a computer storage medium is provided, the computer storage medium storing instructions for performing each of the steps of the file download method according to the first aspect described above.

[0011] According to a third aspect of the present invention, a method for upgrading the software of a vehicle-mounted device is provided, comprising providing an upgrade file from a target server to the vehicle-mounted device using the file download method described in the first aspect; and using the upgrade file to allow the vehicle-mounted device to perform a software upgrade operation.

[0012] According to a fourth aspect of the present invention, a computer storage medium is provided, wherein the computer storage medium stores instructions for performing each step of the vehicle-mounted device software upgrade method according to the third aspect described above.

[0013] According to a fifth aspect of the present invention, a file download apparatus is provided, comprising a file processing module that performs encryption and signature processing and segmentation processing on a target file to obtain a configuration file and a plurality of target segment files; and a file download module that performs download processing and decryption and signature verification processing on the configuration file and each of the target segment files to obtain the target file; wherein the download processing of the configuration file and each of the target segment files and the decryption and signature verification processing are executed in parallel by means of the memory of the client, and the configuration file and each of the target segment files that have completed the decryption and signature verification processing are persistently stored in the memory of the client.

[0014] According to a sixth aspect of the present invention, a vehicle-mounted device software upgrade apparatus is provided, comprising a file acquisition module that uses the file download apparatus described in the fifth aspect to provide the vehicle-mounted device to download an upgrade file from a target server; and a software upgrade module that uses the upgrade file to provide the vehicle-mounted device to perform a software upgrade operation.

[0015] According to a seventh aspect of the present invention, a client is provided, the client being configured to download a configuration file and target segment files of a target file from a server, and to perform decryption and signature verification on the downloaded configuration file and target segment files to obtain the target file; wherein the downloading process of the configuration file and the target segment files and the decryption and signature verification process are executed in parallel in the memory of the client, and the configuration file and the target segment files that have completed the decryption and signature verification process are persistently stored in the memory of the client.

[0016] As can be seen from the above technical solutions, the file download and vehicle-side device software upgrade method, apparatus and computer storage medium provided in the embodiments of the present invention can effectively improve the file download processing efficiency by dividing the target file into multiple target segment files and performing the download processing and decryption and signature verification processing of each target segment file through multi-core parallel computing.

[0017] Furthermore, the file download and vehicle-side device software upgrade method, apparatus, and computer storage medium of this application embodiment, by executing the download processing of configuration files and each target segment file, the decryption and signature verification processing in the client's memory, and then persistently storing each target segment file that has completed the decryption and signature verification processing in the client's memory, allows the client's memory to perform only one write operation without any read operation.

[0018] Furthermore, the file download and vehicle-side device software upgrade method, apparatus, computer storage medium, and client of this application embodiment can stop the target file download operation when any one of the following processes fails: configuration file download processing, download processing of each target segment file, or decryption and signature verification processing, thereby greatly saving client system resource overhead. Attached Figure Description

[0019] The following sections will describe some specific embodiments of the invention in a detailed manner, by way of example and not limitation, with reference to the accompanying drawings. The same reference numerals in the drawings denote the same or similar parts or portions. Those skilled in the art should understand that these drawings are not necessarily drawn to scale. In the drawings:

[0020] Figures 1 to 3 These are sequence diagrams for downloading upgrade packages, verifying signatures, and decrypting existing technologies.

[0021] Figures 4 to 5 A flowchart illustrating the file download method of the first and second embodiments of this application is shown;

[0022] Figure 6 This invention illustrates a timing diagram of a cloud-based implementation of the target file processing in this application.

[0023] Figure 7A flowchart illustrating a file download method according to a third embodiment of this application is shown;

[0024] Figure 8 A timing diagram illustrating an embodiment of cloud-based configuration file processing in this application is shown.

[0025] Figure 9 A flowchart illustrating the file download method according to the fourth embodiment of this application is shown;

[0026] Figure 10 The diagram illustrates an embodiment of the thread pool and buffer queue architecture for the client in this application.

[0027] Figures 11 to 19 The flowcharts of the file download methods of the fifth to thirteenth embodiments of this application are shown;

[0028] Figure 20 A flowchart illustrating the vehicle-side device software upgrade method according to the fifteenth embodiment of this application is shown;

[0029] Figure 21 A schematic diagram of the architecture of a file download device according to the seventeenth embodiment of this application is shown;

[0030] Figure 22 A schematic diagram of the architecture of the vehicle-side equipment software upgrade device according to the eighteenth embodiment of this application is shown. Detailed Implementation

[0031] To enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art should fall within the protection scope of the present invention.

[0032] Figures 1 to 3 The sequence of downloading, signature verification, and decryption processing for existing OTA upgrade packages is displayed.

[0033] Please see Figure 1The figure shows the timing diagram of the OTA upgrade package download in the prior art. As shown in the figure, the OTA upgrade package download process in the prior art mainly includes: (1) The OTA cloud platform encrypts the upgrade package file (for example, the OTA cloud platform uses a symmetric key to encrypt the upgrade package file); (2) The OTA cloud platform signs the encrypted upgrade package file (for example, the encrypted upgrade package is hashed and digitally signed by the hash value using a private key through a CA authentication platform); (3) The OTA cloud platform synchronizes the encrypted and signed upgrade package file to the content delivery network (CDN); (4) The vehicle-side processing thread is started to download the upgrade package file from the CDN; (5) The vehicle-side processing thread writes the upgrade package file into the vehicle-side buffer (memory buffer); (6) The vehicle-side processing thread writes the upgrade package file in the buffer into the vehicle-side storage (for example, the vehicle-side eMMC storage) for persistent storage.

[0034] Please see Figure 2 The figure shows the timing diagram of the OTA upgrade package signature verification in the prior art. As shown in the figure, the OTA upgrade package signature verification process in the prior art mainly includes: (1) starting the vehicle-side processing thread and reading the signature certificate from the vehicle-side memory (e.g., the vehicle-side eMMC memory); (2) the vehicle-side processing thread writes the signature certificate into the vehicle-side buffer (vehicle-side memory buffer); (3) the vehicle-side processing thread reads the signature certificate in the vehicle-side buffer and uses the root certificate (pre-built into the vehicle-side) to verify the legality of the signature certificate; (4) the vehicle-side processing thread uses the public key in the signature certificate to perform digital signature verification (i.e., ... Figure 1 (5) The vehicle-side processing thread reads the upgrade package file from the vehicle-side storage; (6) The vehicle-side processing thread writes the upgrade package file into the vehicle-side buffer; (7) The vehicle-side processing thread reads the upgrade package file in the vehicle-side buffer and performs hash value calculation; (8) The vehicle-side processing thread verifies the upgrade package file based on the hash value restoration result of step 4 and the hash value calculation result of step 7 (for example, determining whether the hash value calculation results of step 4 and step 7 are consistent), thereby ensuring that the content of the upgrade package file has not been tampered with.

[0035] Please see Figure 3The figure shows the timing diagram of OTA upgrade package decryption in the prior art. As shown in the figure, the OTA upgrade package decryption process in the prior art mainly includes: (1) starting the vehicle-side processing thread and reading the ciphertext of the upgrade package file (i.e., the encrypted upgrade package file) from the vehicle-side memory (e.g., the vehicle-side eMMC memory); (2) the vehicle-side processing thread writes the ciphertext of the upgrade package file into the vehicle-side buffer (memory buffer); (3) the vehicle-side processing thread reads the ciphertext of the upgrade package file in the vehicle-side buffer; (4) the vehicle-side processing thread decrypts the ciphertext of the upgrade package file (e.g., using a symmetric key to decrypt the ciphertext of the data packet file); (5) the vehicle-side processing thread writes the decrypted plaintext of the data packet file into the vehicle-side memory (e.g., a new file in the vehicle-side eMMC memory), thereby obtaining the original upgrade package file.

[0036] As can be seen from the above, the traditional OTA upgrade package download, signature verification, and decryption process has the disadvantage of being too time-consuming. Therefore, how to solve the serious performance and time consumption problem faced by the information security processing of large-size OTA upgrade packages on the vehicle side is a technical issue that the industry urgently needs to solve.

[0037] First Embodiment

[0038] Figure 4 The processing flow of the file download method according to the first embodiment of this application is shown.

[0039] In this embodiment, the file download method is applicable to file download or transmission based on mobile communication networks, but is not limited thereto, and can also be applied to file download or transmission based on any other type of communication network (such as wired networks, wireless networks, etc.).

[0040] Please note that the embodiments described below in conjunction with the accompanying drawings are all applicable to application scenarios where vehicles download OTA upgrade package files from the OTA cloud platform.

[0041] The exemplary preconditions for executing the file download method of this application are described below:

[0042] The cloud platform comes pre-installed with root certificates and digital certificates issued by a designated authentication platform (such as USAP / CA authentication platform).

[0043] A secure connection channel provides a communication link between the cloud platform and the client. The client can exchange digital certificates with the cloud platform beforehand via a private network to verify the other party's legitimacy. The session symmetric key is pre-calculated and created through a secure handshake process between the cloud platform and the client, thus establishing a secure connection channel (e.g., an MQTT secure connection channel). The cloud platform can then use this secure connection channel to send upgrade commands (containing the decryption symmetric key for the upgrade file) and other data information to the client.

[0044] The client comes pre-installed with a root certificate and a client digital certificate issued by a specified authentication platform (such as USAP / CA authentication platform). The client also has access to the configuration file's attribute information (such as download path URL, size, version number, etc.).

[0045] like Figure 4 As shown, the file download method in this application embodiment mainly includes:

[0046] Step S402: Perform encryption and signing processing and segmentation processing on the target file to obtain the configuration file of the target file and multiple target segment files.

[0047] Optionally, encryption and signing processing and splitting processing of the target file can be performed on the cloud platform.

[0048] Optionally, the cloud platform can further store the target file's configuration file and multiple target segment files on the target server.

[0049] Optionally, the target server is a CDN (Content Delivery Network) server.

[0050] Optionally, the target file is an OTA upgrade package.

[0051] Alternatively, symmetric key encryption and hash signature algorithms can be used to perform the encryption and signature processing of the target file (see below). Figure 8 ).

[0052] Optionally, the target file can be split based on a preset file splitting rule to obtain multiple target segment files.

[0053] In this embodiment, the preset file splitting rule is used to define the maximum file size of each target segment file. The maximum file size of each target segment file can be set to 10MB, but it is not limited to this. It can be adjusted arbitrarily according to actual needs. This application does not impose any restrictions on this.

[0054] Optionally, a configuration file can be generated based on the digital digest information of each target segment file (see below). Figure 6 ).

[0055] Step S404: Perform download and decryption verification processing on the configuration file and each target segment file to obtain the target file.

[0056] In this embodiment, the client's memory can be used to perform the downloading and decryption / signature verification of the configuration file and each target segment file in parallel, and the completed configuration file and each target segment file can be persistently stored in the client's memory.

[0057] Optionally, the client can be a vehicle-mounted device, and the client's memory can be an eMMC memory.

[0058] Optionally, the client can download the configuration file or each target segment file from the target server (CDN server) using over-the-air (OTA) technology.

[0059] Optionally, the client and the target server communicate via an HTTP protocol connection.

[0060] Optionally, the HTTP protocol supports multi-request segmented downloads.

[0061] In summary, this application embodiment divides the target file into multiple encrypted and signed target segment files, and provides the client to perform decryption and signature verification processing of each target segment file in parallel. In this way, this application can significantly improve the download processing efficiency of large files.

[0062] Furthermore, this embodiment of the application directly performs the download and decryption verification of the configuration file and each target segment file in the client's memory, and then persistently stores the successfully decrypted and verified configuration file and each target segment file to the client's storage. In this way, it can be ensured that the storage only needs to perform one write operation and there is no read operation, so as to effectively avoid the impact of the file download performance on the read and write speed limitation of the storage.

[0063] Second Embodiment

[0064] Figure 5 The processing flow of the file download method according to the second embodiment of this application is shown. This embodiment is a specific implementation of step S402 described above.

[0065] The following will combine Figure 6 The diagram illustrates a cloud-based processing sequence for the target file, and details the specific steps of each embodiment. As shown, the file download method in this embodiment mainly includes:

[0066] Step S502: Perform encryption processing on the target file based on the preset encryption rules to obtain the encrypted file of the target file.

[0067] Optionally, the preset encryption rules include symmetric key encryption.

[0068] Specifically, the cloud platform can call an authentication platform (e.g., a local SDK function of USAP (Unified Security Application Platform)) to obtain a symmetric key, and use the symmetric key to perform encryption processing on the target file (see reference). Figure 6 Step 1). The authentication platform responds to the cloud platform's call instruction by generating a 16-byte random number as the symmetric key and returns it to the cloud platform (see reference). Figure 6Step 2); Next, the cloud platform can call the authentication platform (e.g., USAP's local SDK function) to perform encryption processing based on the original plaintext of the target file and the symmetric key (see...). Figure 6 Step 3); The authentication platform responds to the cloud platform's call instruction by performing encryption operations on the original plaintext of the target file (the encryption algorithm can be, for example, the national standard SM4 or the foreign standard AES-256) to obtain the encrypted version of the target file and return it to the cloud platform.

[0069] Step S504: Perform segmentation processing on the encrypted file based on the preset file segmentation rules to obtain multiple initial segment files.

[0070] In this embodiment, the preset file splitting rules are used to define the maximum file size of each target segment file (i.e., the initial segment file) generated after splitting.

[0071] Optionally, the maximum file size of the target segment file can be set to 10MB, but this is not a limitation and can be adjusted arbitrarily according to actual needs (including hardware and software configuration requirements).

[0072] Step S506: Perform signature processing on each segment file based on the preset signature rules to obtain each target segment file and the corresponding digital digest of each target segment file.

[0073] Optionally, the default signing rule is a hash signature algorithm.

[0074] Specifically, the cloud platform can call the authentication platform to perform signature processing based on each encrypted target segment file. For example, it can call USAP's local SDK functions to perform hash calculations on each target segment file (see reference). Figure 6 Step 6); The authentication platform responds to the cloud platform's call instruction by performing a hash calculation on the current target segment file, obtaining the target segment file (i.e., the initial segment file after signing) and the corresponding digital digest of the target segment file, and returns it to the cloud platform (see reference). Figure 6 Step 7).

[0075] Please note that in Figure 6 Steps 5 through 7 will initiate a loop to repeatedly perform signature processing on each initial segment file until the signature processing of all initial segment files is completed.

[0076] Step S508: Obtain the configuration file based on the digital digests corresponding to each target segment file.

[0077] Specifically, the cloud platform can obtain the configuration file (see reference) based on the digital digests and attribute information corresponding to each target segment file returned by the authentication platform. Figure 6Step 8); Next, the cloud platform can transmit the encrypted and signed target segment files to the target server. For example, the cloud platform can transmit the encrypted and signed target segment files to the CDN server through a public HTTPS secure transmission channel.

[0078] Optionally, the configuration file can be edited in JSON format.

[0079] Optionally, the configuration file may include the target file's version number (versionInfo), target file description information (description), target file download status and progress, reporting server URL path address (reportUrl), HTTPS request configuration information (requestConfig), target file attribute information, such as target file name information (name), target file size information (size), target file format information (type), target file download path URL (objectUrl), client download proxy information (delegate), etc.

[0080] In this embodiment, the client download delegate information can be used to describe which specific part on the vehicle is responsible for the download of the target file. It can typically be the delegate for the intelligent connected TBox / IAM part or the delegate for the intelligent cockpit ICM part.

[0081] In addition, the configuration file also contains description information (ranges) for each target segment file, so that the client can use multi-threading to download each target segment file in parallel according to the description information of each target segment file, and perform signature verification and decryption processing on each target segment file respectively.

[0082] In this embodiment, the description information (ranges) of each target segment file may include the starting offset position (offset), size information (rangeSize), etc., of each target segment file. The starting offset position (offset) is used to identify the offset address at the beginning of each segment of each target segment file in the target file; the size information (rangeSize) is used to identify the size of each target segment file in the target file.

[0083] In addition, the configuration file also contains digital digest information (sha256) of each target segment file, which is used to identify each digital digest of each target segment file of the target file.

[0084] Optionally, the digital digest information of the target segment files can be stored in the category of the description information (ranges) of each target segment file.

[0085] In summary, the embodiments of this application, by performing encryption, signing, and segmentation processing on the target file, can provide a way to download the target file in segments and ensure the security of data transmission of the target file.

[0086] Third Embodiment

[0087] Figure 7 The processing flow of the file download method according to the third embodiment of this application is shown. This embodiment is a specific implementation of step S502 described above.

[0088] The following will combine Figure 8 The diagram shown illustrates a cloud-based configuration file processing sequence, detailing each processing step in this embodiment. As shown, the file download processing flow of this embodiment mainly includes:

[0089] Step S702: Obtain the initial configuration file based on the digital digests corresponding to each target segment file.

[0090] For example, the cloud platform can obtain an initial configuration file based on the digital digest and description information of each target segment file (see the description of the configuration file in step S508 above).

[0091] Step S704: Perform encryption processing on the configuration file based on preset encryption rules to obtain an encrypted configuration file.

[0092] Optionally, the default encryption rule is symmetric key encryption.

[0093] Specifically, the cloud platform can call the authentication platform's local interface (SDK function) to obtain the symmetric key (see reference). Figure 8 Step 1); The authentication platform's local interface generates a 16-byte random number as the symmetric key based on the cloud platform's call instructions and returns it to the cloud platform (see reference). Figure 8 Step 2); The cloud platform, based on the initial configuration file (i.e., plaintext configuration file) and the symmetric key, calls the authentication platform's local interface to perform encryption processing (see reference). Figure 8 Step 3); The local interface of the authentication platform performs encryption operations on the initial configuration file (i.e., plaintext configuration file) according to the call instructions of the cloud platform (the encryption algorithm can be the national standard SM4 or the foreign standard AES-256), and returns the encrypted configuration file (see reference). Figure 8 Step 4).

[0094] Step S706: Perform signature processing on the encrypted configuration file based on the preset signature processing rules to obtain the encrypted and signed configuration file.

[0095] Specifically, the cloud platform calls the authentication platform's local interface to perform signature processing based on the encrypted configuration file (see reference). Figure 8Step 5); The authentication platform's local interface responds to the cloud platform's call command by performing a hash value calculation on the encrypted configuration file (see reference). Figure 8 Step 6); Next, the authentication platform's local interface calls the backend service interface (e.g., USAP / CA's RPC service interface) to perform digital signature based on the calculated hash value. The cloud platform's service interface returns the digital signature to the authentication platform's local interface, which then returns it to the cloud platform (see reference). Figure 8 Step 7).

[0096] It should be noted that in this embodiment, the authentication platform (USAP / CA) needs to complete the creation and management of the cloud platform's asymmetric public and private keys and PKI digital certificates in advance, and use the private key to perform hash value signature calculation.

[0097] Step S708: Perform format conversion processing on the encrypted and signed configuration file and transmit it to the target server.

[0098] Specifically, the cloud platform can perform format conversion processing on the encrypted and signed configuration file based on preset file format rules, generate a configuration file that meets the preset file format rules, and transmit it (for example, through a public HTTPS secure transmission channel) to the target server (CDN server).

[0099] Optionally, a configuration file that meets the preset file format rules may include a signature certificate field, a file signature field, an original length field, and a data ciphertext field.

[0100] For example, a configuration file with a fixed format is: signing certificate (164 bytes) + file signature (64 bytes) + original length (8 bytes) + data ciphertext (n bytes).

[0101] The original length mentioned above represents the original plaintext length of the configuration file before encryption. It is used to remove padding data during subsequent decryption (because padding data will remain in the ciphertext after decryption).

[0102] In summary, this embodiment can further improve the security of data transmission by performing encryption and signature processing on the configuration file.

[0103] Fourth embodiment

[0104] Figure 9 The processing flow of the file download method according to the fourth embodiment of this application is shown in the figure. The file download method of this embodiment includes:

[0105] Step S902: Download the configuration file or each target segment file in the target server and cache it in the client's memory.

[0106] Optionally, the client can use the HTTP protocol to download the configuration file and each target segment file from the target server.

[0107] Optionally, the downloading of configuration files and target segment files can be performed using multi-core parallel computing in the vehicle's memory buffer.

[0108] For example, the vehicle can download configuration files and target segment files from the CDN server based on the HTTP protocol, where HTTP supports multi-request segmented download.

[0109] Specifically, the HTTP protocol implements segmented downloading through two parameters in the request message header: Range when the client sends the request and Content-Range when the target server responds.

[0110] More specifically, the client-side Range header is used in the HTTP request message to specify the position of the first byte and the position of the last byte, while the server-side Content-Range header is used in the HTTP response message. After the client sends a request for the Range header, the server will return the currently received range and the total file size in the Content-Range header.

[0111] Step S904: Determine whether the download and processing of the configuration file or each target segment file is successful. If successful, proceed to step S906; otherwise, end this step.

[0112] Step S906: Perform signature verification processing on the configuration file or each target segment file that has completed the download process based on the preset signature rules.

[0113] Optionally, the verification and signature processing of the configuration file and each target segment file can be performed in the vehicle's memory buffer using a multi-core parallel computing approach.

[0114] Step S908: Determine whether the signature verification process of the configuration file or each target segment file is successful. If successful, proceed to step S910; otherwise, end this step.

[0115] Step S910: Decryption processing is performed on the configuration file or each target segment file that has completed the signature verification process based on the preset encryption rules.

[0116] Optionally, the decryption of the configuration file and each target segment file can be performed in the vehicle's memory buffer using multi-core parallel computing.

[0117] Step S912: Determine whether the decryption process of the configuration file or each target segment file is successful. If successful, proceed to step S914; otherwise, end this step.

[0118] Step S914: Persistently store the completed decryption configuration file or each target segment file to the client's storage, and proceed to step S916.

[0119] Optionally, the client's storage is the vehicle's eMMC storage.

[0120] In this embodiment, each target segment file can be stored in its own designated storage location in the memory according to the attribute information (such as starting offset position information and size information) of each target segment file. Therefore, the target file is automatically restored after all target segment files are written into the memory.

[0121] Step S916: Determine whether all target segment files have been decrypted. If yes, end this step; otherwise, return to step S902.

[0122] Alternatively, this judgment step can be replaced by judging whether the configuration file and all target segment files have been persistently stored in the memory. If yes, then this step ends; if no, then return to step S902.

[0123] In summary, this application embodiment performs the download, signature verification, and decryption processing of configuration files or target segment files in the client's memory, and then persistently stores the decrypted configuration files and target segment files to the client's storage (eMMC storage). In this way, this application can ensure that the storage performs only one write operation and no read operation, which can avoid the impact of storage read and write speed limitations on improving file download efficiency.

[0124] Furthermore, in this embodiment, the download operation can be terminated immediately if any of the download, signature verification, or decryption processes of the configuration file or each target segment file fails, without waiting for all downloadable, signature-verified, or decryptable configuration files or target segment files to be completed before indicating a download failure. This can greatly save client system resources and shorten the time for indicating file download, signature verification, or decryption failures.

[0125] Fifth embodiment

[0126] Figure 11 The processing flow of the file download method according to the fifth embodiment of this application is shown.

[0127] In this embodiment, the client can employ a multi-core parallel computing approach to execute the implementation scheme for downloading configuration files, each target segment file, and decrypting and verifying signatures (i.e., steps S902, S906, S910, and S914 above). The following will combine... Figure 10The client's thread pool and buffer queue architecture are shown, and the implementation scheme of this embodiment is described in detail.

[0128] As shown in the figure, the file download method in this embodiment mainly includes:

[0129] Step S1102: Establish the first task queue, the second task queue, and the third task queue.

[0130] In this embodiment, multiple first task nodes can be created in the first task queue to be responsible for downloading, verifying, and decrypting configuration files or target segment files.

[0131] For example, during initialization, memory space can be allocated in the client's memory according to the maximum number of tasks passed in, and the downloaded task data (such as configuration files or target segment files) can be placed into the first task queue.

[0132] Optionally, each first task node in the first task queue contains two node types: 0 - configuration file type, 1 - target segment file type. Furthermore, each first task node in the first task queue can contain seven node states: 0 - downloadable, 1 - downloading, 2 - download complete, 3 - signature verification, 4 - signature verification complete, 5 - decryption, 6 - decryption complete.

[0133] In this process, the data processing order for any first task node is download, signature verification, and decryption.

[0134] In this embodiment, multiple second task nodes can be created in the second task queue to be responsible for parsing and processing the configuration file or storing (i.e., persistent storage) the target segment files.

[0135] For example, during initialization, memory space can be allocated in the client's memory based on the maximum number of tasks passed in, and the decrypted task data (such as configuration files or target segment files) can be placed into the second task queue. Each second task node in the second task queue can contain two data types: 0 - configuration file type, 1 - target segment file type. Furthermore, each second task node in the second task queue can contain three basic states: 0 - writable to storage, 1 - writing to storage platform, 2 - writing to storage completed; in addition, for configuration files, there are three additional states: 3 - parsable, 4 - parsing, 5 - parsing completed.

[0136] Step S1104: Establish a thread pool with multiple worker threads to execute each first task node in the first task queue or each second task node in the second task queue by means of each worker thread.

[0137] In this embodiment, depending on the node type and node status of the first task node, a worker thread may be provided to perform one of the following: downloading the configuration file or each target segment file. Alternatively, depending on the node type and node status of the second task node, a worker thread may be provided to perform one of the following: parsing the configuration file or storing the configuration file or target segment file.

[0138] In this embodiment, the thread task engine can be assembled onto worker threads by the manager thread, so that the worker threads can execute specific business processing logic, namely, one of the following: downloading, signing, and decrypting the configuration file and each target segment file; parsing the configuration file; storing the configuration file; and storing the target segment files (see reference). Figure 10 ).

[0139] Optionally, the manager thread can call the corresponding thread task engine and assemble it onto the worker thread based on the node status of the first and second task nodes executed by the worker thread (it can also refer to both the node status and the node type).

[0140] For example, if it is determined that the worker thread is executing the first task node, and its corresponding node state is 2 - download completed, then the signature verification task engine is installed on the worker thread; if it is determined that the worker thread is executing the first task node, and its corresponding node state is 4 - signature verification completed, then the decryption task engine is installed on the worker thread; if it is determined that the worker thread is executing the second task node, and its corresponding node type is 0 - configuration file type, and its node state is 3 - parsable, then the parsing task engine is installed on the worker thread; if it is determined that the worker thread is executing the second task node, and its corresponding node state is 0 - writable storage state, then regardless of its node type, the storage task engine is installed on the worker thread.

[0141] In this embodiment, the download process performed by the worker thread includes downloading configuration files or target segment files from the target server and caching successful configuration files or target segment files to a first task queue. The signature verification process performed by the worker thread includes retrieving successfully downloaded configuration files or target segment files from the first task queue for signature verification and returning the successfully verified configuration files or target segment files to the first task queue. The decryption process performed by the worker thread includes retrieving successfully verified configuration files or target segment files from the first task queue for decryption and storing the successfully decrypted configuration files or target segment files to a second task queue. The parsing process performed by the worker thread includes retrieving successfully decrypted configuration files from the second task queue for parsing to obtain the digital digests and descriptive information corresponding to each target segment file, and storing the digital digests and descriptive information to a third task queue. The storage process performed by the worker thread includes persistently storing the successfully decrypted configuration files or target segment files to the client's storage.

[0142] In this embodiment, the node status of the first task node or the second task node can be updated based on the execution results of each execution stage of the worker thread.

[0143] In this embodiment, in addition to dynamically configuring the corresponding thread task engine for each worker thread based on the task request status of each worker thread in the thread pool, the manager thread can also be used to check the liveness and working status of each worker thread in the thread pool, and is responsible for dynamically adding or deleting worker threads according to the current task request status to ensure that the number of worker threads in the thread pool is maintained at a reasonable and efficient balance; periodically check the node status of each first task node in the first task queue, and dynamically allocate appropriate first task nodes (download, verification, decryption) to the thread pool accordingly, and promptly clean up each completed first task node; periodically check the node status of each second task node in the second task queue, and dynamically allocate appropriate second task nodes (parse, store) to the thread pool accordingly, and promptly clean up each completed second task node.

[0144] Sixth Embodiment

[0145] Figure 12 The sixth embodiment of this application illustrates a file download method, which mainly shows an implementation scheme for creating a thread pool on the client side. As shown in the figure, the file download method of this embodiment mainly includes:

[0146] Step S1202: Allocate memory space for the thread pool object in the memory.

[0147] For example, memory space can be allocated for thread pool objects in the memory of the client (vehicle).

[0148] Step S1204: Determine whether the memory space allocation was successful. If successful, proceed to step S1206; if allocation fails, proceed to step S1222.

[0149] Step S1206: Perform initialization processing on the basic information of the thread pool.

[0150] Step S1208: Allocate memory space in the memory for the worker thread array according to the maximum number of threads in the thread pool.

[0151] Step S1210: Determine whether the memory space allocation was successful. If successful, proceed to step S1212; if unsuccessful, proceed to step S1222.

[0152] In step S1212, memory space is allocated sequentially for the objects in the first task queue, the second task queue, and the third task queue in the memory.

[0153] Step S1214: Determine whether the memory space has been successfully allocated. If the allocation is successful, proceed to step S1216; otherwise, proceed to step S1222.

[0154] Step S1216: Initialize the mutex and condition variable.

[0155] Step S1218: Determine whether the initialization operation was successful. If successful, proceed to step S1220; if unsuccessful, proceed to step S1222.

[0156] Step S1220: Start the minimum number of worker threads, start the manager thread, and end this process.

[0157] Step S1222: Release the thread pool in the memory and end this process.

[0158] Seventh Embodiment

[0159] The file download method of the seventh embodiment of this application further includes the step of the client releasing the thread pool, which includes releasing the memory space allocated in the memory for the objects of the first task queue, the objects of the second task queue, and the objects of the third task queue; and releasing the memory space allocated in the memory for the objects of the thread pool.

[0160] like Figure 13 As shown, the specific implementation scheme for releasing the thread pool on the client side in this embodiment includes:

[0161] Step S1302: Determine if the thread pool object is empty. If not, proceed to step S1304. If yes, end the process.

[0162] Step S1304: Determine if the first task queue object exists. If it exists, execute step S1306 after releasing all first task nodes in the first task queue. If it does not exist, proceed directly to step S1306.

[0163] This step is equivalent to releasing the memory space allocated to the objects in the first task queue in the memory.

[0164] Step S1306: Determine if the second task queue object exists. If it exists, release all second task nodes in the second task queue and then proceed to step S1308. If it does not exist, proceed directly to step S1308.

[0165] This step is equivalent to releasing the memory space allocated in the memory for the objects in the second task queue.

[0166] Step S1308: Determine if the third task queue object exists. If it exists, release all second task nodes in the third task queue and then proceed to step S1310. If it does not exist, proceed directly to step S1310.

[0167] This step is equivalent to releasing the memory space allocated in the memory for the object in the third task queue.

[0168] Step S1310: Determine if the thread pool dynamic array object exists. If it exists, proceed to step S1312; otherwise, proceed to step S1320.

[0169] Step S1312: Release all objects in the thread pool's dynamic array.

[0170] Step S1314: Add a mutex lock to the thread pool object, and then destroy the mutex lock on the thread pool object.

[0171] Step S1316: Add a mutex lock to the busy thread variable, and then destroy the mutex lock on the busy thread variable.

[0172] Step S1318: Check if the destruction queue is not empty, and check if the destruction queue is not full.

[0173] Step S1320: Release the thread pool object, that is, release the memory space allocated for the thread pool object in the memory, and exit this process.

[0174] This step is equivalent to releasing the memory space allocated for the thread pool objects in the memory.

[0175] Eighth embodiment

[0176] Figure 14The eighth embodiment of this application illustrates a file download method, which mainly shows a specific implementation scheme for a client to download a configuration file. As shown in the figure, the file download method of this embodiment mainly includes:

[0177] Step S1402: Obtain the attribute information of the configuration file based on the configuration file.

[0178] In this embodiment, the client can obtain the attribute information of the configuration file in advance, including the download path of the target server (CDN server), file size, file version number and other attribute information (i.e. metadata).

[0179] Step S1404: Generate the first task node according to the attribute information of the configuration file, initialize the node status of the first task node to the downloadable state, and initialize the task type of the first task node to the configuration file type.

[0180] In this embodiment, the file size of the configuration file can be obtained based on the attribute information of the configuration file, and a memory buffer that meets the file size can be allocated in the memory to generate the first task node.

[0181] Step S1406: Add the first task node to the first task queue and update the node status of the first task node from the downloadable state to the downloading state.

[0182] In this embodiment, the first task node can be added to the tail of the first task queue.

[0183] Step S1408: Obtain the download path of the configuration file based on the attribute information of the configuration file, and download the configuration file from the target server according to the node status of the first task node and the download path.

[0184] In this embodiment, the specified download path URL of the configuration file can be obtained based on the attribute information (metadata) of the configuration file. Based on the specified download path URL of the configuration file and the current node status of the first task node (i.e., downloading status), the configuration file is downloaded from the CDN server and cached in the buffer corresponding to the first task node.

[0185] Step S1410: Update the node status of the first task node from the downloading state to the download completed state.

[0186] In this embodiment, the node status of the first task node can be updated to the download complete status after the configuration file download is completed.

[0187] Ninth Embodiment

[0188] Figure 15This application illustrates a file download method according to a ninth embodiment, which mainly shows an implementation scheme for a client to download various target segment files. As shown in the figure, the file download method of this embodiment mainly includes:

[0189] Step S1502: Obtain the description information corresponding to each target segment file according to the configuration file.

[0190] In this embodiment, the description information (ranges) of the target segment file includes the download parameters corresponding to each target segment, such as the download path.

[0191] Step S1504: Based on the description information of the target segment file to be downloaded, generate a first task node, initialize the node status of the first task node to a downloadable state, and initialize the task type of the first task node to the target segment file type.

[0192] Step S1506: Add the first task node to the first task queue and update the node status of the first task node from the downloadable state to the downloading state.

[0193] In one embodiment, the first task node may be added to the tail of the first task queue.

[0194] Step S1508: Obtain the download path of the target segment file based on the description information of the target segment file, and download the target segment file from the target server according to the node status of the first task node and the download path.

[0195] In this embodiment, based on the description information of each target segment file in the configuration file, the specified download path URL of each target segment file can be obtained. Based on the specified download path URL of each target segment file and the current node status of the first task node (i.e., downloading status), each target segment file is downloaded from the CDN server and cached in the buffer corresponding to the first task node.

[0196] Step S1510: Determine whether the download process of the target segment file is complete. If yes, proceed to step S1512; otherwise, proceed to step S1514.

[0197] Step S1512: Update the node status of the first task node from the downloading state to the download completed state, and end this process.

[0198] Step S1514: Continuously write the downloaded data into the client's memory, and report the download status and progress of the target segment file to the designated server.

[0199] For example, when the download of the target segment file is not completed, the download data can be continuously written to the client's memory (e.g., the buffer corresponding to the first task node), and the current download status and download progress of the target segment file can be reported to the target server specified by the cloud platform.

[0200] Step S1516: Determine if there is an error in downloading the target segment file. If not, return to step S1510; if yes, proceed to step S1518.

[0201] In this embodiment, it can be determined whether any abnormalities, such as connection timeout, occur during the download process of the target segment file.

[0202] Step S1518: Reconnect the client to the target client.

[0203] The number of reconnections between the client and the target client can be set to, for example, 3 times, but this is not a limit and can be changed according to actual needs.

[0204] Step S1520: Determine whether the connection between the client and the target client is successful. If yes, return to step S1510; otherwise, proceed to step S1522.

[0205] Step S1522: End the download process of the target segment file.

[0206] Tenth Embodiment

[0207] Figure 16 This application illustrates a file download method according to a tenth embodiment, which mainly shows a specific implementation scheme for the client to perform signature verification processing on a configuration file or target segment file. As shown in the figure, the file download method of this embodiment mainly includes:

[0208] Step S1602: Update the node status of the first task node from the download completed status to the signature verification status.

[0209] In this embodiment, the node status of the first task node in the first task queue that updates the input can be updated from the download completed status to the signature verification status.

[0210] Step S1604: Determine the task type of the first task node. If it is a configuration file type, proceed to step S1606. If it is a target segment file type, proceed to step S1620.

[0211] Step S1606: Perform signature verification processing on the configuration file.

[0212] Step S1608 verifies the validity of the digital certificate in the configuration file.

[0213] For example, the client can use a pre-installed root certificate to call the VSS interface (vehicle security service, which has built-in various encryption / decryption, signature / verification algorithms of Chinese and foreign cryptography) to verify the legitimacy of the digital certificate in the configuration file.

[0214] Step S1610: Obtain the public key from the digital certificate of the configuration file, and use the public key to perform a hash operation on the digital signature of the configuration file to obtain the first hash value.

[0215] In this embodiment, the public key in the digital certificate can be used to call the VSS interface (Chinese national cryptographic SM2 or foreign cryptographic ECC algorithm) to perform signature verification calculation on the digital signature of the configuration file and generate the first hash value.

[0216] Step S1612: Perform a hash operation on the configuration file to obtain the second hash value.

[0217] In this embodiment, the client can call the VSS interface (Chinese national cryptographic SM3 or foreign cryptographic SHA-256 algorithm) to calculate the second hash value.

[0218] Step S1614: Determine whether the first hash value and the second hash value are equal. If they are equal, proceed to step S1616; if they are not equal, proceed to step S1618.

[0219] Step S1616: Update the node status of the first task node to the signature verification completed status.

[0220] Step S1618: End the signature verification process.

[0221] Step S1620: Perform signature verification processing on the target segment file.

[0222] Step S1622: Obtain the digital digest of the target segment file from the third task queue based on the target segment file, and use it as the first hash value.

[0223] Step S1624: Perform a hash operation on the target segment file to obtain a second hash value, and continue to execute step S1614.

[0224] For example, the client can call the VSS interface (using either the Chinese national cryptographic SM3 or the foreign cryptographic SHA-256 algorithm) to calculate the second hash value.

[0225] Eleventh Embodiment

[0226] Figure 17 This application illustrates a file download method according to its eleventh embodiment, which mainly shows a specific implementation scheme for the client to perform decryption processing on configuration files or target segment files. As shown in the figure, the file download method of this embodiment mainly includes:

[0227] Step S1702: Update the node status of the first task node from the signature verification completed state to the decryption in progress state.

[0228] In this embodiment, the node status of the first task node in the first task queue that updates the input can be updated from the signature verification completed state to the decryption in progress state.

[0229] Step S1704: Decrypt the configuration file or each target segment file using the symmetric key obtained in advance by the client.

[0230] For example, the symmetric key pre-issued to the client by the cloud platform can be used to call the VSS interface (Chinese national cryptographic SM4 or foreign cryptographic AES algorithm) to decrypt the input node data (i.e., configuration file or target segment file) and obtain the original data of the configuration file or target segment file.

[0231] Step S1706: Determine the node type of the first task node. If it is a configuration file type, proceed to step S1708. If it is a target segment file type, proceed to step S1710.

[0232] Step S1708: Generate a second task node, initialize the node state of the second task node to a resolvable state, add the second task node to the second task queue, and execute step S1712.

[0233] In this embodiment, the second task node can be added to the tail of the second task queue.

[0234] Step S1710: Generate a second task node, initialize the node state of the second task node to a writable storage state, add the second task node to the second task queue, and execute step S1712.

[0235] In this embodiment, the second task node can be added to the tail of the second task queue.

[0236] Step S1712: Delete the first task node.

[0237] Specifically, delete the first task node currently executing in the first task queue, that is, the first task node currently executing the decryption processing of the configuration file or target segment file.

[0238] Twelfth Embodiment

[0239] Figure 18 This application illustrates a file download method according to its twelfth embodiment, which mainly shows a specific implementation scheme for the client to perform configuration file parsing processing. As shown in the figure, the file download method of this embodiment mainly includes:

[0240] Step S1802: Update the node status of the second task node from the resolvable state to the resolving state.

[0241] Step S1804: Based on the node status of the second task node, perform parsing processing on the configuration file to obtain the description information and digital digest of each target segment file.

[0242] Step S1806: Update the node status of the second task node from the parsable state to the parsing completed state.

[0243] Step S1808: Generate a third task node in the third task queue to write the description information and digital digest of each target segment file into the third task queue.

[0244] In this embodiment, a loop program can be started to repeatedly execute the writing process of the description information and digital digest of each target segment file.

[0245] Optionally, a third task node can be generated cyclically in the third task queue based on the starting offset, size information (rangeSize), and digital digest information (sha256) of each target segment file, so as to write the description information and digital digest of each target segment file into the third task queue in sequence.

[0246] Step S1810: If the description information and digital digest of all target segment files have been written, update the node status of the second task node from the parsing completed state to the writable storage state.

[0247] Thirteenth Embodiment

[0248] Figure 19 This application illustrates a file download method according to its thirteenth embodiment, which mainly shows a specific implementation scheme for the client to perform storage processing of configuration files or target segment files. As shown in the figure, the file download method of this embodiment mainly includes:

[0249] Step S1902: Update the node status of the second task node from the writable storage state to the storage state.

[0250] Step S1904: Determine the node type of the second task node. If it is a configuration file type, proceed to step S1906. If it is a target segment file type, proceed to step S1908.

[0251] Step S1906: Persistently store the configuration file in the memory, and proceed to step S1910.

[0252] Optionally, the configuration file can be persistently stored in the client's eMMC storage.

[0253] Step S1908: Obtain the attribute information of each target segment file from the configuration file, and persist each target segment file to the specified storage location in the memory according to the attribute information, and then proceed to step S1910.

[0254] In this embodiment, the description information of the target segment file includes the starting offset position information and size information of the target segment file, and based on this, each target segment file is persistently stored in a specified storage location in the memory. Accordingly, after all target segment files are written to the specified storage locations in the memory, the target file can be restored and generated in the memory.

[0255] Step S1910: Delete the second task node.

[0256] In this embodiment, after the persistent storage of the configuration file or each target segment file is completed, the current second task node in the second task queue, that is, the second task node currently performing the storage processing of the configuration file or target segment file, can be deleted.

[0257] In summary, the file download method of the fifth to thirteenth embodiments of this application allows the client to use multi-core and multi-threaded technology to perform download, signature verification, decryption, and persistent storage processing of configuration files and various target segment files, which can improve file download processing performance by multiple times, significantly shorten the download time of large files, and improve the user's file download operation experience.

[0258] Fourteenth Embodiment

[0259] The fourteenth embodiment of the present invention provides a computer storage medium storing instructions for performing each step of the file download method described in the first to thirteenth embodiments above.

[0260] Fifteenth Embodiment

[0261] Figure 20 The processing flow of the vehicle-side device software upgrade method according to the fifteenth embodiment of this application is shown. It mainly shows the specific implementation scheme of the client executing the decryption processing of configuration files or various target segment files. As shown in the figure, the file download method of this embodiment mainly includes:

[0262] Step S2002: Using a file download method, the vehicle terminal is provided with the option to download the upgrade file from the target server.

[0263] In this embodiment, the file download method described in the first to thirteenth embodiments above can be used to provide the vehicle-side download of the upgrade file from the target server.

[0264] Step S2004: Use the upgrade file to provide the vehicle-side device software upgrade operation.

[0265] In summary, the vehicle-side device software upgrade method of this application embodiment can greatly improve the download and processing efficiency of upgrade files, and is especially suitable for OTA download processing of large-size upgrade files on the vehicle side. It can not only significantly shorten the download time of upgrade files, but also ensure the security of upgrade package data transmission.

[0266] Sixteenth Embodiment

[0267] The sixteenth embodiment of the present invention provides a computer storage medium storing instructions for performing each step of the terminal device software upgrade method of the fifteenth embodiment described above.

[0268] Seventeenth Embodiment

[0269] Figure 21 A schematic diagram of the architecture of a file download device according to the seventeenth embodiment of this application is shown. As shown in the figure, the file download device 2100 of this application includes a file processing module 2102 and a file download module 2104.

[0270] The file processing module 2102 is used to perform encryption and signing processing and segmentation processing on the target file to obtain the configuration file and multiple target segment files of the target file.

[0271] Optionally, the file processing module 2102 is further configured to perform encryption processing on the target file based on a preset encryption rule to obtain an encrypted file of the target file; perform segmentation processing on the encrypted file based on a preset file segmentation rule to obtain multiple initial segment files; perform signature processing on each of the initial segment files based on a preset signature rule to obtain each target segment file and each digital digest corresponding to each target segment file; and obtain the configuration file based on each of the digital digests corresponding to each target segment file.

[0272] Optionally, the file processing module 2102 is further configured to obtain the initial configuration file based on the digital digests corresponding to each of the target segment files; perform encryption processing on the configuration file based on the preset encryption rules to obtain the encrypted configuration file; and perform signature processing on the encrypted configuration file based on the preset signature processing rules to obtain the encrypted and signed configuration file.

[0273] Optionally, the configuration file includes a signature certificate field, a file signature field, an original length field, and a data ciphertext field; the signature certificate field has 16 bytes, the file signature field has 64 bytes, and the original length field has 8 bytes.

[0274] Optionally, the preset encryption rule includes symmetric key encryption, the preset signature rule includes a hash signature algorithm, and the preset file splitting rule is used to define the maximum file size of each target segment file.

[0275] Optionally, the file processing module 2102 is further configured to store the configuration file of the target file and each of the target segment files to the target server.

[0276] The file download module 2104 is used to perform download processing and decryption and signature verification processing on the configuration file and each of the target segment files to obtain the target file; wherein, the download processing of the configuration file and each of the target segment files and the decryption and signature verification processing are executed in parallel by the memory of the client, and the configuration file and each of the target segment files that have completed the decryption and signature verification processing will be persistently stored in the memory of the client.

[0277] Optionally, the file download module 2104 is further configured to provide the client with the ability to download the configuration file and each of the target segment files from the target server using the HTTP protocol, wherein the HTTP protocol supports multi-request segmented download.

[0278] Optionally, the file download module 2104 is further configured to perform the download process on the configuration file or each of the target segment files in the target server and cache it in the memory of the client; perform signature verification processing on the configuration file or each of the target segment files that have completed the download process based on the preset signature rules; perform decryption processing on the configuration file or each of the target segment files that have completed the signature verification process based on the preset encryption rules; and persistently store the configuration file or each of the target segment files that have completed the decryption process in the memory of the client.

[0279] Optionally, the file download module 2104 is further configured to execute the download processing and decryption / signature verification processing of the configuration file and each of the target segment files using a multi-core parallel computing approach; wherein, the execution of download processing and decryption / signature verification processing for the configuration file and each of the target segment files includes: establishing a first task queue, a second task queue, and a third task queue; establishing a thread pool with multiple worker threads, so that each worker thread executes each first task node in the first task queue or each second task node in the second task queue; wherein, the first task node includes one of download processing, signature verification processing, and decryption processing, and the second task node includes one of parsing processing and storage processing; and wherein, the download processing includes downloading the configuration file or each of the target segment files from the target server, and storing the successfully downloaded configuration file or each of the target segment files. The file is cached in the first task queue; the signature verification process includes obtaining the successfully downloaded configuration file or each of the target segment files in the first task queue for signature verification, and returning the successfully verified configuration file or each of the target segment files to the first task queue; the decryption process includes obtaining the successfully verified configuration file or each of the target segment files in the first task queue for decryption, and storing the successfully decrypted configuration file or each of the target segment files in the second task queue; the parsing process includes obtaining the successfully decrypted configuration file in the second task queue for parsing, obtaining each of the digital digests corresponding to each of the target segment files, and storing each of the digital digests in the third task queue; the storage process includes persistently storing the successfully decrypted configuration file or each of the target segment files in the client's memory.

[0280] Optionally, the file download module 2104 is further configured to allocate memory space in the memory for the objects of the thread pool; allocate memory space in the memory sequentially for the objects of the first task queue, the objects of the second task queue, and the objects of the third task queue; wherein, if the memory space generation fails for any one of the objects of the first task queue, the objects of the second task queue, and the objects of the third task queue, the memory space allocated in the memory for the objects of the thread pool is released.

[0281] Optionally, the file download module 2104 is further configured to release the memory space allocated in the memory for the objects of the first task queue, the objects of the second task queue, and the objects of the third task queue; and to release the memory space allocated in the memory for the objects of the thread pool.

[0282] Optionally, the file download module 2104 is further configured to, based on the node type and node status of the first task node, provide the worker thread to execute one of the download processing, the signature verification processing, and the decryption processing of the configuration file or each of the target segment files; and based on the node type and node status of the second task node, provide the worker thread to execute one of the parsing processing of the configuration file, the storage processing of the configuration file, and the storage processing of the target segment files; wherein, the node type of the first task node and the node type of the second task node each include a configuration file type and a target segment file type; the node status of the first task node includes one of the following: downloadable state, downloading state, download completed state, signature verification state, signature verification completed state, decryption state, and decryption completed state; the node status of the second task node includes one of the following: writable storage state, writing to storage state, writing to storage completed state, parsable state, parsing state, and parsing completed state.

[0283] Optionally, the file download module 2104 is further configured to generate the first task node, initialize the node status of the first task node to the downloadable state, initialize the task type of the first task node to the configuration file type; add the first task node to the first task queue, and update the node status of the first task node from the downloadable state to the downloading state; obtain the download path of the configuration file according to the attribute information of the configuration file, and download the configuration file from the target server according to the node status of the first task node and the download path; and update the node status of the first task node from the downloading state to the download completed state.

[0284] Optionally, the file download module 2104 is further configured to generate the first task node, initialize the node state of the first task node to the downloadable state, and initialize the task type of the first task node to the target segment file type; add the first task node to the first task queue, and update the node state of the first task node from the downloadable state to the downloading state; obtain the download path of the target segment file according to the description information of the target segment file to be downloaded, and download the target segment file from the target server according to the node state of the first task node and the download path; and update the node state of the first task node from the downloading state to the download completed state.

[0285] Optionally, the file download module 2104 is further configured to update the node status of the first task node from the download completed state to the signature verification state; perform signature verification processing of the configuration file or the target segment file according to the node status and node type of the first task node; and update the node status of the first task node from the signature verification state to the signature completed state after the signature verification processing of the configuration file or the signature verification processing of the target segment file is successful.

[0286] Optionally, the file download module 2104 is further configured to obtain a public key from the digital certificate of the configuration file, and use the public key to perform a hash operation on the digital signature of the configuration file to obtain a first hash value; perform a hash operation on the configuration file to obtain a second hash value; and if the first hash value and the second hash value are equal, update the node status of the first task node to the signature verification completion status.

[0287] Optionally, the file download module 2104 is further configured to obtain the digital digest of the target segment file from the third task queue according to the target segment file, and use the digital digest as a first hash value; perform a hash operation on the target segment file to obtain a second hash value; and if the first hash value and the second hash value are equal, update the node status of the first task node to the signature verification completion status.

[0288] Optionally, the file download module 2104 is further configured to update the node status of the first task node from the signature completion status to the decryption status; perform decryption processing of the configuration file or the target segment file according to the node status and node type of the first task node; if the decryption processing is completed for the configuration file, generate the second task node, initialize the node status of the second task node to the parsable status, and add the second task node to the second task queue; if the decryption processing is completed for the target segment file, generate the second task node, initialize the node status of the second task node to the writable storage status, and add the second task node to the second task queue.

[0289] Optionally, the file download module 2104 is further configured to update the node status of the second task node from the parsable state to the parsing state; perform parsing processing on the configuration file according to the node status of the second task node to obtain the description information and digital digest of each of the target segment files; update the node status of the second task node from the parsable state to the parsing completed state; generate the third task node in the third task queue to write the description information and digital digest of each of the target segment files into the third task queue; if the description information and digital digest of each of the target segment files have been written, update the node status of the second task node from the parsing completed state to the writable storage state.

[0290] Optionally, the file download module 2104 is further configured to update the node status of the second task node from the writable storage state to the storing state; and to perform the storage processing of the configuration file or each of the target segment files according to the node status of the second task node; wherein, if the node type of the second task node is the configuration file type, the configuration file is persistently stored in the memory; if the node type of the second task node is the target segment file type, the description information of each of the target segment files is obtained from the configuration file, and each of the target segment files is persistently stored in each specified storage location in the memory according to the description information; wherein, the description information of the target segment file includes the starting offset position information and size information of the target segment file.

[0291] Optionally, the file download module 2104 is further configured to terminate the download operation of the target file if any of the download processes of the configuration file, each of the target segment files, or the decryption and signature verification processes fails.

[0292] Optionally, the client downloads the configuration file or each of the target segment files from the target server using over-the-air (OTA) download technology.

[0293] Furthermore, the file download apparatus of each embodiment of the present invention can also be used to implement other steps in the foregoing file download method embodiments, and has the beneficial effects of the corresponding method step embodiments, which will not be repeated here.

[0294] Eighteenth Embodiment

[0295] Figure 22 A schematic diagram of the architecture of the vehicle-side device software upgrade apparatus according to the eighteenth embodiment of this application is shown. As shown in the figure, the vehicle-side device software upgrade apparatus 2200 of this application includes a file acquisition module 2202 and a software upgrade module 2204.

[0296] The file acquisition module 2202 is used to provide upgrade files from the target server for download on the vehicle side through the file download device described in the seventeenth embodiment above.

[0297] The software upgrade module 2204 is used to provide the vehicle-side execution device software upgrade operation using the upgrade file.

[0298] Nineteenth Embodiment

[0299] The nineteenth embodiment of this application provides a client for downloading a configuration file and target segment files of a target file from a server, and performing decryption and signature verification on the downloaded configuration file and target segment files to obtain the target file; wherein the downloading process of the configuration file and the target segment files and the decryption and signature verification process are executed in parallel in the memory of the client, and the configuration file and the target segment files that have completed the decryption and signature verification process are persistently stored in the memory of the client.

[0300] In summary, the file download and vehicle-side device software upgrade method, apparatus, computer storage medium, and client provided in this application embodiment can improve file download processing efficiency, shorten file download time, and ensure data transmission security.

[0301] It should be noted that, depending on the implementation needs, the various components / steps described in the embodiments of the present invention can be broken down into more components / steps, or two or more components / steps or parts of the operation of components / steps can be combined into new components / steps to achieve the purpose of the embodiments of the present invention.

[0302] The methods described above according to embodiments of the present invention can be implemented in hardware, firmware, or as software or computer code that can be stored in a recording medium (such as CD ROM, RAM, floppy disk, hard disk, or magneto-optical disk), or as computer code originally stored in a remote recording medium or a non-transitory machine-readable medium and subsequently stored in a local recording medium, downloaded over a network. Thus, the methods described herein can be stored as software processing on a recording medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware (such as an ASIC or FPGA). It is understood that the computer, processor, microprocessor controller, or programmable hardware includes storage components (e.g., RAM, ROM, flash memory, etc.) capable of storing or receiving software or computer code. When the software or computer code is accessed and executed by the computer, processor, or hardware, the file download and vehicle-end device software upgrade methods described herein are implemented. Furthermore, when a general-purpose computer accesses code used to implement the file download and vehicle-end device software upgrade methods shown herein, the execution of the code transforms the general-purpose computer into a dedicated computer for executing the file download and vehicle-end device software upgrade methods shown herein.

[0303] Those skilled in the art will recognize that the units and method steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of the embodiments of the present invention.

[0304] The above embodiments are only used to illustrate the embodiments of the present invention, and are not intended to limit the embodiments of the present invention. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the embodiments of the present invention. Therefore, all equivalent technical solutions also fall within the scope of the embodiments of the present invention, and the patent protection scope of the embodiments of the present invention should be defined by the claims.

Claims

1. A file download method, characterized in that, include: The target file is encrypted, signed, and segmented to obtain the target file's configuration file and multiple target segment files. as well as Download and decryption / signature verification processes are performed on the configuration file and each target segment file to obtain the target file; wherein, The client's memory is used to execute the download process of the configuration file and each of the target segment files in parallel, and the decryption and signature verification process is performed. The configuration file and each of the target segment files that have completed the decryption and signature verification process are then persistently stored in the client's memory. The parallel execution of the download process and the decryption and signature verification process of the configuration file and each target segment file by means of the client's memory includes: the client is a vehicle terminal, the vehicle terminal uses the HTTP protocol to download the configuration file and each target segment file from the target server, directly executes the download process and the decryption and signature verification process of the configuration file and each target segment file in the memory of the vehicle terminal, and then persistently stores the configuration file and each target segment file that have successfully decrypted and verified the signature to the storage of the vehicle terminal; The download process involves downloading each target segment of the configuration file from the target server in parallel using over-the-air (OTA) download technology through a multi-request segmented download method. The configuration file contains description information for each target segment file, so that the vehicle terminal can use multi-threading to download each target segment file in parallel according to the description information of each target segment file. The description information includes one or more of the following: the starting offset position, size information, and digital digest information for each target segment file. The starting offset position is used to identify the offset address at the beginning of each segment of the target file. The size information is used to identify the size of each target segment file. The digital digest information is used to identify the digital digest of each target segment file and is stored in the category of the description information of each target segment file.

2. The file download method according to claim 1, characterized in that, The process of performing encryption and signature processing and segmentation on the target file to obtain the configuration file and multiple target segment files includes: Based on preset encryption rules, the target file is encrypted to obtain an encrypted version of the target file. Based on preset file segmentation rules, the encrypted file is segmented to obtain multiple initial segment files; Based on preset signing rules, signing processing is performed on each of the initial segmented files to obtain each of the target segmented files and the corresponding digital digests for each target segmented file; and The configuration file is obtained based on the digital digests corresponding to each of the target segment files.

3. The file download method according to claim 2, characterized in that, Obtaining the configuration file based on the digital digests corresponding to each of the segmented files includes: The initial configuration file is obtained based on the digital digests corresponding to each of the target segment files; Based on the preset encryption rules, the configuration file is encrypted to obtain the encrypted configuration file; and Based on the preset signing rules, a signing process is performed on the encrypted configuration file to obtain the encrypted and signed configuration file.

4. The file download method according to claim 2, characterized in that, The configuration file includes a signature certificate field, a file signature field, an original length field, and a data ciphertext field; The signature certificate field has 16 bytes, the file signature field has 64 bytes, and the original length has 8 bytes.

5. The file download method according to claim 2, characterized in that, The preset encryption rules include symmetric key encryption, the preset signature rules include hash signature algorithms, and the preset file splitting rules are used to define the maximum file size of each target segment file.

6. The file download method according to any one of claims 2-5, characterized in that, The download and decryption / signature verification processes performed on the configuration file and each of the target segment files include: The download process is performed on the configuration file or each of the target segment files in the target server, and; Based on the preset signature rules, signature verification processing is performed on the configuration file or each of the target segment files that have completed the download process; Based on the preset encryption rules, decryption processing is performed on the configuration file or each of the target segment files that have completed the signature verification process; and The configuration file or each of the target segment files that has completed the decryption process will be persistently stored in the client's memory.

7. The file download method according to claim 6, characterized in that, The method also includes using multi-core parallel computing to execute the downloading process of the configuration file and each of the target segment files, and the decryption and signature verification process. Furthermore, the download processing and decryption verification processing performed on the configuration file and each of the target segment files includes: Establish a first task queue, a second task queue, and a third task queue; A thread pool with multiple worker threads is established so that each worker thread can execute a first task node in the first task queue or a second task node in the second task queue; wherein, The first task node includes one of download processing, signature verification processing, and decryption processing; the second task node includes one of parsing processing and storage processing; and wherein, The download process includes downloading the configuration file or each of the target segment files from the target server, and caching the successfully downloaded configuration file or each of the target segment files to the first task queue; The signature verification process includes obtaining the successfully downloaded configuration file or each of the target segment files from the first task queue for signature verification, and returning the successfully verified configuration file or each of the target segment files to the first task queue. The decryption process includes obtaining the configuration file or each of the target segment files that have been successfully verified in the first task queue for decryption, and storing the successfully decrypted configuration file or each of the target segment files in the second task queue. The parsing process includes obtaining the successfully decrypted configuration file in the second task queue for parsing, obtaining the digital digest and description information corresponding to each target segment file, and storing each digital digest and description information in the third task queue. The storage process includes persistently storing the successfully decrypted configuration file or each of the target segment files to the client's memory.

8. The file download method according to claim 7, characterized in that, The method further includes: In the memory device, the memory device is sequentially located; and Memory space is allocated sequentially for the objects of the first task queue, the objects of the second task queue, and the objects of the third task queue in the memory; wherein... If the memory space generation fails for any of the objects in the first task queue, the second task queue, or the third task queue, the memory space allocated to the thread pool objects in the memory device is released.

9. The file download method according to claim 8, characterized in that, The method further includes: Release the memory space allocated in the memory for the objects in the first task queue, the objects in the second task queue, and the objects in the third task queue; and Release the memory space allocated in the memory for the object of the thread pool.

10. The file download method according to claim 7, characterized in that, The execution of each first task node in the first task queue or each second task node in the second task queue by means of each of the worker threads includes: Based on the node type and node status of the first task node, the worker thread is provided to execute one of the following: the download process, the signature verification process, or the decryption process of the configuration file or each of the target segment files; and Based on the node type and node status of the second task node, the worker thread is provided to perform one of the following: the parsing process of the configuration file, the storage process of the configuration file, or the storage process of the target segment file; wherein, The node types of the first task node and the second task node each include a configuration file type and a target segment file type; The node status of the first task node includes one of the following: downloadable, downloading, download completed, signature verification in progress, signature verification completed, decryption in progress, or decryption completed. The node status of the second task node includes one of the following: writable storage status; writing to storage status; writing to storage completed status; parsable status; parsing status; and parsing completed status.

11. The file download method according to claim 10, characterized in that, The process of providing the worker thread to execute the download of the configuration file includes: Generate the first task node, initialize the node state of the first task node to the downloadable state, and initialize the task type of the first task node to the configuration file type; Add the first task node to the first task queue, and update the node status of the first task node from the downloadable status to the downloading status; Based on the attribute information of the configuration file, the download path of the configuration file is obtained, and the configuration file is downloaded from the target server according to the node status of the first task node and the download path; and Update the node status of the first task node from the downloading state to the download completed state.

12. The file download method according to claim 10, characterized in that, The provision of the worker thread to perform the download process for each of the target segment files includes: Generate the first task node, initialize the node state of the first task node to the downloadable state, and initialize the task type of the first task node to the target segment file type; Add the first task node to the first task queue, and update the node status of the first task node from the downloadable status to the downloading status; Based on the description information of the target segment file to be downloaded, the download path of the target segment file is obtained, and the target segment file is downloaded from the target server according to the node status of the first task node and the download path; and Update the node status of the first task node from the downloading state to the download completed state.

13. The file download method according to claim 11 or 12, characterized in that, The provision of the worker thread to execute the signature verification process of the configuration file or each of the target segment files includes: Update the node status of the first task node from the download completed status to the signature verification status; Based on the node status and node type of the first task node, perform the signature verification process of the configuration file or the signature verification process of the target segment file. Once the signature verification process of the configuration file or the target segment file is successful, the node status of the first task node will be updated from the "signature verification in progress" status to the "signature verification completed" status.

14. The file download method according to claim 13, characterized in that, The signature verification process for executing the configuration file includes: Obtain the public key from the digital certificate of the configuration file, and use the public key to perform a hash operation on the digital signature of the configuration file to obtain the first hash value; Perform a hash operation on the configuration file to obtain a second hash value; and If the first hash value and the second hash value are equal, the node status of the first task node is updated to the signature verification completed status.

15. The file download method according to claim 13, characterized in that, The signature verification process for the target segment file includes: Based on the target segment file, obtain the digital digest of the target segment file from the third task queue, and use the digital digest as the first hash value; Perform a hash operation on the target segment file to obtain a second hash value; and If the first hash value and the second hash value are equal, the node status of the first task node is updated to the signature verification completed status.

16. The file download method according to claim 13, characterized in that, The provision of the worker thread to execute the decryption process of the configuration file or each of the target segment files includes: Update the node status of the first task node from the signature verification completed status to the decryption in progress status; Based on the node status and node type of the first task node, perform the decryption process of the configuration file or the decryption process of the target segment file; If the configuration file is the one that has completed the decryption process, a second task node is generated, and the node state of the second task node is initialized to the parsable state. The second task node is then added to the second task queue. If the target segment file is the one whose decryption process is completed, a second task node is generated, and the node state of the second task node is initialized to the writable storage state. The second task node is then added to the second task queue.

17. The file download method according to claim 16, characterized in that, The provision of the worker thread to execute the parsing process of the configuration file includes: Update the node status of the second task node from the resolvable state to the resolvable state; Based on the node status of the second task node, parsing processing is performed on the configuration file to obtain the description information and digital digest of each of the target segment files; Update the node status of the second task node from the parsable state to the parsing completed state; The third task node is generated in the third task queue to write the description information and digital digest of each of the target segment files into the third task queue; If the description information and digital digest of each of the target segment files have been written, the node status of the second task node is updated from the parsing completed state to the writable storage state.

18. The file download method according to claim 17, characterized in that, The provision of the worker thread to execute the storage processing of the configuration file or the target segment file includes: Update the node status of the second task node from the writable storage status to the writing to storage status; Based on the node status of the second task node, the storage processing of the configuration file or each of the target segment files is executed; wherein, If the node type of the second task node is the configuration file type, then the configuration file is persistently stored in the memory; If the node type of the second task node is the target segment file type, then the description information of each target segment file is obtained from the configuration file, and each target segment file is persistently stored in the specified storage location in the memory according to the description information. The description information of the target segment file includes the starting offset position information and size information of the target segment file.

19. The file download method according to claim 1, characterized in that, The method further includes: If any of the following processes fails: the download process of the configuration file, the download process of each target segment file, or the decryption and signature verification process, the download operation of the target file shall be terminated.

20. A method for upgrading vehicle-side equipment software, characterized in that, The method includes: Using the file download method according to any one of claims 1 to 19, an upgrade file is provided for downloading from a target server on a vehicle-side device; and The upgrade file is used to enable the vehicle to perform a device software upgrade operation.

21. A computer storage medium, characterized in that, The computer storage medium stores instructions for performing each step of the file download method according to any one of claims 1 to 19, or the computer storage medium stores instructions for performing each step of the vehicle-mounted device software upgrade method according to claim 20.

22. A file download device, characterized in that, include: The file processing module performs encryption and signing processing and segmentation processing on the target file to obtain the configuration file and multiple target segment files; as well as The file download module performs download processing and decryption and signature verification processing on the configuration file and each of the target segment files to obtain the target file; wherein, the download processing of the configuration file and each of the target segment files and the decryption and signature verification processing are executed in parallel by the client's memory, and the configuration file and each of the target segment files that have completed the decryption and signature verification processing will be persistently stored in the client's memory; The downloading process of the configuration file and each of the target segment files, and the decryption and signature verification process are executed in parallel by the memory of the client. The configuration file and each of the target segment files that have completed the decryption and signature verification process will be persistently stored in the memory of the client. This includes: using the vehicle as the client, the vehicle using the HTTP protocol to download the configuration file and each of the target segment files from the target server, directly executing the downloading process and decryption and signature verification process of the configuration file and each of the target segment files in the memory of the vehicle, and then persistently storing the configuration file and each of the target segment files that have successfully undergone decryption and signature verification in the memory of the vehicle. The download process is based on over-the-air download technology to download the target server in segments through multiple requests, so as to download each target segment file of the configuration file in parallel; The configuration file contains description information for each target segment file, so that the vehicle terminal can use multi-threading to download each target segment file in parallel according to the description information of each target segment file. The description information includes one or more of the following: the starting offset position, size information, and digital digest information for each target segment file. The starting offset position is used to identify the offset address at the beginning of each segment of the target file. The size information is used to identify the size of each target segment file. The digital digest information is used to identify the digital digest of each target segment file and is stored in the category of the description information of each target segment file.

23. A vehicle-side equipment software upgrade device, characterized in that, include: The file acquisition module, through the file download device according to claim 22, provides the vehicle-side download of the upgrade file from the target server; as well as The software upgrade module utilizes the upgrade file to provide the vehicle-side execution device software upgrade operation.

24. A client application, characterized in that, The client is used to download the configuration file and each target segment file of the target file from the server, and to perform decryption and signature verification on the downloaded configuration file and each target segment file to obtain the target file; wherein, the downloading process of the configuration file and each target segment file and the decryption and signature verification process are executed in parallel in the memory of the client, and the configuration file and each target segment file that have completed the decryption and signature verification process will be persistently stored in the memory of the client; The download processing and decryption verification processing of the configuration file and each of the target segment files are executed in parallel in the memory of the client, and the configuration file and each of the target segment files that have completed the decryption verification processing are persistently stored in the memory of the client. This includes: using the vehicle as the client, the vehicle using the HTTP protocol to download the configuration file and each of the target segment files from the target server, directly executing the download processing and decryption verification processing of the configuration file and each of the target segment files in the memory of the vehicle, and then persistently storing the configuration file and each of the target segment files that have successfully decrypted and verified the signature in the memory of the vehicle. The download process is based on over-the-air download technology to download the target server in segments through multiple requests, so as to download each target segment file of the configuration file in parallel; The configuration file contains description information for each target segment file, so that the vehicle terminal can use multi-threading to download each target segment file in parallel according to the description information of each target segment file. The description information includes one or more of the following: the starting offset position, size information, and digital digest information for each target segment file. The starting offset position is used to identify the offset address at the beginning of each segment of the target file. The size information is used to identify the size of each target segment file. The digital digest information is used to identify the digital digest of each target segment file and is stored in the category of the description information of each target segment file.

Citation Information

Patent Citations

  • Method for analyzing dump files

    CN106354646A

  • ELF file release method, ELF file verification method, server and terminal

    CN107786504A

  • OTA upgrade package downloading method and device, vehicle end and server

    CN111510485A