From 849d74d16afb37ea824b5a8bcb963a28a109f25b Mon Sep 17 00:00:00 2001 From: 16337 <1633794139@qq.com> Date: Thu, 5 Feb 2026 15:16:49 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E7=A7=BB=E9=99=A4=E4=BA=BA=E7=BE=A4?= =?UTF-8?q?=E8=81=9A=E9=9B=86=E6=A3=80=E6=B5=8B=E7=AE=97=E6=B3=95=E9=A2=84?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - SQL初始化脚本移除 crowd_detection - Java预置算法移除 crowd_detection - 与边缘端保持一致,仅保留2个算法 Co-Authored-By: Claude Opus 4.5 --- .../vmp/aiot/service/impl/AiAlgorithmServiceImpl.java | 10 ++++++---- 数据库/aiot/初始化-mysql-aiot.sql | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) 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 7a1360f07..b1b08d0fe 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 @@ -34,6 +34,7 @@ public class AiAlgorithmServiceImpl implements IAiAlgorithmService { /** * 预置算法定义,启动时自动校正数据库中的乱码数据 + * 注意:仅包含边缘端实际实现的算法 */ private static final Map PRESET_ALGORITHMS = new HashMap<>(); static { @@ -46,10 +47,11 @@ public class AiAlgorithmServiceImpl implements IAiAlgorithmService { "周界入侵检测", "person", "检测人员进入指定区域", "{\"cooldown_seconds\":{\"type\":\"int\",\"default\":120,\"min\":0},\"confirm_seconds\":{\"type\":\"int\",\"default\":5,\"min\":1}}" }); - PRESET_ALGORITHMS.put("crowd_detection", new String[]{ - "人群聚集检测", "person", "检测区域内人员数量是否超过阈值", - "{\"max_count\":{\"type\":\"int\",\"default\":10,\"min\":1},\"cooldown_seconds\":{\"type\":\"int\",\"default\":300,\"min\":0}}" - }); + // 人群聚集检测暂时注释,边缘端未启用 + // PRESET_ALGORITHMS.put("crowd_detection", new String[]{ + // "人群聚集检测", "person", "检测区域内人员数量是否超过阈值", + // "{\"max_count\":{\"type\":\"int\",\"default\":10,\"min\":1},\"cooldown_seconds\":{\"type\":\"int\",\"default\":300,\"min\":0}}" + // }); } @PostConstruct diff --git a/数据库/aiot/初始化-mysql-aiot.sql b/数据库/aiot/初始化-mysql-aiot.sql index 2166ccbc5..2d2f89017 100644 --- a/数据库/aiot/初始化-mysql-aiot.sql +++ b/数据库/aiot/初始化-mysql-aiot.sql @@ -70,7 +70,7 @@ CREATE TABLE IF NOT EXISTS wvp_ai_config_log ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='配置变更日志'; -- ============================================================ --- 初始数据:预置算法(2个,不含人群聚集检测) +-- 初始数据:预置算法(2个,与边缘端保持一致) -- ============================================================ INSERT INTO wvp_ai_algorithm (algo_code, algo_name, target_class, param_schema, description, is_active, create_time, update_time) VALUES ('leave_post', '离岗检测', 'person', '{"confirm_on_duty_sec":{"type":"int","default":10,"min":1},"confirm_leave_sec":{"type":"int","default":10,"min":1},"cooldown_sec":{"type":"int","default":300,"min":0},"working_hours":{"type":"list","default":[]}}', '检测人员是否在岗,支持工作时间段配置', 1, NOW(), NOW()),