Upgrade package generation method and device, equipment and readable storage medium

By determining the kinship of image files and optimizing the combination of upgrade packages in the vehicle ECU upgrade solution, the limitations of the sub-package strategy and the inefficiency of resource allocation are solved, achieving efficient upgrade package transmission and resource management, and improving the user experience.

CN120994213APending Publication Date: 2025-11-21HUIZHOU DESAY SV AUTOMOTIVE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510860878.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-25
Publication Date
2025-11-21

AI Technical Summary

Technical Problem

The limitations of the sub-packaging strategy in existing vehicle ECU upgrade solutions result in insufficient parallelism, inefficient resource allocation, and an inability to effectively balance transmission efficiency and resource conflicts, which is particularly prominent in vehicle systems with high software complexity.

Method used

By obtaining the target partition, target partition offset, and target logical unit of the image file, the affinity of the image file is determined, and a dynamic programming algorithm is used to generate upgrade blocks, optimize the combination of upgrade packages, avoid resource conflicts, and improve transmission efficiency.

Benefits of technology

By using the fewest upgrade packages within the set data threshold, the efficiency of transmission to flashing is improved, system resources are saved, upgrade time is reduced, and user experience is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120994213A_ABST
    Figure CN120994213A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to an upgrade package generation method and device, equipment and a readable storage medium, and the method comprises the steps: obtaining a genetic relationship among a plurality of mirror image files according to a target partition and a target partition offset after the plurality of mirror image files and a configuration file are obtained, packaging the mirror image files according to the genetic relationship, and generating a first upgrade block; packaging the first upgrading block according to the target logic unit to generate a second upgrading block; and packaging the second upgrade block according to the data size of the second upgrade block to generate a target upgrade package. According to the method provided by the invention, the fewest upgrade packages can be used in the first data threshold value set by the upgrade platform, and the efficiency from transmission to flashing is improved; and the image file genetic characteristics are packaged, so that the condition of repeatedly applying for board end system resources can be avoided, and the system resources are saved. And meanwhile, the upgrading time consumption is effectively reduced, and the use experience of the user on the product is also improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the field of automotive electronics, in particular to a method and device for generating an upgrade package, and a readable storage medium. BACKGROUND

[0002] In the wired upgrade scheme of vehicle electronic control unit (ECU), the traditional firmware upgrade process usually contains three stages: upgrade package transmission, local verification and image flashing. To improve the transmission efficiency of large volume upgrade package, the existing technology generally adopts the sub-package transmission strategy, which splits the complete upgrade package into several sub-upgrade packages, and allows the parallel flashing of the received sub-packages during the transmission process, thereby shortening the overall upgrade time.

[0003] However, this scheme has significant technical bottlenecks: (1) Limitation of sub-package strategy: Although the existing scheme supports parallel processing of sub-upgrade packages, it does not make standardized constraints on the number of sub-packages and the combination method of image content. In practice, the size of sub-package is usually fixed according to the transmission scenario (such as CAN / LIN bus bandwidth), but the number of sub-packages can be freely set. In theory, the fewer the number of sub-packages (i.e. the larger the single package size), the lower the transmission verification overhead and the higher the upgrade efficiency. However, too few sub-packages in the actual scenario may lead to insufficient parallelism, which in turn limits the efficiency improvement.

[0004] (2) Low efficiency of resource allocation: Since the image combination method is not restricted, the same hardware resource (such as storage partition, communication buffer) may be repeatedly occupied by the image fragments in multiple sub-packages. For example, if two sub-packages both contain operation instructions for the same storage sector, the flashing process will cause repeated application-release operations due to resource conflicts, and even trigger redundant erase actions. This resource competition will significantly increase the flashing delay and reduce the upgrade robustness.

[0005] (3) Contradiction between efficiency and flexibility: The existing scheme lacks an effective balance mechanism between "improving parallelism" and "reducing resource conflicts". Fixed sub-package size simplifies transmission design, but cannot adapt to the hardware resource characteristics of different ECUs; while allowing free combination of images, it improves the deployment flexibility, but leads to low efficiency of system resource management. This contradiction is particularly prominent in vehicle systems with increasing software complexity (such as automatic driving domain controllers).

