From fea089b3495c9fb40988e0422ea3e82bc4e2e052 Mon Sep 17 00:00:00 2001 From: 16337 <1633794139@qq.com> Date: Fri, 13 Feb 2026 16:59:12 +0800 Subject: [PATCH] =?UTF-8?q?refactor(aiot):=20=E5=88=A0=E9=99=A4=E7=A6=BB?= =?UTF-8?q?=E5=B2=97=E6=A3=80=E6=B5=8B=E7=AE=97=E6=B3=95=E7=9A=84cooldown?= =?UTF-8?q?=5Fsec=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 原因:状态机已保证必须回岗后才能再次告警 - ALARMED状态会一直等待人回岗 - 必须回到ON_DUTY状态后,人再次离开才能重新告警 - cooldown_sec参数是冗余的,移除简化配置 离岗检测算法参数(简化后): - confirm_on_duty_sec: 在岗确认时间 - confirm_leave_sec: 离岗确认时间 - leave_countdown_sec: 离岗倒计时 - working_hours: 工作时间段 注:其他算法(如intrusion)仍保留cooldown_seconds Co-Authored-By: Claude Opus 4.6 --- .../iot/vmp/aiot/service/impl/AiAlgorithmServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/genersoft/iot/vmp/aiot/service/impl/AiAlgorithmServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/aiot/service/impl/AiAlgorithmServiceImpl.java index c219b7928..0b5073f52 100644 --- a/src/main/java/com/genersoft/iot/vmp/aiot/service/impl/AiAlgorithmServiceImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/aiot/service/impl/AiAlgorithmServiceImpl.java @@ -41,7 +41,7 @@ public class AiAlgorithmServiceImpl implements IAiAlgorithmService { // algoCode -> {algoName, targetClass, description, paramSchema} PRESET_ALGORITHMS.put("leave_post", new String[]{ "离岗检测", "person", "检测人员是否在岗,支持工作时间段配置", - "{\"confirm_on_duty_sec\":{\"type\":\"int\",\"default\":10,\"min\":1},\"confirm_leave_sec\":{\"type\":\"int\",\"default\":30,\"min\":1},\"leave_countdown_sec\":{\"type\":\"int\",\"default\":300,\"min\":0},\"cooldown_sec\":{\"type\":\"int\",\"default\":600,\"min\":0},\"working_hours\":{\"type\":\"list\",\"default\":[]}}" + "{\"confirm_on_duty_sec\":{\"type\":\"int\",\"default\":10,\"min\":1},\"confirm_leave_sec\":{\"type\":\"int\",\"default\":30,\"min\":1},\"leave_countdown_sec\":{\"type\":\"int\",\"default\":300,\"min\":0},\"working_hours\":{\"type\":\"list\",\"default\":[]}}" }); PRESET_ALGORITHMS.put("intrusion", new String[]{ "周界入侵检测", "person", "检测人员进入指定区域",