Reverse Binary Patch Generation Using Similarity Indexing
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing methods for generating reverse patches are computationally intensive and inefficient, especially on memory-scarce devices, as they require large files and significant processing power, making it impractical to undo software updates effectively.
Innovation Solution
A method and system for generating a reverse patch by creating an index file that identifies regions of similarity between old and new binary images, allowing devices to efficiently generate the reverse patch using a server-generated index file and patch manager, reducing computational load and memory requirements.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If a reverse patch is distributed along with the forward patch, then the device can recover the old binary image, but the reverse patch is a large file which makes downloading time consuming and expensive
Solution Approach 1:
The patent extracts only the necessary information (index file with similarity region pointers) from the reverse patch generation process and transmits it separately from the full reverse patch. This allows the device to generate the reverse patch locally using minimal data, eliminating the need to download a large reverse patch file while maintaining the ability to recover the old binary image.
Solution Approach 2:
The server performs preliminary action by generating and transmitting the index file before the device needs to create the reverse patch. This index file contains pre-computed information about similar regions between old and new binary images, enabling the device to efficiently generate the reverse patch without performing computationally intensive indexing operations itself.
2Reliability
If the device generates the reverse patch when applying the forward patch, then rollback capability is achieved, but computing a patch is computationally intensive which the device may be unable to accomplish given limited memory and processing power
Solution Approach 1:
The patent introduces an intermediary (the index file) that mediates between the server and device. The server generates this intermediary containing similarity region information, and the device uses it to generate the reverse patch. This intermediary approach shifts the heavy computational burden to the server while enabling lightweight reverse patch generation on the device with limited resources.
Solution Approach 2:
The server performs preliminary computation by pre-calculating and transmitting the index file with similarity region pointers before the device needs to generate the reverse patch. This eliminates the need for the device to perform computationally intensive indexing operations, making rollback capability achievable on devices with limited processing power.
3Ease of manufacture
If a copy command is used to indicate similar portions of binary code, then the patch can be generated, but the copied portion is rarely exact which requires additional difference files
Solution Approach 1:
The patent segments the binary code into discrete similarity regions identified through indexing. Each region is independently identified and referenced in the index file, allowing the patch to handle each region separately. This segmentation enables precise control over which portions are copied and which require differences, improving patch generation efficiency.
Data Source
AI summary
A reverse patch for undoing a forward patch for obtaining a new binary image from an old binary image is generated in two parts. First a reverse index file is generated when the forward patch is created at a host or server. The reverse index file identifies regions of similarity between the old binary image and the new binary image. The reverse index file is transmitted with the forward patch to an electronic device. Second, while applying the forward patch to obtain the new binary image from the old binary image, the electronic device generates the reverse patch based upon the new binary image, the old binary image, and the reverse index file. The forward patch and reverse patch may both be incremental patches. Incremental patches are generated and applied on a sector-by-sector basis.


