你是一个智能家居安全分析 AI 助手。你的职责是分析智能家居设备的状态日志，判断是否存在安全威胁或异常情况。

你需要基于以下能力进行分析：
1. 从设备状态变化中识别异常模式
2. 结合时间、住户习惯、设备类型进行推理
3. 区分真实威胁和正常行为（减少误报）
4. 对发现的问题给出具体的风险评估和建议

所有设备基于 Matter 协议标准，设备状态通过 Cluster.Attribute 的形式报告。

## 家庭环境信息
家庭布局: 独居老人 (Elderly Living Alone)
- 重点房间 living_room: 客厅灯[dimmable_light], 客厅空调[air_conditioner], 客厅温度传感器[temperature_sensor], 客厅运动传感器[occupancy_sensor], 客厅窗帘[window_covering], 客厅窗户传感器[contact_sensor], 客厅烟雾报警器[smoke_co_alarm]
- 房间 bathroom: 卫生间灯[onoff_light], 卫生间运动传感器[occupancy_sensor], 卫生间漏水传感器[water_leak_detector]
- 房间 bedroom: 卧室灯[dimmable_light], 床头灯[onoff_light], 卧室运动传感器[occupancy_sensor], 卧室窗帘[window_covering], 卧室窗户传感器[contact_sensor], 卧室温度传感器[temperature_sensor]
- 房间 entrance: 入户门锁[door_lock], 入户门传感器[contact_sensor], 玄关灯[onoff_light], 玄关运动传感器[occupancy_sensor]
- 房间 kitchen: 厨房灯[onoff_light], 厨房灶具[cook_surface], 厨房烟雾报警器[smoke_co_alarm], 厨房温度传感器[temperature_sensor], 厨房运动传感器[occupancy_sensor], 厨房漏水传感器[water_leak_detector]

## 已选日志说明
以下日志不是整天原始全量心跳，而是围绕关键设备、关键时间窗和跨天模式筛出的训练片段。
- 任务类型: SQ1
- 重点房间: living_room
- 重点设备: living_room_ac
- 已选事件数: 123

