Vehicle and upgrading method thereof, server and upgrading file processing method thereof, medium and program product

By using a grouped parallel upgrade mechanism, the problem of low vehicle upgrade efficiency is solved, ensuring that the longest upgrade task does not block other tasks, thus achieving a stable, reliable, and efficient upgrade.

CN121597239APending Publication Date: 2026-03-03VOYAH AUTOMOBILE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511503703.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-21
Publication Date
2026-03-03

AI Technical Summary

Technical Problem

The current technology for vehicle upgrades is relatively inefficient, mainly due to the efficiency bottleneck caused by the use of a serial upgrade method.

Method used

By dividing the upgrade file package into multiple compressed upgrade packages for parallel processing, a first thread and at least one second thread are established. The first thread processes the longest compressed upgrade package, and the second thread processes other compressed upgrade packages, ensuring parallel operation. Within each second thread, serial upgrades are used to satisfy the constraint that the total time within the group is less than or equal to the time of the first compressed upgrade package.

Benefits of technology

It achieves stability, reliability, and efficiency improvement in the vehicle upgrade process, avoids performance bottlenecks caused by excessive parallel tasks, reduces the risk of concurrent write conflicts, and improves overall upgrade efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121597239A_ABST
    Figure CN121597239A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a vehicle and an upgrading method thereof, a server and an upgrading file processing method thereof, a medium and a program product, and the method comprises the steps: obtaining an upgrading file package under the condition of receiving an upgrading instruction, and building a first thread and at least one second thread based on grouping information; upgrading the vehicle based on the first compressed upgrade package in the first thread; the vehicle is subjected to serial upgrading based on the second compressed upgrading package in the corresponding second group in each second thread, and the first thread and at least one second thread run in parallel. According to the embodiment of the invention, the longest upgrading task in the system is ensured not to block the execution of other upgrading tasks, the longest upgrading task is continuously operated as an independent parallel unit, and other threads can synchronously promote intra-group upgrading by fully utilizing calculation and I / O (Input / Output) resources, so that the total time consumption of remote online upgrading is greatly shortened globally, and the upgrading efficiency is improved. And the upgrading efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of automotive technology, and more particularly to vehicles and their upgrade methods, servers and their upgrade file processing methods, media, and program products. Background Technology

[0002] As vehicles become increasingly intelligent, the related hardware and software upgrades are becoming more frequent. Currently, these upgrades are performed sequentially, resulting in low efficiency. Therefore, improving vehicle upgrade efficiency is a pressing issue that needs to be addressed. Summary of the Invention

[0003] This application provides a vehicle and its upgrade method, a server and its upgrade file processing method, a medium, and a program product, which solves the technical problem of low upgrade efficiency caused by the serial upgrade method in the prior art, and achieves the technical effect of improving the upgrade efficiency of vehicles.

[0004] In a first aspect, this application provides a method for upgrading a vehicle, the method comprising: Upon receiving an upgrade instruction, an upgrade file package is obtained, which includes multiple compressed upgrade packages and grouping information for the multiple compressed upgrade packages; each compressed upgrade package is obtained by compressing an upgrade file. Based on the grouping information, a first thread and at least one second thread are established. The first thread corresponds to a first group, and each second thread corresponds to a second group. The first group includes a first compressed upgrade package, which is the compressed upgrade package with the longest required upgrade time among the plurality of compressed upgrade packages. Each second group includes at least one second compressed upgrade package, which is a compressed upgrade package other than the first compressed upgrade package among the plurality of compressed upgrade packages. The sum of the required upgrade times of each second compressed upgrade package in each second group is less than the required upgrade time of the first compressed upgrade package. In the first thread, the vehicle is upgraded based on the first compressed upgrade package; in each second thread, the vehicle is upgraded serially based on the second compressed upgrade package in the corresponding second group, wherein the first thread and at least one second thread run in parallel.

[0005] In some embodiments of this application, based on the foregoing scheme, obtaining the upgrade file package includes: Download the encrypted complex package from the server and store the encrypted complex package in the target partition; the target partition is a dedicated partition for storing the encrypted complex package, or the target partition is a partition obtained after cleaning up the shared partition after receiving the upgrade instruction; The encrypted composite package is decrypted and verified to obtain the upgrade file package.

[0006] In some embodiments of this application, based on the foregoing scheme, the space size of the target partition is X times the size of the encrypted composite packet, where X ≥ 2.1.

[0007] In some embodiments of this application, based on the foregoing scheme, after decrypting and verifying the encrypted composite package to obtain the upgrade file package, the method further includes: Delete the encrypted composite package.

[0008] In some embodiments of this application, based on the foregoing scheme, the grouping information includes file identifiers of compressed upgrade packages contained in each group, and the upgrading of the vehicle based on the first compressed upgrade package in the first thread includes: Based on the file identifier of the first compressed upgrade package, the first compressed upgrade package is obtained from the upgrade file package; In the first thread, a non-verification upgrade is performed on the vehicle based on the first compressed upgrade package; After the first compressed upgrade package completes the non-verification upgrade, the integrity of the first target content after the non-verification upgrade of the first compressed upgrade package is verified. If the first target content passes the integrity verification, then the first compressed upgrade package is determined to have completed the upgrade. If the first target content fails the integrity check, the first target content is deleted, and the vehicle is re-upgraded in the first thread based on the first compressed upgrade package without verification, until the final first target content passes the integrity check.

[0009] In some embodiments of this application, based on the foregoing scheme, the step of performing a non-verification upgrade on the vehicle based on the first compressed upgrade package in the first thread includes: If the upgrade method of the first compressed upgrade package is a full upgrade, then at least two first full upgrade operations are performed on the first compressed upgrade package in the first thread until the first compressed upgrade package completes the non-verification upgrade. The first full upgrade operation includes: A first data segment of a first length is read from the first compressed upgrade package, the first data segment is decompressed, and the decompressed first data segment is written to the first target location of the vehicle according to the writing path of the first compressed upgrade package; the first target location is the storage partition of the first target device in the vehicle that is upgraded using the first compressed upgrade package, or the first target location is a location in the first disk partition of the vehicle.

[0010] In some embodiments of this application, based on the foregoing scheme, the step of performing a non-verification upgrade on the vehicle based on the first compressed upgrade package in the first thread includes: If the upgrade method of the first compressed upgrade package is differential upgrade, then at least two first differential upgrade operations are performed on the first compressed upgrade package in the first thread until the first compressed upgrade package completes the non-verification upgrade. The first differential upgrade operation includes: A second data segment of a second length is read from the first compressed upgrade package, the second data segment is decompressed, a first original data segment matching the second data segment is read from the second disk partition of the vehicle, the first original data segment and the decompressed second data segment are restored to obtain a first full data fragment, and the first full data fragment is written to the first target location of the vehicle according to the upgrade path of the first compressed upgrade package; the first target location is the storage partition of the first target device in the vehicle that is upgraded using the first compressed upgrade package, or the first target location is a location in the first disk partition of the vehicle; the first disk partition and the second disk partition are different partitions.

[0011] In some embodiments of this application, based on the foregoing scheme, the grouping information includes file identifiers of compressed upgrade packages contained in each group, and the step of performing a serial upgrade on the vehicle based on the second compressed upgrade package in the corresponding second group in each second thread includes: For each of the second groups, based on the file identifiers of each of the second compressed upgrade packages in the current second group, each of the second compressed upgrade packages in the current second group is obtained one by one from the upgrade file package; For each second compressed upgrade package obtained, a non-verification upgrade is performed on the vehicle based on the current second compressed upgrade package in the current second thread; After the second compressed upgrade package completes the unverified upgrade, the integrity of the second target content after the unverified upgrade of the second compressed upgrade package is verified. If the current second target content passes the integrity check, then continue to upgrade the vehicle for the next obtained second compressed upgrade package in the current second thread until all the second compressed upgrade packages in the current second group have been upgraded; If the current second target content fails the integrity check, the current second target content is deleted, and the vehicle is re-upgraded in the current second thread based on the current second compressed upgrade package without verification, until the current second target content finally obtained based on the current second compressed upgrade package passes the integrity check. Then, the vehicle is upgraded in the current second thread for the next obtained second compressed upgrade package, until all second compressed upgrade packages in the current second group have been upgraded.

[0012] In some embodiments of this application, based on the foregoing scheme, the step of performing a non-verification upgrade on the vehicle based on the current second compressed upgrade package in the current second thread includes: If the current upgrade method of the second compressed upgrade package is a full upgrade, then at least one second full upgrade operation is performed on the current second compressed upgrade package in the current second thread until the current second compressed upgrade package completes the non-verification upgrade; The second full upgrade operation includes: A third data segment of a third length is read from the current second compressed upgrade package, the third data segment is decompressed, and the decompressed third data segment is written to the second target location of the vehicle according to the writing path of the current second compressed upgrade package; the second target location is the storage partition of the second target device in the vehicle that is upgraded using the current second compressed upgrade package, or the second target location is a location in the first disk partition of the vehicle.

[0013] In some embodiments of this application, based on the foregoing scheme, the step of performing a non-verification upgrade on the vehicle based on the current second compressed upgrade package in the current second thread includes: If the current second compressed upgrade package is upgraded using a differential upgrade method, then at least one second differential upgrade operation is performed on the current second compressed upgrade package in the current second thread until the current second compressed upgrade package completes the non-verification upgrade. The second differential upgrade operation includes: A fourth data segment of a fourth length is read from the current second compressed upgrade package. The fourth data segment is decompressed. A second original data segment matching the fourth data segment is read from the second disk partition of the vehicle. The second original data segment and the decompressed fourth data segment are restored to obtain a second full data fragment. The second full data fragment is then written to the second target location of the vehicle according to the upgrade path of the current second compressed upgrade package. The second target location is either the storage partition of the second target device in the vehicle that is being upgraded using the current second compressed upgrade package, or a location within the first disk partition of the vehicle. The first disk partition and the second disk partition are different partitions.