[0006] Therefore, there is an urgent need for a vehicle ECU upgrade scheme that takes into account transmission efficiency, resource optimization and scenario adaptability, and solves the inherent contradiction between parallel flashing and resource conflicts in the existing technology through intelligent sub-package strategy and resource scheduling mechanism. SUMMARY

[0007] In view of the above problems, the present application provides an upgrade package generation method, device, equipment and readable storage medium, to solve the problems of the existing technology, such as the limitation of upgrade package generation with a subpackage strategy, low resource allocation efficiency, and the contradiction between efficiency and flexibility.

[0008] According to one aspect of the present application, an upgrade package generation method is provided, comprising: obtaining a plurality of image files and a configuration file, wherein the configuration file records at least the data size, target partition, target logical unit, and target partition offset of each image file; obtaining the kinship between the plurality of image files according to the target partition and target partition offset, and grouping the image files according to the kinship to generate a first upgrade block; grouping the first upgrade block according to the target logical unit to generate a second upgrade block; grouping the second upgrade block according to the data size of the second upgrade block to generate a target upgrade package.

[0009] In some optional embodiments, the obtaining of the plurality of image files and the configuration file specifically comprises: obtaining the image files and the configuration file through a system interface, and parsing the image files and the configuration file to obtain the data size, target partition, target logical unit, and target partition offset of each image file, and recording them in a data structure.

[0010] In some optional embodiments, the obtaining of the kinship between the plurality of image files according to the target partition and target partition offset specifically comprises: when the target partitions of two image files are the same, the kinship between the two image files is first-level kinship; when the target partitions of two image files are different and the target logical units are the same, the kinship between the two image files is second-level kinship; when the target logical units of two image files are different, the kinship between the two image files is third-level kinship; wherein, when the kinship between two image files is first-level kinship, the target partition offset is used to determine the order of first-level kinship.

[0011] In some optional embodiments, the grouping of the image files according to the kinship to generate a first upgrade block specifically comprises: determining whether the image file exceeds a first data threshold, if yes, performing remainder separation on the image file to generate a plurality of image files, otherwise, no processing is performed; The mirror files with the same target partition are packaged by a dynamic programming algorithm to generate a plurality of first package files, wherein when the first package file has a plurality of mirror files, the mirror files are sorted in the first package file according to the target partition offset of the mirror files; The first upgrade blocks are sorted according to the target partition offset of the first mirror file in the first package file to generate a first upgrade block.

[0012] In some optional embodiments, the first upgrade block is packaged according to the target logical unit to generate a second upgrade block, specifically including: The first upgrade block is grouped according to the target logical unit to generate a plurality of second package files; The second package files are regrouped by a dynamic programming algorithm to generate a plurality of third package files; The third package components are sorted according to the target partition offset of the first mirror file in the third package file and are written into the second upgrade block respectively.

[0013] In some optional embodiments, the second upgrade block is packaged according to the data size of the second upgrade block to generate a target upgrade package, specifically including: The second upgrade block is packaged by a dynamic programming algorithm to generate a target upgrade package.

[0014] In some optional embodiments, in the dynamic programming algorithm, the data size of the first package file and / or the third package file and / or the target upgrade package does not exceed a first data threshold.

[0015] According to another aspect of the embodiment of the present application, a method for generating an upgrade package is provided, and the device includes: A data acquisition module is configured to acquire a plurality of mirror files and a configuration file, wherein the configuration file records at least the data size, target partition, target logical unit and target partition offset of each mirror file; A first generation module is configured to acquire the kinship among the mirror files according to the target partition and target partition offset, and package the mirror files according to the kinship to generate a first upgrade block; A second generation module is configured to package the first upgrade block according to the target logical unit to generate a second upgrade block; A third generation module is configured to package the second upgrade block according to the data size of the second upgrade block to generate a target upgrade package.

[0016] According to another aspect of the embodiments of the present application, there is provided an upgrade package generation device, comprising: a processor, a memory, a communication interface and a communication bus, the processor, the memory and the communication interface complete communication with each other through the communication bus; The memory is configured to store at least one executable instruction, and the executable instruction causes the processor to perform the operations of the upgrade package generation method as described above.

[0017] According to another aspect of the embodiments of the present application, there is provided a readable storage medium, the storage medium stores at least one executable instruction, and the executable instruction causes the upgrade package generation device to perform the operations of the upgrade package generation method as described above when the executable instruction runs on the upgrade package generation device.

