Differential packet generation method and system for vehicle ECU firmware

By performing structural analysis and multi-granularity difference calculation on the ECU firmware, differential packets for verification and index data are generated, solving the problems of large differential packet size, low upgrade efficiency and insufficient security in the existing technology, and realizing efficient and secure ECU firmware upgrade.

CN121785641APending Publication Date: 2026-04-03WUHAN JIANGXIA CHUNENG AUTOMOBILE TECHNOLOGY R&D CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-25
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Existing technologies cannot effectively utilize the structured information in ECU firmware, resulting in large differential package sizes, low upgrade efficiency, and insufficient security, as well as a lack of special requirements for the vehicle environment.

Method used

By performing structural analysis on the ECU firmware, multi-granularity difference data is generated and additional verification and index data are added to form a differential package to meet the upgrade requirements of the vehicle's electronic control unit.

Benefits of technology

Significantly reduce the size of differential packets, improve upgrade efficiency and security, meet the bandwidth limitations of in-vehicle networks, and optimize the utilization of computing resources through indexed data to ensure the reliability and security of the upgrade process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121785641A_ABST
    Figure CN121785641A_ABST
Patent Text Reader

Abstract

The invention provides a differential package generation method and system for vehicle ECU firmware, and the method comprises the steps: carrying out the structure analysis of the ECU firmware of an old version and a new version, and obtaining the structure information describing the internal logic structure of the firmware; on a plurality of different granularity hierarchies, differences of the new version firmware relative to the old version firmware are calculated respectively, difference data corresponding to the granularity hierarchies are generated, and the granularity hierarchies at least comprise a first granularity hierarchies based on minimum independently-updatable data units and a second granularity hierarchies based on function modules; generating verification data and index data associated with the difference data; the index data is used for indicating the organizational relationship of the difference data in the difference packet; and packaging the difference data, the verification data and the index data to generate a difference packet. The differential package generation method not only solves the inherent defects of large differential redundancy and weak safety of the traditional technology, but also provides technical guarantee for efficient, safe and reliable upgrading of the vehicle ECU through structural perception and fine management capability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of vehicle control technology, and specifically to a method and system for generating differential packets for vehicle ECU firmware. Background Technology

[0002] With the continuous improvement of vehicle intelligence and connectivity, over-the-air (OTA) technology has become a core means of maintaining and iterating vehicle electronic control unit software. Incremental upgrades through differential packets can effectively reduce data transmission volume and shorten upgrade time, making it particularly suitable for bandwidth-constrained in-vehicle network environments.

[0003] Currently, ECU differential packets are a type of intelligent data package used for efficient and secure incremental updates of automotive electronic systems. The mainstream method for creating ECU (Electronic Control Unit) differential packets in the industry originates from general file differential technology. This method treats the ECU firmware file as a continuous binary data stream and uses algorithms such as longest common subsequence or hash-based sliding window comparison to find the similarities and differences between the old and new versions. However, ECU firmware is not an unstructured sequence of bytes, but rather consists of structured data with clear logic and dependencies, including bootloaders, hardware drivers, functional algorithm modules, configuration parameters, and diagnostic information. The existing "blind" binary stream comparison method cannot recognize and utilize the inherent hierarchical structure of the firmware, resulting in inefficient redundancy elimination of structured data.

[0004] Furthermore, existing differential solutions generally lack consideration for the specific requirements of the in-vehicle environment. On the one hand, they fail to embed functional safety verification mechanisms for the ECU upgrade process, such as verification of the integrity, legality of the source, and version compatibility of the differential content, posing potential security risks. On the other hand, the generated differential packet structure does not fully consider the limited computing resources of the ECU and the transmission characteristics of the in-vehicle bus, which is detrimental to the reliability and efficiency of the upgrade process.

[0005] Therefore, there is an urgent need in this field for a new technology solution that can sense the ECU firmware structure, achieve fine differential analysis, and ensure upgrade security. Summary of the Invention

[0006] This invention aims to overcome the shortcomings of existing technologies and provide a method and system for generating differential packets for vehicle ECU firmware. It aims to solve the problems of large differential packet size, low upgrade efficiency, and insufficient security caused by the inability of traditional binary differential methods to effectively process structured data in ECU firmware.