[0014] In some embodiments of this application, based on the foregoing scheme, after the upgrade of each of the compressed upgrade packages is completed in both the first thread and at least one second thread, the method further includes: A version switching instruction is generated, which is used to configure the vehicle so that the vehicle loads and runs file data corresponding to the upgraded software version number upon the next startup.

[0015] Secondly, this application provides an upgrade file processing method, the method comprising: Obtain the required upgrade time for each upgrade file; The first upgrade file with the longest upgrade time among all the upgrade files is divided into a first group, and the second upgrade files other than the first upgrade file among all the upgrade files are divided into at least one second group, and the grouping information of the first group and at least one second group is recorded; the sum of the upgrade times of the second upgrade files in each second group is less than or equal to the upgrade time of the first upgrade file; Upon receiving a request instruction from a vehicle, the group information and each of the upgrade files are sent to the vehicle, so that the vehicle establishes a first thread for the first group and at least one second thread for at least one second group. In the first thread, the vehicle is upgraded based on the first upgrade file, and in at least one second thread, the vehicle is serially upgraded based on the second upgrade file of the corresponding second group. The first thread and at least one second thread run in parallel.

[0016] In some embodiments of this application, based on the foregoing scheme, the method further includes: Each of the aforementioned upgrade files is compressed separately to obtain a compressed upgrade package; Package the various compressed upgrade packages together to obtain an upgrade file package; The upgrade file package is encrypted and a digital signature is generated to obtain an encrypted composite package. Upon receiving the request instruction from the vehicle, the encrypted composite package is sent to the vehicle so that the vehicle can perform an upgrade based on the encrypted composite package.

[0017] In some embodiments of this application, based on the foregoing scheme, the method further includes: Obtain parameter information for each of the upgrade files; A configuration file is generated based on the parameter information of each of the upgrade files. Upon receiving the request instruction from the vehicle, the configuration file is sent to the vehicle so that the vehicle can upgrade based on the parameter information in the configuration file and each of the upgrade files. The parameter information includes at least the file identifier, upgrade method, upgraded software version number, file size, flashing path, integrity check value, and grouping information.

[0018] In some embodiments of this application, based on the foregoing scheme, each upgrade file is a differential file or a mirror file.

[0019] In some embodiments of this application, based on the foregoing scheme, dividing the second upgrade files (excluding the first upgrade file) into at least one second group in each of the upgrade files includes: If the total upgrade duration of the second upgrade files (excluding the first upgrade file) is less than or equal to the upgrade duration of the first upgrade file, then each of the second upgrade files is divided into a second group.

[0020] In some embodiments of this application, based on the foregoing scheme, dividing the second upgrade files (excluding the first upgrade file) into at least one second group in each of the upgrade files includes: If the total upgrade time of the second upgrade files other than the first upgrade file in all the upgrade files is greater than the upgrade time of the first upgrade file, then for the set of all the second upgrade files, at least two target grouping operations are performed sequentially until all the second upgrade files in the set are divided into at least two second groups; The target grouping operation includes: Select M second upgrade files from the set such that the sum of the upgrade times of the M second upgrade files is less than the upgrade time of the first upgrade file, and the difference between the sum of the upgrade times of the M second upgrade files and the upgrade time of the first upgrade file is minimized; M is a positive integer.

[0021] In some embodiments of this application, based on the foregoing scheme, dividing the second upgrade files (excluding the first upgrade file) into at least one second group in each of the upgrade files includes: If the total upgrade time of the second upgrade files other than the first upgrade file in all the upgrade files is greater than the upgrade time of the first upgrade file, the target number of second groups to be divided for each second upgrade file is determined based on the multiple relationship between the total preset time of each second upgrade file and the upgrade time of the first upgrade file. The second upgrade files are grouped according to the target number to obtain a second group with the target number, wherein the total upgrade time of the second upgrade files in each second group is less than or equal to the upgrade time of the first upgrade file.

[0022] In some embodiments of this application, based on the foregoing scheme, after dividing the second upgrade files (excluding the first upgrade file) in each of the upgrade files into at least one second group, the method further includes: If a new second upgrade file that has not been grouped is added, then based on the sum of the upgrade durations of the second upgrade files in each of the second groups and the upgrade duration of the ungrouped second upgrade files, the ungrouped second upgrade files are assigned to at least one target group in the second groups, such that the sum of the upgrade durations of the second upgrade files in the target groups is less than or equal to the upgrade duration of the first upgrade file.

[0023] Thirdly, this application provides a vehicle, including: First processor; A first memory for storing executable instructions of the first processor; The first processor is configured to execute a vehicle upgrade method as provided in the first aspect.

[0024] Fourthly, this application provides a server, characterized in that it includes: Second processor; A second memory for storing executable instructions of the second processor; The second processor is configured to execute an upgrade file processing method as provided in the second aspect.

[0025] Fifthly, this application provides a non-transitory computer-readable storage medium that, when the instructions in the storage medium are executed by a first processor of a vehicle, enables the vehicle to perform a vehicle upgrade method as provided in the first aspect; and when the instructions in the storage medium are executed by a second processor of a server, enables the server to perform an upgrade file processing method as provided in the second aspect.

[0026] In a sixth aspect, this application provides a computer program product, including computer instructions that, when executed by a first processor of a vehicle, are used to implement a vehicle upgrade method as provided in the first aspect; and when executed by a second processor of a server, are used to implement an upgrade file processing method as provided in the second aspect.

[0027] One or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages: Upon receiving an upgrade instruction, this embodiment obtains an upgrade file package and establishes a first thread and at least one second thread based on grouping information. In the first thread, the vehicle is upgraded based on the first compressed upgrade package. In each second thread, the vehicle is serially upgraded based on the second compressed upgrade package in the corresponding second group, wherein the first thread and at least one second thread run in parallel. This embodiment ensures that the longest upgrade task in the system (the first compressed upgrade package) does not block the execution of other upgrade tasks; it runs continuously as an independent parallel unit, while other threads can fully utilize computing and I / O resources to synchronously advance the upgrade within the group. This significantly reduces the total time required for remote online upgrades globally and improves upgrade efficiency. Furthermore, by imposing the constraint "total time within the group ≤ time of the first compressed upgrade package" on the second group, the workload of each group is relatively balanced, preventing a single second thread from becoming a new performance bottleneck due to excessive workload, thus ensuring the effectiveness of parallel scheduling and the controllability of the overall progress. Furthermore, this scheme improves parallelism while avoiding resource contention and system overload issues that may arise from unlimited concurrency. Each second thread employs a serial upgrade process, maintaining the order and reliability of operations and reducing the risk of upgrade failure due to concurrent write conflicts. In summary, this parallel upgrade mechanism, based on intelligent task duration grouping, maximizes system processing capacity and upgrade efficiency while ensuring a stable and reliable upgrade process. Attached Figure Description

[0028] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0029] Figure 1 A flowchart illustrating an upgrade file processing method provided in an embodiment of this application; Figure 2 A schematic flowchart illustrating a vehicle upgrade method provided in an embodiment of this application; Figure 3 A schematic diagram of a vehicle architecture provided for an embodiment of this application; Figure 4 This is a schematic diagram of a server architecture provided in an embodiment of this application. Detailed Implementation

[0030] This application provides a vehicle and its upgrade method, a server and its upgrade file processing method, a medium, and a program product, thereby solving the technical problem of low upgrade efficiency caused by the serial upgrade method in the prior art.

[0031] The technical solution of this application embodiment is to solve the above-mentioned technical problems, and the general idea is as follows: Upon receiving an upgrade instruction, this embodiment obtains an upgrade file package and establishes a first thread and at least one second thread based on grouping information. In the first thread, the vehicle is upgraded based on the first compressed upgrade package. In each second thread, the vehicle is serially upgraded based on the second compressed upgrade package in the corresponding second group, wherein the first thread and at least one second thread run in parallel. This embodiment ensures that the longest upgrade task in the system (the first compressed upgrade package) does not block the execution of other upgrade tasks; it runs continuously as an independent parallel unit, while other threads can fully utilize computing and I / O resources to synchronously advance the upgrade within the group. This significantly reduces the total time required for remote online upgrades globally and improves upgrade efficiency. Furthermore, by imposing the constraint "total time within the group ≤ time of the first compressed upgrade package" on the second group, the workload of each group is relatively balanced, preventing a single second thread from becoming a new performance bottleneck due to excessive workload, thus ensuring the effectiveness of parallel scheduling and the controllability of the overall progress. Furthermore, this scheme improves parallelism while avoiding resource contention and system overload issues that may arise from unlimited concurrency. Each second thread employs a serial upgrade process, maintaining the order and reliability of operations and reducing the risk of upgrade failure due to concurrent write conflicts. In summary, this parallel upgrade mechanism, based on intelligent task duration grouping, maximizes system processing capacity and upgrade efficiency while ensuring a stable and reliable upgrade process.

[0032] To better understand the above technical solutions, the following will provide a detailed explanation of the technical solutions in conjunction with the accompanying drawings and specific implementation methods.

[0033] First, it should be clarified that the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.

[0034] This application provides an upgrade file processing method and a vehicle upgrade method. The upgrade file processing method is mainly executed on the server side, and the vehicle upgrade method is mainly executed on the vehicle side. The server and the vehicle can communicate with each other. The communication method is not limited to cellular mobile communication networks, dedicated short-range communication, satellite communication, wireless local area networks, etc., and can be selected according to the actual situation.

[0035] The present application first describes an upgrade file processing method as follows.

[0036] This application provides an upgrade file processing method applied to a server. The method includes steps S11-S13, as detailed below. Figure 1 As shown.

[0037] Step S11: Obtain the upgrade time required for each upgrade file; Step S12: Divide the first upgrade file with the longest upgrade time among all the upgrade files into a first group, and divide the second upgrade files other than the first upgrade file among all the upgrade files into at least one second group, and record the grouping information of the first group and at least one second group; the sum of the upgrade times of the second upgrade files in each second group is less than or equal to the upgrade time of the first upgrade file. Step S13: Upon receiving a request instruction from the vehicle, the group information and each of the upgrade files are sent to the vehicle, so that the vehicle establishes a first thread for the first group and at least one second thread for at least one second group. In the first thread, the vehicle is upgraded based on the first upgrade file, and in at least one second thread, the vehicle is serially upgraded based on the second upgrade file of the corresponding second group. The first thread and at least one second thread run in parallel.