[0018] The present application provides an upgrade package generation method, device, equipment and readable storage medium, its beneficial effect lies in: the present application obtains the kinship between multiple image files according to the target partition and target partition offset after obtaining multiple image files and configuration files, and the image files are packaged according to the kinship, and the first upgrade block is generated;The first upgrade block is packaged according to the target logic unit, and the second upgrade block is generated;The second upgrade block is packaged according to the data size of the second upgrade block, and the target upgrade package is generated. The method of the present application can not only use the least upgrade package in the first data threshold set in the upgrade platform, but also improve the efficiency of transmission to the writing. The image file kinship characteristics are packaged, which can avoid the repeated application of system resources on the board, and save system resources. At the same time, the present application effectively reduces the upgrade time, and improves the user experience of the product.

[0019] The above description is only a summary of the example technical solutions of the present application, in order to more clearly understand the technical means of the embodiments of the present application, the content of the specification can be implemented, and in order to make the above and other purposes, characteristics and advantages of the example of the present application more obvious and easy to understand, the specific implementation mode of the present application is described below. BRIEF DESCRIPTION OF DRAWINGS

[0020] The accompanying drawings are only used to show the embodiments, and are not considered as limitations of the present application. Moreover, the same reference signs are used to represent the same parts throughout the drawings. In the drawings: Figure 1 The flowchart of the upgrade package generation method provided by the present application is shown; Figure 2 The flowchart of step 120 provided by the present application is shown; Figure 3 The flowchart of step 130 provided by the present application is shown; Figure 4 Fig. 1 shows a structural schematic diagram of an upgrade package generation device according to an embodiment of the present application; Figure 5 Fig. 2 shows a structural schematic diagram of an upgrade package generation device according to another embodiment of the present application. DETAILED DESCRIPTION

[0021] Exemplary embodiments of the present application will be described in detail with reference to the drawings. Although exemplary embodiments of the present application are shown in the drawings, it is understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein.

[0022] Embodiment 1: Figure 1 An embodiment of an upgrade package generation method according to the present application is shown, which comprises: 110, obtaining a plurality of image files and a configuration file, wherein the configuration file records at least the data size, target partition, target logical unit and target partition offset of each image file; in step 110, the plurality of image files and the configuration file are obtained, specifically including obtaining the image files and the configuration file through a system interface, and parsing the image files and the configuration file to obtain the data size, target partition, target logical unit and target partition offset of each image file, and record them in a data structure.

[0023] 120, obtaining the kinship between the plurality of image files according to the target partition and the target partition offset, and grouping the image files according to the kinship to generate a first upgrade block; in step 120, the kinship between the plurality of image files is obtained according to the target partition and the target partition offset, specifically including: when the target partitions of two image files are the same, the kinship between the two image files is first-level kinship; when the target partitions of two image files are different and the target logical units are the same, the kinship between the two image files is second-level kinship; when the target logical units of two image files are different, the kinship between the two image files is third-level kinship; wherein when the kinship between two image files is first-level kinship, the sorting of first-level kinship is determined according to the target partition offset. The image files are grouped according to the kinship to generate a first upgrade block, specifically including: judging whether the image files exceed a first data threshold, if yes, the image files are taken modulo to generate a plurality of image files, otherwise no processing is performed; the image files with the same target partition are grouped by a dynamic programming algorithm to generate a plurality of first grouping files, wherein when a first grouping file has a plurality of image files, the image files are sorted in the first grouping file according to the target partition offset; the plurality of first grouping components are sorted according to the target partition offset of the first image file in the first grouping file to generate the first upgrade block.

[0024] 130, packing the first upgrade block according to the target logical unit to generate a second upgrade block; in step 130, the first upgrade block is packed according to the target logical unit to generate a second upgrade block, specifically including: grouping the first upgrade block according to the target logical unit to generate a plurality of second package files; grouping the second package files again by a dynamic programming algorithm to generate a plurality of third package files; sorting the plurality of third package components according to the target partition offset of the first image file in the third package file and writing them into the second upgrade block respectively.

[0025] 140, packing the second upgrade block according to the data size of the second upgrade block to generate a target upgrade package; in step 140, the second upgrade block is packed according to the data size of the second upgrade block to generate a target upgrade package, specifically including: packing the second upgrade block by a dynamic programming algorithm to generate a target upgrade package. In the dynamic programming algorithm, the data size of the target upgrade package does not exceed the first data threshold.

