Document Color Encoding for Logical Structure Preservation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Converting documents from one format to another often results in the loss of logical structure information, such as paragraph identification and character colors, when creating physical markup format documents from semantic or word processing documents.
Innovation Solution
A method involving the use of data structures to store and restore original colors and logical elements by coloring paragraphs with unique color pairs in the target format, allowing for the identification and preservation of these elements during the conversion process.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Loss of information
If document format conversion is performed using conventional methods, then the conversion process is simple and fast, but logical structure information and color information are lost
Solution Approach 1:
The patent applies preliminary action by assigning unique color pairs to mark paragraph boundaries and logical elements during the document conversion process. Before the actual format conversion occurs, the system colors the source document with specific color codes that encode paragraph identification information. This preliminary coloring ensures that when the document is converted to the target format, the logical structure information is already embedded and can be preserved without requiring complex post-processing steps.
Solution Approach 2:
The patent directly applies color changes as a technical means to encode and preserve logical structure information. By replacing original colors with specific color pairs during conversion, the system embeds paragraph identification data within the visual properties of the document. The color information serves as a carrier for logical structure data, allowing the target document to maintain references to original paragraphs while being in a different format.
2Loss of information
If color information is preserved during document conversion, then logical structure is maintained, but processing time and computational resources increase
Solution Approach 1:
The patent applies segmentation by dividing the color information into distinct color pairs, where each pair serves a specific function: one color marks the beginning of a paragraph while the other marks the end. This segmentation allows the system to process and preserve only the essential logical structure information rather than all color data, reducing computational overhead while maintaining the necessary paragraph identification capabilities throughout the conversion process.
Data Source
AI summary
A generated document is colored by replacing the original colors of a paragraph of a source document with colors used to identify the paragraph and with colors to mark original color boundaries. The colors used to identify the paragraph and the colors used to mark color boundaries include a pair of colors including a first replacement color and a second replacement color. Values identifying the original colors of the paragraph are stored, including by storing a list of colors corresponding to the original colors of the paragraph. A first character of the paragraph is colored with the first replacement color. A second character of the paragraph is colored with the second replacement color if the original color of the second character is the same as the original color of the first character. The second character of the paragraph is colored with the first replacement color if the original color of the second character is different from the original color of the first character. The colors of the source document are restored to the generated document, including by using the first replacement color as an index into the stored list of colors and coloring a first character of a paragraph of the generated document the indicated color from the stored list of colors.