[0007] The technical solution of the present invention to solve the above-mentioned technical problems is as follows: In a first aspect, the present invention provides a method for generating differential packets of vehicle ECU firmware, comprising the following steps: S1. Structural Analysis: Perform structural analysis on the old and new versions of ECU firmware to obtain structural information describing the internal logic structure of the firmware. S2. Difference Calculation: Based on the structural information, the differences between the new firmware version and the old firmware version are calculated at multiple different granularity levels, generating difference data corresponding to each granularity level; wherein, the granularity level includes at least a first granularity level based on the smallest independently updatable data unit and a second granularity level based on functional modules. S3. Verification and Indexing: Generate verification data and index data associated with the difference data; the verification data is used to verify the correctness and security of the firmware update; the index data is used to indicate the organization of the difference data in the differential packet. S4. Encapsulation: The difference data, the verification data, and the index data are encapsulated to generate a differential package, which is suitable for processing by the vehicle electronic control unit to complete the firmware update.

[0008] Based on the above scheme, further, in step S1, the structural information includes three-level hierarchical information that divides the firmware data into storage partitions, functional modules, and minimum updatable blocks; The types of the minimum updatable blocks include binary code blocks, numeric parameter blocks, and array parameter blocks.

[0009] Furthermore, in step S2, for the difference calculation at the first granularity level, the corresponding difference strategy is adopted according to the type of the minimum updatable block as follows: For the binary code block, a matching strategy based on sliding window hashing is adopted; For the numerical parameter block, a strategy of recording numerical differences is adopted; For the array parameter block, a strategy is adopted to record the index of the changed element and its corresponding new value.

[0010] Furthermore, in step S2, the difference data also includes dependency instructions generated based on the dependencies between partitions or modules.

[0011] Furthermore, in step S3, the verification data includes verification information generated for the changed data units in the difference data; The verification information includes at least a first verification value calculated based on the data before the change and a second verification value calculated based on the data after the change.

[0012] Furthermore, the verification information also includes a digital signature of the second verification value.

[0013] Furthermore, in step S3, the index data is an encrypted mapping table used to quickly locate the position of the difference data.

[0014] Secondly, the present invention also provides a vehicle ECU differential package manufacturing system for implementing the above method, comprising: The firmware structure parsing module is used to parse old and new versions of ECU firmware files respectively and extract structured metadata. The multi-granularity difference calculation module is used to perform hierarchical difference calculation based on the structured metadata, and generate difference data corresponding to each granularity level. A security verification and index building module is used to generate verification data and index data associated with the differential data; The differential package encapsulation module is used to encapsulate the difference data, the verification data, and the index data to generate a differential package file.

[0015] Thirdly, the present invention also provides an electronic device, including at least one processor and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the at least one processor implements the differential package generation method for vehicle ECU firmware as described in the first aspect by executing the instructions stored in the memory.

[0016] Fourthly, the present invention also provides a computer-readable storage medium storing at least one instruction or at least one program, wherein the at least one instruction or at least one program is loaded and executed by a processor to implement the differential packet generation method for vehicle ECU firmware as described in the first aspect.

[0017] Compared to existing differential techniques that treat ECU firmware as a binary stream, this invention introduces an innovative system of "structure-aware analysis - multi-granularity differential - security verification packaging," bringing fundamental improvements in three dimensions: differential efficiency, upgrade security, and system reliability. Specifically, it offers the following four significant advantages: 1. Improved differential efficiency based on structural parsing: The system performs structural parsing on the ECU firmware to obtain structural information describing its internal logic structure. Based on this, differential calculation is performed, which fundamentally avoids the redundant processing of unmodified structures in traditional binary stream comparison methods. This significantly reduces the amount of differential packet data generated and improves transmission efficiency, making it particularly suitable for low-bandwidth vehicle network environments.

[0018] 2. Enhanced Accuracy and Reliability of Upgrades Based on Multi-Granularity Difference Calculation: By employing a technique that performs difference calculations at multiple different granularity levels, the most suitable difference strategy can be adopted for changes at different logical levels (such as changes in the smallest updatable unit, or the addition or deletion of functional modules). This multi-granularity processing approach not only further compresses the size of the difference package, but more importantly, it lays the foundation for subsequent on-demand updates and dependency management, thereby significantly improving the accuracy of the upgrade process and the reliability of the entire system, effectively avoiding upgrade failures caused by global replacements or missing dependencies.