[0026] In steps 110-140 of the present application, after obtaining a plurality of image files and configuration files, the kinship between the plurality of image files is obtained according to the target partition and the target partition offset, and the image files are packed according to the kinship to generate a first upgrade block; the first upgrade block is packed according to the target logical unit to generate a second upgrade block; and the second upgrade block is packed according to the data size of the second upgrade block to generate a target upgrade package. By the method of the present application, the efficiency of transmission to flashing can be improved using the least upgrade package in the first data threshold set in the upgrade platform; and the image file kinship characteristics are packed to avoid repeated application of board system resources, saving system resources. At the same time, the present application effectively reduces the upgrade time and improves the user's experience of using the product.

[0027] In one embodiment of step 110, a plurality of image files and configuration files are obtained, specifically including: obtaining the image files and configuration files through a system interface, and parsing the image files and configuration files to obtain the data size, target partition, target logical unit and target partition offset of each image file, and record them into a data structure.

[0028] In the embodiment, the system interface can be an on-board interface of the vehicle-mounted ECU, where the type of the on-board interface can be an I / O interface, and the vehicle-mounted ECU is a car electronic control unit. The scheme can receive the mirror image file and the configuration file through the I / O interface of the vehicle-mounted ECU, and store the downloaded mirror image file and the configuration file into a storage module by a master module of the vehicle-mounted ECU, and execute the scheme of steps 110-140 by the master module. The data size, i.e., the data memory size of the mirror image file, can be in GB, MB, KB, B, etc. The target partition is a process of dividing a storage space into multiple logical parts in a storage system, and the target partition offset is a position of the target partition where the mirror image file is located. The target logical unit, i.e., the target LUN, is specifically a logical unit number in the storage system, and represents a logical block device in the storage space. The target LUN can contain one or more target partitions for storing data.

[0029] In an embodiment of step 120, the kinship between the multiple mirror image files is obtained according to the target partition and the target partition offset, specifically including: when the target partitions of two mirror image files are the same, the kinship between the two mirror image files is first-level kinship; when the target partitions of two mirror image files are different and the target logical units are the same, the kinship between the two mirror image files is second-level kinship; when the target logical units of two mirror image files are different, the kinship between the two mirror image files is third-level kinship; where the kinship between the two mirror image files is first-level kinship, the sorting of the first-level kinship is determined according to the target partition offset.

[0030] In the embodiment, the first-level kinship can be Level 1, the second-level kinship can be Level 2, and the third-level kinship can be Level 3; and the relationship of each mirror image file with all other mirror image files can be confirmed by the present application. Where the kinship between the two mirror image files is first-level kinship, the sorting of the first-level kinship is determined according to the target partition offset; the smaller the target partition offset difference is, the higher the sorting of the two mirror image files in the first-level kinship is. Similarly, the smaller the target partition offset difference in the target logical unit is, the higher the sorting of the two mirror image files in the second-level kinship is.

[0031] In a specific example, when three mirror images a, b and c are obtained, the target partition of the a mirror image is in volume 1, the target partition of the b mirror image is in volume 1, and the target partition of the c mirror image is in volume 2, then the kinship level between a and b is higher than that between a and c, and a and b are more compatible.

[0032] When a, b, c three images are acquired, the target partition of a image is in volume 1, and the target partition offset of a is 3; the target partition of b image is in volume 1, and the target partition offset of b is 3; the target partition of c image is in volume 1, and the target partition offset of c is 11; then the affinity between a and b is higher than that between a and c, and a and b are more affinity.

[0033] When a, b, c three images are acquired, the target partition of a image is in volume 1, the target partition of b image is in volume 2, and the target partition of c image is in volume 3; then the affinity between a, b, c is consistent, and there is no more affinity between two images.

[0034] In an embodiment of step 120, the image files are packaged according to the affinity to generate the first upgrade block, specifically including: 210, judging whether the image file exceeds the first data threshold, if yes, the image file is taken remainder to separate to generate a plurality of image files, otherwise no processing is performed; 220, the image files with the same target partition are packaged by a dynamic programming algorithm to generate a plurality of first package files, wherein when the first package file has a plurality of image files, the image files are sorted in the first package file according to the target partition offset of the image files; 230, the first package components are sorted according to the target partition offset of the first image file in the first package file to generate the first upgrade block.