[0038] Regarding step S11, obtain the upgrade time required for each upgrade file; The various upgrade files on the server correspond to the hardware and software upgrades required on the vehicle side. For example, the vehicle's autonomous driving domain controller, system-on-a-chip, microcontroller unit, vehicle camera, vehicle Ethernet switch, radar, etc., can each correspond to at least one upgrade file.

[0039] Each upgrade file can be either a differential file or a mirror file. In other words, each upgrade file is either a differential file or a mirror file. If an upgrade file is a differential file, it needs to be upgraded using the differential upgrade method; if an upgrade file is a mirror file, it needs to be upgraded using the full upgrade method.

[0040] A full upgrade refers to an upgrade package containing a complete image file of the target software or firmware version. During the upgrade process, the device writes the entire new version's files to the corresponding partition or storage space, completely replacing all content of the old version. A differential upgrade, also known as an incremental upgrade, refers to an upgrade package containing only the differences needed to upgrade from the current old version to the target new version. The upgrade process requires a "synthesis" step, using this difference package and the existing old version files on the device to reconstruct the complete new version files locally before flashing them.

[0041] In practice, whether to create a differential file or an image file for the upgrade can be determined based on a combination of factors. These factors may include network bandwidth and traffic costs, server storage costs, upgrade reliability and risks, version management complexity, processing performance and time, etc.

[0042] After the server prepares the upgrade files for the hardware and software that need to be upgraded on the vehicle side, it can estimate the upgrade time required for each upgrade file during the upgrade process.

[0043] Regarding step S12, the first upgrade file with the longest upgrade time among all the upgrade files is divided into a first group, and the second upgrade files other than the first upgrade file among all the upgrade files are divided into at least one second group, and the grouping information of the first group and at least one second group is recorded; the sum of the upgrade times of the second upgrade files in each second group is less than or equal to the upgrade time of the first upgrade file.

[0044] The upgrade durations of each upgrade file are compared, and the upgrade file with the longest upgrade duration is selected and designated as the first upgrade file. The first upgrade file is then divided into the first group.

[0045] Each upgrade file, excluding the first upgrade file, is designated as a second upgrade file. These second upgrade files are then divided into at least one second group. Each second group contains at least one second upgrade file. However, it's important to note that the total preset duration of the second upgrade files within each second group must be less than or equal to the preset duration of the first upgrade file.

[0046] The step of dividing the second upgrade files other than the first upgrade file into at least one second group can be achieved by first determining whether the sum of the upgrade times of all the second upgrade files is less than or equal to the upgrade time of the first upgrade file.

[0047] If the total upgrade duration of the second upgrade files (excluding the first upgrade file) is less than or equal to the upgrade duration of the first upgrade file, then each of the second upgrade files is divided into a second group.

[0048] If the total upgrade time of all the second upgrade files (excluding the first upgrade file) exceeds the upgrade time of the first upgrade file, then each second upgrade file needs to be divided into at least two second groups. This application provides two methods for dividing each second upgrade file into at least two second groups.

[0049] The first method: If the total upgrade time of the second upgrade files other than the first upgrade file in all the upgrade files is greater than the upgrade time of the first upgrade file, then for the set of all the second upgrade files, at least two target grouping operations are performed sequentially until all the second upgrade files in the set are divided into at least two second groups; The target grouping operation includes: Select M second upgrade files from the set such that the sum of the upgrade times of the M second upgrade files is less than the upgrade time of the first upgrade file, and the difference between the sum of the upgrade times of the M second upgrade files and the upgrade time of the first upgrade file is minimized; M is a positive integer.

[0050] All the second upgrade files are grouped into a set. For this set, each time the target grouping operation is performed, the number of second upgrade files in the set decreases by M, until all the second upgrade files in the set are divided into at least two second groups.

[0051] The value of M in different target grouping operations can be different or the same, and can be adjusted according to the actual situation. For each target grouping operation, the sum of the upgrade times of the selected M second upgrade files is less than or equal to the upgrade time of the first upgrade file. This minimizes the difference between the sum of the upgrade times of the M second upgrade files and the upgrade time of the first upgrade file. This ensures that the sum of the preset times of the second groups obtained after each target grouping operation is as close as possible to the upgrade time of the first upgrade file, minimizing the total number of second groups and thus reducing the number of second threads established by the vehicle, thereby saving computing resources used by the vehicle during the upgrade process. The relationship between the second groups and the second threads will be explained later; this embodiment will not elaborate further here.

[0052] For example, the upgrade time for the first upgrade file (large package) is 100 seconds. The second set of upgrade files (small packages) and their respective upgrade times are: File A: 55 seconds, File B: 45 seconds, File C: 40 seconds, File D: 30 seconds, and File E: 20 seconds.

[0053] The second upgrade file has a total duration of 55+45+40+30+20=190 seconds, and the first upgrade file has a duration of 100 seconds. Since 190>100, the prerequisite is met, and the target grouping operation needs to be performed.

[0054] First target grouping operation The current ungrouped set is: {A(55),B(45),C(40),D(30),E(20)} Objective: Find a combination whose total duration is less than or equal to 100 and is closest to 100.

[0055] Try different combinations: A + B = 55 + 45 = 100 (Perfect equals 100, this is the optimal solution) A + C + D = 55 + 40 + 30 = 125 > 100 (invalid) A + C + E = 55 + 40 + 20 = 115 > 100 (invalid) B + C + D = 45 + 40 + 30 = 115 > 100 (invalid) A + D + E = 55 + 30 + 20 = 105 > 100 (invalid) B + C + E = 45 + 40 + 20 = 105 > 100 (invalid) C + D + E = 40 + 30 + 20 = 90 (less than 100, but not as close to 100) Optimal solution: Select M=2 files: A(55) and B(45), whose sum is 100, and have the smallest difference in duration (0) with the first upgrade file.

[0056] Successfully separated into the second group 1, containing files A and B, with a total duration of 100 seconds.

[0057] Removing A and B from the original set, the new ungrouped set becomes: {C(40),D(30),E(20)} Second target grouping operation The current ungrouped set is: {C(40),D(30),E(20)} Objective: Find a combination whose total duration is less than or equal to 100 and is closest to 100.

[0058] Try different combinations: C+D+E=40+30+20=90 (This is the only and best combination, closest to 100) C + D = 40 + 30 = 70 C + E = 40 + 20 = 60 D + E = 30 + 20 = 50 Optimal solution: Select M=3 files: C(40), D(30), E(20), their sum is 90.

[0059] Successfully created the second group 2, containing files C, D, and E, with a total duration of 90 seconds. The ungrouped set is now empty.

[0060] After two target grouping operations, all second upgrade files were divided into two second groups. Second group 1 includes A and B, with a preset total duration of 100 seconds. Second group 2 includes C, D, and E, with a preset total duration of 90 seconds.

[0061] The second method: If the total upgrade time of the second upgrade files other than the first upgrade file in all the upgrade files is greater than the upgrade time of the first upgrade file, the target number of second groups to be divided for each second upgrade file is determined based on the multiple relationship between the total preset time of each second upgrade file and the upgrade time of the first upgrade file. The second upgrade files are grouped according to the target number to obtain a second group with the target number, wherein the total upgrade time of the second upgrade files in each second group is less than or equal to the upgrade time of the first upgrade file.

[0062] Calculate the multiple relationship between the sum of the preset durations of all second upgrade files and the preset duration of the first upgrade file, and then determine the target number corresponding to the second group. Then, divide each second upgrade file into its respective second group, so that the sum of the upgrade durations of the second upgrade files in each second group is less than or equal to the upgrade duration of the first upgrade file.

[0063] For example, suppose the upgrade time for the first upgrade file is 100 seconds. There are five second upgrade files: file a, file b, file c, file d, and file e, with preset upgrade times of 55 seconds, 45 seconds, 40 seconds, 30 seconds, and 20 seconds, respectively. First, calculate the total upgrade time for all the second upgrade files: 55 + 45 + 40 + 30 + 20 = 190 seconds. Since 190 seconds is greater than the 100 seconds for the first upgrade file, the prerequisite for grouping is met.

[0064] Next, the target number of packets needs to be determined based on the ratio between the total duration and the duration of the first upgrade file. The total duration of the second upgrade file (190 seconds) divided by the duration of the first upgrade file (100 seconds) yields a ratio of 1.9. According to standard packetization strategies (e.g., rounding up), this ratio means that at least two packets are needed to accommodate all these second upgrade files, ensuring that the total duration of each packet does not exceed 100 seconds. Therefore, the target number is determined to be two second packets.

[0065] Then, the five second-upgrade files are specifically grouped according to this determined target number. The goal of grouping is to form two groups, where the total duration of the files in each group is less than or equal to 100 seconds. One feasible grouping scheme is to divide file a (55 seconds) and file b (45 seconds) into the first group, whose total duration is exactly 100 seconds. The remaining files c (40 seconds), d (30 seconds), and e (20 seconds) are divided into the second group, whose total duration is 90 seconds, also less than 100 seconds. Ultimately, two second groups are obtained: the first group contains files a and b, with a total duration of 100 seconds; the second group contains files c, d, and e, with a total duration of 90 seconds. This perfectly meets the requirement that the duration of each group does not exceed the duration of the first-upgrade file, and the number of groups is consistent with the target number initially determined based on the multiple relationship.

[0066] After obtaining the first group and at least one second group, record the grouping information of the first group and at least one second group. This grouping information may include the file identifier (such as the file name) of the upgrade file contained in each group.