[0019] 3. Security and Processing Efficiency Optimization Based on Verification and Indexing: By employing the technical feature of generating verification data and index data associated with the differential data, an inherent security verification and rapid location mechanism is constructed. Verification data ensures the legitimacy of the differential packet source and the integrity of the updated content, meeting the standard requirements for vehicle functional safety; while index data enables the ECU to quickly locate the required differential instructions when synthesizing new firmware, greatly reducing the occupation of limited computing resources and improving the execution efficiency of the upgrade process.

[0020] 4. Industrial applicability and compatibility of the technical solution: By encapsulating difference data, verification data and index data to generate standard difference packets, the technical feature enables the corresponding output to have good compatibility with existing vehicle diagnostic communication protocols (such as UDS); the entire technical solution forms an efficient and secure closed loop from generation to application, and has high industrial applicability.

[0021] In summary, the differential packet generation method provided by this invention not only solves the inherent defects of large differential redundancy and weak security in traditional technologies, but also provides comprehensive technical support for the efficient, safe and reliable upgrading of vehicle ECUs through its structural perception and refined management capabilities, and has important industrial application value. Attached Figure Description

[0022] Figure 1 This is a schematic diagram of a differential packet generation method for vehicle ECU firmware provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the differential packet generation system for vehicle ECU firmware provided in an embodiment of the present invention; Figure 3 A schematic diagram of the hardware structure of a possible electronic device provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the hardware structure of a possible computer-readable storage medium provided in an embodiment of the present invention. Detailed Implementation

[0023] The implementation methods of this solution will be described in further detail below. Obviously, the described embodiments are only a part of the embodiments of this solution, and not an exhaustive list of all embodiments. It should be noted that, unless otherwise specified, the embodiments and features in the embodiments of this solution can be combined with each other.

[0024] Example 1 This invention provides a method for generating differential packets in vehicle ECU firmware, such as... Figure 1 As shown, it includes the following steps: Step S1, Structure Analysis: Perform structure analysis on the old and new versions of the ECU firmware to obtain structural information describing the internal logic structure of the firmware.

[0025] Specifically, using tools provided by the ECU supplier or by parsing HEX / binary files, the old firmware version F_old and the new firmware version F_new are analyzed. The extracted three-level structure metadata includes: Partitioning: Divided according to the ISO 14229 standard, such as the ROM read-only area where the Bootloader is located (0x0000-0x1000), the application area (0x1000-0x8000), and the parameter storage area (EEPROM, 0x8000-0xA000). Module layer: Identify the functional modules within each zone, such as "Fuel Injection Control Module M1" and "Ignition Control Module M2" in the application zone, and "Fuel Injector Calibration Module P1" and "Sensor Threshold Module P2" in the parameter zone, and record the dependencies between modules; Block-level layer: Identifies the smallest updatable unit within a module, such as code block B1 of M1 (address 0x1000-0x1500) and numerical parameter block B2 (injector flow coefficient) of P1, and assigns a unique ID to each block.

[0026] Traditional differential packages treat ECU firmware as a pure binary byte stream and cannot recognize its inherent layered and modular characteristics (such as the hierarchical relationship between partitions, modules, and blocks).

[0027] The innovation of this step lies in the fact that it is the first time that the three-layer structure of the ECU firmware, namely "storage partition (ROM / RAM / Flash) - functional module (such as fuel injection control, sensor processing) - minimum block (code / parameter / array)," is parsed to extract structured meta-information (such as module boundaries, block type, and dependencies). This mechanism enables differential calculation to accurately locate "the parts that need to be changed," avoids redundant processing of irrelevant modules / blocks, and lays the foundation for subsequent multi-granularity differential calculations.

[0028] Step S2, Difference Calculation: Based on structural information, the differences between the new firmware version and the old firmware version are calculated at multiple different granularity levels, generating difference data corresponding to each granularity level; wherein, the granularity level includes at least a first granularity level based on the smallest independently updatable data unit and a second granularity level based on functional modules.

[0029] Specifically, block-level differential (first granularity level): binary code block, for the code block of the above M1 module, use the Rabin-Karp algorithm with a window size of 4KB to calculate the hash, match the unmodified function sequence, and only record the offset of the changed sub-block and the new instruction stream; numerical parameter block, for the "water temperature sensor upper limit" parameter in the above P2 module (from 120℃ to 125℃), record the difference +5; array parameter block, for the fuel injection pulse width lookup table of the above P1 module (from [10,15,20,25] to [10,18,20,30]), record the new value of the instruction [index 1:18, index 3:30].

[0030] Module-level differential (second granularity level): Module addition / deletion, such as adding "OBD-II Extended Diagnostic Module M3", record the module creation command (including complete code and parameters, stored only when it appears for the first time); Module replacement, if the underlying driver that the module depends on changes (such as the crankshaft sensor driver that M2 depends on is upgraded), record the module full replacement command.

[0031] Cross-partition dependency differential: If the Bootloader version (V2.1) of F_new is detected to be higher than that of F_old (V1.8), a dependency instruction is generated, requiring the Bootloader to be upgraded to V2.1 first, otherwise the application update is rejected; if the calibration value of parameter area P1 depends on the algorithm version of application area M1, the mapping relationship is recorded: the new value of P1 is only compatible with M1 V3.0+.

[0032] The innovation of this step lies in the fact that traditional differential methods only use a single granularity (such as global binary comparison), resulting in differential packets containing a large number of invalid differences (such as byte fluctuations of unmodified modules).

[0033] Among them, block-level difference: Design exclusive strategies for different types of blocks (code blocks, parameter blocks, array blocks) (e.g., code blocks use "sliding window hash + Rabin-Karp" to match invariant sub-blocks, parameter blocks record differences, and array blocks record index-level changes) to minimize the volume of single-block differences; Module-level differentiation: New / deleted / full replacement modules are processed separately to avoid duplicate recording of unchanged content within a module; Cross-partition dependency differential: For the first time, a "partition-module" dependency relationship record is introduced (such as the version matching requirements between application modules and Bootloader), which solves the problem of upgrade failure caused by ignoring dependencies in traditional methods.

[0034] Step S3, Verification and Indexing: Generate verification data and index data associated with the difference data; the verification data is used to verify the correctness and security of the firmware update; the index data is used to indicate the organization of the difference data in the differential packet.

[0035] Specifically, for each changed block in step S2, a SHA-256 hash value is calculated as the old value hash (H_old) and the new value hash (H_new), and H_new is RSA signed using the OEM private key. The purpose is to verify whether the F_old block matches during synthesis (to avoid version incompatibility) and to ensure that the new block has not been tampered with.

[0036] Furthermore, a module-level index is constructed, which is a hash table that maps module IDs to the offset addresses of their difference data within the packet. This index table is encrypted using the AES-128 algorithm, with the aim of supporting ECUs to quickly locate the differences of target modules.

[0037] Furthermore, global security information is set in the header of the differential packet, including the MCU serial number mask of the target ECU, the range of firmware versions allowed for upgrade (such as V1.5-V2.0), and the public key of the manufacturer's root certificate used to verify the signature. The purpose is to prevent cross-hardware model upgrades and low version rollback attacks, and to verify the legitimacy of the differential packet.

[0038] The innovation of this step lies in the fact that traditional differential packets only verify integrity through a single checksum, which cannot ensure the legitimacy of local differences, nor can it prevent cross-hardware / cross-version misinstallation.

[0039] Among them, block-level verification: each changed block is appended with "old block hash (to verify the legality of the original version) + new block hash (to verify the integrity of the new content) + car company signature (to prevent malicious tampering)" to achieve accurate verification of local differences; Module-level encrypted index: The mapping relationship between modules and differences is encrypted with AES, which not only supports ECU to quickly locate differences (adapting to the limited computing power of ECU), but also prevents unauthorized parsing; Global security binding: The differential package header contains a unique identifier for the ECU hardware (such as MCU model + serial number mask) and version range restrictions, eliminating the risks of cross-hardware upgrades and rollbacks to lower versions from the source, and complying with the ISO 26262 functional safety standard.

[0040] Step S4, Encapsulation: The difference data, verification data, and index data are encapsulated to generate a differential package. The differential package is suitable for processing by the vehicle's electronic control unit to complete the firmware update.

[0041] Specifically, data is encapsulated according to the ISO 14229 UDS protocol 0x34 service format. The encapsulation structure includes: a 32-byte header (protocol version, ECU model, version number), a 256-byte security area (signature, hardware identifier, version range), a variable-length index area (encrypted mapping table), a variable-length difference area (differential instructions containing verification information), a variable-length dependency area (dependency instructions), and a 32-byte tail (global SHA-256 checksum and rollback pointer). LZ77 compression is applied to the code blocks in the difference area.

