Files
iot-device-management-service/README.md
16337 baa895a6f1 feat: 初始化告警平台后端项目
- 创建 FastAPI 项目结构
- 实现告警数据模型(SQLAlchemy)
- 实现 multipart/form-data 告警接收接口
- 实现阿里云 OSS 图片上传模块
- 实现告警查询和处理 API
- 实现异步大模型分析模块
2026-02-02 09:40:02 +08:00

51 lines
1.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# AI 告警平台
轻量级告警接收与处理平台,接收边缘端告警数据,存储到数据库并提供可视化查询能力。
## 功能特性
- 告警接收:支持边缘端通过 multipart/form-data 上报告警
- 图片存储:阿里云 OSS 对象存储
- 告警管理:查询、筛选、处理告警
- 大模型分析:异步告警智能分析
## 快速开始
```bash
# 安装依赖
pip install -r requirements.txt
# 配置环境变量
cp .env.example .env
# 编辑 .env 文件,配置数据库和 OSS
# 启动服务
python -m app.main
```
## 项目结构
```
alert_platform/
├── app/
│ ├── main.py # FastAPI 入口
│ ├── config.py # 配置
│ ├── models.py # 数据模型
│ ├── schemas.py # Pydantic 模型
│ ├── api/
│ │ └── alert.py # 告警 API
│ ├── services/
│ │ ├── alert_service.py # 告警业务
│ │ └── oss_storage.py # OSS 存储
│ └── utils/
│ └── logger.py # 日志工具
├── data/ # 数据库目录
├── uploads/ # 本地临时存储
├── requirements.txt
└── .env.example
```
## API 文档
启动后访问http://localhost:8000/docs