架构重构:拆分 core/ops/DBManager,统一 SQLite 锁,DEB 改进,新增注意力模型

- web/core.py 858→236行,拆出 schemas/middleware/auth/diagnostics
- ops_api.py 2876→4个 domain 模块 (users/payments/health/config)
- DBManager Supabase HTTP 调用提取到 SupabaseAdminClient
- 新增 LockedSQLiteConnection 统一多进程读写锁
- 新增 WeatherCacheManager 替代 12 个独立缓存字典
- METAR 缓存迁移至统一缓存管理器
- analysis_service 提取 _build_intraday_meteorology 到独立模块
- DEB 改进:偏差惩罚、分歧回退、自适应 lookback (MAE ↓12.6%)
- 新增 PyTorch 注意力模型 deb_attention.py (数据积累后启用)
- 新增 torch 到 requirements.lock
This commit is contained in:
2569718930@qq.com
2026-06-16 02:00:22 +08:00
parent ed0447f408
commit dca4f2d618
26 changed files with 5010 additions and 3974 deletions
+4
View File
@@ -109,6 +109,10 @@ multidict==6.7.1
netcdf4==1.7.4
# via -r requirements.txt
numpy==2.4.6
torch @ https://download.pytorch.org/whl/cpu/torch-2.5.1%2Bcpu-cp311-cp311-manylinux_2_28_x86_64.whl ; python_version >= "3.11"
typing_extensions==4.15.0
# via torch
# via
# -r requirements.txt
# cftime