Differential Program Update Using Matching and Operation Sequences
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing program update methods using differential packages are inefficient in terms of traffic usage and storage requirements, particularly for intelligent terminals with limited storage capacity, as they require generating a complete new program file and replacing the old one, which can exceed storage limits.
Innovation Solution
A method involving determining a matching sequence and operation sequence for program files of different versions to generate a differential package that allows direct restoration of the newer program file by moving and modifying character strings in the older file, reducing storage occupancy and improving efficiency.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If a complete new program file is generated and replaced, then program update reliability is ensured, but storage occupancy increases and update speed decreases
Solution Approach 1:
The program file is segmented into character strings, and only the differing portions (non-matching fields) are transmitted in the differential package. The terminal reconstructs the new program file by applying these differences to the existing file, avoiding the need to store the complete new program file.
Solution Approach 2:
The patent extracts only the essential difference information (non-matching character strings) from the complete program file comparison. The differential package contains only these extracted differences, not the entire program file, thereby reducing storage requirements while maintaining update reliability.
2Reliability
If a complete new program file is generated and replaced, then program update reliability is ensured, but update speed decreases
Solution Approach 1:
The patent extracts only the essential difference information (non-matching character strings) from the complete program file comparison. The differential package contains only these extracted differences, not the entire program file, thereby reducing storage requirements while maintaining update reliability.
Solution Approach 2:
The server performs the time-consuming program file comparison and differential calculation in advance before the update operation. By pre-computing the matching sequence and operation sequence, the actual update process at the terminal is accelerated, as it only needs to apply the pre-calculated differences rather than performing a complete file replacement.
3Quantity of substance
If differential package size is reduced, then traffic cost decreases, but generation time increases
Solution Approach 1:
The server performs the time-consuming program file comparison and differential calculation in advance before the update operation. By pre-computing the matching sequence and operation sequence, the actual update process at the terminal is accelerated, as it only needs to apply the pre-calculated differences rather than performing a complete file replacement.
Solution Approach 2:
The patent changes the parameter of character string ordering by introducing the operation sequence that rearranges character strings based on their matching relationships. This reordering enables more efficient differential encoding, reducing the differential package size while the server's pre-computation compensates for the additional processing time required.
4Manufacturing precision
If character strings are moved in a specific order, then character string overlap is avoided, but operation complexity increases
Solution Approach 1:
The server performs the time-consuming program file comparison and differential calculation in advance before the update operation. By pre-computing the matching sequence and operation sequence, the actual update process at the terminal is accelerated, as it only needs to apply the pre-calculated differences rather than performing a complete file replacement.
Solution Approach 2:
The patent introduces the operation sequence as an intermediary structure that mediates between the matching sequence and the actual character string movement. This operation sequence, which includes operation types (move, copy, delete) and positions, simplifies the terminal's restoration process by providing a clear, step-by-step instruction set that avoids character string overlaps without requiring complex real-time calculations.
Data Source
Figure 1~2
Figure 3~5
Figure 6
AI summary
This application discloses a program update method and apparatus, a device, a storage medium, and a computer program, and pertains to the field of intelligent terminals. The method includes: determining a matching sequence based on a first program file and a second program file, where the matching sequence includes a plurality of mutual matching fields, a plurality of self-matching fields, and a plurality of non-matching fields; and determining an operation sequence based on the plurality of mutual matching fields, and generating a differential package based on the matching sequence, the operation sequence, and a non-matching data stream. A same character string in program files of different versions of a same program is determined based on the program files of different versions, to obtain the matching sequence that includes the plurality of mutual matching fields, the plurality of self-matching fields, and the plurality of non-matching fields, and the operation sequence that indicates an execution order of the mutual matching fields. The matching sequence, the operation sequence, and the non-matching data stream are encoded, so that the differential package can be generated more quickly, and a faster and more traffic-saving program update can be implemented.