[0035] In steps 210-230, the same target partition image is packaged according to the affinity, and the first upgrade block is generated. The classic DP algorithm, i.e. dynamic programming algorithm, is used to obtain the best image combination and generate a new file. The dynamic programming algorithm requires that the size of each group of images does not exceed the first data threshold, and the number of groups separated is the least.

[0036] Specifically, there are three images a, b, c under the target partition sop in the target logical unit lun1, and the first upgrade block generally includes the following steps when generating the first upgrade block: First, the size of all image files is judged. If the size of a single image file exceeds the first data threshold, the size of the image file is taken modulo and then the image file is cut and a new image is generated; in a specific example, the first data threshold is 512 MB; the size of a image is 1025 MB, by calculating 1025 / 512=2 remainder 1. Therefore, the image file can be cut into 3 image files, the sizes of which are 512 MB, 512 MB and 1 MB, and the two new split image files can be defined as d and e, that is, the three image files with sizes of 512 MB, 512 MB and 1 MB are named a, d and e.

[0037] Grouping using the DP algorithm: {a}, {c}, and {b, d, e} three first group package files, the sum of the sizes of the images in the three first group package files is very close to or equal to 512 MB Write a and c into two new files, which are called the first upgrade chunk 1 and the first upgrade chunk 2, respectively, and sort b, d and e according to the target partition offset in descending order, and then write them into a new file 3 in order, which is called the first upgrade chunk 3.

[0038] According to the target partition offset of the first image file in the first upgrade chunk, sort in ascending order, and then rename the first upgrade chunk. The number of the first upgrade chunk will be reflected in the final actual flashing order. For example: the first image offset of chunk_a is 3, the first image offset of chunk_b is 5, and the first image offset of chunk_c is 8. Then rename the chunk: chunk_a is named chunk_sop_1, chunk_b is named chunk_sop_2, and chunk_c is named chunk_sop_3, and so on.

[0039] In one embodiment of step 130, the first upgrade chunk is grouped according to the target logical unit to generate a second upgrade chunk, which specifically includes: 310, grouping the first upgrade chunk according to the target logical unit to generate a plurality of second group package files; 320, grouping the second group package files by dynamic programming algorithm to generate a plurality of third group package files; 330, according to the target partition offset of the first image file in the third group package file, sorting and writing the plurality of third group package components into the second upgrade chunk.

[0040] In steps 310-330, the present application sorts the first upgrade chunk generated in step 120 according to the target partition offset in the first mirror image in the first upgrade chunk, and groups according to the target logical unit.

[0041] Specifically, all the mirror images of the present application currently generate 5 chunks: chunk_a (target logical unit is lun1, 512MB), chunk_b (target logical unit is lun1, 20MB), chunk_c (target logical unit is lun2, 88MB), chunk_d (target logical unit is lun2, 12MB), chunk_e (target logical unit is lun3, 100MB), so the steps of generating the second upgrade chunk are as follows: First, group the first upgrade chunk according to the target logical unit: {chunk_a, chunk_b}, {chunk_c, chunk_d}, {chunk_e} three second group package files.

[0042] Group the second group package file using the DP algorithm, and the size of the second group package file does not exceed the first data threshold 512MB. For the above example, the third group package file is generated: {chunk_a}, {chunk_b}, {chunk_c, chunk_d}, {chunk_e} Sort the mirror image files in the above third group package file according to the target partition offset offset, and sort according to the order from large to small.

[0043] Write the sorted group to the new file pre_PKG to generate the second upgrade chunk, in this example: chunk_a is written to pre_PKG1, chunk_b is written to pre_PKG2, chunk_c and chunk_d are written to pre_PKG3, and chunk_e is written to pre_PKG4.

[0044] In one embodiment of step 140, the second upgrade chunk is packaged according to the data size of the second upgrade chunk to generate a target upgrade package, specifically including: the second upgrade chunk is packaged by a dynamic programming algorithm to generate a target upgrade package.

[0045] In this embodiment, the present application uses the second upgrade chunk pre_PKG to generate the final target upgrade package PKG; the present application continues to use the DP algorithm to group the second upgrade chunk pre_PKG, and the total size of each group does not exceed the first data threshold 512MB, and generates the final target upgrade package PKG.