[0067] Regarding step S13, upon receiving a request instruction from the vehicle, the group information and each of the upgrade files are sent to the vehicle, so that the vehicle establishes a first thread for the first group and at least one second thread for at least one second group. In the first thread, the vehicle is upgraded based on the first upgrade file, and in at least one second thread, the vehicle is serially upgraded based on the second upgrade file of the corresponding second group. The first thread and at least one second thread run in parallel.

[0068] After receiving the vehicle's request, the server sends the grouping information and various upgrade files to the vehicle, enabling the vehicle to upgrade based on the grouping information and the upgrade files. The process of upgrading the vehicle based on the grouping information and the upgrade files will be explained later and will not be repeated here.

[0069] Furthermore, since each upgrade file is relatively large, it needs to be compressed before the server sends the upgrade files to the vehicle. The specific process includes: Each of the aforementioned upgrade files is compressed separately to obtain a compressed upgrade package; Package the various compressed upgrade packages together to obtain an upgrade file package; The upgrade file package is encrypted and a digital signature is generated to obtain an encrypted composite package. Upon receiving the request instruction from the vehicle, the encrypted composite package is sent to the vehicle so that the vehicle can perform an upgrade based on the encrypted composite package.

[0070] Each upgrade file is compressed individually to obtain individual compressed upgrade packages. These compressed upgrade packages are then packaged into a larger package, known as an upgrade file package. This upgrade file package is then encrypted and digitally signed to obtain an encrypted composite package. The encrypted composite package can then be sent from the server to the vehicle, enabling the vehicle to perform upgrades based on the encrypted composite package.

[0071] First, this embodiment employs independent compression, achieving optimal compression efficiency based on the specific content characteristics of each upgrade file, effectively reducing the size of each compressed package and thus lowering the overall data volume of the upgrade file package. Second, this embodiment packages the independent compressed packages together for centralized management and transmission, improving overall file processing efficiency. Third, this embodiment encrypts the upgrade file package, ensuring the confidentiality and security of the upgrade content during transmission and storage, preventing unauthorized access or data leakage. Simultaneously, this embodiment utilizes an additional digital signature mechanism to verify the reliability of the data source and the integrity of the data content, effectively resisting malicious tampering or forgery attacks and ensuring the authenticity and trustworthiness of the upgrade process. Finally, this structured processing method provided by this embodiment enables the vehicle to quickly obtain and verify the encrypted composite package upon receiving a request command, and securely and reliably complete the system upgrade based on the verified upgrade content, comprehensively improving the efficiency, security, and reliability of the upgrade process.

[0072] Furthermore, in addition to sending the various upgrade files and grouping information to the vehicle, the server also needs to send some other parameter information to assist the vehicle in performing the upgrade. Therefore, before sending the various upgrade files to the vehicle, the server needs to obtain the parameter information of each upgrade file; based on the parameter information of each upgrade file, a configuration file is generated, so that upon receiving the request instruction from the vehicle, the configuration file is sent to the vehicle, enabling the vehicle to upgrade based on the parameter information in the configuration file and the various upgrade files; the parameter information includes at least the file identifier, upgrade method, upgraded software version number, file size, flashing path, integrity check value, and the grouping information. The file type of the configuration file can be selected according to the actual situation, for example, it can be an extensible markup language (XML) file.

[0073] After dividing the second upgrade files (excluding the first upgrade file) into at least one second group among the various upgrade files, the method further includes: If a new second upgrade file that has not been grouped is added, then based on the sum of the upgrade durations of the second upgrade files in each of the second groups and the upgrade duration of the ungrouped second upgrade files, the ungrouped second upgrade files are assigned to at least one target group in the second groups, such that the sum of the upgrade durations of the second upgrade files in the target groups is less than or equal to the upgrade duration of the first upgrade file.

[0074] In summary, this application provides an upgrade file processing method. First, the required upgrade time for each upgrade file is obtained. Then, the first upgrade file with the longest upgrade time among the upgrade files is divided into a first group, and the second upgrade files other than the first upgrade file are divided into at least one second group. The grouping information of the first group and at least one second group is recorded. The sum of the upgrade times of the second upgrade files in each second group is less than or equal to the upgrade time of the first upgrade file. Upon receiving a request instruction from a vehicle, the grouping information and each upgrade file are sent to the vehicle, so that the vehicle establishes a first thread for the first group and at least one second thread for at least one second group. In the first thread, the vehicle is upgraded based on the first upgrade file, and in the at least one second thread, the vehicle is serially upgraded based on the second upgrade files of the corresponding second group. The first thread and at least one second thread run in parallel. As can be seen, in this embodiment, the upgrade files are grouped before being sent to the vehicle, so that the vehicle can build multiple threads during the upgrade process to achieve multi-threaded parallel upgrade and improve the upgrade efficiency of the vehicle. The individual compression of each upgrade file can reduce the amount of data transmission between the server and the vehicle, improve data transmission efficiency, and the vehicle can upgrade while decompressing without fully decompressing each upgrade file, which can reduce the amount of storage space occupied by the upgrade package on the vehicle and reduce the data storage pressure on the vehicle.

[0075] Based on the same inventive concept, this application provides a vehicle upgrade method, applied to a vehicle, the method including steps S21-S23, see details below. Figure 2 As shown.

[0076] Step S21: Upon receiving an upgrade instruction, obtain an upgrade file package, which includes multiple compressed upgrade packages and grouping information of the multiple compressed upgrade packages; each compressed upgrade package is obtained by compressing an upgrade file. Step S22: Based on the grouping information, establish a first thread and at least one second thread. The first thread corresponds to a first group, and each second thread corresponds to a second group. The first group includes a first compressed upgrade package, which is the compressed upgrade package with the longest required upgrade time among the plurality of compressed upgrade packages. Each second group includes at least one second compressed upgrade package, which is a compressed upgrade package other than the first compressed upgrade package among the plurality of compressed upgrade packages. The total upgrade time required by each second compressed upgrade package in each second group is less than the upgrade time required by the first compressed upgrade package. Step S23: In the first thread, the vehicle is upgraded based on the first compressed upgrade package; in each second thread, the vehicle is serially upgraded based on the second compressed upgrade package in the corresponding second group, wherein the first thread and at least one second thread run in parallel.

[0077] Regarding step S21, upon receiving an upgrade instruction, an upgrade file package is obtained. The upgrade file package includes multiple compressed upgrade packages and grouping information of the multiple compressed upgrade packages. Each compressed upgrade package is obtained by compressing an upgrade file.

[0078] The upgrade command triggering mechanism is designed to be both flexible and intelligent, aiming to provide users with convenient operation while ensuring the safety and efficiency of the upgrade process. Specifically, upgrade commands can be initiated by the user or automatically triggered by the system when preset conditions are met. In user-initiated scenarios, users can start the upgrade process through various terminals and interaction methods. For example, commands can be remotely issued through dedicated applications on mobile terminals such as smartphones and tablets to achieve remote upgrade control of the vehicle. Alternatively, upgrade requests can be manually initiated directly in the vehicle cabin through the touch screen, physical buttons, or other manual operation interfaces on the center console. Furthermore, the upgrade process can be triggered by natural voice commands (such as "Check system updates" or "Start upgrade") using an intelligent voice assistant, further enhancing the intuitiveness and convenience of the interaction.

[0079] On the other hand, the system also supports automatically generating upgrade commands without human intervention, thereby reducing the user's operational burden and ensuring that the upgrade behavior is adapted to the vehicle's status and usage habits. The automatic triggering is based on a series of preset intelligent conditions, including but not limited to: reaching a specific upgrade time preset by the system (such as a low network traffic period at midnight); detecting that the vehicle is completely parked and the power system is off to meet the upgrade's requirements for a static environment; and intelligently learning the user's driving habits to automatically select a time window during the day when the vehicle is basically idle to initiate the upgrade, minimizing interference with the user's driving schedule. This hybrid mechanism, combining proactive triggering and automatic judgment, significantly improves the automation level of upgrade management and the user experience while respecting the user's right to choose.

[0080] Upon receiving the upgrade command, the upgrade file package is obtained. This package can be obtained from an external hard drive or directly from the server via communication with the server. This embodiment of the application only illustrates the example of obtaining the package directly from the server.

[0081] The process of obtaining the upgrade file package includes: Download the encrypted composite package from the server and store it in the target partition; the target partition is a dedicated partition for storing the encrypted composite package, or the target partition is a partition obtained after cleaning up the shared partition after receiving the upgrade instruction; decrypt and verify the signature of the encrypted composite package to obtain the upgrade file package.

[0082] First, the vehicle securely downloads the encrypted composite data package from the server and stores it in a dedicated target partition or a pre-cleaned shared partition. This effectively isolates the upgrade data from other runtime system data, preventing unexpected read / write conflicts or data contamination during the upgrade process, thus ensuring the purity and stability of the system's operational state. Second, using a dedicated partition or a cleaned partition provides a highly controllable and secure storage environment for the upgrade process, greatly reducing the risk of upgrade failure due to insufficient storage space, file fragment interference, or residual data errors, and improving the reliability of the upgrade operation. Furthermore, after storage, decryption and signature verification operations are performed on the encrypted composite data package, rigorously verifying the integrity and authenticity of the data packet's origin, effectively resisting security threats such as malicious tampering and man-in-the-middle attacks, ensuring the trustworthiness and reliability of the obtained upgrade file package. Overall, this mechanism not only strengthens data security and system stability during the upgrade process but also lays a solid and reliable foundation for the smooth execution of subsequent upgrade tasks.

[0083] The main advantage of using a dedicated partition to store the encrypted composite package lies in its extremely high operational certainty and ease of management. This partition is pre-defined and its purpose is fixed during the system design phase, eliminating the need for additional data cleanup operations before each upgrade. This not only significantly improves the startup speed of the upgrade process but also effectively avoids potential risks that may arise during the cleanup process, such as storage space disputes caused by accidental file deletion or incomplete cleanup, thus ensuring a high degree of consistency and reliability in the upgrade process.

