Application Package Splitting and Reassembly for Single-Request Downloads
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing application package splitting methods increase developer costs and user download time due to inappropriate splitting, requiring multiple download requests and inefficient download speeds.
Innovation Solution
A server-based method that automatically splits and reassembles application packages into a main and sub-packages, generating a header with mapping relationships and offsets, allowing clients to download the complete package with a single request.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of manufacture
If a developer performs application package splitting manually, then the application package can be divided into main package and sub-packages, but development costs increase and maintenance burden increases
Solution Approach 1:
The server automatically performs application package splitting based on page information, eliminating the need for manual developer intervention. The system self-services by autonomously dividing the application package into main package and sub-packages according to the mapping relationships stored in the database.
Solution Approach 2:
The manual mechanical process of developer-driven package splitting is replaced with an automated server-based system. The server uses stored page information to automatically determine split points and generate packages, substituting human labor with an automated computational system.
2Quantity of substance
If the application package is split into multiple sub-packages, then the user can download only needed parts, but the client needs to send multiple download requests which reduces download speed
Solution Approach 1:
The server pre-calculates and stores the mapping relationships between pages and packages in the database before user requests. When a user needs to download, the server quickly retrieves this pre-prepared information to determine which packages to send, avoiding real-time calculation delays and enabling rapid multi-package delivery.
Solution Approach 2:
The database acts as an intermediary between the server's package splitting logic and the user's download requests. It stores the mapping relationships that guide the server in efficiently selecting and delivering the appropriate main package and sub-packages based on user needs.
Data Source
Figure 1
Figure 2
Figure 3~4
AI summary
This application provides an application package splitting and reassembly method and apparatus, and an application package running method and apparatus. The application package splitting and reassembly method includes: splitting a first application package into a main package and at least one sub-package; storing the main package and the at least one sub-package in a first file, and determining offsets and sizes that are of the main package and the at least one sub-package in the first file; and generating a second application package corresponding to the application, where the second application package includes a header and the first file. After receiving an original application package, a server automatically performs splitting and reassembly on the original application package, to generate a complete new application package. In this way, a developer does not need to perform splitting or maintain a sub-package obtained through splitting, thereby reducing development costs of the developer. In addition, in a reassembly process, the main package and a plurality of sub-packages that are obtained through splitting are combined into one file. When performing downloading, a client only needs to send one download request to download the complete application package.