Browse Source

推送新增算法事件

zhangdongming 2 năm trước cách đây
mục cha
commit
8fdf21b1fe
1 tập tin đã thay đổi với 9 bổ sung4 xóa
  1. 9 4
      Controller/DetectControllerV2.py

+ 9 - 4
Controller/DetectControllerV2.py

@@ -144,21 +144,26 @@ class NotificationV2View(View):
     @classmethod
     def get_combo_msg_type(cls, ai_type, event_type):
         """
-        获取组合类型,ai_type == 47 支持算法小店,需判断组合类型
+        获取组合类型,需判断组合类型
         """
         logger = logging.getLogger('info')
         try:
-            if ai_type != 47:
+            if ai_type == 0:
                 return event_type
             logger.info('LOG------算法小店组合类型十进制值:{}'.format(event_type))
-            # 如触发一个事件,则匹配已用类型 1替换后变成51代表移动侦测 1:移动侦测,2:人形,4:车型,8:人脸
+            # 设备十进制算法说明:1:移动侦测,2:人形,4:车型,8:人脸,16:宠物,32:异响,64:区域闯入,
+            # 128:区域闯出,256:徘徊检测,512:长时间无人检测
             event_dict = {
                 1: 51,
                 2: 57,
                 4: 58,
                 16: 59,
                 8: 60,
-                32: 61
+                32: 61,
+                64: 62,
+                128: 63,
+                256: 64,
+                512: 65
             }
             event_val = event_dict.get(event_type, 0)
             # event_val == 0 没有匹配到单个值则认为组合类型