MHTML Parsing via Boundary String Segmentation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing methods for processing webpages in archive formats like MHTML on mobile terminals are inefficient due to the need for complex decoding and encoding operations, particularly with base64 and quoted-printable formats, which hinder seamless display and storage of multimedia content.
Innovation Solution
A method and apparatus for mobile terminals that parse MHTML files to extract file header information, divide content into blocks, perform base64 and quoted-printable decoding, and display or encode them for storage, utilizing a processor and memory to handle HTML, CSS, and JavaScript data alongside images.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If complex decoding and encoding operations (base64, quoted-printable) are performed on MHTML files, then the webpage content can be processed and displayed, but the processing efficiency deteriorates and time consumption increases
Solution Approach 1:
The patent segments the MHTML file processing into distinct blocks separated by boundary strings. Each block contains specific content types (HTML, images, CSS, JavaScript) that are independently decoded using appropriate methods. This segmentation allows parallel processing of different content types and eliminates the need for sequential complex decoding of the entire file, thereby improving processing efficiency while maintaining reliable webpage display.
2Stability of the object's composition
If MHTML files are stored as single archive format, then all resources are consolidated, but the file size increases and storage efficiency deteriorates
Solution Approach 1:
The patent extracts image data from the MHTML archive and stores it in a separate, optimized image database rather than embedding it within the HTML structure. This extraction reduces the overall file size of the webpage archive while maintaining resource consolidation through centralized storage management. The boundary string delimiters enable efficient extraction without processing the entire archive structure.
3Ease of operation
If boundary strings are used to divide webpage content into blocks, then content organization is improved, but the parsing complexity increases
Solution Approach 1:
The patent introduces boundary strings as intermediary delimiters that clearly mark the beginning and end of different content blocks within the MHTML file. These standardized delimiters serve as a simple parsing mechanism that reduces complexity compared to nested structures or complex markup languages. The boundary strings enable straightforward identification and extraction of content blocks without requiring sophisticated parsing algorithms.
Data Source
AI summary
According to an example of the present disclosure, a mobile terminal recognizes a webpage in an archive format in a browser of the mobile terminal, parses the webpage in the archive format to obtain file header information, obtains boundary strings and a character encoding format according to the file header information, performs a content dividing and content decoding operation to the webpage in the archive format, and displays data obtained via the content dividing and content decoding operation in form of a webpage.