## 设备事件日志
[2026-08-22T03:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2365
[2026-08-22T03:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2366
[2026-08-22T03:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-08-22T03:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2401
[2026-08-22T04:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2403
[2026-08-22T04:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2407
[2026-08-22T04:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2418
[2026-08-22T05:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2447
[2026-08-22T05:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2453
[2026-08-22T05:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-08-22T05:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2471
[2026-08-22T06:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2479
[2026-08-22T06:02:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-22T06:04:05] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-08-22T06:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2473
[2026-08-22T06:15:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2475
[2026-08-22T06:20:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2380
[2026-08-22T06:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2486
[2026-08-22T06:29:05] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-08-22T06:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-08-22T06:35:00] kitchen_cook_surface | OnOff.OnOff = False
[2026-08-22T06:35:37] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-22T06:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2488
[2026-08-22T06:47:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-22T06:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2493
[2026-08-22T06:55:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2393
[2026-08-22T06:56:02] front_door_lock | DoorLock.LockState = 2
[2026-08-22T06:56:12] front_door_lock | Event: LockOperation(LockOperationType=0, OperationSource=Manual)
[2026-08-22T07:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2510
[2026-08-22T07:01:05] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-22T07:05:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2398
[2026-08-22T07:07:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-22T07:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2517
[2026-08-22T07:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2507
[2026-08-22T07:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2523
[2026-08-22T07:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2515
[2026-08-22T07:27:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-22T07:30:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2512
[2026-08-22T07:34:05] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-08-22T07:35:37] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-22T07:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2512
[2026-08-22T07:45:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2527
[2026-08-22T07:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2521
[2026-08-22T07:52:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-22T07:55:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2528
[2026-08-22T08:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2532
[2026-08-22T08:01:05] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-22T08:05:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2434
[2026-08-22T08:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2524
[2026-08-22T08:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2544
[2026-08-22T08:17:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-22T08:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2529
[2026-08-22T08:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2545
[2026-08-22T08:27:00] front_door_lock | Event: LockOperation(LockOperationType=1, OperationSource=Manual)
[2026-08-22T08:27:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-22T08:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2547
[2026-08-22T08:35:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2441
[2026-08-22T08:40:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2446
[2026-08-22T08:42:08] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-22T08:45:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2536
[2026-08-22T08:49:05] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-08-22T08:52:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-22T08:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2543
[2026-08-22T08:57:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-22T09:00:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2436
[2026-08-22T09:00:00] living_room_ac | Event: DeviceOffline()
[2026-08-22T09:02:00] living_room_ac | Event: DeviceOnline()
[2026-08-22T09:02:08] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-22T09:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2553
[2026-08-22T09:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2550
[2026-08-22T09:14:05] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-08-22T09:17:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-22T09:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2548
[2026-08-22T09:22:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-22T09:25:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2455
[2026-08-22T09:27:08] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-22T09:30:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2558
[2026-08-22T09:34:05] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-08-22T09:35:37] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-22T09:42:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-22T09:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2549
[2026-08-22T09:47:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-22T09:52:08] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-22T09:55:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2542
[2026-08-22T09:59:05] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-08-22T10:02:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-22T10:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2553
[2026-08-22T10:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2547
[2026-08-22T10:12:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-22T10:15:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2442
[2026-08-22T10:17:08] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-22T10:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2540
[2026-08-22T10:24:05] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-08-22T10:27:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-22T10:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2558
[2026-08-22T10:32:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-22T10:35:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2452
[2026-08-22T10:40:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2451
[2026-08-22T10:42:08] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-22T10:45:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2555
[2026-08-22T10:49:05] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-08-22T10:52:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-22T10:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2541
[2026-08-22T10:57:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-22T11:00:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2435
[2026-08-22T11:02:08] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-22T11:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2546
[2026-08-22T11:09:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = None
[2026-08-22T11:12:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-22T11:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2534
[2026-08-22T11:17:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-22T11:20:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2449
[2026-08-22T11:22:08] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-22T11:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2538
[2026-08-22T11:28:00] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-08-22T11:32:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-22T11:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2530
[2026-08-22T11:40:00] kitchen_cook_surface | OnOff.OnOff = False
[2026-08-22T11:41:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = None
[2026-08-22T11:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2535
[2026-08-22T11:52:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-22T11:55:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2432
[2026-08-22T11:57:08] living_room_occupancy | OccupancySensing.Occupancy = 1

## 任务
请结合下面的 Matter 设备日志，判断是否存在设备健康问题，并说明可能的故障类型。

请按以下 JSON 格式回答：

```json
{
  "is_anomaly": true/false,
  "confidence": "high/medium/low",
  "threat_type": "具体威胁类型，从以下选择：intrusion / tailgating / credential_theft / fire_risk / unattended_cooking / carbon_monoxide / sensor_stuck / sensor_drift / sensor_malfunction / actuator_stuck / lock_malfunction / safety_device_failure / water_leak / possible_fall / abnormal_inactivity / health_concern / child_safety / behavioral_anomaly / none",
  "threat_description": "一句话描述发现的问题或确认安全",
  "reasoning": [
    "推理步骤1: ...",
    "推理步骤2: ...",
    "推理步骤3: ..."
  ],
  "key_evidence": [
    "关键证据1",
    "关键证据2"
  ],
  "recommended_actions": [
    "建议措施1",
    "建议措施2"
  ]
}
```

如果判断为正常（无异常），is_anomaly 设为 false，threat_type 设为 "none"，并在 reasoning 中说明为什么这些事件是正常的。

{
  "is_anomaly": false,
  "confidence": "medium",
  "threat_type": "none",
  "threat_description": "当前日志更符合正常模式，不建议报警。",
  "reasoning": [
    "推理步骤1: 正常样本是一次性短暂重连；异常样本在短时间内反复抖动。"
  ],
  "key_evidence": [
    "正常样本是一次性短暂重连；异常样本在短时间内反复抖动。"
  ],
  "recommended_actions": [
    "继续监测，无需立即处置。"
  ]
}

```json
{
  "is_anomaly": true,
  "confidence": "high",
  "threat_type": "sensor_malfunction",
  "threat_description": "客厅温度传感器出现严重数据漂移和归零故障，导致无法准确监测室内环境，存在安全隐患。",
  "reasoning": [
    "推理步骤 1: 分析时间序列数据发现，从 03:00 到 08:25，客厅温度传感器读数持续异常升高（从 23.65°C 升至 25.45°C），且数值增长速率远超正常物理升温规律（例如 04:40 至 05:00 仅 15 分钟内上升近 30 度），这表明传感器读数已不可信，存在严重的传感器漂移或校准失效。",
    "推理步骤 2: 在 11:09 和 11:41，厨房温度传感器连续两次报告 `None` 值，随后在 11:50 恢复但数值波动剧烈，显示该传感器也存在间歇性故障或通信中断问题。",
    "推理步骤 3: 考虑到住户为独居老人，且日志中记录了空调设备在 09:00 短暂离线后重启，若此时依赖的温控传感器本身已损坏或数据错误，可能导致空调系统误判室温而停止制冷/制热，进而引发室内过热风险，对老人健康构成威胁。"
  ],
  "key_evidence": [
    "living_room_temp_sensor 在 04:40-05:00 期间温度读数激增约 27 度，不符合物理规律。",
    "kitchen_temp_sensor 在 11:09 和 11:41 连续报告 None 值，表明传感器功能不稳定。",
    "独居老人居住环境缺乏人工实时干预，传感器故障将直接导致环境监控盲区。"
  ],
  "recommended_actions": [
    "立即安排技术人员上门检查并更换客厅及厨房的温度传感器。",
    "在维修完成前，建议老人暂时避免长时间待在客厅，或手动开启窗户通风以防过热。",
    "检查智能家居网关与传感器的连接稳定性，排除因网络干扰导致的 `None` 值上报。"
  ]
}
```


你是一个智能家居安全分析 AI 助手。你的职责是分析智能家居设备的状态日志，判断是否存在安全威胁或异常情况。

你需要基于以下能力进行分析：
1. 从设备状态变化中识别异常模式
2. 结合时间、住户习惯、设备类型进行推理
3. 区分真实威胁和正常行为（减少误报）
4. 对发现的问题给出具体的风险评估和建议

所有设备基于 Matter 协议标准，设备状态通过 Cluster.Attribute 的形式报告。

## 家庭环境信息
家庭布局: 一室一厅 (Studio/1BR)
- 重点房间 living_room: 客厅主灯[dimmable_light], 客厅台灯[onoff_light], 客厅空调[air_conditioner], 客厅温度传感器[temperature_sensor], 客厅运动传感器[occupancy_sensor], 客厅窗帘[window_covering], 客厅窗户传感器[contact_sensor]
- 房间 bathroom: 卫生间灯[onoff_light], 卫生间运动传感器[occupancy_sensor], 卫生间漏水传感器[water_leak_detector]
- 房间 bedroom: 卧室灯[dimmable_light], 卧室运动传感器[occupancy_sensor], 卧室窗帘[window_covering], 卧室窗户传感器[contact_sensor], 卧室温度传感器[temperature_sensor]
- 房间 entrance: 入户门锁[door_lock], 入户门传感器[contact_sensor], 玄关灯[onoff_light]
- 房间 kitchen: 厨房灯[onoff_light], 厨房灶具[cook_surface], 厨房烟雾报警器[smoke_co_alarm], 厨房温度传感器[temperature_sensor], 厨房窗户传感器[contact_sensor], 洗碗机[dishwasher]

## 已选日志说明
以下日志不是整天原始全量心跳，而是围绕关键设备、关键时间窗和跨天模式筛出的训练片段。
- 任务类型: SQ1
- 重点房间: living_room
- 重点设备: living_room_ac
- 已选事件数: 123

## 设备事件日志
[2026-07-13T03:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2354
[2026-07-13T03:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2378
[2026-07-13T03:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2371
[2026-07-13T03:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2388
[2026-07-13T03:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2392
[2026-07-13T04:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-13T04:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2404
[2026-07-13T04:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2422
[2026-07-13T04:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2432
[2026-07-13T05:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2436
[2026-07-13T05:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2461
[2026-07-13T05:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-13T05:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2468
[2026-07-13T06:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-13T06:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2475
[2026-07-13T06:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2479
[2026-07-13T06:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2473
[2026-07-13T06:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2486
[2026-07-13T06:28:08] bathroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-13T06:30:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2393
[2026-07-13T06:30:00] bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-13T06:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2497
[2026-07-13T06:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2486
[2026-07-13T06:42:10] bedroom_window | WindowCovering.CurrentPositionLiftPercent100ths = 0
[2026-07-13T06:45:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2408
[2026-07-13T06:47:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-13T06:48:28] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-13T06:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2500
[2026-07-13T06:55:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2409
[2026-07-13T07:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2506
[2026-07-13T07:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-13T07:05:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2418
[2026-07-13T07:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2512
[2026-07-13T07:12:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-13T07:15:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2502
[2026-07-13T07:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2519
[2026-07-13T07:21:00] kitchen_light | OnOff.OnOff = False
[2026-07-13T07:21:20] front_door_lock | DoorLock.LockState = 2
[2026-07-13T07:21:24] front_door_lock | Event: LockOperation(LockOperationType=0, OperationSource=Manual)
[2026-07-13T07:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2525
[2026-07-13T07:30:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2524
[2026-07-13T07:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2526
[2026-07-13T07:37:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-13T07:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2512
[2026-07-13T07:45:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2418
[2026-07-13T07:48:28] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-13T07:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2533
[2026-07-13T07:55:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2437
[2026-07-13T08:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-13T08:05:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2428
[2026-07-13T08:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2543
[2026-07-13T08:12:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-13T08:15:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2531
[2026-07-13T08:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2541
[2026-07-13T08:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2542
[2026-07-13T08:30:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2443
[2026-07-13T08:32:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-13T08:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2540
[2026-07-13T08:40:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2434
[2026-07-13T08:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2549
[2026-07-13T08:50:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2436
[2026-07-13T08:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2534
[2026-07-13T08:57:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-13T09:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2537
[2026-07-13T09:00:00] living_room_ac | Event: DeviceOffline()
[2026-07-13T09:02:00] living_room_ac | Event: DeviceOnline()
[2026-07-13T09:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2541
[2026-07-13T09:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2540
[2026-07-13T09:15:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2438
[2026-07-13T09:18:28] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-13T09:25:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2442
[2026-07-13T09:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2551
[2026-07-13T09:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-13T09:35:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2447
[2026-07-13T09:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2543
[2026-07-13T09:42:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-13T09:45:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2555
[2026-07-13T09:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2553
[2026-07-13T09:55:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2545
[2026-07-13T10:00:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2440
[2026-07-13T10:02:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-13T10:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2539
[2026-07-13T10:10:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2457
[2026-07-13T10:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2556
[2026-07-13T10:20:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2449
[2026-07-13T10:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2547
[2026-07-13T10:27:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-13T10:30:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2552
[2026-07-13T10:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2552
[2026-07-13T10:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2546
[2026-07-13T10:45:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2437
[2026-07-13T10:48:28] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-13T10:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2543
[2026-07-13T10:55:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2453
[2026-07-13T11:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2537
[2026-07-13T11:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-13T11:05:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2445
[2026-07-13T11:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2550
[2026-07-13T11:12:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-13T11:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2540
[2026-07-13T11:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2540
[2026-07-13T11:30:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2440
[2026-07-13T11:32:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-13T11:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2546
[2026-07-13T11:40:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2434
[2026-07-13T11:50:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2426
[2026-07-13T11:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2529
[2026-07-13T11:57:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-13T12:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2520
[2026-07-13T12:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2538
[2026-07-13T12:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2530
[2026-07-13T12:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-13T12:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2509
[2026-07-13T13:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2503
[2026-07-13T13:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2498
[2026-07-13T13:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2493
[2026-07-13T13:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2483
[2026-07-13T13:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2471
[2026-07-13T14:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-13T14:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2461
[2026-07-13T14:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2462
[2026-07-13T14:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2453
[2026-07-13T14:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2451

## 任务
根据以下传感器与设备记录，评估目标设备当前工作状态是否正常。如异常，请给出故障判断依据。

请按以下 JSON 格式回答：

```json
{
  "is_anomaly": true/false,
  "confidence": "high/medium/low",
  "threat_type": "具体威胁类型，从以下选择：intrusion / tailgating / credential_theft / fire_risk / unattended_cooking / carbon_monoxide / sensor_stuck / sensor_drift / sensor_malfunction / actuator_stuck / lock_malfunction / safety_device_failure / water_leak / possible_fall / abnormal_inactivity / health_concern / child_safety / behavioral_anomaly / none",
  "threat_description": "一句话描述发现的问题或确认安全",
  "reasoning": [
    "推理步骤1: ...",
    "推理步骤2: ...",
    "推理步骤3: ..."
  ],
  "key_evidence": [
    "关键证据1",
    "关键证据2"
  ],
  "recommended_actions": [
    "建议措施1",
    "建议措施2"
  ]
}
```

如果判断为正常（无异常），is_anomaly 设为 false，threat_type 设为 "none"，并在 reasoning 中说明为什么这些事件是正常的。

{
  "is_anomaly": false,
  "confidence": "medium",
  "threat_type": "none",
  "threat_description": "当前日志更符合正常模式，不建议报警。",
  "reasoning": [
    "推理步骤1: 正常样本是一次性短暂重连；异常样本在短时间内反复抖动。"
  ],
  "key_evidence": [
    "正常样本是一次性短暂重连；异常样本在短时间内反复抖动。"
  ],
  "recommended_actions": [
    "继续监测，无需立即处置。"
  ]
}

```json
{
  "is_anomaly": true,
  "confidence": "high",
  "threat_type": "sensor_malfunction",
  "threat_description": "客厅温度传感器读数严重偏离物理现实，显示异常高温（23.5°C-25.5°C），且与空调离线/重启事件存在时间关联，疑似传感器故障或数据漂移。",
  "reasoning": [
    "推理步骤 1: 日志显示从凌晨 03:00 到中午 14:55，客厅温度传感器 (living_room_temp_sensor) 的 MeasuredValue 持续在 2354 至 2556 之间波动。根据 Matter 协议标准及常见设备规范，该数值极大概率代表摄氏度乘以 100（即 23.54°C - 25.56°C）。",
    "推理步骤 2: 结合住户习惯分析，凌晨 03:00 至 07:00 期间，运动传感器 (occupancy) 多次报告为 0（无人），此时室内应处于夜间低温状态。然而温度读数却呈现持续上升趋势，并在上午达到峰值，这与自然昼夜温差规律及无人员活动的室内环境严重不符。",
    "推理步骤 3: 关键异常点在于 09:00 分，目标设备 living_room_ac 发生 DeviceOffline() 随后 DeviceOnline() 的重启事件。若空调正常工作，其制冷/制热逻辑应能调节室温；但在空调重启前后，温度读数并未出现预期的快速下降或稳定趋势，反而继续维持在高位并伴随剧烈波动（如 08:55 的 2534 到 09:00 的 2541，以及后续的非线性变化）。这表明温度读数并非由真实环境温度驱动，而是传感器本身发生了硬件故障、校准失效或固件层面的数据漂移（Sensor Drift/Malfunction）。",
    "推理步骤 4: 虽然厨房和卧室的温度读数也偏高（约 24-25°C），但考虑到夏季可能的高温天气，这些房间的数据相对可信度高于完全无人且本应降温的客厅。客厅作为重点监控区域，其传感器数据的持续异常且不受控，构成了明确的设备故障特征。"
  ],
  "key_evidence": [
    "凌晨 03:00-07:00 无人活动时段，客厅温度不降反升，违背热力学常识。",
    "09:00 空调重启后，温度读数未恢复正常调节模式，仍维持异常高位。",
    "温度数值随时间呈现非线性的随机波动（如 2473 -> 2486 -> 2497），缺乏真实热交换的平滑过渡特征。"
  ],
  "recommended_actions": [
    "立即检查客厅温度传感器的物理连接及供电情况，排除接触不良导致的信号错误。",
    "尝试重置客厅温度传感器固件，或将其替换为新设备进行验证。",
    "暂时手动关闭自动温控策略，避免基于错误数据导致空调过度运行或能耗浪费。",
    "联系设备制造商技术支持，排查是否存在批次性固件 Bug 或硬件缺陷。"
  ]
}
```


你是一个智能家居安全分析 AI 助手。你的职责是分析智能家居设备的状态日志，判断是否存在安全威胁或异常情况。

你需要基于以下能力进行分析：
1. 从设备状态变化中识别异常模式
2. 结合时间、住户习惯、设备类型进行推理
3. 区分真实威胁和正常行为（减少误报）
4. 对发现的问题给出具体的风险评估和建议

所有设备基于 Matter 协议标准，设备状态通过 Cluster.Attribute 的形式报告。

## 家庭环境信息
家庭布局: 独居老人 (Elderly Living Alone)
- 重点房间 living_room: 客厅灯[dimmable_light], 客厅空调[air_conditioner], 客厅温度传感器[temperature_sensor], 客厅运动传感器[occupancy_sensor], 客厅窗帘[window_covering], 客厅窗户传感器[contact_sensor], 客厅烟雾报警器[smoke_co_alarm]
- 房间 bathroom: 卫生间灯[onoff_light], 卫生间运动传感器[occupancy_sensor], 卫生间漏水传感器[water_leak_detector]
- 房间 bedroom: 卧室灯[dimmable_light], 床头灯[onoff_light], 卧室运动传感器[occupancy_sensor], 卧室窗帘[window_covering], 卧室窗户传感器[contact_sensor], 卧室温度传感器[temperature_sensor]
- 房间 entrance: 入户门锁[door_lock], 入户门传感器[contact_sensor], 玄关灯[onoff_light], 玄关运动传感器[occupancy_sensor]
- 房间 kitchen: 厨房灯[onoff_light], 厨房灶具[cook_surface], 厨房烟雾报警器[smoke_co_alarm], 厨房温度传感器[temperature_sensor], 厨房运动传感器[occupancy_sensor], 厨房漏水传感器[water_leak_detector]

## 已选日志说明
以下日志不是整天原始全量心跳，而是围绕关键设备、关键时间窗和跨天模式筛出的训练片段。
- 任务类型: SQ1
- 重点房间: living_room
- 重点设备: living_room_ac
- 已选事件数: 122

## 设备事件日志
[2026-07-07T03:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2372
[2026-07-07T03:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2368
[2026-07-07T03:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-07T03:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2392
[2026-07-07T04:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2400
[2026-07-07T04:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2406
[2026-07-07T04:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2421
[2026-07-07T05:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2444
[2026-07-07T05:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2441
[2026-07-07T05:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-07T05:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2460
[2026-07-07T06:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2469
[2026-07-07T06:03:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-07T06:05:07] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-07-07T06:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2470
[2026-07-07T06:15:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2382
[2026-07-07T06:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2479
[2026-07-07T06:23:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-07T06:25:07] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-07-07T06:30:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2381
[2026-07-07T06:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2486
[2026-07-07T06:45:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2499
[2026-07-07T06:50:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2391
[2026-07-07T06:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2507
[2026-07-07T06:56:43] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-07T07:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2514
[2026-07-07T07:03:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-07T07:05:07] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-07-07T07:09:06] front_door_lock | DoorLock.LockState = 2
[2026-07-07T07:09:09] front_door_lock | Event: LockOperation(LockOperationType=0, OperationSource=Manual)
[2026-07-07T07:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2511
[2026-07-07T07:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2521
[2026-07-07T07:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2505
[2026-07-07T07:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2519
[2026-07-07T07:26:43] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-07T07:30:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2429
[2026-07-07T07:33:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-07T07:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2516
[2026-07-07T07:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2527
[2026-07-07T07:53:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-07T07:55:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2523
[2026-07-07T07:59:09] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-07T08:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-07T08:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2539
[2026-07-07T08:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2533
[2026-07-07T08:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2526
[2026-07-07T08:18:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-07T08:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2525
[2026-07-07T08:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2546
[2026-07-07T08:26:43] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-07T08:30:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2448
[2026-07-07T08:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2543
[2026-07-07T08:38:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-07T08:38:14] living_room_light | OnOff.OnOff = True
[2026-07-07T08:40:07] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-07-07T08:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2545
[2026-07-07T08:50:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2446
[2026-07-07T08:53:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-07T08:55:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2538
[2026-07-07T09:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2549
[2026-07-07T09:00:00] living_room_ac | Event: DeviceOffline()
[2026-07-07T09:02:00] living_room_ac | Event: DeviceOnline()
[2026-07-07T09:03:10] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-07T09:05:07] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-07-07T09:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2556
[2026-07-07T09:13:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-07T09:15:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2456
[2026-07-07T09:18:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-07T09:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2553
[2026-07-07T09:23:10] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-07T09:25:07] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-07-07T09:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2540
[2026-07-07T09:38:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-07T09:40:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2445
[2026-07-07T09:43:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-07T09:45:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2554
[2026-07-07T09:48:10] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-07T09:50:07] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-07-07T09:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2556
[2026-07-07T09:56:43] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-07T10:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2552
[2026-07-07T10:03:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-07T10:05:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2446
[2026-07-07T10:08:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-07T10:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2559
[2026-07-07T10:13:10] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-07T10:15:07] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-07-07T10:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2540
[2026-07-07T10:23:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-07T10:25:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2459
[2026-07-07T10:30:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2445
[2026-07-07T10:33:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-07T10:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2543
[2026-07-07T10:38:10] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-07T10:40:07] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-07-07T10:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2551
[2026-07-07T10:48:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-07T10:50:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2454
[2026-07-07T10:53:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-07T10:55:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2549
[2026-07-07T10:59:30] kitchen_cook_surface | OnOff.OnOff = True
[2026-07-07T11:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2545
[2026-07-07T11:04:00] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-07-07T11:08:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-07T11:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2550
[2026-07-07T11:13:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-07T11:15:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2449
[2026-07-07T11:18:10] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-07T11:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2550
[2026-07-07T11:24:00] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-07-07T11:26:43] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-07T11:33:00] kitchen_cook_surface | OnOff.OnOff = False
[2026-07-07T11:34:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = None
[2026-07-07T11:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2543
[2026-07-07T11:43:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-07T11:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2529
[2026-07-07T11:48:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-07T11:50:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2435
[2026-07-07T11:53:10] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-07T11:55:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2528
[2026-07-07T12:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2537
[2026-07-07T12:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2521

## 任务
根据以下传感器与设备记录，评估目标设备当前工作状态是否正常。如异常，请给出故障判断依据。

请按以下 JSON 格式回答：

```json
{
  "is_anomaly": true/false,
  "confidence": "high/medium/low",
  "threat_type": "具体威胁类型，从以下选择：intrusion / tailgating / credential_theft / fire_risk / unattended_cooking / carbon_monoxide / sensor_stuck / sensor_drift / sensor_malfunction / actuator_stuck / lock_malfunction / safety_device_failure / water_leak / possible_fall / abnormal_inactivity / health_concern / child_safety / behavioral_anomaly / none",
  "threat_description": "一句话描述发现的问题或确认安全",
  "reasoning": [
    "推理步骤1: ...",
    "推理步骤2: ...",
    "推理步骤3: ..."
  ],
  "key_evidence": [
    "关键证据1",
    "关键证据2"
  ],
  "recommended_actions": [
    "建议措施1",
    "建议措施2"
  ]
}
```

如果判断为正常（无异常），is_anomaly 设为 false，threat_type 设为 "none"，并在 reasoning 中说明为什么这些事件是正常的。

```json
{
  "is_anomaly": false,
  "confidence": "high",
  "threat_type": "none",
  "threat_description": "设备状态正常，空调短暂离线后恢复，未检测到安全威胁或异常行为。",
  "reasoning": [
    "1. 分析目标设备 living_room_ac 的状态：日志显示在 09:00:00 出现 DeviceOffline()，随后在 09:02:00 立即出现 DeviceOnline()。这种持续仅2分钟的离线/在线切换通常由网络波动、Wi-Fi信号干扰或设备重启引起，属于常见的技术故障而非安全攻击或物理损坏。",
    "2. 结合住户行为模式分析：该家庭为独居老人。日志显示老人在早晨 06:03 起床，之后在卧室、厨房、卫生间和客厅之间活动（Occupancy=1）。在空调离线期间（09:00-09:02），客厅运动传感器显示有人（09:03:10 Occupancy=1），且温度传感器读数正常上升（从2556升至2556，后续继续上升），说明老人并未因空调故障而处于危险环境，也没有表现出惊慌或异常求助行为。",
    "3. 排除其他威胁：没有入侵迹象（门锁仅在07:09手动操作一次，无非法开启）；没有火灾风险（烟雾报警器无报警，灶具使用正常）；没有健康紧急事件（如跌倒或长时间静止不动）。空调的短暂离线不影响整体安全性评估。"
  ],
  "key_evidence": [
    "[2026-07-07T09:00:00] living_room_ac | Event: DeviceOffline()",
    "[2026-07-07T09:02:00] living_room_ac | Event: DeviceOnline()",
    "[2026-07-07T09:03:10] living_room_occupancy | OccupancySensing.Occupancy = 1"
  ],
  "recommended_actions": [
    "检查客厅空调的网络连接稳定性，确认Wi-Fi信号强度。",
    "若此类离线频繁发生，建议重启路由器或更换空调的电源适配器以排除硬件隐患。"
  ]
}
```

```json
{
  "is_anomaly": true,
  "confidence": "high",
  "threat_type": "sensor_malfunction",
  "threat_description": "厨房温度传感器在灶具关闭后出现短暂数据丢失（None），随后数值异常跳变，疑似设备故障或严重漂移。",
  "reasoning": [
    "推理步骤 1: 日志显示在 2026-07-07T11:33:00 厨房灶具 (cook_surface) 被关闭 (OnOff=False)，这是正常的烹饪结束行为。",
    "推理步骤 2: 紧随其后，在 2026-07-07T11:34:00，厨房温度传感器报告 MeasuredValue = None，表明传感器暂时无法读取数据或通信中断。",
    "推理步骤 3: 在 11:35:00 传感器恢复报告时，数值为 2543。考虑到前一刻刚关闭热源且环境通常有热惯性，该数值与之前的高温趋势（约 2550）相比并未显著下降反而维持高位，结合中间的'None'状态，强烈暗示传感器存在硬件故障、校准失效或严重的读数漂移，而非正常的环境降温过程。",
    "推理步骤 4: 对于独居老人家庭，厨房是火灾高风险区，关键安全传感器的不可靠会导致烟雾报警器等联动设备失效，构成潜在的安全隐患。"
  ],
  "key_evidence": [
    "2026-07-07T11:33:00 厨房灶具关闭事件",
    "2026-07-07T11:34:00 厨房温度传感器返回 None (数据丢失)",
    "2026-07-07T11:35:00 厨房温度传感器恢复但数值未随热源关闭而合理回落"
  ],
  "recommended_actions": [
    "立即检查厨房温度传感器的物理连接和供电情况。",
    "联系设备供应商进行固件更新或硬件更换，确保其能准确反映环境温度。",
    "在修复前，建议人工定期监测厨房温度，并确认烟雾报警器功能正常作为临时补偿措施。"
  ]
}
```


你是一个智能家居安全分析 AI 助手。你的职责是分析智能家居设备的状态日志，判断是否存在安全威胁或异常情况。

你需要基于以下能力进行分析：
1. 从设备状态变化中识别异常模式
2. 结合时间、住户习惯、设备类型进行推理
3. 区分真实威胁和正常行为（减少误报）
4. 对发现的问题给出具体的风险评估和建议

所有设备基于 Matter 协议标准，设备状态通过 Cluster.Attribute 的形式报告。

## 家庭环境信息
家庭布局: 两室一厅 (2BR)
- 重点房间 living_room: 客厅主灯[dimmable_light], 客厅落地灯[onoff_light], 客厅空调[air_conditioner], 客厅温度传感器[temperature_sensor], 客厅运动传感器[occupancy_sensor], 客厅窗帘[window_covering], 客厅窗户传感器[contact_sensor]
- 房间 balcony: 阳台灯[onoff_light], 阳台门传感器[contact_sensor], 洗衣机[laundry_washer]
- 房间 bathroom: 卫生间灯[onoff_light], 卫生间运动传感器[occupancy_sensor], 卫生间漏水传感器[water_leak_detector]
- 房间 entrance: 入户门锁[door_lock], 入户门传感器[contact_sensor], 玄关灯[onoff_light], 玄关运动传感器[occupancy_sensor]
- 房间 kitchen: 厨房灯[onoff_light], 厨房灶具[cook_surface], 厨房烟雾报警器[smoke_co_alarm], 厨房温度传感器[temperature_sensor], 厨房窗户传感器[contact_sensor], 洗碗机[dishwasher]
- 房间 master_bedroom: 主卧灯[dimmable_light], 主卧空调[air_conditioner], 主卧运动传感器[occupancy_sensor], 主卧窗帘[window_covering], 主卧窗户传感器[contact_sensor], 主卧温度传感器[temperature_sensor]
- 房间 second_bedroom: 次卧灯[dimmable_light], 次卧运动传感器[occupancy_sensor], 次卧窗帘[window_covering], 次卧窗户传感器[contact_sensor], 次卧温度传感器[temperature_sensor]

## 已选日志说明
以下日志不是整天原始全量心跳，而是围绕关键设备、关键时间窗和跨天模式筛出的训练片段。
- 任务类型: SQ1
- 重点房间: living_room
- 重点设备: living_room_ac
- 已选事件数: 125

## 设备事件日志
[2026-07-31T03:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2372
[2026-07-31T03:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2368
[2026-07-31T03:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2370
[2026-07-31T03:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2390
[2026-07-31T03:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2396
[2026-07-31T04:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-31T04:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2402
[2026-07-31T04:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2409
[2026-07-31T04:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2436
[2026-07-31T04:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2434
[2026-07-31T05:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2435
[2026-07-31T05:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2442
[2026-07-31T05:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-31T05:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2464
[2026-07-31T06:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2483
[2026-07-31T06:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2468
[2026-07-31T06:00:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-31T06:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2472
[2026-07-31T06:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2482
[2026-07-31T06:10:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2470
[2026-07-31T06:15:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2489
[2026-07-31T06:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2490
[2026-07-31T06:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2477
[2026-07-31T06:25:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2490
[2026-07-31T06:30:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2483
[2026-07-31T06:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-31T06:30:00] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-31T06:35:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2484
[2026-07-31T06:35:05] bathroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-31T06:40:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2502
[2026-07-31T06:45:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2489
[2026-07-31T06:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2502
[2026-07-31T06:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2491
[2026-07-31T06:55:05] bathroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-31T06:59:34] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-31T07:00:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2506
[2026-07-31T07:00:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-31T07:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2498
[2026-07-31T07:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2498
[2026-07-31T07:10:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2520
[2026-07-31T07:15:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2510
[2026-07-31T07:16:00] kitchen_light | OnOff.OnOff = False
[2026-07-31T07:16:20] front_door_lock | DoorLock.LockState = 2
[2026-07-31T07:16:28] front_door_contact | BooleanState.StateValue = True
[2026-07-31T07:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2524
[2026-07-31T07:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2512
[2026-07-31T07:25:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2520
[2026-07-31T07:26:23] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-31T07:30:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2518
[2026-07-31T07:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-31T07:35:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2512
[2026-07-31T07:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2522
[2026-07-31T07:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2522
[2026-07-31T07:45:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2526
[2026-07-31T07:46:23] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-31T07:50:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2531
[2026-07-31T07:55:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2520
[2026-07-31T08:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2536
[2026-07-31T08:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2532
[2026-07-31T08:00:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-31T08:05:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2539
[2026-07-31T08:06:23] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-31T08:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2530
[2026-07-31T08:15:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2535
[2026-07-31T08:20:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2531
[2026-07-31T08:25:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2546
[2026-07-31T08:29:34] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-31T08:30:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2528
[2026-07-31T08:30:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-31T08:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2547
[2026-07-31T08:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2529
[2026-07-31T08:40:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2535
[2026-07-31T08:41:23] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-31T08:45:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2540
[2026-07-31T08:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2541
[2026-07-31T08:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2553
[2026-07-31T08:55:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2548
[2026-07-31T09:00:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2554
[2026-07-31T09:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-31T09:00:00] living_room_ac | Event: DeviceOffline()
[2026-07-31T09:01:23] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-31T09:02:00] living_room_ac | Event: DeviceOnline()
[2026-07-31T09:05:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2554
[2026-07-31T09:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2552
[2026-07-31T09:15:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2541
[2026-07-31T09:20:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2548
[2026-07-31T09:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2549
[2026-07-31T09:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2547
[2026-07-31T09:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2541
[2026-07-31T09:30:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2539
[2026-07-31T09:30:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-31T09:35:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2540
[2026-07-31T09:36:23] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-31T09:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2543
[2026-07-31T09:45:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2546
[2026-07-31T09:50:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2545
[2026-07-31T09:55:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2548
[2026-07-31T09:59:34] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-31T10:00:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2553
[2026-07-31T10:00:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-31T10:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2539
[2026-07-31T10:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2547
[2026-07-31T10:10:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2554
[2026-07-31T10:11:23] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-31T10:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2549
[2026-07-31T10:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2549
[2026-07-31T10:25:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2546
[2026-07-31T10:30:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2547
[2026-07-31T10:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-31T10:31:23] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-31T10:35:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2541
[2026-07-31T10:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2547
[2026-07-31T10:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2551
[2026-07-31T10:50:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2544
[2026-07-31T10:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2545
[2026-07-31T10:55:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2543
[2026-07-31T11:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2542
[2026-07-31T11:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2545
[2026-07-31T11:00:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-31T11:05:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2538
[2026-07-31T11:06:23] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-31T11:10:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2536
[2026-07-31T11:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2546
[2026-07-31T11:15:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2550
[2026-07-31T11:20:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2537

## 任务
根据以下传感器与设备记录，评估目标设备当前工作状态是否正常。如异常，请给出故障判断依据。

请按以下 JSON 格式回答：

```json
{
  "is_anomaly": true/false,
  "confidence": "high/medium/low",
  "threat_type": "具体威胁类型，从以下选择：intrusion / tailgating / credential_theft / fire_risk / unattended_cooking / carbon_monoxide / sensor_stuck / sensor_drift / sensor_malfunction / actuator_stuck / lock_malfunction / safety_device_failure / water_leak / possible_fall / abnormal_inactivity / health_concern / child_safety / behavioral_anomaly / none",
  "threat_description": "一句话描述发现的问题或确认安全",
  "reasoning": [
    "推理步骤1: ...",
    "推理步骤2: ...",
    "推理步骤3: ..."
  ],
  "key_evidence": [
    "关键证据1",
    "关键证据2"
  ],
  "recommended_actions": [
    "建议措施1",
    "建议措施2"
  ]
}
```

如果判断为正常（无异常），is_anomaly 设为 false，threat_type 设为 "none"，并在 reasoning 中说明为什么这些事件是正常的。

{
  "is_anomaly": false,
  "confidence": "medium",
  "threat_type": "none",
  "threat_description": "当前日志更符合正常模式，不建议报警。",
  "reasoning": [
    "推理步骤1: 正常样本是一次性短暂重连；异常样本在短时间内反复抖动。"
  ],
  "key_evidence": [
    "正常样本是一次性短暂重连；异常样本在短时间内反复抖动。"
  ],
  "recommended_actions": [
    "继续监测，无需立即处置。"
  ]
}

```json
{
  "is_anomaly": true,
  "confidence": "high",
  "threat_type": "sensor_drift",
  "threat_description": "客厅温度传感器读数严重偏离物理现实，显示异常高温（23.7°C-25.4°C），且与空调离线/重启事件存在强相关性，疑似传感器故障或数据漂移。",
  "reasoning": [
    "推理步骤 1: 日志显示从 03:00 到 09:00，living_room_temp_sensor 的 MeasuredValue 从 2372 (约 23.7°C) 持续上升至 2554 (约 25.5°C)。虽然夏季清晨升温符合部分规律，但随后在 09:00 出现设备状态突变。",
    "推理步骤 2: 关键异常点出现在 2026-07-31T09:00:00，此时 living_room_ac 报告 DeviceOffline()，紧接着在 09:01:23 恢复为 DeviceOnline()。这种短暂的离线通常由网络波动、电源瞬断或固件重启引起。",
    "推理步骤 3: 在空调离线的短暂窗口期及之后，温度读数并未如预期般因制冷停止而继续快速攀升至危险水平（例如超过 30°C+），反而在空调恢复后数值开始震荡并略有下降（从 2554 降至 2542）。这表明当前的 25.x°C 读数极有可能是传感器在系统不稳定期间的‘漂移’或‘卡死’值，而非真实的室温。若传感器正常，空调停机期间室内温度应显著高于此数值。",
    "推理步骤 4: 结合 Matter 协议特性，传感器 Attribute 上报可能受设备重启影响产生瞬时错误值。该模式（持续缓慢上升 + 设备重启 + 数值未达极端值）高度指向 sensor_drift 或 sensor_malfunction，而非真实的火灾风险或入侵行为。"
  ],
  "key_evidence": [
    "living_room_ac 在 09:00:00 发生 DeviceOffline() 并在 1 分多钟后恢复，期间伴随温度读数峰值。",
    "空调恢复运行后，温度读数未继续飙升，反而出现回落趋势，证明当前读数不符合热力学逻辑。",
    "整个时间段内 occupancy_sensor 多次报 0，排除了大量人员聚集导致局部微气候变化的可能性。"
  ],
  "recommended_actions": [
    "建议立即检查客厅空调的物理状态及供电情况，确认是否真的发生过断电或重启。",
    "对 living_room_temp_sensor 进行校准测试，对比其他房间（如 kitchen_temp_sensor, master_bedroom_temp_sensor）在同一时间段的读数差异。",
    "在智能家居平台标记该传感器为'需维护'或'数据不可信'，暂时禁用其作为自动化触发条件，防止误操作。"
  ]
}
```


你是一个智能家居安全分析 AI 助手。你的职责是分析智能家居设备的状态日志，判断是否存在安全威胁或异常情况。

你需要基于以下能力进行分析：
1. 从设备状态变化中识别异常模式
2. 结合时间、住户习惯、设备类型进行推理
3. 区分真实威胁和正常行为（减少误报）
4. 对发现的问题给出具体的风险评估和建议

所有设备基于 Matter 协议标准，设备状态通过 Cluster.Attribute 的形式报告。

## 家庭环境信息
家庭布局: 独居老人 (Elderly Living Alone)
- 重点房间 living_room: 客厅灯[dimmable_light], 客厅空调[air_conditioner], 客厅温度传感器[temperature_sensor], 客厅运动传感器[occupancy_sensor], 客厅窗帘[window_covering], 客厅窗户传感器[contact_sensor], 客厅烟雾报警器[smoke_co_alarm]
- 房间 bathroom: 卫生间灯[onoff_light], 卫生间运动传感器[occupancy_sensor], 卫生间漏水传感器[water_leak_detector]
- 房间 bedroom: 卧室灯[dimmable_light], 床头灯[onoff_light], 卧室运动传感器[occupancy_sensor], 卧室窗帘[window_covering], 卧室窗户传感器[contact_sensor], 卧室温度传感器[temperature_sensor]
- 房间 entrance: 入户门锁[door_lock], 入户门传感器[contact_sensor], 玄关灯[onoff_light], 玄关运动传感器[occupancy_sensor]
- 房间 kitchen: 厨房灯[onoff_light], 厨房灶具[cook_surface], 厨房烟雾报警器[smoke_co_alarm], 厨房温度传感器[temperature_sensor], 厨房运动传感器[occupancy_sensor], 厨房漏水传感器[water_leak_detector]

## 已选日志说明
以下日志不是整天原始全量心跳，而是围绕关键设备、关键时间窗和跨天模式筛出的训练片段。
- 任务类型: SQ1
- 重点房间: living_room
- 重点设备: living_room_ac
- 已选事件数: 121

## 设备事件日志
[2026-07-26T03:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2361
[2026-07-26T03:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2363
[2026-07-26T03:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-26T03:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2403
[2026-07-26T04:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2395
[2026-07-26T04:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2413
[2026-07-26T04:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2431
[2026-07-26T05:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2446
[2026-07-26T05:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2455
[2026-07-26T05:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-26T05:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2467
[2026-07-26T06:00:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2383
[2026-07-26T06:00:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-07-26T06:01:03] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = None
[2026-07-26T06:05:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2367
[2026-07-26T06:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2471
[2026-07-26T06:13:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-26T06:15:03] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-07-26T06:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2491
[2026-07-26T06:25:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2378
[2026-07-26T06:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2499
[2026-07-26T06:30:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-07-26T06:33:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = None
[2026-07-26T06:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2492
[2026-07-26T06:40:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2400
[2026-07-26T06:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2505
[2026-07-26T06:48:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-26T06:50:03] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-07-26T06:55:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2496
[2026-07-26T07:00:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2403
[2026-07-26T07:05:04] front_door_lock | Event: LockOperation(LockOperationType=1, OperationSource=Manual)
[2026-07-26T07:05:13] front_door_contact | BooleanState.StateValue = True
[2026-07-26T07:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2513
[2026-07-26T07:10:07] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-26T07:15:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2504
[2026-07-26T07:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2518
[2026-07-26T07:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2517
[2026-07-26T07:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2524
[2026-07-26T07:30:03] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-07-26T07:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2522
[2026-07-26T07:35:07] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-26T07:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2519
[2026-07-26T07:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2523
[2026-07-26T07:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2531
[2026-07-26T07:55:07] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-26T08:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2538
[2026-07-26T08:01:58] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-26T08:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2528
[2026-07-26T08:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2538
[2026-07-26T08:15:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2541
[2026-07-26T08:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2528
[2026-07-26T08:20:07] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-26T08:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2531
[2026-07-26T08:30:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2436
[2026-07-26T08:35:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2430
[2026-07-26T08:37:09] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-26T08:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2538
[2026-07-26T08:43:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-26T08:45:03] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-07-26T08:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2551
[2026-07-26T08:52:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-26T08:55:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2441
[2026-07-26T08:57:09] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-26T09:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2536
[2026-07-26T09:00:00] living_room_ac | Event: DeviceOffline()
[2026-07-26T09:02:00] living_room_ac | Event: DeviceOnline()
[2026-07-26T09:08:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-26T09:10:03] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-07-26T09:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2556
[2026-07-26T09:17:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-26T09:20:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2457
[2026-07-26T09:22:09] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-26T09:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2545
[2026-07-26T09:28:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-26T09:30:03] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-07-26T09:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2545
[2026-07-26T09:42:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-26T09:45:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2439
[2026-07-26T09:47:09] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-26T09:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2547
[2026-07-26T09:53:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-26T09:55:03] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-07-26T10:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2546
[2026-07-26T10:01:58] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-26T10:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2547
[2026-07-26T10:07:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-26T10:10:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2449
[2026-07-26T10:12:09] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-26T10:15:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2558
[2026-07-26T10:18:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-26T10:20:03] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-07-26T10:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2552
[2026-07-26T10:27:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-26T10:30:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2446
[2026-07-26T10:35:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2444
[2026-07-26T10:37:09] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-26T10:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2549
[2026-07-26T10:43:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-26T10:45:03] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-07-26T10:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2550
[2026-07-26T10:52:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-26T10:57:09] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-26T11:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2542
[2026-07-26T11:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2545
[2026-07-26T11:06:30] kitchen_cook_surface | OnOff.OnOff = True
[2026-07-26T11:08:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-26T11:11:00] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-07-26T11:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2540
[2026-07-26T11:17:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-26T11:20:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2432
[2026-07-26T11:22:09] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-26T11:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2539
[2026-07-26T11:28:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-26T11:31:00] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-07-26T11:33:00] kitchen_cook_surface | OnOff.OnOff = False
[2026-07-26T11:35:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2431
[2026-07-26T11:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2540
[2026-07-26T11:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2541
[2026-07-26T11:52:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-26T11:55:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2434
[2026-07-26T11:57:09] living_room_occupancy | OccupancySensing.Occupancy = 1

## 任务
请结合下面的 Matter 设备日志，判断是否存在设备健康问题，并说明可能的故障类型。

请按以下 JSON 格式回答：

```json
{
  "is_anomaly": true/false,
  "confidence": "high/medium/low",
  "threat_type": "具体威胁类型，从以下选择：intrusion / tailgating / credential_theft / fire_risk / unattended_cooking / carbon_monoxide / sensor_stuck / sensor_drift / sensor_malfunction / actuator_stuck / lock_malfunction / safety_device_failure / water_leak / possible_fall / abnormal_inactivity / health_concern / child_safety / behavioral_anomaly / none",
  "threat_description": "一句话描述发现的问题或确认安全",
  "reasoning": [
    "推理步骤1: ...",
    "推理步骤2: ...",
    "推理步骤3: ..."
  ],
  "key_evidence": [
    "关键证据1",
    "关键证据2"
  ],
  "recommended_actions": [
    "建议措施1",
    "建议措施2"
  ]
}
```

如果判断为正常（无异常），is_anomaly 设为 false，threat_type 设为 "none"，并在 reasoning 中说明为什么这些事件是正常的。

{
  "is_anomaly": false,
  "confidence": "medium",
  "threat_type": "none",
  "threat_description": "当前日志更符合正常模式，不建议报警。",
  "reasoning": [
    "推理步骤1: 正常样本是一次性短暂重连；异常样本在短时间内反复抖动。"
  ],
  "key_evidence": [
    "正常样本是一次性短暂重连；异常样本在短时间内反复抖动。"
  ],
  "recommended_actions": [
    "继续监测，无需立即处置。"
  ]
}

```json
{
  "is_anomaly": true,
  "confidence": "high",
  "threat_type": "sensor_malfunction",
  "threat_description": "客厅温度传感器读数异常偏高且数值格式疑似错误，导致空调误判离线，存在过热风险。",
  "reasoning": [
    "推理步骤 1: 日志显示从凌晨 03:00 开始，living_room_temp_sensor 的 MeasuredValue 持续上升（2361 -> 2556），若按 Matter 标准单位（通常摄氏度*100），该数值对应 23.6°C 至 25.5°C，属于正常范围；但结合后续事件看，数值增长趋势在物理上极不合理（短时间内室温不可能自然升高至此且无外部热源介入），或者该设备上报的是毫开尔文或其他非标准单位导致解析错误。",
    "推理步骤 2: 更关键的证据是 09:00:00 时刻，living_room_ac 报告 DeviceOffline()，随后在 09:02:00 恢复在线。考虑到独居老人家庭场景，空调突然离线通常是因为检测到环境温度超过安全阈值而触发保护机制，或者是设备本身故障。",
    "推理步骤 3: 对比卧室和厨房的温度数据（约 23-24°C 或 25°C 左右），客厅温度传感器在 09:00 时读数为 2556（若为摄氏度则高达 25.56°C，虽略高但不至于立即关机；若为其他单位则完全错误）。然而，最合理的解释是该传感器发生了漂移或故障，导致系统认为室内极度炎热，从而强制关闭了空调（DeviceOffline），这属于典型的传感器故障引发的连锁反应。此外，06:01 和 06:33 厨房温度传感器曾短暂返回 None，也暗示网络或传感器状态不稳定。",
    "推理步骤 4: 综合判断，核心问题在于客厅温度传感器的数据不可信（Drift/Malfunction），直接导致了空调的非预期停机，对于独居老人而言，夏季高温下空调失效构成健康和安全威胁。"
  ],
  "key_evidence": [
    "living_room_temp_sensor 在 03:00 至 09:00 期间数值持续单调递增且幅度较大，不符合自然热力学规律或常规环境变化。",
    "living_room_ac 在 09:00:00 突然报告 DeviceOffline()，紧接着温度传感器读数处于高位区间，表明可能是温控逻辑触发了保护性关机。",
    "kitchen_temp_sensor 在 06:01 和 06:33 出现 None 值，显示传感器链路存在间歇性不稳定。"
  ],
  "recommended_actions": [
    "立即检查客厅空调是否因过热保护而停机，并手动重启空调以确保老人居住环境的舒适度。",
    "校准或更换客厅温度传感器，排查其硬件故障或固件版本问题。",
    "联系智能家居管理员检查 Matter 协议下的传感器配置，确认单位设置是否正确，并审查其他传感器的稳定性。"
  ]
}
```


你是一个智能家居安全分析 AI 助手。你的职责是分析智能家居设备的状态日志，判断是否存在安全威胁或异常情况。

你需要基于以下能力进行分析：
1. 从设备状态变化中识别异常模式
2. 结合时间、住户习惯、设备类型进行推理
3. 区分真实威胁和正常行为（减少误报）
4. 对发现的问题给出具体的风险评估和建议

所有设备基于 Matter 协议标准，设备状态通过 Cluster.Attribute 的形式报告。

## 家庭环境信息
家庭布局: 三室两厅 (3BR)
- 重点房间 living_room: 客厅主灯[dimmable_light], 客厅副灯[dimmable_light], 客厅氛围灯[onoff_light], 客厅空调[air_conditioner], 客厅温度传感器[temperature_sensor], 客厅运动传感器[occupancy_sensor], 客厅窗帘1[window_covering], 客厅窗户传感器1[contact_sensor], ... 共10个设备
- 房间 balcony: 阳台灯[onoff_light], 阳台门传感器[contact_sensor], 洗衣机[laundry_washer]
- 房间 dining_room: 餐厅灯[dimmable_light], 餐厅运动传感器[occupancy_sensor]
- 房间 entrance: 入户门锁[door_lock], 入户门传感器[contact_sensor], 玄关灯[onoff_light], 玄关运动传感器[occupancy_sensor]
- 房间 kids_room: 儿童房灯[dimmable_light], 儿童房运动传感器[occupancy_sensor], 儿童房窗帘[window_covering], 儿童房窗户传感器[contact_sensor], 儿童房温度传感器[temperature_sensor]
- 房间 kitchen: 厨房灯[onoff_light], 厨房灶具[cook_surface], 厨房烟雾报警器[smoke_co_alarm], 厨房温度传感器[temperature_sensor], 厨房窗户传感器[contact_sensor], 洗碗机[dishwasher], 厨房漏水传感器[water_leak_detector]
- 房间 master_bathroom: 主卫灯[onoff_light], 主卫运动传感器[occupancy_sensor], 主卫漏水传感器[water_leak_detector]
- 房间 master_bedroom: 主卧灯[dimmable_light], 主卧床头灯[onoff_light], 主卧空调[air_conditioner], 主卧运动传感器[occupancy_sensor], 主卧窗帘[window_covering], 主卧窗户传感器[contact_sensor], 主卧温度传感器[temperature_sensor]
- 房间 second_bathroom: 次卫灯[onoff_light], 次卫漏水传感器[water_leak_detector]
- 房间 second_bedroom: 次卧灯[dimmable_light], 次卧空调[air_conditioner], 次卧运动传感器[occupancy_sensor], 次卧窗帘[window_covering], 次卧窗户传感器[contact_sensor]

## 已选日志说明
以下日志不是整天原始全量心跳，而是围绕关键设备、关键时间窗和跨天模式筛出的训练片段。
- 任务类型: SQ1
- 重点房间: living_room
- 重点设备: living_room_ac
- 已选事件数: 129

## 设备事件日志
[2026-08-11T03:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2367
[2026-08-11T03:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2373
[2026-08-11T03:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2388
[2026-08-11T04:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-08-11T04:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2415
[2026-08-11T04:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2438
[2026-08-11T05:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2441
[2026-08-11T05:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2467
[2026-08-11T05:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2479
[2026-08-11T06:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2470
[2026-08-11T06:00:00] kids_room_occupancy | OccupancySensing.Occupancy = 0
[2026-08-11T06:05:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2487
[2026-08-11T06:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2476
[2026-08-11T06:20:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-11T06:20:02] master_bedroom_light | OnOff.OnOff = True
[2026-08-11T06:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-08-11T06:30:00] master_bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-11T06:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2497
[2026-08-11T06:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2496
[2026-08-11T06:41:00] kids_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-11T06:45:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2505
[2026-08-11T06:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2510
[2026-08-11T06:55:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2499
[2026-08-11T07:00:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2516
[2026-08-11T07:00:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-11T07:05:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2503
[2026-08-11T07:10:00] kitchen_cook_surface | OnOff.OnOff = False
[2026-08-11T07:11:00] kids_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-11T07:20:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2504
[2026-08-11T07:24:00] dining_room_light | OnOff.OnOff = False
[2026-08-11T07:24:16] front_door_lock | DoorLock.LockState = 2
[2026-08-11T07:24:25] front_door_lock | DoorLock.LockState = 1
[2026-08-11T07:25:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-11T07:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2518
[2026-08-11T07:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2524
[2026-08-11T07:35:03] dining_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-11T07:40:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2531
[2026-08-11T07:44:19] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-11T07:45:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-11T07:50:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2518
[2026-08-11T07:51:00] kids_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-11T07:55:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2526
[2026-08-11T08:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-08-11T08:04:19] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-11T08:05:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-11T08:10:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2526
[2026-08-11T08:11:00] kids_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-11T08:15:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2524
[2026-08-11T08:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2540
[2026-08-11T08:20:03] dining_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-11T08:25:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2542
[2026-08-11T08:26:01] master_bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-11T08:30:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2536
[2026-08-11T08:31:00] kids_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-11T08:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2532
[2026-08-11T08:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2538
[2026-08-11T08:40:03] dining_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-11T08:45:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2538
[2026-08-11T08:49:19] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-11T08:50:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-11T08:55:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2551
[2026-08-11T08:56:00] kids_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-11T09:00:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2550
[2026-08-11T09:00:00] living_room_ac | Event: DeviceOffline()
[2026-08-11T09:00:03] dining_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-11T09:02:00] living_room_ac | Event: DeviceOnline()
[2026-08-11T09:05:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2541
[2026-08-11T09:09:19] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-11T09:10:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-11T09:15:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2549
[2026-08-11T09:16:00] kids_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-11T09:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2550
[2026-08-11T09:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2556
[2026-08-11T09:25:03] dining_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-11T09:30:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-11T09:35:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2543
[2026-08-11T09:36:00] kids_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-11T09:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2541
[2026-08-11T09:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2541
[2026-08-11T09:45:03] dining_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-11T09:50:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2545
[2026-08-11T09:54:19] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-11T09:55:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-11T10:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2544
[2026-08-11T10:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2558
[2026-08-11T10:05:03] dining_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-11T10:10:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2554
[2026-08-11T10:14:19] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-11T10:15:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-11T10:20:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2546
[2026-08-11T10:21:00] kids_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-11T10:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2541
[2026-08-11T10:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-08-11T10:34:19] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-11T10:35:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-11T10:40:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2542
[2026-08-11T10:41:00] kids_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-11T10:45:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2557
[2026-08-11T10:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2540
[2026-08-11T10:50:03] dining_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-11T10:55:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2544
[2026-08-11T10:56:01] master_bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-11T11:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2539
[2026-08-11T11:01:00] kids_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-11T11:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2543
[2026-08-11T11:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2543
[2026-08-11T11:10:03] dining_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-11T11:15:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2541
[2026-08-11T11:19:19] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-11T11:20:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-11T11:25:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2535
[2026-08-11T11:26:00] kids_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-11T11:30:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2540
[2026-08-11T11:30:03] dining_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-11T11:35:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2534
[2026-08-11T11:39:19] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-11T11:40:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-11T11:45:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2540
[2026-08-11T11:46:00] kids_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-11T11:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2535
[2026-08-11T11:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2524
[2026-08-11T11:55:03] dining_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-11T12:00:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2529
[2026-08-11T12:00:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-11T12:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2515
[2026-08-11T13:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2514
[2026-08-11T13:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2491
[2026-08-11T13:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2495
[2026-08-11T14:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0

## 任务
根据以下传感器与设备记录，评估目标设备当前工作状态是否正常。如异常，请给出故障判断依据。

请按以下 JSON 格式回答：

```json
{
  "is_anomaly": true/false,
  "confidence": "high/medium/low",
  "threat_type": "具体威胁类型，从以下选择：intrusion / tailgating / credential_theft / fire_risk / unattended_cooking / carbon_monoxide / sensor_stuck / sensor_drift / sensor_malfunction / actuator_stuck / lock_malfunction / safety_device_failure / water_leak / possible_fall / abnormal_inactivity / health_concern / child_safety / behavioral_anomaly / none",
  "threat_description": "一句话描述发现的问题或确认安全",
  "reasoning": [
    "推理步骤1: ...",
    "推理步骤2: ...",
    "推理步骤3: ..."
  ],
  "key_evidence": [
    "关键证据1",
    "关键证据2"
  ],
  "recommended_actions": [
    "建议措施1",
    "建议措施2"
  ]
}
```

如果判断为正常（无异常），is_anomaly 设为 false，threat_type 设为 "none"，并在 reasoning 中说明为什么这些事件是正常的。

{
  "is_anomaly": false,
  "confidence": "medium",
  "threat_type": "none",
  "threat_description": "当前日志更符合正常模式，不建议报警。",
  "reasoning": [
    "推理步骤1: 正常样本是一次性短暂重连；异常样本在短时间内反复抖动。"
  ],
  "key_evidence": [
    "正常样本是一次性短暂重连；异常样本在短时间内反复抖动。"
  ],
  "recommended_actions": [
    "继续监测，无需立即处置。"
  ]
}

```json
{
  "is_anomaly": true,
  "confidence": "high",
  "threat_type": "sensor_malfunction",
  "threat_description": "客厅温度传感器读数严重偏离物理现实，显示异常高温（约 236°C - 255°C），且与空调状态及环境逻辑矛盾。",
  "reasoning": [
    "推理步骤 1: 数据单位分析。日志中的温度值（如 2367, 2470）明显超出了家用环境的正常范围（通常 18-30°C）。结合 Matter 协议常见实现，这些数值极有可能是摄氏度乘以 10 后的整数表示（即实际温度为 23.67°C 至 25.5°C），或者是原始浮点数被错误截断/格式化导致的显示异常。",
    "推理步骤 2: 逻辑一致性检查。尽管数值巨大，但观察趋势：从凌晨 3 点的 23.67°C 逐渐上升至上午 9 点的 25.5°C，随后在下午缓慢下降。这种变化曲线完全符合夏季清晨到正午的自然升温规律，表明传感器本身可能在工作，但上报的数据格式或处理逻辑存在严重缺陷。",
    "推理步骤 3: 设备状态关联验证。日志显示 `living_room_ac` (客厅空调) 在 09:00 短暂离线后于 09:02 恢复在线。如果温度传感器真实检测到 250°C+ 的火灾级高温，空调应持续全速制冷并触发烟雾报警器，而不会仅出现短暂的‘离线’事件。此外，厨房和儿童房的温度传感器也报告了类似的‘超高温’数值，这进一步证实是系统性的数据解析错误或传感器固件 bug，而非真实的物理火灾风险。",
    "推理步骤 4: 结论判定。虽然数值看起来像极端高温，但结合时间趋势和设备行为，判定为传感器数据漂移、单位转换错误或固件 Bug 导致的 `sensor_malfunction`，而非真实的 `fire_risk`。"
  ],
  "key_evidence": [
    "温度数值随时间呈现符合昼夜规律的线性增长（23.67 -> 25.5），排除了瞬间火灾的可能性。",
    "多房间（客厅、厨房、儿童房）同时出现类似量级的异常高温读数，指向系统性问题。",
    "空调设备未因‘超高温’报警而持续运行或触发联动，仅在 09:00 出现一次正常的 DeviceOffline/Online 事件。"
  ],
  "recommended_actions": [
    "立即检查智能家居中枢网关或 Home Assistant/Matter 适配器的配置，确认温度传感器的单位设置是否为 'Celsius' 以及是否存在小数点丢失或乘数错误。",
    "联系设备制造商更新固件，修复可能导致温度读数溢出或格式错误的已知 Bug。",
    "暂时忽略基于该传感器触发的任何高温警报，直到数据流恢复正常。"
  ]
}
```


你是一个智能家居安全分析 AI 助手。你的职责是分析智能家居设备的状态日志，判断是否存在安全威胁或异常情况。

你需要基于以下能力进行分析：
1. 从设备状态变化中识别异常模式
2. 结合时间、住户习惯、设备类型进行推理
3. 区分真实威胁和正常行为（减少误报）
4. 对发现的问题给出具体的风险评估和建议

所有设备基于 Matter 协议标准，设备状态通过 Cluster.Attribute 的形式报告。

## 家庭环境信息
家庭布局: 三室两厅 (3BR)
- 重点房间 living_room: 客厅主灯[dimmable_light], 客厅副灯[dimmable_light], 客厅氛围灯[onoff_light], 客厅空调[air_conditioner], 客厅温度传感器[temperature_sensor], 客厅运动传感器[occupancy_sensor], 客厅窗帘1[window_covering], 客厅窗户传感器1[contact_sensor], ... 共10个设备
- 房间 balcony: 阳台灯[onoff_light], 阳台门传感器[contact_sensor], 洗衣机[laundry_washer]
- 房间 dining_room: 餐厅灯[dimmable_light], 餐厅运动传感器[occupancy_sensor]
- 房间 entrance: 入户门锁[door_lock], 入户门传感器[contact_sensor], 玄关灯[onoff_light], 玄关运动传感器[occupancy_sensor]
- 房间 kids_room: 儿童房灯[dimmable_light], 儿童房运动传感器[occupancy_sensor], 儿童房窗帘[window_covering], 儿童房窗户传感器[contact_sensor], 儿童房温度传感器[temperature_sensor]
- 房间 kitchen: 厨房灯[onoff_light], 厨房灶具[cook_surface], 厨房烟雾报警器[smoke_co_alarm], 厨房温度传感器[temperature_sensor], 厨房窗户传感器[contact_sensor], 洗碗机[dishwasher], 厨房漏水传感器[water_leak_detector]
- 房间 master_bathroom: 主卫灯[onoff_light], 主卫运动传感器[occupancy_sensor], 主卫漏水传感器[water_leak_detector]
- 房间 master_bedroom: 主卧灯[dimmable_light], 主卧床头灯[onoff_light], 主卧空调[air_conditioner], 主卧运动传感器[occupancy_sensor], 主卧窗帘[window_covering], 主卧窗户传感器[contact_sensor], 主卧温度传感器[temperature_sensor]
- 房间 second_bathroom: 次卫灯[onoff_light], 次卫漏水传感器[water_leak_detector]
- 房间 second_bedroom: 次卧灯[dimmable_light], 次卧空调[air_conditioner], 次卧运动传感器[occupancy_sensor], 次卧窗帘[window_covering], 次卧窗户传感器[contact_sensor]

## 已选日志说明
以下日志不是整天原始全量心跳，而是围绕关键设备、关键时间窗和跨天模式筛出的训练片段。
- 任务类型: SQ1
- 重点房间: living_room
- 重点设备: living_room_ac
- 已选事件数: 129

## 设备事件日志
[2026-08-01T03:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2357
[2026-08-01T03:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2366
[2026-08-01T03:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2368
[2026-08-01T03:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2383
[2026-08-01T03:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2391
[2026-08-01T04:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-08-01T04:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2415
[2026-08-01T04:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2417
[2026-08-01T04:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2431
[2026-08-01T04:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2435
[2026-08-01T05:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2444
[2026-08-01T05:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2454
[2026-08-01T05:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-08-01T05:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2458
[2026-08-01T06:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2470
[2026-08-01T06:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2466
[2026-08-01T06:00:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-01T06:00:00] master_bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-01T06:05:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2485
[2026-08-01T06:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2489
[2026-08-01T06:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2473
[2026-08-01T06:15:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2477
[2026-08-01T06:20:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2477
[2026-08-01T06:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2481
[2026-08-01T06:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2495
[2026-08-01T06:30:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2490
[2026-08-01T06:30:00] dining_room_occupancy | OccupancySensing.Occupancy = 0
[2026-08-01T06:30:00] kids_room_occupancy | OccupancySensing.Occupancy = 0
[2026-08-01T06:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2498
[2026-08-01T06:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2498
[2026-08-01T06:40:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2497
[2026-08-01T06:45:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2492
[2026-08-01T06:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2491
[2026-08-01T06:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2510
[2026-08-01T06:55:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2500
[2026-08-01T07:00:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2504
[2026-08-01T07:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-08-01T07:00:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-01T07:00:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-08-01T07:05:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2514
[2026-08-01T07:10:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2518
[2026-08-01T07:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2518
[2026-08-01T07:15:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2512
[2026-08-01T07:20:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2518
[2026-08-01T07:25:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2520
[2026-08-01T07:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2514
[2026-08-01T07:30:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2523
[2026-08-01T07:30:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-01T07:30:00] master_bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-01T07:35:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2517
[2026-08-01T07:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2512
[2026-08-01T07:45:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2525
[2026-08-01T07:50:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2527
[2026-08-01T07:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2526
[2026-08-01T07:55:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2532
[2026-08-01T08:00:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2535
[2026-08-01T08:00:00] dining_room_occupancy | OccupancySensing.Occupancy = 0
[2026-08-01T08:00:00] kids_room_occupancy | OccupancySensing.Occupancy = 0
[2026-08-01T08:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2534
[2026-08-01T08:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2536
[2026-08-01T08:15:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2533
[2026-08-01T08:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2540
[2026-08-01T08:25:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2531
[2026-08-01T08:30:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2529
[2026-08-01T08:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-08-01T08:30:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-01T08:30:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-08-01T08:35:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2530
[2026-08-01T08:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2544
[2026-08-01T08:45:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2540
[2026-08-01T08:50:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2551
[2026-08-01T08:55:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2553
[2026-08-01T09:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2546
[2026-08-01T09:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2541
[2026-08-01T09:00:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-01T09:00:00] master_bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-01T09:00:00] living_room_ac | Event: DeviceOffline()
[2026-08-01T09:02:00] living_room_ac | Event: DeviceOnline()
[2026-08-01T09:05:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2555
[2026-08-01T09:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2541
[2026-08-01T09:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2546
[2026-08-01T09:15:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2550
[2026-08-01T09:20:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2556
[2026-08-01T09:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2542
[2026-08-01T09:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2554
[2026-08-01T09:30:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2543
[2026-08-01T09:30:00] dining_room_occupancy | OccupancySensing.Occupancy = 0
[2026-08-01T09:30:00] kids_room_occupancy | OccupancySensing.Occupancy = 0
[2026-08-01T09:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2559
[2026-08-01T09:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2555
[2026-08-01T09:40:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2549
[2026-08-01T09:45:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2542
[2026-08-01T09:55:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2547
[2026-08-01T10:00:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2552
[2026-08-01T10:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-08-01T10:00:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-01T10:00:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-08-01T10:05:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2544
[2026-08-01T10:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2545
[2026-08-01T10:15:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2540
[2026-08-01T10:20:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2554
[2026-08-01T10:25:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2546
[2026-08-01T10:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2546
[2026-08-01T10:30:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2543
[2026-08-01T10:30:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-01T10:30:00] master_bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-01T10:35:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2551
[2026-08-01T10:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2556
[2026-08-01T10:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2556
[2026-08-01T10:45:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2545
[2026-08-01T10:50:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2550
[2026-08-01T10:55:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2541
[2026-08-01T11:00:00] dining_room_occupancy | OccupancySensing.Occupancy = 0
[2026-08-01T11:00:00] kids_room_occupancy | OccupancySensing.Occupancy = 0
[2026-08-01T11:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2554
[2026-08-01T11:10:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2535
[2026-08-01T11:15:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2547
[2026-08-01T11:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2535
[2026-08-01T11:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2547
[2026-08-01T11:25:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2533
[2026-08-01T11:30:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2532
[2026-08-01T11:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-08-01T11:30:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-01T11:30:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-08-01T11:40:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2537
[2026-08-01T11:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2537
[2026-08-01T11:45:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2535
[2026-08-01T11:50:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2537
[2026-08-01T11:55:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2528

## 任务
请结合下面的 Matter 设备日志，判断是否存在设备健康问题，并说明可能的故障类型。

请按以下 JSON 格式回答：

```json
{
  "is_anomaly": true/false,
  "confidence": "high/medium/low",
  "threat_type": "具体威胁类型，从以下选择：intrusion / tailgating / credential_theft / fire_risk / unattended_cooking / carbon_monoxide / sensor_stuck / sensor_drift / sensor_malfunction / actuator_stuck / lock_malfunction / safety_device_failure / water_leak / possible_fall / abnormal_inactivity / health_concern / child_safety / behavioral_anomaly / none",
  "threat_description": "一句话描述发现的问题或确认安全",
  "reasoning": [
    "推理步骤1: ...",
    "推理步骤2: ...",
    "推理步骤3: ..."
  ],
  "key_evidence": [
    "关键证据1",
    "关键证据2"
  ],
  "recommended_actions": [
    "建议措施1",
    "建议措施2"
  ]
}
```

如果判断为正常（无异常），is_anomaly 设为 false，threat_type 设为 "none"，并在 reasoning 中说明为什么这些事件是正常的。

{
  "is_anomaly": false,
  "confidence": "medium",
  "threat_type": "none",
  "threat_description": "当前日志更符合正常模式，不建议报警。",
  "reasoning": [
    "推理步骤1: 正常样本是一次性短暂重连；异常样本在短时间内反复抖动。"
  ],
  "key_evidence": [
    "正常样本是一次性短暂重连；异常样本在短时间内反复抖动。"
  ],
  "recommended_actions": [
    "继续监测，无需立即处置。"
  ]
}

```json
{
  "is_anomaly": true,
  "confidence": "high",
  "threat_type": "sensor_malfunction",
  "threat_description": "客厅温度传感器读数严重偏离物理现实，显示异常高温（约 235°C - 255°C），且伴随空调设备离线重启事件，表明传感器存在硬件故障或校准失效。",
  "reasoning": [
    "数据合理性分析：日志中 `living_room_temp_sensor` 的 `MeasuredValue` 从 2357 开始，最高达到 2559。在 Matter 协议及常见 IoT 设备中，温度通常以 0.1°C 为单位存储。若按此换算，数值对应 235.7°C 至 255.9°C。对于室内环境而言，超过 200°C 的温度是绝对不可能的，这直接证明了传感器读数严重失真。",
    "关联设备行为分析：在 09:00:00 时，`living_room_ac` 报告了 `DeviceOffline()` 随后立即 `DeviceOnline()`。虽然这可能是正常的网络重连，但在如此极端的‘高温’环境下，空调理应处于持续高负荷运行状态以尝试降温，或者因过热保护而停机。设备的短暂离线可能暗示其控制逻辑受到了错误温度数据的干扰，或者是系统检测到传感器异常后的自我保护机制。",
    "排除其他可能性：全屋其他房间（厨房、主卧、儿童房）的温度读数也在 246-255 范围内同步偏高，但这更可能是由于该特定传感器（客厅）作为主要参考源被系统误读，或者是整个温控系统的基准校准发生了灾难性偏移。考虑到只有温度传感器出现这种数量级的异常，而其他运动传感器和门锁工作正常，最合理的解释是传感器本身的硬件故障（如热敏电阻损坏、信号线短路导致电压饱和）或固件中的单位转换/标度错误。",
    "结论：这种非物理可能的温度读数属于典型的 `sensor_malfunction`（传感器故障），而非真实的环境威胁（如火灾），因为如果是真实火灾，温度上升曲线会呈现指数级爆炸式增长且伴随烟雾报警，而此处温度在 235-255 之间波动，更像是故障导致的固定高位读数。"
  ],
  "key_evidence": [
    "living_room_temp_sensor 读数高达 2559 (即 255.9°C)，远超室内安全阈值。",
    "同一时间段内，厨房和其他房间温度传感器也显示异常高温 (246-255°C)，但幅度略低，符合单一故障源影响全局或连锁反应的特征。",
    "living_room_ac 在 09:00 发生 DeviceOffline/Online 事件，可能与处理异常温度数据时的系统震荡有关。"
  ],
  "recommended_actions": [
    "立即手动检查客厅空调是否正常工作，并尝试手动调节温度设置以验证设备响应。",
    "联系技术支持或更换客厅温度传感器 (`living_room_temp_sensor`)，该设备已确认损坏或需要重新校准。",
    "暂时忽略基于该温度传感器的自动化场景（如高温自动开空调），直到传感器修复，以免触发错误的联动逻辑。",
    "检查家中是否有真实的火灾隐患（尽管概率极低），以确保万无一失。"
  ]
}
```