跳转至

ADR-001:WiFi-Mat 灾难检测架构

状态

已接受

日期

2026-01-13

背景

地震、建筑倒塌、雪崩和洪水等自然灾害会将受害者困在瓦砾或碎片之下。使用目视检查、热成像相机或声学设备的传统搜救方法存在显著局限性:

  • 视觉/光学:无法穿透瓦砾、碎片或倒塌结构
  • 热成像:穿透深度有限,受环境温度影响
  • 声学:需要受害者发出声音,误报率高
  • K9 搜救犬:可用性有限、易疲劳、存在环境危险

基于 WiFi 的感知具有独特优势:射频信号可以穿透非金属碎片(混凝土、木材、石膏板),并通过信道状态信息(CSI)分析检测细微人体运动,包括呼吸模式和心跳。

问题陈述

我们需要对 WiFi-DensePose Rust 实现进行模块化扩展,使其能够:

  1. 在灾难场景中高灵敏度地检测人体存在
  2. 在瓦砾/碎片区域中定位幸存者
  3. 分类受害者状态(有意识运动、仅呼吸、危重)
  4. 向救援团队提供实时警报
  5. 在降级/野外条件下使用便携式硬件运行

决策

我们将创建一个新的 crate wifi-densepose-mat(大规模伤亡评估工具),作为现有 Rust 工作区的模块化扩展,架构如下:

1. 领域驱动设计(DDD)方法

该模块遵循 DDD 原则,具有清晰的限界上下文:

wifi-densepose-mat/
├── src/
│   ├── domain/           # Core domain entities and value objects
│   │   ├── survivor.rs   # Survivor entity with status tracking
│   │   ├── disaster_event.rs  # Disaster event aggregate root
│   │   ├── scan_zone.rs  # Geographic zone being scanned
│   │   └── alert.rs      # Alert value objects
│   ├── detection/        # Life sign detection bounded context
│   │   ├── breathing.rs  # Breathing pattern detection
│   │   ├── heartbeat.rs  # Micro-doppler heartbeat detection
│   │   ├── movement.rs   # Gross/fine movement classification
│   │   └── classifier.rs # Multi-modal victim classifier
│   ├── localization/     # Position estimation bounded context
│   │   ├── triangulation.rs  # Multi-AP triangulation
│   │   ├── fingerprinting.rs # CSI fingerprint matching
│   │   └── depth.rs      # Depth/layer estimation in rubble
│   ├── alerting/         # Notification bounded context
│   │   ├── priority.rs   # Triage priority calculation
│   │   ├── dispatcher.rs # Alert routing and dispatch
│   │   └── protocols.rs  # Emergency protocol integration
│   └── integration/      # Anti-corruption layer
│       ├── signal_adapter.rs  # Adapts wifi-densepose-signal
│       └── nn_adapter.rs      # Adapts wifi-densepose-nn

2. 核心架构决策

2.1 事件驱动架构

  • 所有幸存者检测都会发出领域事件
  • 事件支持事后分析的审计跟踪和重放
  • 支持多个扫描团队的分布式部署

2.2 可配置检测流水线

pub struct DetectionPipeline {
    breathing_detector: BreathingDetector,
    heartbeat_detector: HeartbeatDetector,
    movement_classifier: MovementClassifier,
    ensemble_classifier: EnsembleClassifier,
}

2.3 分诊分类(兼容 START 协议)

状态 检测标准 优先级
立即(红色) 检测到呼吸,无运动 P1
延迟(黄色) 运动 + 呼吸,生命体征稳定 P2
轻微(绿色) 强烈运动,有反应模式 P3
死亡(黑色) 连续扫描 >30 分钟无生命体征 P4

2.4 硬件抽象

支持多种部署场景:

  • 便携式:单 TX/RX 手持设备
  • 分布式:在倒塌现场周围部署多个 AP
  • 无人机搭载:基于 UAV 的大面积扫描
  • 车载:带天线阵列的移动指挥所

3. 集成策略

该模块通过适配器与现有 crate 集成:

┌─────────────────────────────────────────────────────────────┐
│                    wifi-densepose-mat                        │
├─────────────────────────────────────────────────────────────┤
│  ┌─────────────┐  ┌─────────────┐  ┌─────────────────────┐  │
│  │  Detection  │  │ Localization│  │      Alerting       │  │
│  │  Context    │  │   Context   │  │      Context        │  │
│  └──────┬──────┘  └──────┬──────┘  └──────────┬──────────┘  │
│         │                │                     │             │
│         └────────────────┼─────────────────────┘             │
│                          │                                   │
│              ┌───────────▼───────────┐                       │
│              │   Integration Layer   │                       │
│              │  (Anti-Corruption)    │                       │
│              └───────────┬───────────┘                       │
└──────────────────────────┼───────────────────────────────────┘
                           │
        ┌──────────────────┼──────────────────┐
        │                  │                  │
        ▼                  ▼                  ▼
┌───────────────┐  ┌───────────────┐  ┌───────────────┐
│wifi-densepose │  │wifi-densepose │  │wifi-densepose │
│    -signal    │  │     -nn       │  │   -hardware   │
└───────────────┘  └───────────────┘  └───────────────┘

4. 性能要求

指标 目标 理由
检测延迟 <500ms 为救援人员提供实时反馈
误报率 <5% 最大限度减少浪费的救援努力
漏报率 <1% 不能遗漏幸存者
穿透深度 3-5m 典型瓦砾堆深度
电池续航(便携式) >8 小时 完整班次运行
并发区域 16+ 大型灾难现场覆盖

5. 安全性与可靠性

  • 故障安全默认值:在模糊信号下始终假定存在生命
  • 冗余检测:多个算法对存在性进行投票
  • 持续监测:定期重新扫描区域
  • 离线运行:无网络时具备完整功能
  • 审计日志:完整记录所有检测事件

后果

积极影响

  • 模块化设计支持独立开发和测试
  • DDD 确保领域专家可以验证逻辑
  • 事件驱动支持分布式部署
  • 适配器隔离上游变更
  • 与现有 WiFi-DensePose 基础设施兼容

负面影响

  • 事件系统带来额外复杂性
  • 救援团队存在学习曲线
  • 需要针对不同碎片类型进行校准
  • 灾区存在射频干扰

风险与缓解措施

风险 缓解措施
金属碎片阻挡信号 多角度扫描、自适应频率
环境射频干扰 频谱感知、跳频
动物引起的误报 尺寸/模式分类
现场电力受限 低功耗模式、太阳能充电

参考资料

本页原文 Markdown:在 AtomGit 查看·内容源自开源项目 wi/RuView