[0084] On the other hand, choosing to clean up the shared partition during upgrades to create target space has the core advantage of significantly improving the space utilization efficiency of storage resources and the flexibility of system design. During normal, non-upgrade periods, this partition is fully available to users for storing various personal data and applications, thus avoiding the waste of storage space caused by idle dedicated partitions. This is especially suitable for in-vehicle hardware environments with limited storage capacity. This approach allows for full utilization of hardware resources, providing users with more available storage space and enhancing product usability and user experience.

[0085] In this embodiment, after obtaining the upgrade file package, it is not necessary to decompress the individual compressed upgrade packages within it. Therefore, the space required for the target partition during the upgrade process in this embodiment can be X times the size of the encrypted composite package, where X ≥ 2.1. The reason X is at least 2.1 is that after obtaining the encrypted composite package, the vehicle needs to decrypt and verify it to obtain the upgrade file package. The upgrade file package and the encrypted composite package coexist in the target partition, and their file sizes are basically the same; therefore, the target partition requires twice the space. Furthermore, in addition to the upgrade file package and the encrypted composite package, some other information files required for the upgrade (such as configuration files) will occupy a small amount of space. Adding this to the aforementioned twice the space, the target partition's space size can be considered to be 2.1 times the size of the encrypted composite package, which is generally sufficient to meet the space requirements for the upgrade.

[0086] After decrypting and verifying the encrypted composite package to obtain the upgrade file package, the encrypted composite package is deleted to free up more storage resources.

[0087] This embodiment of the application does not require decompressing the compressed upgrade package within the upgrade file package, thus avoiding the space required beyond the aforementioned 2.1 times. Compared to existing technologies that require complete decompression of the upgrade compressed package before upgrading, this embodiment of the application uses significantly less space by performing the upgrade in a partially decompressed state.

[0088] The upgrade method provided in this application has significant space efficiency advantages. Its core advantage lies in eliminating the need to decompress each compressed upgrade package within the upgrade file package, thereby greatly reducing the additional storage space required during the upgrade process. Specifically, the entire upgrade process only requires space equivalent to the size of the encrypted composite package itself and its decompressed compressed package, without needing to reserve a large amount of additional storage for the decompressed files as in traditional methods. For example, for a 1GB upgrade compressed package, existing technologies require complete decompression before upgrading. If the decompressed content is 4GB, the total space requirement is as high as 5GB (the sum of the compressed package and the decompressed files). In contrast, this application embodiment, upon receiving the equivalent 1GB encrypted composite package, decrypts it to obtain the original 1GB compressed upgrade package and directly performs the upgrade process in its compressed state, requiring only 2GB of space in total, reducing space usage by up to 60% compared to traditional solutions.

[0089] The benefits of this technology are multifaceted. First, it significantly reduces the hardware requirements for storage resources in vehicle embedded systems, enabling reliable upgrades on hardware platforms with limited storage capacity, thus helping to control overall vehicle manufacturing costs. Second, reduced space requirements also lower the risk of upgrade failures due to insufficient storage space, improving the robustness and success rate of the upgrade process. Furthermore, by omitting the computation of complete decompression, it helps shorten upgrade preparation time, reduce power consumption during the upgrade process, and improve overall upgrade efficiency and user experience. Therefore, this solution not only excels in terms of space utilization but also provides a more efficient and reliable implementation path for remote upgrades in resource-constrained environments.

[0090] Regarding step S22, based on the grouping information, a first thread and at least one second thread are established. The first thread corresponds to a first group, and each second thread corresponds to a second group. The first group includes a first compressed upgrade package, which is the compressed upgrade package with the longest required upgrade time among the plurality of compressed upgrade packages. Each second group includes at least one second compressed upgrade package, which is the compressed upgrade package other than the first compressed upgrade package among the plurality of compressed upgrade packages. The sum of the required upgrade times of each second compressed upgrade package in each second group is less than the required upgrade time of the first compressed upgrade package.

[0091] In this embodiment, a separate thread is created for each group, and the compressed upgrade package corresponding to each group upgrades the vehicle in its respective thread. All threads can run in parallel, which greatly improves upgrade efficiency.

[0092] In this embodiment, the compressed upgrade package with the longest upgrade time required for the upgrade is designated as the first compressed upgrade package, and it is divided into a separate group, denoted as the first group. The other compressed upgrade packages are designated as second compressed upgrade packages, and are divided into at least one second group. The specific grouping is executed by the server, as described above, and will not be repeated here.

[0093] Regarding step S23, the vehicle is upgraded based on the first compressed upgrade package in the first thread; the vehicle is serially upgraded based on the second compressed upgrade package in the corresponding second group in each second thread, wherein the first thread and at least one second thread run in parallel.

[0094] The parallel upgrade thread management strategy adopted in this application has significant technical advantages. Through sophisticated thread allocation and task scheduling, it effectively optimizes the overall upgrade time and improves system resource utilization. Specifically, this application places the most time-consuming first compressed upgrade package in an independent first thread for upgrade execution. Simultaneously, the remaining compressed upgrade packages are rationally grouped into several second groups, with the total upgrade time of each second group not exceeding the time of the first compressed upgrade package. These second groups are then executed serially in independent second threads. Under this architecture, the first thread and multiple second threads can run in parallel.

[0095] The core advantages of this design are as follows: First, it ensures that the longest upgrade task in the system (the first compressed upgrade package) does not block the execution of other upgrade tasks. It runs continuously as an independent parallel unit, while other threads can fully utilize computing and I / O resources to synchronously advance the upgrade within their groups. This significantly reduces the total time spent on remote online upgrades globally, improving upgrade efficiency. Second, by imposing the constraint that "total duration within the group ≤ duration of the first compressed upgrade package" on the second group, the workload of each group is relatively balanced, preventing any single second thread from becoming a new performance bottleneck due to excessive workload. This ensures the effectiveness of parallel scheduling and the controllability of the overall progress. Furthermore, while improving parallelism, this scheme also avoids resource contention and system overload problems that may be caused by unlimited concurrency. Each second thread uses serial upgrades, maintaining the order and reliability of operations and reducing the risk of upgrade failure due to concurrent write conflicts. In summary, this parallel upgrade mechanism based on intelligent task duration grouping maximizes system processing capacity and upgrade efficiency while ensuring the stability and reliability of the upgrade process.

[0096] Further, the grouping information includes file identifiers of compressed upgrade packages contained in each group, and the upgrading of the vehicle based on the first compressed upgrade package in the first thread includes: Based on the file identifier of the first compressed upgrade package, the first compressed upgrade package is obtained from the upgrade file package; In the first thread, a non-verification upgrade is performed on the vehicle based on the first compressed upgrade package; After the first compressed upgrade package completes the non-verification upgrade, the integrity of the first target content after the non-verification upgrade of the first compressed upgrade package is verified. If the first target content passes the integrity verification, then the first compressed upgrade package is determined to have completed the upgrade. If the first target content fails the integrity check, the first target content is deleted, and the vehicle is re-upgraded in the first thread based on the first compressed upgrade package without verification, until the final first target content passes the integrity check.

[0097] The upgrade and verification separation process design adopted in this application has the dual technical effect of improving upgrade efficiency and ensuring system reliability. This application embodiment arranges the most time-consuming first compressed upgrade package for "non-verification upgrade" in the first thread, meaning that real-time verification is not performed during the writing process. This avoids the computational resource contention and operational delays caused by simultaneous upgrade and verification in traditional methods, allowing the core upgrade task to be executed continuously at maximum speed, significantly shortening the initial installation time of the first compressed upgrade package. After the non-verification upgrade is completed, the system performs a centralized integrity verification on the written first target content. This post-verification mechanism effectively identifies data corruption caused by transmission errors, storage media disturbances, or unexpected power outages, ensuring the accuracy and integrity of the upgrade content. If verification fails, the system can automatically trigger a rollback and retry mechanism, deleting the corrupted content and re-executing the entire installation and verification process of the first compressed upgrade package, thereby eliminating residual errors and greatly enhancing the fault tolerance and final reliability of the upgrade process. This strategy of "upgrading with full effort first, then conducting centralized verification, and automatically retrying if it fails" optimizes resource utilization and accelerates the main upgrade process without excessively sacrificing security, providing an effective guarantee for achieving efficient and robust remote online vehicle upgrades.

[0098] The step of performing a non-verification upgrade on the vehicle based on the first compressed upgrade package in the first thread includes: If the upgrade method of the first compressed upgrade package is a full upgrade, then at least two first full upgrade operations are performed on the first compressed upgrade package in the first thread until the first compressed upgrade package completes the non-verification upgrade. The first full upgrade operation includes: A first data segment of a first length is read from the first compressed upgrade package, the first data segment is decompressed, and the decompressed first data segment is written to the first target location of the vehicle according to the writing path of the first compressed upgrade package; the first target location is the storage partition of the first target device in the vehicle that is upgraded using the first compressed upgrade package, or the first target location is a location in the first disk partition of the vehicle.

[0099] This application embodiment addresses the scenario where the first compressed upgrade package is a full upgrade, and designs a reliable upgrade process based on iterative data segment flushing. This process is executed in the first thread and specifically includes: First, a first data segment of a specified first length is read from the first compressed upgrade package. This data segment is then decompressed and written to the first target location in the vehicle according to a predefined flashing path. The first target location, depending on the upgrade target, can be the storage partition of the first target device (such as a control unit) in the vehicle that requires the compressed package for upgrade, or a specified logical location within the vehicle's first disk partition. The read, decompression, and flashing operations are repeated cyclically until all data segments of the entire compressed package have been processed. If the upgraded content fails subsequent integrity verification, the system automatically repeats the first full upgrade operation until it finally passes the verification.

[0100] First, this application adopts a segmented processing strategy, eliminating the need to completely decompress the entire compressed package to storage before unified flashing. This significantly reduces the occupation of temporary storage space during the upgrade process, which is particularly beneficial in vehicle environments with limited storage resources. Second, segmented flashing helps to distribute the computational and write loads, reducing excessive occupation of system resources by a single operation. This effectively reduces performance interference to other vehicle functions caused by prolonged occupation of processor or storage bandwidth, ensuring the smoothness of basic vehicle operations during the upgrade process. Overall, this solution achieves a balance between reliability, efficiency, and system availability for full upgrades with limited resources, making it particularly suitable for large-scale firmware update scenarios in vehicle environments that are sensitive to stability and resource consumption.

[0101] The step of performing a non-verification upgrade on the vehicle based on the first compressed upgrade package in the first thread includes: If the upgrade method of the first compressed upgrade package is differential upgrade, then at least two first differential upgrade operations are performed on the first compressed upgrade package in the first thread until the first compressed upgrade package completes the non-verification upgrade. The first differential upgrade operation includes: A second data segment of a second length is read from the first compressed upgrade package, the second data segment is decompressed, a first original data segment matching the second data segment is read from the second disk partition of the vehicle, the first original data segment and the decompressed second data segment are restored to obtain a first full data fragment, and the first full data fragment is written to the first target location of the vehicle according to the upgrade path of the first compressed upgrade package; the first target location is the storage partition of the first target device in the vehicle that is upgraded using the first compressed upgrade package, or the first target location is a location in the first disk partition of the vehicle; the first disk partition and the second disk partition are different partitions.

[0102] This application embodiment addresses a scenario where the first compressed upgrade package is a differential upgrade, and designs a reliable upgrade process based on iterative processing and synthesis of data segments. This process is executed in a first thread and specifically includes: First, reading a second data segment (i.e., a differential data segment) of a specified second length from the first compressed upgrade package and decompressing the data segment; then, reading a first original data segment corresponding to the current differential data segment from the vehicle's second disk partition; next, merging the decompressed differential data segment with the read original data segment using a restoration algorithm (such as patch synthesis) to generate a complete full data fragment; finally, writing the first full data fragment to the vehicle's first target location according to a predefined upgrade path.

[0103] The first target location, depending on the upgrade target, can be the storage partition of the first target device (such as a system-on-a-chip or processor) that needs to be upgraded using this compressed package, or a designated logical location within the vehicle's first disk partition. It is worth noting that the first disk partition and the second disk partition are physically or logically independent storage areas. This isolation design ensures that the original data will not be accidentally modified or corrupted during the upgrade process, improving operational security. The aforementioned read, decompress, read and match original data, restore, and flash operations are executed cyclically until all data segments of the entire differential compressed package have been processed.

[0104] First, this embodiment employs a segmented differential restoration and flashing strategy, eliminating the need to completely restore the entire differential packet and original data into a full image before flashing. This significantly reduces the demand for temporary storage space, making it particularly suitable for automotive embedded environments with highly limited storage resources. Second, by distinguishing between a second disk partition used to store the original data and a first disk partition (or target device storage) used to write the upgrade content, this embodiment achieves strict read-write isolation. This not only ensures the integrity and reliability of the original data source but also provides a safe and stable operating environment for the differential restoration process. Simultaneously, the distributed computation and write load helps reduce the continuous occupation of resources in the vehicle's main system, avoiding performance interference with critical vehicle functions (such as instrument displays or basic controls), and ensuring system responsiveness and security during the upgrade process. Overall, this embodiment achieves a balance of reliability, efficiency, and security in differential upgrades with limited resources, providing an efficient and practical technical path for large-scale firmware updates in automotive environments.

[0105] Further, the grouping information includes the file identifier of the compressed upgrade package contained in each group, and the step of serially upgrading the vehicle based on the second compressed upgrade package in the corresponding second group in each second thread includes: For each of the second groups, based on the file identifiers of each of the second compressed upgrade packages in the current second group, each of the second compressed upgrade packages in the current second group is obtained one by one from the upgrade file package; For each second compressed upgrade package obtained, a non-verification upgrade is performed on the vehicle based on the current second compressed upgrade package in the current second thread; After the second compressed upgrade package completes the unverified upgrade, the integrity of the second target content after the unverified upgrade of the second compressed upgrade package is verified. If the current second target content passes the integrity check, then continue to upgrade the vehicle for the next obtained second compressed upgrade package in the current second thread until all the second compressed upgrade packages in the current second group have been upgraded; If the current second target content fails the integrity check, the current second target content is deleted, and the vehicle is re-upgraded in the current second thread based on the current second compressed upgrade package without verification, until the current second target content finally obtained based on the current second compressed upgrade package passes the integrity check. Then, the vehicle is upgraded in the current second thread for the next obtained second compressed upgrade package, until all second compressed upgrade packages in the current second group have been upgraded.

[0106] First, for each second group, the system retrieves each compressed package from the total upgrade file package sequentially based on the file identifiers of the various second compressed upgrade packages within the group. Upon successful retrieval of a second compressed upgrade package, a non-verification upgrade process is immediately initiated in the current second thread, directly writing the package content to the target storage area without real-time verification to improve write efficiency. After the non-verification upgrade of the package is complete, the system performs integrity verification on the written target content to ensure data accuracy and integrity. If the verification passes, the current thread automatically continues processing the next second compressed upgrade package in the group, and so on sequentially until all compressed packages in the group have successfully completed the upgrade. If the verification of the upgraded content of any second compressed upgrade package fails, the system automatically deletes the written invalid content and immediately re-initiates the non-verification upgrade and subsequent verification process based on the same compressed package within the current thread until it finally passes verification before continuing to process subsequent compressed packages in the group.

[0107] The serial upgrade process provided in this application combines a grouping and thread-based packet-by-packet verification and retry mechanism. By implementing strict serial scheduling of tasks within a group within a single thread, it effectively avoids storage resource contention, I / O conflicts, and thread synchronization issues that may arise from upgrading multiple compressed packages simultaneously. This significantly improves the stability and controllability of the upgrade process, making it particularly beneficial for resource-constrained automotive embedded environments. Secondly, the strategy of sequential execution of "upgrade-verification" with single-packet retry upon failure ensures the orderly progress of tasks in each group while significantly reducing the risk of failure of the entire group or even the entire upgrade process due to local errors. This improves the system's fault tolerance and the overall success rate of the upgrade task. Furthermore, this fine-grained error isolation and automatic recovery mechanism ensures that the corruption or upgrade failure of individual data packets will not affect the upgrade progress of other packets within the group, further optimizing resource utilization efficiency, shortening fault recovery time, and guaranteeing the robustness and ultimate reliability of the upgrade process. Overall, this solution achieves an effective balance of efficiency, safety, and stability in complex automotive environments, providing crucial assurance for the reliable implementation of parallel remote upgrades.

[0108] Furthermore, the step of performing a non-verification upgrade on the vehicle based on the current second compressed upgrade package in the current second thread includes: If the current upgrade method of the second compressed upgrade package is a full upgrade, then at least one second full upgrade operation is performed on the current second compressed upgrade package in the current second thread until the current second compressed upgrade package completes the non-verification upgrade; The second full upgrade operation includes: A third data segment of a third length is read from the current second compressed upgrade package, the third data segment is decompressed, and the decompressed third data segment is written to the second target location of the vehicle according to the writing path of the current second compressed upgrade package; the second target location is the storage partition of the second target device in the vehicle that is upgraded using the current second compressed upgrade package, or the second target location is a location in the first disk partition of the vehicle.

[0109] If the upgrade method of the current second compressed upgrade package is identified as a full upgrade, then one or more second full upgrade operations will be performed on it within this thread until the package is confirmed to have completed a non-verification upgrade. Each second full upgrade operation will be executed according to the following steps: First, a third data segment of a specified third length is read from the current second compressed upgrade package. Then, this data segment is decompressed. Finally, the decompressed third data segment is accurately written to the vehicle's second target location according to the preset write path of the current compressed package. The second target location, depending on the upgrade target, can be the storage partition of a specific second target device (such as a sensor or controller unit) in the vehicle that is being upgraded using this compressed package, or it can be a logical storage location within the vehicle's first disk partition. This process is repeated until all data segments of the entire compressed package have been processed.

[0110] First, this embodiment of the application decomposes the large-scale full upgrade package into multiple data segments of moderate length and processes them step by step. This avoids the huge memory and storage space occupation caused by decompressing and writing the entire package at once, greatly reducing the pressure on the limited hardware resources of the vehicle system, making it particularly suitable for resource-constrained embedded environments. Second, by adopting an incremental writing method, computationally intensive operations (decompression) and I / O-intensive operations (writing) are distributed into multiple small tasks, effectively smoothing the instantaneous load on the processor and storage bandwidth. This reduces performance interference to other real-time functions of the vehicle (such as vehicle-to-everything (V2X) interaction or control command response) caused by the upgrade task monopolizing system resources for a long time, thereby ensuring the overall smoothness and stability of the system during the upgrade process. Overall, this solution optimizes resource utilization efficiency while ensuring upgrade reliability, providing key technical support for the efficient and stable processing of full upgrade tasks in a multi-threaded parallel upgrade architecture.

[0111] The step of performing a non-verification upgrade on the vehicle based on the current second compressed upgrade package in the current second thread includes: If the current second compressed upgrade package is upgraded using a differential upgrade method, then at least one second differential upgrade operation is performed on the current second compressed upgrade package in the current second thread until the current second compressed upgrade package completes the non-verification upgrade. The second differential upgrade operation includes: A fourth data segment of a fourth length is read from the current second compressed upgrade package. The fourth data segment is decompressed. A second original data segment matching the fourth data segment is read from the second disk partition of the vehicle. The second original data segment and the decompressed fourth data segment are restored to obtain a second full data fragment. The second full data fragment is then written to the second target location of the vehicle according to the upgrade path of the current second compressed upgrade package. The second target location is either the storage partition of the second target device in the vehicle that is being upgraded using the current second compressed upgrade package, or a location within the first disk partition of the vehicle. The first disk partition and the second disk partition are different partitions.

