ragserver/README.md
yumoqing 254bf8e9b2 feat: initial ragserver - web app skeleton with data models, CRUD, and build scripts
- ahserver web app on port 9190
- DB: rag (test/test123, utf8mb4)
- 7 data models: knowledge_bases, documents, document_chunks, entities, entity_relations, subscriptions, engine_configs, usage_logs
- 4 CRUD definitions: knowledge_bases, documents, subscriptions, engine_configs
- build.sh clones all foundation modules + rag-pipeline + services
- independent venv, bricks frontend, RBAC support
2026-07-21 17:00:53 +08:00

3.4 KiB

RAG Server — 多媒体知识库 SaaS 平台

概述

RagServer 是一个独立的多媒体 RAG (检索增强生成) SaaS Web 应用。支持文本、图片、音频、视频文件的拖拽上传,自动向量化入库,人脸识别,声纹识别,知识图谱构建,以及统一的混合检索。

架构

┌─────────────────────────────────────────────────────┐
│                    RagServer (:9190)                 │
│  ┌──────────┐  ┌──────────┐  ┌──────────────────┐  │
│  │ RBAC 鉴权 │  │ 订阅容量  │  │ 拖拽上传 UI      │  │
│  │ 多租户隔离 │  │ quota 管控│  │ 知识库/文档 CRUD │  │
│  └──────────┘  └──────────┘  └──────────────────┘  │
│                         │                           │
│              ┌──────────┴──────────┐                │
│              │   rag-pipeline 引擎  │                │
│              │   ingest / search   │                │
│              └──────────┬──────────┘                │
└─────────────────────────┼───────────────────────────┘
                          │
    ┌─────────┬───────────┼───────────┬─────────┐
    ▼         ▼           ▼           ▼         ▼
┌───────┐ ┌───────┐ ┌─────────┐ ┌───────┐ ┌──────────┐
│ CLIP  │ │  VDB  │ │  Graph  │ │Rerank │ │  Face    │
│ 9086  │ │ 8886  │ │  9092   │ │ 9090  │ │  9091    │
└───────┘ └───────┘ └─────────┘ └───────┘ └──────────┘

数据库

  • 数据库名: rag
  • 用户: test / 密码: test123
  • 字符集: utf8mb4

模块结构

模块 说明 仓库
ragserver 主 Web 应用 yumoqing/ragserver
rag-pipeline RAG 管线引擎 yumoqing/rag-pipeline
clip_embedding 多模态向量化 (CLIP ViT-H-14) yumoqing/clip_embedding
vdb 向量数据库 (Milvus Lite) yumoqing/vdb
bge-reranker 文本重排 (BGE Reranker v2-m3) yumoqing/bge-reranker
face-service 人脸识别 (InsightFace) yumoqing/face-service
graph-service 图数据库 (NetworkX) yumoqing/graph-service
ner-service 命名实体识别 (GLiNER) yumoqing/ner-service
speaker-id 声纹识别 (ECAPA-TDNN) yumoqing/speaker-id

部署

# 测试服务器
ssh apitest@tokentest.opencomputing.cn
cd ~/ragserver
git pull && bash build.sh && ./stop.sh && ./start.sh

数据模型

  • knowledge_bases — 知识库
  • documents — 文档 (文本/图片/音频/视频)
  • document_chunks — 文档分片
  • subscriptions — 租户订阅 (磁盘容量/文档数/API调用量)
  • engine_configs — 引擎配置 (支持租户级覆盖)
  • usage_logs — 用量日志