你是一个智能家居安全分析 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]

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

## 跨天活动摘要
- 2026-07-14: living_room=210, kitchen=243, bedroom=241, entrance=230, bathroom=60

## 设备事件日志
[2026-07-14T00:00:00] kitchen_occupancy | OccupancySensing.Occupancy = 0
[2026-07-14T00:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2268
[2026-07-14T00:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2277
[2026-07-14T00:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2274
[2026-07-14T00:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2287
[2026-07-14T00:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-14T00:30:00] kitchen_occupancy | OccupancySensing.Occupancy = 0
[2026-07-14T00:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2286
[2026-07-14T00:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2288
[2026-07-14T00:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2281
[2026-07-14T00:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2296
[2026-07-14T01:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-14T01:00:00] kitchen_occupancy | OccupancySensing.Occupancy = 0
[2026-07-14T01:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2300
[2026-07-14T01:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2293
[2026-07-14T01:10:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2191
[2026-07-14T01:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2292
[2026-07-14T01:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2297
[2026-07-14T01:15:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2199
[2026-07-14T01:15:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2311
[2026-07-14T01:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2304
[2026-07-14T01:20:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2198
[2026-07-14T01:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2299
[2026-07-14T01:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2302
[2026-07-14T01:25:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2206
[2026-07-14T01:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2308
[2026-07-14T01:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2318
[2026-07-14T01:30:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2216
[2026-07-14T01:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-14T01:30:00] bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-14T01:30:00] kitchen_occupancy | OccupancySensing.Occupancy = 0
[2026-07-14T01:30:00] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-14T01:30:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-07-14T01:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2311
[2026-07-14T01:35:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2214
[2026-07-14T01:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2318
[2026-07-14T01:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2312
[2026-07-14T01:40:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2223
[2026-07-14T01:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2317
[2026-07-14T01:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2320
[2026-07-14T01:45:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2220
[2026-07-14T01:45:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2310
[2026-07-14T01:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2328
[2026-07-14T01:50:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2212
[2026-07-14T01:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2319
[2026-07-14T01:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2327
[2026-07-14T01:55:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2330
[2026-07-14T02:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2317
[2026-07-14T02:00:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2222
[2026-07-14T02:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2331
[2026-07-14T02:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-14T02:00:00] bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-14T02:00:00] kitchen_occupancy | OccupancySensing.Occupancy = 0
[2026-07-14T02:00:00] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-14T02:00:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-07-14T02:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2336
[2026-07-14T02:05:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2233
[2026-07-14T02:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2321
[2026-07-14T02:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2323
[2026-07-14T02:10:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2228
[2026-07-14T02:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2329
[2026-07-14T02:10:00] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-07-14T02:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2330
[2026-07-14T02:15:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2226
[2026-07-14T02:15:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2340
[2026-07-14T02:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2343
[2026-07-14T02:20:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2246
[2026-07-14T02:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2342
[2026-07-14T02:25:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2236
[2026-07-14T02:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2345
[2026-07-14T02:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2350
[2026-07-14T02:30:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2250
[2026-07-14T02:30:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2339
[2026-07-14T02:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-14T02:30:00] bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-14T02:30:00] kitchen_occupancy | OccupancySensing.Occupancy = 0
[2026-07-14T02:30:00] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-14T02:30:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-07-14T02:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2355
[2026-07-14T02:35:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2249
[2026-07-14T02:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2353
[2026-07-14T02:35:00] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-07-14T02:40:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2239
[2026-07-14T02:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2358
[2026-07-14T02:45:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2252
[2026-07-14T02:45:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2344
[2026-07-14T02:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2361
[2026-07-14T02:50:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2251
[2026-07-14T02:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2348
[2026-07-14T02:50:00] kitchen_light | OnOff.OnOff = True
[2026-07-14T02:55:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2266
[2026-07-14T02:55:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2360
[2026-07-14T03:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2352
[2026-07-14T03:00:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2268
[2026-07-14T03:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2367
[2026-07-14T03:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-14T03:00:00] bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-14T03:00:00] kitchen_occupancy | OccupancySensing.Occupancy = 0
[2026-07-14T03:00:00] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-14T03:00:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-07-14T03:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2370
[2026-07-14T03:05:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2258
[2026-07-14T03:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2373
[2026-07-14T03:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2365
[2026-07-14T03:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2371
[2026-07-14T03:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2364
[2026-07-14T03:15:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2262
[2026-07-14T03:15:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2374
[2026-07-14T03:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2370
[2026-07-14T03:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2369
[2026-07-14T03:25:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2284
[2026-07-14T03:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2385
[2026-07-14T03:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2387
[2026-07-14T03:30:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2278
[2026-07-14T03:30:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2383
[2026-07-14T03:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-14T03:30:00] bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-14T03:30:00] kitchen_occupancy | OccupancySensing.Occupancy = 0
[2026-07-14T03:30:00] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-14T03:30:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-07-14T03:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2374
[2026-07-14T03:35:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2282
[2026-07-14T03:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2382
[2026-07-14T03:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2389
[2026-07-14T03:40:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2291
[2026-07-14T03:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2391
[2026-07-14T03:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2395
[2026-07-14T03:45:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2285
[2026-07-14T03:45:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2393
[2026-07-14T03:50:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2300
[2026-07-14T03:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2391
[2026-07-14T04:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2399
[2026-07-14T04:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-14T04:00:00] kitchen_occupancy | OccupancySensing.Occupancy = 0
[2026-07-14T04:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2413
[2026-07-14T04:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2410

## 任务
请综合以下多个设备与环境状态，评估家庭整体安全状况，指出任何潜在风险。

请按以下 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": true,
  "confidence": "medium",
  "threat_type": "health_concern",
  "threat_description": "夜间长期停留在非卧室区域",
  "reasoning": [
    "推理步骤1: 深夜在非卧室区域持续活动",
    "推理步骤2: 时长明显超出普通起夜",
    "推理步骤3: 可能是迷路或意识混乱"
  ],
  "key_evidence": [
    "深夜在非卧室区域持续活动",
    "时长明显超出普通起夜",
    "可能是迷路或意识混乱"
  ],
  "recommended_actions": [
    "按老人夜间异常活动处理，建议家属关注。"
  ]
}

```json
{
  "is_anomaly": true,
  "confidence": "high",
  "threat_type": "fire_risk",
  "threat_description": "厨房温度持续异常升高且伴随无人值守状态，存在极高的火灾风险。",
  "reasoning": [
    "推理步骤 1: 时间与环境分析。日志显示时间为凌晨 02:10 至 04:10，属于独居老人的夜间睡眠时段。在此期间，所有房间（包括客厅、卧室、卫生间、玄关）的运动传感器均报告 Occupancy = 0，确认屋内无人。",
    "推理步骤 2: 设备状态异常检测。厨房运动传感器在 02:10 短暂检测到有人 (Occupancy=1)，随后在 02:30 及之后长时间保持无人状态 (Occupancy=0)。然而，厨房温度传感器读数从 02:10 的约 23.4°C (2340mK) 开始急剧上升，至 04:10 达到约 24.1°C (2410mK)，并在 03:45-04:00 期间维持在极高水平 (2390mK+)。",
    "推理步骤 3: 关联分析与风险评估。在‘无人’状态下，厨房温度却呈现持续且快速的上升趋势，这不符合正常环境热力学规律（通常夜间无人时温度应随空调/暖气关闭而下降或保持稳定）。这种‘高温 + 无人’的组合强烈暗示厨房内有热源正在工作（如灶具未关、电器故障发热），且由于老人独居且处于睡眠中，无法及时察觉和处理，构成了严重的火灾隐患。"
  ],
  "key_evidence": [
    "02:30 至 04:10 期间，kitchen_occupancy 持续为 0（无人），但 kitchen_temp_sensor 读数从 ~2340mK 攀升至 ~2410mK。",
    "厨房温度在无人状态下仍呈线性快速上升趋势，且数值远超正常室温范围（假设 mK 单位为毫开尔文，则 2400mK ≈ 21.27°C，若为绝对温度单位或其他缩放比例需结合具体硬件校准，但趋势本身即为异常；即便按常规摄氏度理解，短时间内升温幅度也过大，或者此处数据代表的是相对于基准的偏差值，无论如何，持续单向高温增长是核心异常点）。注：根据 Matter 标准，TemperatureMeasurement.MeasuredValue 通常为毫开尔文 (mK)。2268mK = 19.5°C。从 19.5°C 升至 21.1°C 虽然看似不大，但在 2 小时内无人情况下持续被动升温且无降温措施（空调日志未提及开启），结合厨房场景，更可能是热源导致。若数据单位不同或存在漂移，趋势依然是关键。",
    "厨房灯 (kitchen_light) 在 02:50 被打开，此时室内已无人超过 40 分钟，进一步佐证了可能存在遗留的热源或人为疏忽。"
  ],
  "recommended_actions": [
    "立即远程检查厨房烟雾报警器状态，并尝试通过 Matter 协议触发警报通知监护人或紧急联系人。",
    "建议系统自动向物业或紧急服务发送预警，提示‘夜间厨房疑似过热/无人烹饪’。",
    "待老人醒来后，必须人工检查厨房灶具是否关闭，排查是否有电器故障或燃气泄漏隐患。"
  ]
}
```


你是一个智能家居安全分析 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]

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

## 跨天活动摘要
- 2026-07-31: living_room=208, bedroom=242, kitchen=242, entrance=230, bathroom=60
- 2026-08-01: living_room=208, bedroom=241, kitchen=239, entrance=230, bathroom=60

## 设备事件日志
[2026-07-31T05:52:32] kitchen_cook_surface | OnOff.OnOff = True
[2026-07-31T10:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2556
[2026-07-31T10:14:10] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-31T10:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2544
[2026-07-31T10:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2538
[2026-07-31T10:44:10] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-31T10:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2549
[2026-07-31T11:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2553
[2026-07-31T11:03:00] kitchen_light | OnOff.OnOff = True
[2026-07-31T11:04:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = None
[2026-07-31T11:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2536
[2026-07-31T11:06:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-31T11:09:10] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-31T11:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2549
[2026-07-31T11:14:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-31T11:15:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2439
[2026-07-31T11:18:00] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-07-31T11:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2532
[2026-07-31T11:25:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2437
[2026-07-31T11:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2538
[2026-07-31T11:31:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-31T11:34:10] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-31T11:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2533
[2026-07-31T11:38:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = None
[2026-07-31T11:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2538
[2026-07-31T11:44:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-31T11:45:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2440
[2026-07-31T11:48:00] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-07-31T11:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2537
[2026-07-31T11:51:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-31T11:55:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2429
[2026-07-31T12:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2523
[2026-07-31T12:00:00] kitchen_cook_surface | OnOff.OnOff = True
[2026-07-31T12:04:10] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-31T12:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2530
[2026-07-31T12:05:00] kitchen_cook_surface | OnOff.OnOff = False
[2026-07-31T12:09:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-31T12:10:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2432
[2026-07-31T12:13:00] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-07-31T12:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2532
[2026-07-31T12:16:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-31T12:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2518
[2026-07-31T12:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2513
[2026-07-31T12:29:10] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-31T12:30:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2517
[2026-07-31T12:34:00] living_room_light | OnOff.OnOff = False
[2026-07-31T12:35:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2406
[2026-07-31T12:39:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-31T12:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2510
[2026-07-31T12:43:00] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-07-31T12:45:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2514
[2026-07-31T12:49:09] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-31T12:50:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2409
[2026-07-31T12:54:10] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-31T12:55:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2504
[2026-07-31T13:00:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2410
[2026-07-31T13:04:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-31T13:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2500
[2026-07-31T13:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2508
[2026-07-31T13:24:10] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-31T13:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2484
[2026-07-31T13:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2473
[2026-07-31T13:53:13] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-31T14:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2476
[2026-08-01T10:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2542
[2026-08-01T10:06:06] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-01T10:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2552
[2026-08-01T10:36:06] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-01T10:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2540
[2026-08-01T10:56:06] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-01T11:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2536
[2026-08-01T11:05:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2444
[2026-08-01T11:06:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-01T11:10:03] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-01T11:15:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2447
[2026-08-01T11:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2540
[2026-08-01T11:21:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-01T11:24:00] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-08-01T11:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2549
[2026-08-01T11:26:06] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-01T11:30:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2441
[2026-08-01T11:32:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = None
[2026-08-01T11:35:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2442
[2026-08-01T11:36:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-01T11:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2533
[2026-08-01T11:40:03] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-01T11:45:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2440
[2026-08-01T11:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2528
[2026-08-01T11:51:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-01T11:54:00] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-08-01T11:55:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2521
[2026-08-01T11:56:06] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-01T12:00:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2424
[2026-08-01T12:00:00] kitchen_cook_surface | OnOff.OnOff = True
[2026-08-01T12:01:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-01T12:04:00] kitchen_cook_surface | OnOff.OnOff = False
[2026-08-01T12:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2527
[2026-08-01T12:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2526
[2026-08-01T12:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2534
[2026-08-01T12:16:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-01T12:19:00] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-08-01T12:20:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2414
[2026-08-01T12:20:14] bedroom_window | WindowCovering.CurrentPositionLiftPercent100ths = 10000
[2026-08-01T12:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2510
[2026-08-01T12:26:06] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-01T12:31:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-01T12:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2524
[2026-08-01T12:39:00] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-08-01T12:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2512
[2026-08-01T12:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2511
[2026-08-01T12:45:04] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-01T12:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2502
[2026-08-01T12:51:06] living_room_occupancy | OccupancySensing.Occupancy = 1

## 任务
你将看到一组跨设备日志。请做综合安全分析，而不是单点判断。

请按以下 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": true,
  "confidence": "medium",
  "threat_type": "health_concern",
  "threat_description": "做饭时间异常短",
  "reasoning": [
    "推理步骤1: 做饭时长明显缩短",
    "推理步骤2: 跨天重复出现",
    "推理步骤3: 可能提示进食不足或功能下降"
  ],
  "key_evidence": [
    "做饭时长明显缩短",
    "跨天重复出现",
    "可能提示进食不足或功能下降"
  ],
  "recommended_actions": [
    "标记为进食相关异常，建议关注老人营养与健康状态。"
  ]
}

```json
{
  "is_anomaly": false,
  "confidence": "high",
  "threat_type": "none",
  "threat_description": "日志显示独居老人正常的日间活动模式，包括烹饪、休息和日常移动，未发现安全威胁或异常行为。",
  "reasoning": [
    "时间线分析：事件集中在上午 10:00 至下午 13:50，符合独居老人的正常作息（起床、早餐/午餐准备、午休）。",
    "设备状态一致性：厨房灶具 (kitchen_cook_surface) 在 12:00 开启并在 4 分钟后关闭，随后温度传感器读数随时间自然下降，符合物理规律；无长时间无人看管的高温记录。",
    "环境参数正常：客厅和卧室温度读数（约 24-26°C）处于舒适且安全的范围，未出现烟雾报警器触发或温度急剧升高的火灾风险迹象。",
    "人员活动逻辑：运动传感器在各房间（玄关、客厅、卧室、厨房）的触发顺序合理，反映了人员在房内的正常流动路径，未见徘徊、跌倒后的静止不动或其他异常行为模式。",
    "数据完整性：虽然部分温度传感器偶有 None 值（可能为短暂通信延迟），但整体数据流连续，未出现传感器卡死或漂移导致的误报。"
  ],
  "key_evidence": [
    "kitchen_cook_surface 仅在 12:00 短暂开启并自动关闭，伴随合理的温度变化曲线。",
    "所有 OccupancySensing.Occupancy = 1 的事件均发生在白天活跃时段，且分布均匀。",
    "TemperatureMeasurement 数值稳定在 2400-2600 (即 24-26°C) 区间，无极端值。",
    "smoke_co_alarm 在整个日志期间无任何报警事件报告。"
  ],
  "recommended_actions": [
    "继续保持当前的监控频率，无需额外干预。",
    "建议定期检查厨房灶具的温度传感器校准情况，确保其能准确反映加热状态。",
    "鉴于住户为独居老人，可定期人工电话确认其生活状况，作为技术监控的补充。"
  ]
}
```


你是一个智能家居安全分析 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]

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

## 跨天活动摘要
- 2026-08-04: living_room=208, bedroom=241, kitchen=237, entrance=232, bathroom=60
- 2026-08-05: living_room=210, bedroom=242, kitchen=239, entrance=230, bathroom=60
- 2026-08-06: living_room=210, bedroom=243, kitchen=239, entrance=231, bathroom=60

## 设备事件日志
[2026-08-04T00:00:00] bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-04T07:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2509
[2026-08-04T07:26:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-04T07:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2525
[2026-08-04T07:46:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-04T07:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2538
[2026-08-04T08:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-08-04T08:06:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-04T08:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2527
[2026-08-04T08:14:10] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-08-04T08:15:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2436
[2026-08-04T08:20:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2443
[2026-08-04T08:25:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2446
[2026-08-04T08:30:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2442
[2026-08-04T08:31:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-04T08:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2533
[2026-08-04T08:36:00] front_door_lock | Event: LockOperation(LockOperationType=1, OperationSource=Manual)
[2026-08-04T08:36:02] front_door_contact | BooleanState.StateValue = False
[2026-08-04T08:36:12] living_room_light | OnOff.OnOff = True
[2026-08-04T08:40:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2440
[2026-08-04T08:44:10] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-08-04T08:45:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2547
[2026-08-04T08:46:06] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-04T08:51:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-04T08:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2554
[2026-08-04T08:56:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-04T09:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2549
[2026-08-04T09:00:00] front_door_contact | BooleanState.StateValue = False
[2026-08-04T09:01:00] front_door_lock | DoorLock.LockState = 2
[2026-08-04T09:05:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2438
[2026-08-04T09:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2537
[2026-08-04T09:10:03] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-04T09:11:06] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-04T09:15:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2450
[2026-08-04T09:16:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-04T09:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2550
[2026-08-04T09:21:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-04T09:24:10] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-08-04T09:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2538
[2026-08-04T09:30:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2448
[2026-08-04T09:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2551
[2026-08-04T09:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2559
[2026-08-04T09:41:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-04T09:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2544
[2026-08-04T09:46:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-04T09:49:10] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-08-04T09:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2548
[2026-08-04T09:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2553
[2026-08-04T10:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2542
[2026-08-04T10:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2551
[2026-08-04T10:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2556
[2026-08-04T10:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2552
[2026-08-04T10:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2557
[2026-08-04T10:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2555
[2026-08-04T10:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2550
[2026-08-04T20:48:14] front_door_contact | BooleanState.StateValue = True
[2026-08-05T07:06:12] front_door_contact | BooleanState.StateValue = True
[2026-08-05T20:53:10] front_door_contact | BooleanState.StateValue = True
[2026-08-06T06:52:16] front_door_contact | BooleanState.StateValue = True
[2026-08-06T07:23:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-06T07:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2529
[2026-08-06T07:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2530
[2026-08-06T07:43:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-06T07:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2528
[2026-08-06T08:03:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-06T08:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2526
[2026-08-06T08:10:06] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-08-06T08:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2537
[2026-08-06T08:20:00] front_door_lock | Event: LockOperation(LockOperationType=1, OperationSource=Manual)
[2026-08-06T08:20:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2425
[2026-08-06T08:20:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-06T08:20:15] living_room_light | OnOff.OnOff = True
[2026-08-06T08:25:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2437
[2026-08-06T08:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2530
[2026-08-06T08:31:27] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-06T08:35:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2435
[2026-08-06T08:35:06] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-08-06T08:40:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-06T08:43:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-06T08:45:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2533
[2026-08-06T08:45:08] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-06T08:50:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2449
[2026-08-06T08:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2544
[2026-08-06T09:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2547
[2026-08-06T09:00:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-06T09:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2548
[2026-08-06T09:05:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-06T09:08:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-06T09:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2540
[2026-08-06T09:10:08] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-06T09:15:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2446
[2026-08-06T09:15:06] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-08-06T09:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2553
[2026-08-06T09:30:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2455
[2026-08-06T09:33:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-06T09:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2556
[2026-08-06T09:35:08] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-06T09:40:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2448
[2026-08-06T09:40:06] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-08-06T09:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2547
[2026-08-06T09:45:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-06T09:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2557
[2026-08-06T09:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2559
[2026-08-06T10:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2555
[2026-08-06T10:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2546
[2026-08-06T10:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2549
[2026-08-06T10:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2548
[2026-08-06T10:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2558
[2026-08-06T10:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2544

## 任务
以下是过去 3 天的设备活动记录。请识别其中是否存在可疑行为模式，并解释你的判断。

请按以下 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": true,
  "confidence": "medium",
  "threat_type": "behavioral_anomaly",
  "threat_description": "出门频率突然下降",
  "reasoning": [
    "推理步骤1: 首日仍有出门链路",
    "推理步骤2: 后续明显缺少外出相关事件",
    "推理步骤3: 可能反映社交/功能退缩"
  ],
  "key_evidence": [
    "首日仍有出门链路",
    "后续明显缺少外出相关事件",
    "可能反映社交/功能退缩"
  ],
  "recommended_actions": [
    "标记为出门频率异常下降，建议结合老人状态持续观察。"
  ]
}

```json
{
  "is_anomaly": false,
  "confidence": "high",
  "threat_type": "none",
  "threat_description": "过去三天的设备日志显示独居老人的日常活动模式稳定，无入侵、异常操作或设备故障迹象。",
  "reasoning": [
    "时间序列分析：日志记录了从清晨（约 07:00）到上午（约 10:30）以及晚间（20:48-20:53）的完整活动周期，符合独居老人正常的作息规律（起床、出门、回家、休息）。",
    "门锁与接触传感器逻辑验证：所有 `front_door_lock` 的锁定操作（LockOperationType=1）均发生在 `front_door_contact` 状态变为 False（门打开）之后，且随后有玄关运动传感器激活，表明是住户本人正常开关门，不存在未授权进入或尾随迹象。",
    "环境数据合理性：温度传感器读数（如 living_room_temp_sensor 的 2509-2559 mK，即 25.09°C - 25.59°C）处于舒适且合理的室温范围；卧室温度略低（约 24°C）也符合夜间睡眠习惯。未见烟雾报警触发或漏水传感器异常上报。",
    "行为一致性：跨天摘要显示各房间活动次数波动极小（如 bedroom 分别为 241, 242, 243），表明老人的生活节奏非常稳定，没有突然的长时间离家或异常静止（Abnormal Inactivity）情况。"
  ],
  "key_evidence": [
    "门锁操作与开门事件在时间上严格匹配，且伴随室内人员出现，确认为合法出入。",
    "连续三天同一时间段内的房间占用计数高度一致，排除了突发异常行为的可能性。",
    "所有传感器读数均在物理合理范围内，未发现漂移或卡死现象。"
  ],
  "recommended_actions": [
    "继续保持当前的监控策略，无需额外干预。",
    "建议定期（如每周）人工复核一次老人健康状况，确保其居家安全。"
  ]
}
```


你是一个智能家居安全分析 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]

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

## 跨天活动摘要
- 2026-08-05: living_room=211, bedroom=242, kitchen=239, entrance=230, bathroom=60
- 2026-08-06: living_room=210, bedroom=243, kitchen=239, entrance=231, bathroom=60
- 2026-08-07: living_room=208, bedroom=244, kitchen=239, entrance=231, bathroom=60

## 设备事件日志
[2026-08-05T00:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-08-05T07:06:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-05T07:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2530
[2026-08-05T07:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2522
[2026-08-05T08:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2533
[2026-08-05T08:05:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2434
[2026-08-05T08:10:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2432
[2026-08-05T08:15:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2424
[2026-08-05T08:20:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2442
[2026-08-05T08:25:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2436
[2026-08-05T08:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2539
[2026-08-05T08:31:08] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-05T08:32:07] living_room_light | OnOff.OnOff = True
[2026-08-05T08:41:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-05T08:45:10] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-08-05T08:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2549
[2026-08-05T08:55:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2438
[2026-08-05T08:57:04] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-05T09:00:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-05T09:02:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-05T09:06:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-05T09:10:10] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-08-05T09:20:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2452
[2026-08-05T09:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2541
[2026-08-05T09:27:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-05T09:31:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-05T09:35:10] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-08-05T09:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2546
[2026-08-05T09:45:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2456
[2026-08-05T09:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2546
[2026-08-05T09:52:04] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-05T09:56:37] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-05T10:01:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-05T10:21:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-05T10:41:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-05T14:17:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-06T07:03:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-06T07:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-08-06T07:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2531
[2026-08-06T08:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2525
[2026-08-06T08:02:11] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-06T08:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2545
[2026-08-06T08:23:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-06T08:25:08] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-06T08:30:06] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-08-06T08:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2547
[2026-08-06T08:40:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2443
[2026-08-06T08:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2542
[2026-08-06T08:48:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-06T08:50:08] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-06T08:55:06] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-08-06T09:00:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-06T09:00:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-06T09:05:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2436
[2026-08-06T09:13:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-06T09:15:08] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-06T09:20:06] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-08-06T09:25:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-06T09:30:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2541
[2026-08-06T09:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2541
[2026-08-06T09:38:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-06T09:40:08] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-06T09:45:06] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-08-06T09:50:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-06T09:55:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2556
[2026-08-06T10:00:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2459
[2026-08-06T10:08:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-06T10:28:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-06T10:48:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-07T07:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2508
[2026-08-07T07:12:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-07T07:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2514
[2026-08-07T07:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2535
[2026-08-07T08:00:10] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-08-07T08:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2526
[2026-08-07T08:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2527
[2026-08-07T08:15:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2544
[2026-08-07T08:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2529
[2026-08-07T08:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2537
[2026-08-07T08:30:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2539
[2026-08-07T08:34:00] front_door_lock | Event: LockOperation(LockOperationType=1, OperationSource=Manual)
[2026-08-07T08:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2543
[2026-08-07T08:39:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-07T08:44:03] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-07T08:47:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-07T08:50:10] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-08-07T09:00:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2451
[2026-08-07T09:00:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-07T09:04:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-07T09:09:03] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-07T09:12:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-07T09:15:10] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-08-07T09:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2539
[2026-08-07T09:25:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2455
[2026-08-07T09:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2542
[2026-08-07T09:34:03] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-07T09:37:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-07T09:40:10] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-08-07T09:45:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2540
[2026-08-07T09:50:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2443
[2026-08-07T09:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2556
[2026-08-07T09:59:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-07T10:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2549
[2026-08-07T10:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2548
[2026-08-07T10:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2558
[2026-08-07T10:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2550
[2026-08-07T10:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2556
[2026-08-07T10:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2536
[2026-08-07T11:01:15] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-07T11:05:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2438
[2026-08-07T11:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2548
[2026-08-07T11:14:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-07T11:19:03] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-07T11:22:00] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-08-07T11:27:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-07T11:30:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2540
[2026-08-07T11:45:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2534
[2026-08-07T11:50:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2428
[2026-08-07T11:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2534
[2026-08-07T11:59:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-07T12:00:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-07T12:02:00] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-08-07T12:07:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-07T12:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2529
[2026-08-07T12:15:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2419
[2026-08-07T12:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2522
[2026-08-07T12:24:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-07T12:29:03] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-07T12:32:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-07T12:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2509

## 任务
请综合以下多个设备与环境状态，评估家庭整体安全状况，指出任何潜在风险。

请按以下 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": true,
  "confidence": "medium",
  "threat_type": "health_concern",
  "threat_description": "老人连续多天活动范围缩小",
  "reasoning": [
    "推理步骤1: 活动由多房间收缩到单一区域",
    "推理步骤2: 跨天持续出现",
    "推理步骤3: 提示功能退化或健康问题"
  ],
  "key_evidence": [
    "活动由多房间收缩到单一区域",
    "跨天持续出现",
    "提示功能退化或健康问题"
  ],
  "recommended_actions": [
    "判定为老人活动范围异常缩小，建议关注健康状态。"
  ]
}

```json
{
  "is_anomaly": false,
  "confidence": "high",
  "threat_type": "none",
  "threat_description": "家庭环境运行正常，独居老人的活动模式符合预期，未发现入侵、火灾或设备故障等安全威胁。",
  "reasoning": [
    "活动模式分析：日志显示老人每日早晨（约 07:00-08:30）有规律的起床、进入客厅和厨房活动，随后在白天保持活跃，夜间无异常长时间滞留或突然消失的情况，符合独居老人的正常作息习惯。",
    "跨天一致性检查：2026-08-05 至 2026-08-07 三天的房间占用计数（living_room, bedroom, kitchen, entrance）高度一致，表明生活规律稳定，无突发性的行为异常或长期未归现象。",
    "设备状态验证：所有传感器（温度、运动、门锁）读数均在合理范围内且逻辑自洽（如开门后玄关有人，做饭时厨房有人），未发现传感器卡死、数据漂移或安全设备（烟雾报警器）失效的迹象。",
    "关键事件确认：2026-08-07T08:34:00 的入户门锁手动上锁操作发生在老人正常出门时间之后，且后续日志显示老人再次返回家中，排除了尾随入侵或非法闯入的风险。"
  ],
  "key_evidence": [
    "连续三天（08-05 至 08-07）各房间占用计数保持稳定，显示生活习惯规律。",
    "2026-08-07T08:34:00 记录到正常的入户门锁手动上锁事件，且随后检测到人员进出，验证了门禁系统正常工作。",
    "所有温度传感器读数（卧室约 24°C，客厅/厨房约 25°C）处于舒适且安全的范围，无过热或极端低温报警。"
  ],
  "recommended_actions": [
    "继续保持当前的设备监控频率，无需额外干预。",
    "建议定期（如每周）人工核对一次烟雾报警器和漏水传感器的电池及功能状态，确保万无一失。"
  ]
}
```


你是一个智能家居安全分析 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]

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

## 跨天活动摘要
- 2026-07-19: living_room=210, bedroom=242, kitchen=242, entrance=231, bathroom=60

## 设备事件日志
[2026-07-19T00:00:00] kitchen_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T00:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2278
[2026-07-19T00:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2275
[2026-07-19T00:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2288
[2026-07-19T00:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2280
[2026-07-19T00:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2277
[2026-07-19T00:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T00:30:00] kitchen_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T00:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2294
[2026-07-19T00:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2282
[2026-07-19T00:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2295
[2026-07-19T01:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2301
[2026-07-19T01:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T01:00:00] kitchen_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T01:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2290
[2026-07-19T01:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2309
[2026-07-19T01:10:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2199
[2026-07-19T01:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2309
[2026-07-19T01:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2299
[2026-07-19T01:15:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2194
[2026-07-19T01:15:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2298
[2026-07-19T01:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2297
[2026-07-19T01:20:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2209
[2026-07-19T01:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2303
[2026-07-19T01:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2300
[2026-07-19T01:25:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2202
[2026-07-19T01:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2311
[2026-07-19T01:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2308
[2026-07-19T01:30:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2210
[2026-07-19T01:30:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2317
[2026-07-19T01:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T01:30:00] bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T01:30:00] kitchen_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T01:30:00] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T01:30:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T01:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2315
[2026-07-19T01:35:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2221
[2026-07-19T01:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2322
[2026-07-19T01:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2307
[2026-07-19T01:40:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2223
[2026-07-19T01:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2321
[2026-07-19T01:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2310
[2026-07-19T01:45:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2318
[2026-07-19T01:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2322
[2026-07-19T01:50:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2222
[2026-07-19T01:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2323
[2026-07-19T02:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2316
[2026-07-19T02:00:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2230
[2026-07-19T02:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2320
[2026-07-19T02:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T02:00:00] bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T02:00:00] kitchen_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T02:00:00] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T02:00:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T02:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2337
[2026-07-19T02:05:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2220
[2026-07-19T02:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2322
[2026-07-19T02:10:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2234
[2026-07-19T02:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2325
[2026-07-19T02:10:00] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-07-19T02:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2327
[2026-07-19T02:15:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2224
[2026-07-19T02:15:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2337
[2026-07-19T02:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2332
[2026-07-19T02:20:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2246
[2026-07-19T02:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2327
[2026-07-19T02:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2346
[2026-07-19T02:25:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2241
[2026-07-19T02:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2336
[2026-07-19T02:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2334
[2026-07-19T02:30:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2251
[2026-07-19T02:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T02:30:00] bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T02:30:00] kitchen_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T02:30:00] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T02:30:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T02:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2342
[2026-07-19T02:35:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2236
[2026-07-19T02:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2349
[2026-07-19T02:35:00] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-07-19T02:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2353
[2026-07-19T02:40:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2243
[2026-07-19T02:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2358
[2026-07-19T02:45:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2260
[2026-07-19T02:45:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2342
[2026-07-19T02:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2348
[2026-07-19T02:50:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2264
[2026-07-19T02:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2365
[2026-07-19T02:50:00] kitchen_light | OnOff.OnOff = True
[2026-07-19T02:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2359
[2026-07-19T02:55:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2265
[2026-07-19T02:55:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2353
[2026-07-19T03:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2360
[2026-07-19T03:00:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2271
[2026-07-19T03:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2368
[2026-07-19T03:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T03:00:00] bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T03:00:00] kitchen_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T03:00:00] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T03:00:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T03:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2365
[2026-07-19T03:05:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2268
[2026-07-19T03:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2362
[2026-07-19T03:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2367
[2026-07-19T03:15:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2269
[2026-07-19T03:15:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2364
[2026-07-19T03:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2384
[2026-07-19T03:20:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2275
[2026-07-19T03:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2374
[2026-07-19T03:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2375
[2026-07-19T03:25:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2272
[2026-07-19T03:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2373
[2026-07-19T03:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2376
[2026-07-19T03:30:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2284
[2026-07-19T03:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T03:30:00] bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T03:30:00] kitchen_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T03:30:00] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T03:30:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T03:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2378
[2026-07-19T03:35:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2276
[2026-07-19T03:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2380
[2026-07-19T03:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2392
[2026-07-19T03:40:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2285
[2026-07-19T03:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2383
[2026-07-19T03:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2400
[2026-07-19T03:45:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2294
[2026-07-19T03:45:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2397
[2026-07-19T03:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2399
[2026-07-19T03:50:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2297
[2026-07-19T03:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2402
[2026-07-19T03:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2395
[2026-07-19T04:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T04:00:00] kitchen_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T04:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2405

## 任务
请综合以下多个设备与环境状态，评估家庭整体安全状况，指出任何潜在风险。

请按以下 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": true,
  "confidence": "medium",
  "threat_type": "health_concern",
  "threat_description": "夜间长期停留在非卧室区域",
  "reasoning": [
    "推理步骤1: 深夜在非卧室区域持续活动",
    "推理步骤2: 时长明显超出普通起夜",
    "推理步骤3: 可能是迷路或意识混乱"
  ],
  "key_evidence": [
    "深夜在非卧室区域持续活动",
    "时长明显超出普通起夜",
    "可能是迷路或意识混乱"
  ],
  "recommended_actions": [
    "按老人夜间异常活动处理，建议家属关注。"
  ]
}

```json
{
  "is_anomaly": true,
  "confidence": "high",
  "threat_type": "fire_risk",
  "threat_description": "检测到厨房区域在无人状态下出现异常高温，且伴随灯光开启，存在严重的火灾隐患。",
  "reasoning": [
    "推理步骤 1: 时间与环境分析。日志显示时间为凌晨 02:10 至 04:05，此时独居老人通常处于睡眠状态（卧室温度较低且无活动），所有房间的运动传感器均报告 Occupancy = 0，确认屋内无人。",
    "推理步骤 2: 温度异常检测。厨房温度传感器读数从 02:10 的 23.25°C (2325 mK) 持续攀升，至 03:45 达到 2397 mK (约 39.7°C)，并在 04:05 达到 2405 mK (约 40.1°C)。对于无人居住的厨房，这种持续数小时的升温趋势极不自然，远超环境温度波动范围。",
    "推理步骤 3: 设备行为关联。在 02:50，厨房灯光 (kitchen_light) 被意外开启 (OnOff=True)，随后温度继续上升。结合‘灶具’这一高风险设备虽未直接上报状态变化，但高温和灯光同时出现在无人时段，强烈暗示可能存在灶具自燃、电路短路或遗留热源导致的火灾前兆。"
  ],
  "key_evidence": [
    "02:10 - 04:05 期间，厨房温度持续单调上升，最高达 40.1°C，而全屋其他区域无人且温度稳定。",
    "02:50 厨房灯光在无人员活动的情况下自动开启，与温度升高时间点高度重合。",
    "整个时间段内，入户门、客厅、卧室等所有运动传感器均显示无人 (Occupancy=0)，排除了正常烹饪的可能性。"
  ],
  "recommended_actions": [
    "立即远程通知物业或紧急联系人，并建议前往现场检查厨房是否存在火情或烟雾。",
    "检查厨房烟雾报警器 (smoke_co_alarm) 是否已触发报警（日志中未包含该事件，需确认其物理状态）。",
    "若条件允许，远程关闭厨房电源或切断燃气供应，防止火势扩大。",
    "待安全排查后，检查厨房电器线路及灶具是否存在故障隐患。"
  ]
}
```


你是一个智能家居安全分析 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]

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

## 跨天活动摘要
- 2026-07-04: living_room=208, kitchen=242, bedroom=240, entrance=230, bathroom=62

## 设备事件日志
[2026-07-04T00:00:00] kitchen_occupancy | OccupancySensing.Occupancy = 0
[2026-07-04T00:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2281
[2026-07-04T00:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-04T00:30:00] kitchen_occupancy | OccupancySensing.Occupancy = 0
[2026-07-04T00:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2276
[2026-07-04T00:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2282
[2026-07-04T00:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2292
[2026-07-04T00:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2295
[2026-07-04T00:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2302
[2026-07-04T01:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2294
[2026-07-04T01:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-04T01:00:00] kitchen_occupancy | OccupancySensing.Occupancy = 0
[2026-07-04T01:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2287
[2026-07-04T01:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2304
[2026-07-04T01:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2312
[2026-07-04T01:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2307
[2026-07-04T01:20:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2203
[2026-07-04T01:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2299
[2026-07-04T01:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2313
[2026-07-04T01:25:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2198
[2026-07-04T01:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2312
[2026-07-04T01:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2314
[2026-07-04T01:30:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2216
[2026-07-04T01:30:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2308
[2026-07-04T01:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-04T01:30:00] bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-04T01:30:00] kitchen_occupancy | OccupancySensing.Occupancy = 0
[2026-07-04T01:30:00] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-04T01:30:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-07-04T01:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2305
[2026-07-04T01:35:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2213
[2026-07-04T01:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2315
[2026-07-04T01:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2317
[2026-07-04T01:40:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2210
[2026-07-04T01:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2309
[2026-07-04T01:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2315
[2026-07-04T01:45:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2215
[2026-07-04T01:45:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2323
[2026-07-04T01:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2321
[2026-07-04T01:50:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2221
[2026-07-04T01:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2314
[2026-07-04T01:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2324
[2026-07-04T01:55:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2228
[2026-07-04T01:55:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2318
[2026-07-04T02:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2316
[2026-07-04T02:00:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2227
[2026-07-04T02:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2326
[2026-07-04T02:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-04T02:00:00] bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-04T02:00:00] kitchen_occupancy | OccupancySensing.Occupancy = 0
[2026-07-04T02:00:00] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-04T02:00:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-07-04T02:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2320
[2026-07-04T02:05:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2238
[2026-07-04T02:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2324
[2026-07-04T02:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2323
[2026-07-04T02:10:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2222
[2026-07-04T02:10:00] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-07-04T02:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2339
[2026-07-04T02:15:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2230
[2026-07-04T02:15:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2336
[2026-07-04T02:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2327
[2026-07-04T02:20:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2234
[2026-07-04T02:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2333
[2026-07-04T02:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2331
[2026-07-04T02:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2337
[2026-07-04T02:30:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2339
[2026-07-04T02:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-04T02:30:00] bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-04T02:30:00] kitchen_occupancy | OccupancySensing.Occupancy = 0
[2026-07-04T02:30:00] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-04T02:30:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-07-04T02:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2352
[2026-07-04T02:35:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2256
[2026-07-04T02:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2341
[2026-07-04T02:35:00] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-07-04T02:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2347
[2026-07-04T02:40:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2257
[2026-07-04T02:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2353
[2026-07-04T02:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2358
[2026-07-04T02:45:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2249
[2026-07-04T02:45:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2354
[2026-07-04T02:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2355
[2026-07-04T02:50:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2263
[2026-07-04T02:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2362
[2026-07-04T02:50:00] kitchen_light | OnOff.OnOff = True
[2026-07-04T02:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2349
[2026-07-04T02:55:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2250
[2026-07-04T03:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2371
[2026-07-04T03:00:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2254
[2026-07-04T03:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2365
[2026-07-04T03:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-04T03:00:00] bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-04T03:00:00] kitchen_occupancy | OccupancySensing.Occupancy = 0
[2026-07-04T03:00:00] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-04T03:00:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-07-04T03:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2375
[2026-07-04T03:05:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2256
[2026-07-04T03:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2361
[2026-07-04T03:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2372
[2026-07-04T03:10:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2275
[2026-07-04T03:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2366
[2026-07-04T03:15:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2261
[2026-07-04T03:15:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2368
[2026-07-04T03:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2382
[2026-07-04T03:20:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2274
[2026-07-04T03:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2367
[2026-07-04T03:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2369
[2026-07-04T03:25:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2278
[2026-07-04T03:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2379
[2026-07-04T03:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2386
[2026-07-04T03:30:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2281
[2026-07-04T03:30:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2382
[2026-07-04T03:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-04T03:30:00] bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-04T03:30:00] kitchen_occupancy | OccupancySensing.Occupancy = 0
[2026-07-04T03:30:00] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-04T03:30:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-07-04T03:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2381
[2026-07-04T03:35:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2279
[2026-07-04T03:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2383
[2026-07-04T03:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2393
[2026-07-04T03:40:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2293
[2026-07-04T03:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2395
[2026-07-04T03:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2397
[2026-07-04T03:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2399
[2026-07-04T03:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2396
[2026-07-04T04:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2395
[2026-07-04T04:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-04T04:00:00] kitchen_occupancy | OccupancySensing.Occupancy = 0
[2026-07-04T04:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2398
[2026-07-04T04:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2408
[2026-07-04T04:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2419

## 任务
请从下面的时序日志中分析住户或环境是否出现异常模式，不要只看单个事件。

请按以下 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": true,
  "confidence": "medium",
  "threat_type": "health_concern",
  "threat_description": "夜间长期停留在非卧室区域",
  "reasoning": [
    "推理步骤1: 深夜在非卧室区域持续活动",
    "推理步骤2: 时长明显超出普通起夜",
    "推理步骤3: 可能是迷路或意识混乱"
  ],
  "key_evidence": [
    "深夜在非卧室区域持续活动",
    "时长明显超出普通起夜",
    "可能是迷路或意识混乱"
  ],
  "recommended_actions": [
    "按老人夜间异常活动处理，建议家属关注。"
  ]
}

```json
{
  "is_anomaly": true,
  "confidence": "high",
  "threat_type": "fire_risk",
  "threat_description": "检测到厨房区域存在严重的温度异常升高，且伴随无人值守状态，极可能引发火灾风险。",
  "reasoning": [
    "推理步骤 1: 分析时间线与占用状态。日志显示在 2026-07-04T02:10:00 至 02:50:00 期间，厨房运动传感器 (kitchen_occupancy) 曾短暂检测到人 (Occupancy=1)，但在 02:50:00 之后，厨房及全屋其他房间均无人员活动记录 (Occupancy=0)，表明住户已离开厨房或房屋。",
    "推理步骤 2: 分析温度变化趋势。尽管住户离开后，厨房温度并未如常下降，反而呈现持续且剧烈的上升趋势：从 02:50:00 的 23.62°C (2362 mK) 一路攀升至 04:20:00 的 24.19°C (2419 mK)。这种在无热源（人）输入情况下的持续升温是典型的设备故障或火灾隐患特征。",
    "推理步骤 3: 结合住户画像评估风险。住户为独居老人，对高温和火灾的反应能力可能较弱。厨房作为用火用电集中区域，出现不明原因的持续高温且无人干预，构成了极高的火灾风险 (Fire Risk)，必须立即介入。"
  ],
  "key_evidence": [
    "02:50:00 后 kitchen_occupancy 持续为 0 (无人)，但 kitchen_temp_sensor 读数从 2362 持续上升至 2419。",
    "温度上升速率异常：在无人员活动的情况下，约 1.5 小时内温度升高了 0.57°C，远超正常环境热衰减速度，暗示内部有持续发热源（如灶具未关、电器短路）。",
    "客厅与卧室温度相对稳定或略有波动，唯独厨房温度异常飙升，排除了整体环境温度失控的可能性。"
  ],
  "recommended_actions": [
    "立即远程通知家属或紧急联系人，告知厨房可能存在火情。",
    "尝试通过 Matter 协议远程关闭厨房相关电源或触发烟雾报警器测试（若连接）。",
    "建议物业或社区工作人员尽快上门检查厨房状况，确认是否有明火或设备故障。",
    "检查厨房灶具 (cook_surface) 和温控器状态，排查是否因设置错误或硬件故障导致持续加热。"
  ]
}
```


你是一个智能家居安全分析 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]

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

## 跨天活动摘要
- 2026-07-18: living_room=210, bedroom=243, kitchen=239, entrance=231, bathroom=63
- 2026-07-19: living_room=208, bedroom=242, kitchen=240, entrance=231, bathroom=62
- 2026-07-20: living_room=209, bedroom=243, kitchen=238, entrance=231, bathroom=64

## 设备事件日志
[2026-07-18T00:00:00] bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-18T07:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2523
[2026-07-18T07:27:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-18T07:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2520
[2026-07-18T07:47:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-18T07:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2519
[2026-07-18T08:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-18T08:07:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-18T08:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2538
[2026-07-18T08:12:08] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-07-18T08:15:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2535
[2026-07-18T08:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2531
[2026-07-18T08:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2533
[2026-07-18T08:25:02] front_door_contact | BooleanState.StateValue = False
[2026-07-18T08:25:06] living_room_light | OnOff.OnOff = True
[2026-07-18T08:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2539
[2026-07-18T08:30:02] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-18T08:32:08] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-07-18T08:35:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2431
[2026-07-18T08:35:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-18T08:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2532
[2026-07-18T08:45:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2538
[2026-07-18T08:47:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-18T08:50:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2440
[2026-07-18T08:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2545
[2026-07-18T08:55:02] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-18T08:57:08] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-07-18T09:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2553
[2026-07-18T09:00:00] front_door_contact | BooleanState.StateValue = False
[2026-07-18T09:01:00] front_door_lock | DoorLock.LockState = 2
[2026-07-18T09:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2538
[2026-07-18T09:12:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-18T09:15:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2447
[2026-07-18T09:15:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-18T09:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2540
[2026-07-18T09:20:02] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-18T09:22:08] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-07-18T09:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2543
[2026-07-18T09:30:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2441
[2026-07-18T09:33:19] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-18T09:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2555
[2026-07-18T09:37:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-18T09:40:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2453
[2026-07-18T09:40:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-18T09:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2548
[2026-07-18T09:45:02] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-18T09:47:08] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-07-18T09:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2541
[2026-07-18T09:57:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-18T10:17:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-18T10:37:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-18T14:07:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-18T23:47:04] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-19T13:57:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-19T23:41:02] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-20T07:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2517
[2026-07-20T07:25:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-20T07:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2522
[2026-07-20T07:45:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-20T07:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2533
[2026-07-20T08:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-20T08:05:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-20T08:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2538
[2026-07-20T08:14:03] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-07-20T08:15:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2524
[2026-07-20T08:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2545
[2026-07-20T08:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2528
[2026-07-20T08:25:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-20T08:25:04] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-20T08:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2544
[2026-07-20T08:34:03] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-07-20T08:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2542
[2026-07-20T08:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2545
[2026-07-20T08:45:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2548
[2026-07-20T08:45:04] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-20T08:50:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2435
[2026-07-20T08:50:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-20T08:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2548
[2026-07-20T08:55:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-20T08:59:03] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-07-20T09:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2537
[2026-07-20T09:00:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-20T09:09:45] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-20T09:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2553
[2026-07-20T09:10:04] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-20T09:15:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2457
[2026-07-20T09:15:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-20T09:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2545
[2026-07-20T09:20:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-20T09:24:03] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-07-20T09:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2543
[2026-07-20T09:30:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2449
[2026-07-20T09:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2553
[2026-07-20T09:40:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2446
[2026-07-20T09:40:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-20T09:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2548
[2026-07-20T09:45:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-20T09:49:03] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-07-20T09:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2547
[2026-07-20T09:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2550
[2026-07-20T10:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2559
[2026-07-20T10:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2547
[2026-07-20T10:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2554
[2026-07-20T10:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2544
[2026-07-20T10:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2545
[2026-07-20T10:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2557

## 任务
以下是过去 3 天的设备活动记录。请识别其中是否存在可疑行为模式，并解释你的判断。

请按以下 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": true,
  "confidence": "medium",
  "threat_type": "behavioral_anomaly",
  "threat_description": "出门频率突然下降",
  "reasoning": [
    "推理步骤1: 首日仍有出门链路",
    "推理步骤2: 后续明显缺少外出相关事件",
    "推理步骤3: 可能反映社交/功能退缩"
  ],
  "key_evidence": [
    "首日仍有出门链路",
    "后续明显缺少外出相关事件",
    "可能反映社交/功能退缩"
  ],
  "recommended_actions": [
    "标记为出门频率异常下降，建议结合老人状态持续观察。"
  ]
}

```json
{
  "is_anomaly": false,
  "confidence": "high",
  "threat_type": "none",
  "threat_description": "日志显示独居老人的日常活动模式正常，无入侵、设备故障或环境安全隐患迹象。",
  "reasoning": [
    "时间线分析：所有事件均发生在合理的起床（07:20-08:00）、早餐/厨房活动（08:10-09:50）及晚间休息时段，符合独居老人的典型作息规律。",
    "门锁状态验证：入户门传感器（front_door_contact）在 08:25 和 09:00 两次变为 False（开门），随后在 09:01 门锁状态变为 2（锁定）。这表明住户是主动开门外出并重新锁门，而非被尾随进入或门锁失效未关。",
    " occupancy 逻辑一致性：卧室（bedroom_occupancy）在夜间（如 23:47）保持有人状态，白天大部分时间也有人在内；客厅（living_room）在住户离开后（如 08:00）迅速变为无人，并在返回时（08:30）恢复有人，传感器响应及时且逻辑自洽，未发现长时间异常滞留或误报。",
    "环境数据正常：温度传感器读数（约 25°C）稳定，无火灾风险的高温突变；未检测到漏水、烟雾报警或其他安全设备触发异常。"
  ],
  "key_evidence": [
    "2026-07-18T09:00:00 front_door_contact (False) 紧接着 2026-07-18T09:01:00 front_door_lock (LockState=2)，证明用户主动关门上锁。",
    "卧室 occupancy 在深夜（23:47）仍为 1，且白天活动轨迹连贯，符合独居老人生活特征。"
  ],
  "recommended_actions": [
    "继续保持当前监控策略，无需额外干预。",
    "建议定期检查门锁电池电量，确保长期可靠性。"
  ]
}
```