[0112] If the upgrade method of the current second compressed upgrade package is identified as differential upgrade, then one or more second differential upgrade operations are performed on it within this thread until the package is confirmed to have completed a non-verification upgrade. Each second differential upgrade operation is executed according to the following steps: First, a fourth data segment (i.e., a differential data segment) of a specified fourth length is read from the current second compressed upgrade package, and this data segment is decompressed. Then, the second original data segment corresponding to the current differential data segment is read from the vehicle's second disk partition. Next, the decompressed differential data segment is merged with the read original data segment using a restoration algorithm (such as patch synthesis or data reconstruction operation) to generate a complete second full data fragment. Finally, this second full data fragment is written to the vehicle's second target location according to the upgrade path preset in the current compressed package.

[0113] The second target location, depending on the upgrade target, can be a storage partition of a specific second target device (such as a processor or sensor module) in the vehicle that is being upgraded using this compressed package, or it can be a logical storage location within the vehicle's first disk partition. During this process, the first and second disk partitions are physically or logically isolated storage areas. This design ensures that the original data is not accidentally modified or corrupted during the upgrade process. The aforementioned read, decompress, read and match original data, restore, and flash operations are executed cyclically until all data segments of the entire differential compressed package have been processed.

[0114] This application provides a segmented differential upgrade mechanism executed serially within a second thread. By decomposing the differential upgrade task into multiple small-granularity data segment processing units, the differential data restoration and writing are completed step by step. This avoids the large-scale temporary storage space required for synthesizing a complete image at once, greatly reducing the occupation of vehicle system memory and storage resources, making it particularly suitable for resource-constrained embedded environments. Secondly, a strict disk partitioning isolation strategy (separating the first and second disk partitions) ensures that the integrity and security of the original data source are not compromised during the upgrade process, providing a stable and reliable data foundation for differential restoration operations and significantly improving the security and predictability of the upgrade process. Furthermore, this iterative processing method, combined with in-thread serial scheduling, effectively smooths the computational and I / O operation load, reduces the continuous occupation of system resources due to large-scale data synthesis and writing, avoids performance interference with other real-time vehicle functions (such as critical control command processing or human-machine interaction response), and ensures the overall stability and responsiveness of the system during the upgrade process. Overall, this solution optimizes resource utilization efficiency while ensuring upgrade security and reliability, providing a solid technical foundation for the efficient and stable processing of differential upgrade tasks in a multi-threaded parallel upgrade architecture.

[0115] The second and fourth lengths in this embodiment, that is, the lengths of the data segments decompressed each time when differential upgrade is used, can be adjusted according to the type of the selected restoration algorithm to match the corresponding type of restoration algorithm, so that the restoration speed of the restoration algorithm is relatively the fastest.

[0116] Furthermore, after the upgrade of each of the compressed upgrade packages is completed in the first thread and at least one of the second threads, the method further includes: generating a version switching instruction, which is used to configure the vehicle so that the vehicle loads and runs file data corresponding to the upgraded software version number upon the next startup. When all compressed upgrade packages have successfully completed their upgrades, a version switching instruction can be generated to enable the vehicle to load and run file data corresponding to the upgraded software version number upon the next startup.

[0117] In summary, upon receiving an upgrade instruction, this embodiment obtains an upgrade file package, establishes a first thread and at least one second thread based on grouping information, upgrades the vehicle based on the first compressed upgrade package in the first thread, and serially upgrades the vehicle based on the second compressed upgrade package in the corresponding second group in each second thread, wherein the first thread and at least one second thread run in parallel. This embodiment ensures that the longest upgrade task in the system (the first compressed upgrade package) does not block the execution of other upgrade tasks, and it runs continuously as an independent parallel unit, while other threads can make full use of computing and I / O resources to synchronously advance the upgrade within the group, thereby significantly shortening the total time of remote online upgrades globally and improving upgrade efficiency. Secondly, by imposing the constraint of "total duration within the group ≤ duration of the first compressed upgrade package" on the second group, the workload of each group is relatively balanced, avoiding the situation where a certain second thread becomes a new performance bottleneck due to excessive workload, and ensuring the effectiveness of parallel scheduling and the controllability of the overall progress. Furthermore, this scheme improves parallelism while avoiding resource contention and system overload issues that may arise from unlimited concurrency. Each second thread employs a serial upgrade process, maintaining the order and reliability of operations and reducing the risk of upgrade failure due to concurrent write conflicts. In summary, this parallel upgrade mechanism, based on intelligent task duration grouping, maximizes system processing capacity and upgrade efficiency while ensuring a stable and reliable upgrade process.

[0118] Based on the same inventive concept, the embodiments of this application provide, as follows: Figure 3 The vehicle shown includes: First processor 31; A first memory 32 is used to store executable instructions of the first processor 31; The first processor 31 is configured to execute a vehicle upgrade method as described above.

[0119] Based on the same inventive concept, the embodiments of this application provide, as follows: Figure 4 A server is shown, characterized in that it includes: Second processor 41; A second memory 42 is used to store executable instructions of the second processor 41; The second processor 41 is configured to execute an upgrade file processing method as described above.

[0120] Based on the same inventive concept, embodiments of this application provide a non-transitory computer-readable storage medium. When the instructions in the storage medium are executed by a first processor 31 of a vehicle, the vehicle is able to execute a vehicle upgrade method as described above. When the instructions in the storage medium are executed by a second processor 41 of a server, the server is able to execute an upgrade file processing method as described above.

[0121] Based on the same inventive concept, this application provides a computer program product, including computer instructions, which, when executed by a first processor 31 of a vehicle, are used to implement a vehicle upgrade method as described above; and when executed by a second processor 41 of a server, are used to implement an upgrade file processing method as described above.

[0122] Since the electronic device described in this embodiment is an electronic device used to implement the information processing method in the embodiments of this application, those skilled in the art can understand the specific implementation methods and various variations of the electronic device in this embodiment based on the information processing method described in the embodiments of this application. Therefore, how the electronic device implements the method in the embodiments of this application will not be described in detail here. Any electronic device used by those skilled in the art to implement the information processing method in the embodiments of this application falls within the scope of protection of this application.

[0123] The technical solutions described in the embodiments of this application have at least the following technical effects or advantages: Upon receiving an upgrade instruction, this embodiment obtains an upgrade file package and establishes a first thread and at least one second thread based on grouping information. In the first thread, the vehicle is upgraded based on the first compressed upgrade package. In each second thread, the vehicle is serially upgraded based on the second compressed upgrade package in the corresponding second group, wherein the first thread and at least one second thread run in parallel. This embodiment ensures that the longest upgrade task in the system (the first compressed upgrade package) does not block the execution of other upgrade tasks; it runs continuously as an independent parallel unit, while other threads can fully utilize computing and I / O resources to synchronously advance the upgrade within the group. This significantly reduces the total time required for remote online upgrades globally and improves upgrade efficiency. Furthermore, by imposing the constraint "total time within the group ≤ time of the first compressed upgrade package" on the second group, the workload of each group is relatively balanced, preventing a single second thread from becoming a new performance bottleneck due to excessive workload, thus ensuring the effectiveness of parallel scheduling and the controllability of the overall progress. Furthermore, this scheme improves parallelism while avoiding resource contention and system overload issues that may arise from unlimited concurrency. Each second thread employs a serial upgrade process, maintaining the order and reliability of operations and reducing the risk of upgrade failure due to concurrent write conflicts. In summary, this parallel upgrade mechanism, based on intelligent task duration grouping, maximizes system processing capacity and upgrade efficiency while ensuring a stable and reliable upgrade process.

[0124] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0125] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0126] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0127] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0128] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.

[0129] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.

Claims

1. A method for upgrading a vehicle, characterized in that, The method includes: Upon receiving an upgrade instruction, an upgrade file package is obtained, which includes multiple compressed upgrade packages and grouping information for the multiple compressed upgrade packages; each compressed upgrade package is obtained by compressing an upgrade file. Based on the grouping information, a first thread and at least one second thread are established. The first thread corresponds to a first group, and each second thread corresponds to a second group. The first group includes a first compressed upgrade package, which is the compressed upgrade package with the longest required upgrade time among the plurality of compressed upgrade packages. Each second group includes at least one second compressed upgrade package, which is a compressed upgrade package other than the first compressed upgrade package among the plurality of compressed upgrade packages. The sum of the required upgrade times of each second compressed upgrade package in each second group is less than the required upgrade time of the first compressed upgrade package. In the first thread, the vehicle is upgraded based on the first compressed upgrade package; in each second thread, the vehicle is upgraded serially based on the second compressed upgrade package in the corresponding second group, wherein the first thread and at least one second thread run in parallel.

2. The vehicle upgrade method as described in claim 1, characterized in that, The process of obtaining the upgrade file package includes: Download the encrypted complex package from the server and store the encrypted complex package in the target partition; the target partition is a dedicated partition for storing the encrypted complex package, or the target partition is a partition obtained after cleaning up the shared partition after receiving the upgrade instruction; The encrypted composite package is decrypted and verified to obtain the upgrade file package.

3. The vehicle upgrade method as described in claim 2, characterized in that, The size of the target partition is X times the size of the encrypted composite packet, where X ≥ 2.

1.

4. The vehicle upgrade method as described in claim 2, characterized in that, After decrypting and verifying the encrypted composite package to obtain the upgrade file package, the method further includes: Delete the encrypted composite package.

5. The vehicle upgrade method as described in claim 1, characterized in that, The grouping information includes file identifiers of compressed upgrade packages contained in each group, and the upgrading of the vehicle based on the first compressed upgrade package in the first thread includes: Based on the file identifier of the first compressed upgrade package, the first compressed upgrade package is obtained from the upgrade file package; In the first thread, a non-verification upgrade is performed on the vehicle based on the first compressed upgrade package; After the first compressed upgrade package completes the non-verification upgrade, the integrity of the first target content after the non-verification upgrade of the first compressed upgrade package is verified. If the first target content passes the integrity verification, then the first compressed upgrade package is determined to have completed the upgrade. If the first target content fails the integrity check, the first target content is deleted, and the vehicle is re-upgraded in the first thread based on the first compressed upgrade package without verification, until the final first target content passes the integrity check.