[0046] Specifically, continue to use the DP algorithm to group pre_PKG1, pre_PKG2, pre_PKG3, and pre_PKG4 in step 130, and require that the total size of the second upgrade block does not exceed 512 MB, and two groups {pre_PKG1} and {pre_PKG2, pre_PKG3, pre_PKG4} are obtained. The files in the two groups are written into new PKGs respectively: {pre_PKG1} is written into PKG1, and {pre_PKG2, pre_PKG3, pre_PKG4} is written into PKG2; PKG1 and PKG2 are target upgrade packages.

[0047] In addition, it should be noted that in the dynamic programming algorithm, the data size of the first group of package files and / or the third group of package files and / or the target upgrade package does not exceed the first data threshold. The first data threshold is the optimal mirror package size in the vehicle-mounted ECU; it can be pre-set according to the memory of the vehicle-mounted ECU. The dynamic programming algorithm can specifically use a recursive method to try to solve the original problem. In the recursive process, if a sub-problem that has been calculated is encountered, the result is directly looked up and returned from memory storage such as an array, a hash table, etc.; if it has not been calculated, the sub-problem is recursively calculated, and the result is stored and returned. Through the dynamic programming algorithm, the data size of the first group of package files and / or the third group of package files and / or the target upgrade package can be ensured to be less than or equal to the first data threshold of 512 MB, and the number of groups divided is the least.

[0048] Embodiment 2 Figure 4 An embodiment of an upgrade package generation device of the present application is shown, and the upgrade package generation device 400 includes a data acquisition module 410, a first generation module 420, a second generation module 430, and a third generation module 440. Specifically, the data acquisition module 410 is configured to perform step 110 in embodiment 1, and specifically includes: acquiring a plurality of image files and configuration files, specifically including: acquiring the image files and the configuration files through a system interface, and parsing the image files and the configuration files to acquire the data size, the target partition, the target logical unit, and the target partition offset of each image file, and record them in a data structure.

[0049] The first generation module 420 is configured to perform step 120 in Embodiment 1, and specifically comprises: obtaining the kinship between the plurality of image files according to the target partition and the target partition offset, specifically comprising: when the target partitions of two image files are the same, the kinship between the two image files is first-level kinship; when the target partitions of two image files are different and the target logical units are the same, the kinship between the two image files is second-level kinship; when the target logical units of two image files are different, the kinship between the two image files is third-level kinship; wherein, when the kinship between the two image files is first-level kinship, the first-level kinship is sorted according to the target partition offset. The image files are packaged according to the kinship to generate a first upgrade block, specifically comprising: judging whether the image file exceeds the first data threshold, if yes, the image file is taken modulo to separate to generate a plurality of image files, otherwise no processing is performed; the image files with the same target partition are packaged by a dynamic programming algorithm to generate a plurality of first package files, wherein, when the first package file has a plurality of image files, the image files are sorted in the first package file according to the target partition offset; the plurality of first package components are sorted according to the target partition offset of the first image file in the first package file to generate the first upgrade block.

[0050] The second generation module 430 is configured to perform step 130 in Embodiment 1, and specifically comprises: packaging the first upgrade block according to the target logical unit to generate a second upgrade block, specifically comprising: grouping the first upgrade block according to the target logical unit to generate a plurality of second package files; re-grouping the second package files by a dynamic programming algorithm to generate a plurality of third package files; sorting the plurality of third package components according to the target partition offset of the first image file in the third package file and writing into the second upgrade block respectively.

[0051] The third generation module 440 is configured to perform step 140 in Embodiment 1, and specifically comprises: packaging the second upgrade block according to the data size of the second upgrade block to generate a target upgrade package, specifically comprising: packaging the second upgrade block by a dynamic programming algorithm to generate the target upgrade package. In the dynamic programming algorithm, the data size of the target upgrade package does not exceed the first data threshold.

[0052] In the application, after a plurality of image files and configuration files are acquired, a kinship between the plurality of image files is acquired according to a target partition and a target partition offset, the image files are packaged according to the kinship, and a first upgrade block is generated; the first upgrade block is packaged according to the target logic unit, and a second upgrade block is generated; and the second upgrade block is packaged according to a data size of the second upgrade block, and a target upgrade package is generated. By the method of the application, the efficiency of transmission to flashing can be improved by using the least upgrade package in the first data threshold set in the upgrade platform; and the image file kinship characteristics are used for packaging, so that the system resources of the board end can be avoided to be repeatedly applied for, and the system resources are saved. Meanwhile, the application effectively reduces the upgrade time consumption and improves the user experience of the product.

