5a553ddde3
feat(knowledge-graph): 实现知识图谱基础设施搭建
...
实现功能:
- Neo4j Docker Compose 配置(社区版,端口 7474/7687,数据持久化)
- Makefile 新增 Neo4j 命令(neo4j-up/down/logs/shell)
- knowledge-graph-service Spring Boot 服务(完整的 DDD 分层架构)
- kg_extraction Python 模块(基于 LangChain LLMGraphTransformer)
技术实现:
- Neo4j 配置:环境变量化密码,统一默认值 datamate123
- Java 服务:
- Domain: GraphEntity, GraphRelation 实体模型
- Repository: Spring Data Neo4j,支持 graphId 范围查询
- Service: 业务逻辑,graphId 双重校验,查询限流
- Controller: REST API,UUID 格式校验
- Exception: 实现 ErrorCode 接口,统一异常体系
- Python 模块:
- KnowledgeGraphExtractor 类
- 支持异步/同步/批量抽取
- 支持 schema-guided 模式
- 兼容 OpenAI 及自部署模型
关键设计:
- graphId 权限边界:所有实体操作都在正确的 graphId 范围内
- 查询限流:depth 和 limit 参数受配置约束
- 异常处理:统一使用 BusinessException + ErrorCode
- 凭据管理:环境变量化,避免硬编码
- 双重防御:Controller 格式校验 + Service 业务校验
代码审查:
- 经过 3 轮 Codex 审查和 2 轮 Claude 修复
- 所有 P0 和 P1 问题已解决
- 编译通过,无阻塞性问题
文件变更:
- 新增:Neo4j 配置、knowledge-graph-service(11 个 Java 文件)、kg_extraction(3 个 Python 文件)
- 修改:Makefile、pom.xml、application.yml、pyproject.toml
2026-02-17 20:42:55 +08:00
71f8f7d1c3
feat: 实现任务拆分和分配功能
...
## 功能概述
实现完整的任务拆分、分配和进度跟踪功能,支持将任务拆分为子任务并分配给不同用户。
## Phase 1: 数据库层
- 新增 t_task_meta 表(任务元数据协调表)
- 新增 t_task_assignment_log 表(分配日志表)
- 新增 3 个权限条目(read/write/assign)
- 新增 SQLAlchemy ORM 模型
## Phase 2: 后端 API (Java)
- 新增 task-coordination-service 模块(32 个文件)
- 实现 11 个 API 端点:
- 任务查询(列表、子任务、我的任务)
- 任务拆分(支持 4 种策略)
- 任务分配(单个、批量、重新分配、撤回)
- 进度管理(查询、更新、聚合)
- 分配日志
- 集成权限控制和路由规则
## Phase 3: 前端 UI (React + TypeScript)
- 新增 10 个文件(模型、API、组件、页面)
- 实现 5 个核心组件:
- SplitTaskDialog - 任务拆分对话框
- AssignTaskDialog - 任务分配对话框
- BatchAssignDialog - 批量分配对话框
- TaskProgressPanel - 进度面板
- AssignmentLogDrawer - 分配记录
- 实现 2 个页面:
- TaskCoordination - 任务管理主页
- MyTasks - 我的任务页面
- 集成侧边栏菜单和路由
## 问题修复
- 修复 getMyTasks 分页参数缺失
- 修复子任务 assignee 信息缺失(批量查询优化)
- 修复 proportion 精度计算(余量分配)
## 技术亮点
- 零侵入设计:通过独立协调表实现,不修改现有模块
- 批量查询优化:避免 N+1 查询问题
- 4 种拆分策略:按比例/数量/文件/手动
- 进度自动聚合:子任务更新自动聚合到父任务
- 权限细粒度控制:read/write/assign 三级权限
## 验证
- Maven 编译:✅ 零错误
- TypeScript 编译:✅ 零错误
- Vite 生产构建:✅ 成功
2026-02-09 00:42:34 +08:00
hefanli
63f4e3e447
refactor: modify data collection to python implementation ( #214 )
...
* feature: LabelStudio jumps without login
* refactor: modify data collection to python implementation
* refactor: modify data collection to python implementation
* refactor: modify data collection to python implementation
* refactor: modify data collection to python implementation
* refactor: modify data collection to python implementation
* refactor: modify data collection to python implementation
* fix: remove terrabase dependency
* feature: add the collection task executions page and the collection template page
* fix: fix the collection task creation
* fix: fix the collection task creation
2025-12-30 18:48:43 +08:00
hhhhsc701
d82bff441a
fix: prevent deletion of predefined operators and improve error handling ( #192 )
...
* fix: prevent deletion of predefined operators and improve error handling
* fix: prevent deletion of predefined operators and improve error handling
2025-12-22 19:30:41 +08:00
hefanli
e5b28c26b1
add gateway ( #187 )
...
* feature: add gateway
2025-12-22 15:41:17 +08:00