6. The vehicle upgrade method as described in claim 5, characterized in that, The step of performing a non-verification upgrade on the vehicle based on the first compressed upgrade package in the first thread includes: If the upgrade method of the first compressed upgrade package is a full upgrade, then at least two first full upgrade operations are performed on the first compressed upgrade package in the first thread until the first compressed upgrade package completes the non-verification upgrade. The first full upgrade operation includes: A first data segment of a first length is read from the first compressed upgrade package, the first data segment is decompressed, and the decompressed first data segment is written to the first target location of the vehicle according to the writing path of the first compressed upgrade package; the first target location is the storage partition of the first target device in the vehicle that is upgraded using the first compressed upgrade package, or the first target location is a location in the first disk partition of the vehicle.

7. The vehicle upgrade method as described in claim 5, characterized in that, The step of performing a non-verification upgrade on the vehicle based on the first compressed upgrade package in the first thread includes: If the upgrade method of the first compressed upgrade package is differential upgrade, then at least two first differential upgrade operations are performed on the first compressed upgrade package in the first thread until the first compressed upgrade package completes the non-verification upgrade. The first differential upgrade operation includes: A second data segment of a second length is read from the first compressed upgrade package, the second data segment is decompressed, a first original data segment matching the second data segment is read from the second disk partition of the vehicle, the first original data segment and the decompressed second data segment are restored to obtain a first full data fragment, and the first full data fragment is written to the first target location of the vehicle according to the upgrade path of the first compressed upgrade package; the first target location is the storage partition of the first target device in the vehicle that is upgraded using the first compressed upgrade package, or the first target location is a location in the first disk partition of the vehicle; the first disk partition and the second disk partition are different partitions.

8. The vehicle upgrade method as described in claim 1, characterized in that, The grouping information includes file identifiers of compressed upgrade packages contained in each group. The step of serially upgrading the vehicle based on the second compressed upgrade package in the corresponding second group in each second thread includes: For each of the second groups, based on the file identifiers of each of the second compressed upgrade packages in the current second group, each of the second compressed upgrade packages in the current second group is obtained one by one from the upgrade file package; For each second compressed upgrade package obtained, a non-verification upgrade is performed on the vehicle based on the current second compressed upgrade package in the current second thread; After the second compressed upgrade package completes the unverified upgrade, the integrity of the second target content after the unverified upgrade of the second compressed upgrade package is verified. If the current second target content passes the integrity check, then continue to upgrade the vehicle for the next obtained second compressed upgrade package in the current second thread until all the second compressed upgrade packages in the current second group have been upgraded; If the current second target content fails the integrity check, the current second target content is deleted, and the vehicle is re-upgraded in the current second thread based on the current second compressed upgrade package without verification, until the current second target content finally obtained based on the current second compressed upgrade package passes the integrity check. Then, the vehicle is upgraded in the current second thread for the next obtained second compressed upgrade package, until all second compressed upgrade packages in the current second group have been upgraded.

9. A vehicle upgrade method as described in claim 8, characterized in that, The step of performing a non-verification upgrade on the vehicle based on the current second compressed upgrade package in the current second thread includes: If the current upgrade method of the second compressed upgrade package is a full upgrade, then at least one second full upgrade operation is performed on the current second compressed upgrade package in the current second thread until the current second compressed upgrade package completes the non-verification upgrade; The second full upgrade operation includes: A third data segment of a third length is read from the current second compressed upgrade package, the third data segment is decompressed, and the decompressed third data segment is written to the second target location of the vehicle according to the writing path of the current second compressed upgrade package; the second target location is the storage partition of the second target device in the vehicle that is upgraded using the current second compressed upgrade package, or the second target location is a location in the first disk partition of the vehicle.

10. A vehicle upgrade method as described in claim 8, characterized in that, The step of performing a non-verification upgrade on the vehicle based on the current second compressed upgrade package in the current second thread includes: If the current second compressed upgrade package is upgraded using a differential upgrade method, then at least one second differential upgrade operation is performed on the current second compressed upgrade package in the current second thread until the current second compressed upgrade package completes the non-verification upgrade. The second differential upgrade operation includes: A fourth data segment of a fourth length is read from the current second compressed upgrade package. The fourth data segment is decompressed. A second original data segment matching the fourth data segment is read from the second disk partition of the vehicle. The second original data segment and the decompressed fourth data segment are restored to obtain a second full data fragment. The second full data fragment is then written to the second target location of the vehicle according to the upgrade path of the current second compressed upgrade package. The second target location is either the storage partition of the second target device in the vehicle that is being upgraded using the current second compressed upgrade package, or a location within the first disk partition of the vehicle. The first disk partition and the second disk partition are different partitions.

11. A method for upgrading a vehicle as described in claim 1, characterized in that, After the upgrade of each of the compressed upgrade packages has been completed in the first thread and at least one of the second threads, the method further includes: A version switching instruction is generated, which is used to configure the vehicle so that the vehicle loads and runs file data corresponding to the upgraded software version number upon the next startup.

12. An upgrade file processing method, characterized in that, The method includes: Obtain the required upgrade time for each upgrade file; The first upgrade file with the longest upgrade time among all the upgrade files is divided into a first group, and the second upgrade files other than the first upgrade file among all the upgrade files are divided into at least one second group, and the grouping information of the first group and at least one second group is recorded; the sum of the upgrade times of the second upgrade files in each second group is less than or equal to the upgrade time of the first upgrade file; Upon receiving a request instruction from a vehicle, the group information and each of the upgrade files are sent to the vehicle, so that the vehicle establishes a first thread for the first group and at least one second thread for at least one second group. In the first thread, the vehicle is upgraded based on the first upgrade file, and in at least one second thread, the vehicle is serially upgraded based on the second upgrade file of the corresponding second group. The first thread and at least one second thread run in parallel.

13. The upgrade file processing method as described in claim 12, characterized in that, The method further includes: Each of the aforementioned upgrade files is compressed separately to obtain a compressed upgrade package; Package the various compressed upgrade packages together to obtain an upgrade file package; The upgrade file package is encrypted and a digital signature is generated to obtain an encrypted composite package. Upon receiving the request instruction from the vehicle, the encrypted composite package is sent to the vehicle so that the vehicle can perform an upgrade based on the encrypted composite package.

14. The upgrade file processing method as described in claim 12, characterized in that, The method further includes: Obtain parameter information for each of the upgrade files; A configuration file is generated based on the parameter information of each of the upgrade files. Upon receiving the request instruction from the vehicle, the configuration file is sent to the vehicle so that the vehicle can upgrade based on the parameter information in the configuration file and each of the upgrade files. The parameter information includes at least the file identifier, upgrade method, upgraded software version number, file size, flashing path, integrity check value, and grouping information.

15. The upgrade file processing method as described in claim 12, characterized in that, Each of the upgrade files is either a differential file or an image file.

16. The upgrade file processing method as described in claim 12, characterized in that, The step of dividing the second upgrade files (excluding the first upgrade file) into at least one second group includes: If the total upgrade duration of the second upgrade files (excluding the first upgrade file) is less than or equal to the upgrade duration of the first upgrade file, then each of the second upgrade files is divided into a second group.

17. The upgrade file processing method as described in claim 12, characterized in that, The step of dividing the second upgrade files (excluding the first upgrade file) into at least one second group includes: If the total upgrade time of the second upgrade files other than the first upgrade file in all the upgrade files is greater than the upgrade time of the first upgrade file, then for the set of all the second upgrade files, at least two target grouping operations are performed sequentially until all the second upgrade files in the set are divided into at least two second groups; The target grouping operation includes: Select M second upgrade files from the set such that the sum of the upgrade times of the M second upgrade files is less than the upgrade time of the first upgrade file, and the difference between the sum of the upgrade times of the M second upgrade files and the upgrade time of the first upgrade file is minimized; M is a positive integer.

18. The upgrade file processing method as described in claim 12, characterized in that, The step of dividing the second upgrade files (excluding the first upgrade file) into at least one second group includes: If the total upgrade time of the second upgrade files other than the first upgrade file in all the upgrade files is greater than the upgrade time of the first upgrade file, the target number of second groups to be divided for each second upgrade file is determined based on the multiple relationship between the total preset time of each second upgrade file and the upgrade time of the first upgrade file. The second upgrade files are grouped according to the target number to obtain a second group with the target number, wherein the total upgrade time of the second upgrade files in each second group is less than or equal to the upgrade time of the first upgrade file.

19. The upgrade file processing method as described in claim 12, characterized in that, After dividing the second upgrade files (excluding the first upgrade file) into at least one second group among the various upgrade files, the method further includes: If a new second upgrade file that has not been grouped is added, then based on the sum of the upgrade durations of the second upgrade files in each of the second groups and the upgrade duration of the ungrouped second upgrade files, the ungrouped second upgrade files are assigned to at least one target group in the second groups, such that the sum of the upgrade durations of the second upgrade files in the target groups is less than or equal to the upgrade duration of the first upgrade file.

20. A vehicle, characterized in that, include: First processor; A first memory for storing executable instructions of the first processor; The first processor is configured to execute a vehicle upgrade method as described in any one of claims 1 to 11.

21. A server, characterized in that, include: Second processor; A second memory for storing executable instructions of the second processor; The second processor is configured to execute an upgrade file processing method as described in any one of claims 12 to 19.

22. A non-transitory computer-readable storage medium, wherein, when instructions in the storage medium are executed by a first processor of a vehicle, the vehicle is enabled to perform a vehicle upgrade method as claimed in any one of claims 1 to 11; and when instructions in the storage medium are executed by a second processor of a server, the server is enabled to perform an upgrade file processing method as claimed in any one of claims 12 to 19.

23. A computer program product, characterized in that, The system includes computer instructions that, when executed by a first processor of a vehicle, are used to implement a vehicle upgrade method as described in any one of claims 1 to 11; and when executed by a second processor of a server, are used to implement an upgrade file processing method as described in any one of claims 12 to 19.