[0053] Embodiment 3 Figure 5 The structure diagram of one embodiment of the upgrade package generation device of the application is shown, and the specific implementation of the upgrade package generation device is not limited in the specific embodiments of the application.

[0054] As shown in Figure 5 The upgrade package generation device can include a processor, a communications interface, a memory, and a communications bus.

[0055] The processor 510, the communications interface 540, and the memory 520 can communicate with each other through the communications bus 530. The communications interface is used for communication with network elements such as clients or other servers. The processor is used for executing the program 550, and can specifically execute the related steps in the above-mentioned vehicle-mounted key storage method embodiments.

[0056] Specifically, the program can include program code, and the program code includes computer executable instructions.

[0057] The processor can be a central processing unit CPU, or an application specific integrated circuit ASIC, or one or more integrated circuits configured to implement embodiments of the application. The one or more processors included in the upgrade package generation device can be the same type of processors, such as one or more CPUs; or can be different types of processors, such as one or more CPUs and one or more ASICs.

[0058] The memory is used for storing programs. The memory can include a high-speed RAM memory, and can also include a non-volatile memory, for example, at least one disk memory.

[0059] The program can be specifically invoked by the processor to enable the upgrade package generation device to perform the following operations: Figure 1 Steps 110-140.

[0060] Embodiment 4: The embodiment of the present application provides a readable storage medium, the storage medium stores at least one executable instruction, the executable instruction enables the upgrade package generation device to perform the upgrade package generation method of embodiment 1 when running on the upgrade package generation device.

[0061] The executable instruction can be specifically used to enable the upgrade package generation device to perform the following operations: 110, obtain a plurality of image files and configuration files, wherein the configuration file at least records the data size, the target partition, the target logical unit and the target partition offset of each image file; 120, obtain the kinship between the plurality of image files according to the target partition and the target partition offset, and pack the image files according to the kinship to generate a first upgrade block; 130, pack the first upgrade block according to the target logical unit to generate a second upgrade block; 140, pack the second upgrade block according to the data size of the second upgrade block to generate a target upgrade package.

[0062] The present application obtains a plurality of image files and configuration files, obtains the kinship between the plurality of image files according to the target partition and the target partition offset, packs the image files according to the kinship to generate a first upgrade block, packs the first upgrade block according to the target logical unit to generate a second upgrade block, and packs the second upgrade block according to the data size of the second upgrade block to generate a target upgrade package. The method of the present application can not only use the least upgrade package in the first data threshold set in the upgrade platform to improve the efficiency of transmission and writing, but also can avoid the repeated application of system resources on the board and save system resources. At the same time, the present application effectively reduces the upgrade time and improves the user experience of the product.

[0063] The algorithms or displays provided herein are not inherently related to any particular computer, virtual system, or other apparatus.

[0064] In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the application can be practiced without these specific details. In other instances, well-known methods, structures and techniques have not been described in detail in order to avoid obscuring the understanding of this description. Like reference numerals refer to like elements throughout. Similarly, while operations can be depicted in the drawings in a particular order, this should not be understood as requiring or

[0065] It is understood by those skilled in the art that modules in the apparatus of the embodiments can be adapted and placed in one or more apparatuses other than the embodiments. Modules or units or components in the embodiments can be combined into one module or unit or component, and further can be divided into multiple sub-modules or sub-units or sub-components. Except that at least some of such features and / or processes or units are mutually exclusive.

[0066] It is noted that the foregoing examples have been provided merely for the purpose of explanation and are in no way to be construed as limiting of the present application. While the application has been described with reference to preferred embodiments, it is understood that the words which have been used herein are words of description, and that details of the preferred embodiments can vary without departing from the scope of the application. No reference has been made to the patent or application file of this application that will include additional information to enable this application to be practiced. It is understood that changes in the preferred embodiments can be made by those skilled in the art without departing from the scope of the present application. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word comprising does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The application can be implemented by means of both hardware and software, and any combination thereof. In a unit claim, any reference signs placed between parentheses shall not be construed as limiting the claim. The use of the word "about" followed by a value and / or a unit of measure to describe a criterion is intended to convey that a criterion can not be exactly that value, and / or that the criterion can not be measured to that precision, but that it is intended to convey that the criterion is close to the value given. The use of the term "at least" followed by a number and then the term "of" is used herein to describe a minimum number of items or a quantity of an item, for example.

