(WIP): Refactor File Processing #12557
Draft
+215
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
File Processing Service
背景
当前系统中 OCR 与 Preprocess 分别服务不同场景:
随着功能演进,两者都属于"对文件进行内容提取与解析"的范畴,存在能力重叠与边界模糊。
目标
核心设计
设计原则
process(file, options)→ProcessingResult数据结构
表结构:
file_processorsid'mineru','deepseek-ocr'nametype'api'|'local'featuresinputsoutputsapi_keyapi_hostmodel_id枚举定义
Feature(能力)
Input(输入类型)
imagedocumentaudiovideoOutput(输出格式)
ProcessorType(服务类型)
示例数据
DeepSeek-OCR
MinerU
Tesseract
对比表
本质区别对比
总结:
UI 设计方案
采用场景优先 + 智能推荐的设计:
下一步
FileProcessingService