Binary Image Differential Patching for Memory-Constrained Devices

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing techniques for generating and implementing patch files are not suitable for memory-constrained devices, as they require storing both the original and new software images simultaneously, which is inefficient in terms of memory usage.

Innovation Solution

A patch generator that compares sections of the target image with a continually updating reference source image, generating a patch that describes the differences to transform the source image into the target image, allowing in situ updates and reducing memory requirements by not needing to store both images simultaneously.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Loss of energy

If BSDiff technique is used to generate patch files encoding differences between replacement code and old code, then bandwidth efficiency is improved (up to 90% reduction in transmitted data), but memory requirement worsens because the device must store both the original software image and the new image simultaneously

Engineering Contradiction:
Improvebandwidth efficiencyVSAvoidmemory requirement
Core Design Contradiction:
Loss of energyVSQuantity of substance

Solution Approach 1:

The patch generator performs preliminary actions by continuously updating the reference source image during patch generation. This allows the system to prepare the replacement image incrementally while reusing memory space, avoiding the need to store both original and new images simultaneously. The reference image is updated in-place as patches are generated, enabling memory-efficient operation before the actual device update occurs.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system employs dynamic memory management where the reference source image is continuously updated during the patch generation process. Instead of static storage of both images, the reference image evolves dynamically as patches are generated and applied, allowing the same memory space to be reused for both original and replacement image data at different times in the process.

Inventive Principle:
Principle #15Dynamics

2Manufacturing precision

If the device stores the new image while constructing it and the original software image simultaneously, then patch application accuracy is improved, but device complexity increases due to memory constraints on constrained devices

Engineering Contradiction:
Improvepatch application accuracyVSAvoidmemory management complexity
Core Design Contradiction:
Manufacturing precisionVSDevice complexity

Solution Approach 1:

The system performs preliminary validation and preparation of patches against the reference image before actual application. This preliminary action ensures patch accuracy is verified in advance, allowing the device to apply patches confidently without needing to maintain complex dual-image storage and comparison mechanisms during the application process.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patch generation system uses the reference source image to generate and validate patches, then the same reference image is used during application to ensure accuracy. This self-service approach where the reference image serves multiple purposes (generation and validation) eliminates the need for separate verification mechanisms, reducing device complexity while maintaining accuracy.

Inventive Principle:
Principle #25Self-service

Data Source

PatentEP3510483B1Binary image differential patching
Publication Date: 2023.12.20 HUAWEI TECH CO LTD
  • EP3510483B1 patent drawingFigure 1
  • EP3510483B1 patent drawingFigure 2
  • EP3510483B1 patent drawingFigure 3

AI summary

A patch generator for generating a patch that expresses a series of updates to a source image that will transform the source image into a target image. The patch generator is configured to compare sections of the target image, in turn, with respective versions of the source image. The patch generator is configured to determine the respective versions of the source image by assuming that a device for which the patch is intended will implement the patch by progressively updating a source image that it stores and by determining the respective versions of the source image to be versions of the source image that the patch generator expects the device to be storing when it implements each update of the series of updates expressed by the patch. The patch generator is configured to compare each section of the target image with a respective version of the source image that the patch generator expects the device to be storing at the point when it implements an update corresponding to that section of the target image in the patch. The patch generator generates the series of updates for the patch in dependence on the comparisons between the sections of the target image and the respective versions of the source image. Comparing each section of the target image with versions of the source image that are expected to be stored by the device during the process of implementing the patch allows the possibility that the device could change the source image in its memory while it implements the patch. This can reduce memory usage at the device, by removing the need for the device to keep source image unchanged in memory while it constructs its replacement.