Claims

1. An upgrade package generation method characterized by comprising: The method comprises: acquiring a plurality of image files and a configuration file, wherein the configuration file records at least data size, target partition, target logical unit and target partition offset of each image file; obtaining the kinship between the plurality of image files according to the target partition and the target partition offset, and grouping the image files according to the kinship to generate a first upgrade block; grouping the first upgrade block according to the target logical unit to generate a second upgrade block; grouping the second upgrade block according to the data size of the second upgrade block to generate a target upgrade package.

2. The upgrade package generation method of claim 1, wherein, The acquiring of the plurality of image files and the configuration file specifically comprises: acquiring the image files and the configuration file through a system interface, and parsing the image files and the configuration file to obtain the data size, the target partition, the target logical unit and the target partition offset of each image file, and record them in a data structure.

3. The upgrade package generation method of claim 1, wherein, The obtaining of the kinship between the plurality of image files according to the target partition and the target partition offset specifically comprises: when the target partitions of two image files are the same, the kinship between the two image files is first-level kinship; when the target partitions of two image files are different and the target logical units are the same, the kinship between the two image files is second-level kinship; when the target logical units of two image files are different, the kinship between the two image files is third-level kinship; when the kinship between two image files is first-level kinship, the target partition offset is used to determine the order of the first-level kinship.

4. The upgrade package generation method of claim 3, wherein, The grouping of the image files according to the kinship to generate the first upgrade block specifically comprises: judging whether the image file exceeds a first data threshold, if yes, the image file is taken modulo to generate a plurality of image files, otherwise, no processing is performed; grouping the image files with the same target partition through a dynamic programming algorithm to generate a plurality of first grouping files, wherein when the first grouping file has a plurality of image files, the image files are sorted in the first grouping file according to the target partition offset; sorting a plurality of the first grouping components according to the target partition offset of the first image file in the first grouping file to generate the first upgrade block.

5. The upgrade package generation method of claim 4, wherein, The grouping of the first upgrade block according to the target logical unit to generate the second upgrade block specifically comprises: grouping the first upgrade block according to the target logical unit to generate a plurality of second grouping files; grouping the second grouping files again through a dynamic programming algorithm to generate a plurality of third grouping files; sorting a plurality of the third grouping components according to the target partition offset of the first image file in the third grouping file and writing them into the second upgrade block respectively.

6. The upgrade package generation method of claim 5, wherein, The grouping of the second upgrade block according to the data size of the second upgrade block to generate the target upgrade package specifically comprises: grouping the second upgrade block through a dynamic programming algorithm to generate the target upgrade package.

7. The upgrade package generation method of claim 6, wherein, In the dynamic programming algorithm, the data size of the first grouping file and / or the third grouping file and / or the target upgrade package does not exceed the first data threshold.

8. An upgrade package generation method characterized by comprising: The device comprises: The data acquisition module is configured to acquire a plurality of image files and a configuration file, wherein the configuration file records at least data sizes of the image files, target partitions, target logical units, and target partition offsets. The first generation module is configured to acquire a kinship relationship among the image files according to the target partitions and the target partition offsets, and to generate a first upgrade block by grouping the image files according to the kinship relationship. The second generation module is configured to group the first upgrade block according to the target logical units, and to generate a second upgrade block. The third generation module is configured to group the second upgrade block according to data sizes of the second upgrade block, and to generate a target upgrade package.

9. An upgrade package generation device characterized by comprising: The device comprises: a processor, a memory, a communication interface, and a communication bus, which are in communication with each other through the communication bus; The memory is configured to store at least one executable instruction, which causes the processor to perform the operations of the upgrade package generation method according to any one of claims 1-7.

10. A readable storage medium, characterized by, The storage medium stores at least one executable instruction, which, when executed on the upgrade package generation device according to claim 9, causes the upgrade package generation device to perform the operations of the upgrade package generation method according to any one of claims 1-7.