Browse Source

feat(docs): enhance workflow documentation with color coding for Mermaid diagrams

- Added a section detailing the color coding used in Mermaid flowcharts to improve understanding of processing steps.
- Updated flowchart styles to reflect the new color scheme, categorizing nodes by their function (core steps, output nodes, special markers, and replaceable components) for better visual clarity.
zhch158_admin 4 giờ trước cách đây
mục cha
commit
822d946ce9
1 tập tin đã thay đổi với 36 bổ sung2 xóa
  1. 36 2
      docs/ocr_tools/universal_doc_parser/模型统一框架.md

+ 36 - 2
docs/ocr_tools/universal_doc_parser/模型统一框架.md

@@ -49,6 +49,19 @@
 
 ---
 
+## 流程图颜色说明
+
+本文档中的 Mermaid 流程图采用统一的颜色规范,便于快速理解处理流程:
+
+| 颜色 | 十六进制值 | 用途说明 | 示例节点 |
+|------|----------|---------|---------|
+| **浅蓝色** | `#e1f5ff` | **核心处理步骤**:OCR识别、文本提取、Span匹配、坐标转换等关键处理节点 | 整页OCR、PDF文本提取、Span-Block匹配 |
+| **浅橙色** | `#fff4e1` | **输出/结果节点**:元素分类、格式输出、VLM识别结果等输出相关节点 | 元素分类、统一输出格式、VLM结构识别 |
+| **浅红色** | `#ffe1e1` | **特殊标记节点**:边缘过滤、后处理等需要特别注意的节点 | 边缘过滤、可替换组件标记 |
+| **红色边框** | `stroke:#ff0000` | **可替换组件**:可通过配置文件替换的组件节点 | 方向识别、Layout检测、表格识别器 |
+
+---
+
 ## 处理流程
 
 ### 主流程图(简化版)
@@ -109,7 +122,7 @@ graph TB
     E --> F{大文本块转表格?}
     
     F -->|是| G[面积占比判断<br/>转换为table类型]
-    F -->|否| H
+    F -->|否| H[Layout处理完成<br/>准备文本提取]
     G --> H
     
     H --> H1{PDF类型?}
@@ -152,8 +165,10 @@ graph TB
     S --> T[按阅读顺序排序]
     T --> U[坐标转换回原图]
     
+    style H fill:#e1f5ff
     style H2 fill:#e1f5ff
     style H3 fill:#e1f5ff
+    style H5 fill:#e1f5ff
     style K fill:#e1f5ff
     style L fill:#fff4e1
     style L1 fill:#fff4e1
@@ -294,10 +309,27 @@ graph TB
     F[坐标逆转换] --> G[回到原图坐标系]
     G --> H[返回表格元素]
     
+    style B fill:#e1f5ff
+    style B1 fill:#e1f5ff
+    style B2 fill:#e1f5ff
+    style B4 fill:#e1f5ff
+    style B5 fill:#e1f5ff
+    style B6 fill:#e1f5ff
+    style C1 fill:#fff4e1
     style D fill:#e1f5ff
+    style D1 fill:#e1f5ff
     style D3 fill:#e1f5ff
+    style D4 fill:#e1f5ff
+    style D4a fill:#e1f5ff
+    style D6 fill:#e1f5ff
+    style D7 fill:#e1f5ff
+    style D8 fill:#e1f5ff
     style D5 fill:#ffe1e1
-    style E1 fill:#fff4e1
+    style E1 fill:#e1f5ff
+    style E2 fill:#e1f5ff
+    style E3 fill:#fff4e1
+    style F fill:#e1f5ff
+    style G fill:#e1f5ff
 ```
 
 #### 表格分类(可选)
@@ -458,6 +490,8 @@ graph TB
     
     style C fill:#e1f5ff
     style D fill:#e1f5ff
+    style G fill:#e1f5ff
+    style H fill:#e1f5ff
 ```
 
 **处理优先级**: