Differential File Restoration Parallel Thread Allocation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The challenge of improving the efficiency of differential file restoration in terminal devices during firmware upgrades, particularly in low-end devices with limited RAM resources, is addressed by optimizing the use of RAM memory space through adaptive parallel processing of restoration threads based on block size and RAM space availability.
Innovation Solution
The method involves determining the number of parallel restoration threads based on the block size and RAM space used for differential file restoration, dividing RAM space into safety buffer areas and shared areas, and performing restoration processing in parallel using multiple threads to minimize RAM consumption and enhance efficiency.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If a differential package upgrade manner is used to improve firmware upgrade efficiency, then upgrade efficiency is improved, but RAM memory space requirements increase
Solution Approach 1:
The patent divides the differential file restoration process into multiple independent restoration threads, each handling a specific block size. This segmentation allows parallel processing while controlling the RAM memory space required for each thread, thus resolving the contradiction between upgrade efficiency and memory requirements.
Solution Approach 2:
The patent dynamically determines the block size and number of restoration threads based on the available RAM memory space. By making these parameters adaptive rather than fixed, the system can optimize the balance between restoration speed and memory consumption according to the specific device capabilities.
2Productivity
If a large block size is used for differential file restoration, then restoration speed improves, but RAM memory consumption increases
Solution Approach 1:
The patent changes the parameter of block size to different values based on the available RAM memory space. By providing multiple block size options and selecting the appropriate one dynamically, the system can adjust the balance between restoration speed and memory consumption to match the device's resource capabilities.
3Productivity
If multiple parallel restoration threads are used to improve restoration efficiency, then restoration efficiency improves, but device complexity increases
Solution Approach 1:
The patent segments the restoration work into multiple independent threads with clearly defined responsibilities. Each thread handles specific blocks based on the determined block size, making the overall complex process manageable through clear division of labor and reducing the complexity of coordination.
Data Source
AI summary
Embodiments of this application provide a differential file restoration method and an electronic device. In the method, a differential file includes at least one group of data compressed blocks, and data compressed blocks in each group are divided based on a preset block size before being compressed. When the electronic device performs restoration on the differential file, the electronic device first determines a parallel quantity k of restoration threads based on the block size and a size of RAM space, and then performs restoration processing on the differential file in parallel by using the k restoration threads, where each restoration thread performs restoration processing on the at least one group of data compressed blocks by using one group of RAM space corresponding to the restoration thread.


