From 48644c662f5ae83cb33058909c7a41866f6b0dd3 Mon Sep 17 00:00:00 2001 From: liangguodong Date: Thu, 5 Feb 2026 19:04:40 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E9=87=8D=E5=86=99=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E8=A1=8D=E7=94=9F=E6=B5=81=E7=A8=8B=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 5fe7a0d..5f1089d 100644 --- a/README.md +++ b/README.md @@ -13,14 +13,30 @@ ## 标签衍生流程 -![标签衍生流程图](docs/tag_derive_flow.png) +``` +1. 查询数据库 + └─ SELECT * FROM ai_image_tags WHERE status='tag_extension' -**流程说明:** -1. 遍历 `ai_image_tags` 表中每一条图片记录 -2. 用 `tag_id` 查询 `ai_tags` 表,检查该标签是否为衍生标签 -3. 如果不是衍生标签,调用千问大模型生成衍生标签 -4. 将新标签插入 `ai_tags` 表(标记为衍生标签) -5. 更新 `ai_image_tags` 表中的 `tag_id` 和 `tag_name` +2. 拼接图片URL + └─ 完整URL = CDN基础URL + image_url + +3. 按10张分组,并发发送请求 + ├─ Prompt:图片1: ID=123, 原始标签「高血压」, 关键字「心血管」 + ├─ Prompt:图片2: ID=124, 原始标签「糖尿病」, 关键字「内分泌」 + └─ + 10张原图URL + +4. 大模型返回衍生标签 + └─ {"results": [{"id": 123, "derived_tags": ["衍生1", "衍生2"]}]} + +5. 更新数据库 + ├─ ai_tags表:INSERT 衍生标签 + ├─ ai_image_tags表:UPDATE tag_id, tag_name + └─ status: tag_extension → manual_review + +6. 审核失败处理(DataInspectionFailed) + ├─ status → automated_review_failed + └─ 记录失败原因到 automated_review_failed_reason +``` ## 项目结构