[0042] The innovation of this step lies in the fact that traditional differential packets do not take into account the low bandwidth characteristics (≤1Mbps) of the vehicle's CAN / LIN bus, and the full transmission of differences leads to excessively long upgrade times. This invention supports "on-demand download by module" based on structured indexes (e.g., if only the faulty module is being upgraded, there is no need to transmit the full difference), reducing invalid data transmission; LZ77 compression is used for code blocks (ECU supports fast decompression), and parameter blocks are stored directly due to their small data size, further reducing the differential packet size (30%-50% smaller than traditional methods), adapting to the bandwidth limitations of vehicle networks.

[0043] Example 2 This embodiment provides a curve trajectory planning and tracking system for implementing the method of Embodiment 1 above. The system includes: The firmware structure parsing module is used to parse old and new versions of ECU firmware files respectively and extract structured metadata. The multi-granularity difference calculation module is used to perform hierarchical difference calculation based on structured metadata, and generate difference data corresponding to each granularity level. The security verification and index building module is used to generate verification data and index data associated with the differential data; The differential package encapsulation module is used to encapsulate the difference data, verification data, and index data into a differential package file.

[0044] Example 3 See Figure 3 , Figure 3 This is a schematic diagram illustrating an embodiment of the electronic device provided in this invention. For example... Figure 3 As shown, this embodiment of the invention provides an electronic device 300, including a memory 310, a processor 320, and a computer program 311 stored in the memory 310 and executable on the processor 320. When the processor 320 executes the computer program 311, it performs the following steps: S1. Structural Analysis: Perform structural analysis on the old and new versions of ECU firmware to obtain structural information describing the internal logic structure of the firmware. S2. Difference Calculation: Based on structural information, the differences between the new firmware version and the old firmware version are calculated at multiple different granularity levels, generating difference data corresponding to each granularity level; wherein, the granularity level includes at least a first granularity level based on the smallest independently updatable data unit and a second granularity level based on functional modules. S3. Verification and Indexing: Generate verification data and index data associated with the difference data; the verification data is used to verify the correctness and security of the firmware update; the index data is used to indicate the organization of the difference data in the differential packet. S4. Encapsulation: The difference data, verification data, and index data are encapsulated to generate a differential package, which is suitable for processing by the vehicle's electronic control unit to complete the firmware update.

[0045] Example 4 See Figure 4 , Figure 4 This is a schematic diagram illustrating an embodiment of a computer-readable storage medium provided by the present invention. (See diagram below.) Figure 4 As shown, this embodiment provides a computer-readable storage medium 400 on which a computer program 311 is stored. When the computer program 311 is executed by a processor, it performs the following steps: S1. Structural Analysis: Perform structural analysis on the old and new versions of ECU firmware to obtain structural information describing the internal logic structure of the firmware. S2. Difference Calculation: Based on structural information, the differences between the new firmware version and the old firmware version are calculated at multiple different granularity levels, generating difference data corresponding to each granularity level; wherein, the granularity level includes at least a first granularity level based on the smallest independently updatable data unit and a second granularity level based on functional modules. S3. Verification and Indexing: Generate verification data and index data associated with the difference data; the verification data is used to verify the correctness and security of the firmware update; the index data is used to indicate the organization of the difference data in the differential packet. S4. Encapsulation: The difference data, verification data, and index data are encapsulated to generate a differential package, which is suitable for processing by the vehicle's electronic control unit to complete the firmware update.

[0046] Based on the above embodiments, it can be seen that compared with existing traditional differential techniques that treat ECU firmware as a binary stream, this invention, by introducing an innovative system of "structure-aware analysis - multi-granularity differential - security verification packaging," brings fundamental improvements in three dimensions: differential efficiency, upgrade security, and system reliability. Specifically, it exhibits the following four significant advantages: Firstly, regarding differential efficiency and bandwidth adaptation, this invention achieves accurate difference localization by identifying the firmware's partition, module, and block-level three-layer structure. It employs dedicated differential strategies (such as sliding window hashing, difference recording, and index updating) for different data types like code, parameters, and arrays, effectively avoiding redundant processing of unmodified data in traditional global binary comparisons. This reduces the differential packet size by 20%-40% compared to traditional methods, significantly lowering network transmission load, and is particularly suitable for low-bandwidth automotive bus environments such as CAN / LIN.

[0047] Secondly, regarding the security of the upgrade process, this invention constructs a multi-layered security verification system. By attaching new and old hash values ​​and digital signatures to each changed block, the authentication of the update source and the verification of data integrity are achieved. By binding the encrypted index with global security information (hardware identifier, version range), security risks such as cross-hardware upgrades, version rollbacks, and malicious tampering are effectively prevented, fully meeting the requirements of the ISO 26262 ASIL-B functional safety standard.

[0048] Furthermore, regarding system compatibility and reliability, this invention innovatively addresses the dependencies between modules and partitions. By generating dependency instructions that clearly define the upgrade order and version matching requirements, it avoids upgrade failures or ECU "bricking" risks caused by Bootloader incompatibility or module version mismatch from the source, greatly improving the success rate of OTA upgrades and system robustness.

[0049] Finally, in terms of practical application efficiency, based on the support of structural indexes, the ECU can achieve on-demand parsing and synthesis of differential packages. For example, key driving function modules can be upgraded first, while non-critical modules are upgraded in the background, thereby significantly reducing vehicle downtime caused by software upgrades and improving the user experience.

[0050] In summary, the differential packet generation method provided by the embodiments of the present invention not only solves the inherent defects of large differential redundancy and weak security in traditional technologies, but also provides comprehensive technical support for the efficient, safe and reliable upgrading of vehicle ECUs through its structural perception and refined management capabilities, and has important industrial application value.

[0051] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for generating differential packets in vehicle ECU firmware, characterized in that, Includes the following steps: S1. Structural Analysis: Perform structural analysis on the old and new versions of ECU firmware to obtain structural information describing the internal logic structure of the firmware. S2. Difference Calculation: Based on the structural information, the differences between the new firmware version and the old firmware version are calculated at multiple different granularity levels, generating difference data corresponding to each granularity level; wherein, the granularity level includes at least a first granularity level based on the smallest independently updatable data unit and a second granularity level based on functional modules. S3. Verification and Indexing: Generate verification data and index data associated with the difference data; the verification data is used to verify the correctness and security of the firmware update; the index data is used to indicate the organization of the difference data in the differential packet. S4. Encapsulation: The difference data, the verification data, and the index data are encapsulated to generate a differential package, which is suitable for processing by the vehicle electronic control unit to complete the firmware update.

2. The method according to claim 1, characterized in that, In step S1, the structural information includes three-level hierarchical information that divides the firmware data into storage partitions, functional modules, and minimum updatable blocks; The types of the minimum updatable blocks include binary code blocks, numeric parameter blocks, and array parameter blocks.

3. The method according to claim 2, characterized in that, In step S2, the difference calculation for the first granularity level is performed, and the corresponding difference strategy is adopted according to the type of the minimum updatable block: For the binary code block, a matching strategy based on sliding window hashing is adopted; For the numerical parameter block, a strategy of recording numerical differences is adopted; For the array parameter block, a strategy is adopted to record the index of the changed element and its corresponding new value.

4. The method according to claim 1, characterized in that, In step S2, the difference data also includes dependency instructions generated based on the dependencies between partitions or modules.

5. The method according to claim 1, characterized in that, In step S3, the verification data includes verification information generated for the changed data units in the difference data; The verification information includes at least a first verification value calculated based on the data before the change and a second verification value calculated based on the data after the change.

6. The method according to claim 5, characterized in that, The verification information also includes a digital signature of the second verification value.

7. The method according to claim 1, characterized in that, In step S3, the index data is an encrypted mapping table used to quickly locate the position of the difference data.

8. A vehicle ECU differential package manufacturing system for implementing the method of any one of claims 1 to 7, characterized in that, include: The firmware structure parsing module is used to parse old and new versions of ECU firmware files respectively and extract structured metadata. The multi-granularity difference calculation module is used to perform hierarchical difference calculation based on the structured metadata, and generate difference data corresponding to each granularity level. A security verification and index building module is used to generate verification data and index data associated with the differential data; The differential package encapsulation module is used to encapsulate the difference data, the verification data, and the index data to generate a differential package file.

9. An electronic device, comprising at least one processor and a memory communicatively connected to said at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, which implements the differential package generation method for vehicle ECU firmware as described in any one of claims 1 to 7 by executing the instructions stored in the memory.

10. A computer-readable storage medium storing at least one instruction or at least one program, said at least one instruction or at least one program being loaded and executed by a processor to implement the differential package generation method for vehicle ECU firmware as claimed in any one of claims 1 to 7.