rtsp_config_longting.yaml 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. # ============================================================
  2. # 龙亭新水岛 水厂配置文件
  3. # ============================================================
  4. # 使用方法:python tool/migrate_yaml_to_db.py --yaml 本文件路径 --force
  5. # 导入后可通过 API(:8080)在线修改,无需再编辑此文件
  6. # ============================================================
  7. # ----------------------------------------------------------
  8. # 水厂列表
  9. # ----------------------------------------------------------
  10. plants:
  11. - name: 龙亭新水岛 # 水厂名称
  12. enabled: true # 是否启用
  13. project_id: 1450 # 平台项目 ID
  14. # 流量 PLC 映射(泵名称 -> PLC 地址)
  15. flow_plc:
  16. 高压泵1流量: ns=3;s=1#RO_JSFLOW_O
  17. 高压泵2流量: ns=3;s=2#RO_JSFLOW_O
  18. # 泵状态 PLC 点位(val=1 运行, val=0 停机)
  19. pump_status_plc:
  20. 段间泵: # pump_name(与 rtsp_streams.pump_name 对应)
  21. - point: ns=6;s=P_1#RODJB_RFB
  22. name: 1#RO段间泵
  23. - point: ns=6;s=P_2#RODJB_RFB
  24. name: 2#RO段间泵
  25. 高压泵:
  26. - point: ns=6;s=P_1#ROGYB_RFB
  27. name: 1#RO高压泵
  28. - point: ns=6;s=P_2#ROGYB_RFB
  29. name: 2#RO高压泵
  30. # RTSP 拾音器流(每个流 = 一台拾音器)
  31. rtsp_streams:
  32. - name: 龙亭一层冲洗泵区域5 # 显示名称
  33. url: rtsp://rtsp:newwater123@192.168.70.11:31016/cam/realmonitor?channel=5&subtype=0
  34. channel: 5 # 通道号
  35. device_code: LT-5 # 设备编码(唯一,训练数据/模型目录名)
  36. pump_name: 段间泵 # 关联泵名称
  37. model_subdir: LT-5 # 模型目录(默认 = device_code)
  38. - name: 龙亭一层高压泵区域
  39. url: rtsp://rtsp:newwater123@192.168.70.11:31016/cam/realmonitor?channel=2&subtype=0
  40. channel: 2
  41. device_code: LT-2
  42. pump_name: 高压泵
  43. model_subdir: LT-2
  44. # ----------------------------------------------------------
  45. # 音频采集参数
  46. # ----------------------------------------------------------
  47. audio:
  48. sample_rate: 16000 # 采样率 Hz(必须与训练一致)
  49. file_duration: 60 # 每个音频文件时长(秒)
  50. segment_duration: 60 # FFmpeg 切片时长(秒)
  51. auto_cleanup:
  52. enabled: true
  53. delete_normal: true
  54. keep_recent_count: 100
  55. # ----------------------------------------------------------
  56. # 异常检测参数
  57. # ----------------------------------------------------------
  58. prediction:
  59. batch_size: 64 # 推理批大小
  60. check_interval: 1.0 # 检查新文件间隔(秒)
  61. default_threshold: 0.01 # 默认阈值(模型未加载时)
  62. voting: # 滑动窗口投票
  63. enabled: true
  64. window_size: 5 # 5 个周期约 5 分钟
  65. threshold: 3 # 5 次中 3 次异常才报
  66. frequency_history:
  67. enabled: true
  68. history_minutes: 10
  69. energy_detection: # 音频能量检测(无 PLC 时判断启停)
  70. enabled: true
  71. skip_when_stopped: true
  72. save_anomaly_audio:
  73. enabled: true
  74. save_dir: data/anomaly_detected
  75. cooldown_minutes: 15
  76. context_capture:
  77. enabled: true
  78. pre_minutes: 2
  79. post_minutes: 2
  80. # ----------------------------------------------------------
  81. # 推送通知
  82. # ----------------------------------------------------------
  83. push_notification:
  84. enabled: false # 总开关(false = 不推送任何消息)
  85. alert_enabled: false # false = 只推心跳不推告警
  86. push_base_urls:
  87. - label: "外网"
  88. url: "http://120.55.44.4:8900/api/v1/dumu/push-msg"
  89. - label: "内网"
  90. url: "http://192.168.60.8:8900/api/v1/dumu/push-msg"
  91. timeout: 30
  92. retry_count: 2
  93. cooldown_minutes: 15
  94. cooldown_same_type_hours: 24
  95. cooldown_diff_type_hours: 1
  96. alert_aggregate:
  97. enabled: true
  98. window_seconds: 300
  99. min_devices: 2
  100. # ----------------------------------------------------------
  101. # SCADA/PLC 接口
  102. # ----------------------------------------------------------
  103. scada_api:
  104. enabled: true
  105. base_url: http://120.55.44.4:8900/api/v1/jinke-cloud/db/device/history-data
  106. realtime_url: http://47.96.12.136:8788/api/v1/jinke-cloud/device/current-data
  107. jwt_token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJJRCI6NywiVXNlcm5hbWUiOiJhZG1pbiIsIkRlcCI6IjEzNSIsImV4cCI6MTc3NjExOTExNCwiaXNzIjoiZ2luLWJsb2cifQ.0HTtzHZjyd2mHo8VCy8icYROxmntRMuQhyoZsAYRL_M
  108. timeout: 10
  109. # ----------------------------------------------------------
  110. # 人体检测抑制
  111. # ----------------------------------------------------------
  112. human_detection:
  113. enabled: false
  114. db_path: /data/human_detector/detection_status.db
  115. cooldown_minutes: 5