瀏覽代碼

V0.1.12
1、解析完了基础的Redis数据
2、开始判断数据的发生时间和报警信息

Apple 7 月之前
父節點
當前提交
e8c86560f6
共有 5 個文件被更改,包括 789 次插入578 次删除
  1. 3 1
      SecurePlayAuxServer/CMakeLists.txt
  2. 26 2
      SecurePlayAuxServer/GlobalInfo.h
  3. 89 16
      SecurePlayAuxServer/SPAServer.cpp
  4. 2 1
      SecurePlayAuxServer/SPAServer.h
  5. 669 558
      json.json

+ 3 - 1
SecurePlayAuxServer/CMakeLists.txt

@@ -38,6 +38,7 @@ target_include_directories(${execName1} PRIVATE
     ${LHQLog_INCLUDE_DIRS}
     ${LHHTTPAPI_SOURCE_DIRS}
     ${SM_INCLUDE_DIR}
+    ${CURL_INCLUDE_DIR}
 )
 #链接Qt库
 target_link_libraries(${execName1} PRIVATE
@@ -50,9 +51,10 @@ target_link_libraries(${execName1} PRIVATE
 target_link_libraries(${execName1} PRIVATE
     fmt::fmt
     spdlog::spdlog
-    CURL::libcurl
+    # CURL::libcurl
     ${SM_LIBRARY}
     hiredis::hiredis
+    ${CURL_LIBRARY}
 )
 
 #连接stdc++fs库,如果编译器版本低于GCC9.0,则需要连接这个库

+ 26 - 2
SecurePlayAuxServer/GlobalInfo.h

@@ -161,6 +161,28 @@ struct CameraThreadInfo
     std::string RedisPWD;       /* Redis Password */
     int DeviceID;               /* 设备ID */
     std::vector<std::string> vecAction;  /* Redis Key,一个设备可能会有多个算法ID */
+
+    CameraThreadInfo() = default;
+    CameraThreadInfo& operator=(const CameraThreadInfo& other) {
+        if (this != &other) {
+            RedisIP = other.RedisIP;
+            RedisPort = other.RedisPort;
+            RedisPWD = other.RedisPWD;
+            DeviceID = other.DeviceID;
+            vecAction = other.vecAction;
+        }
+        return *this;
+    }
+};
+
+/**
+ * @brief 人员信息
+ * 
+ */
+struct PersonInfo
+{
+    std::string PersonID;       /* 人员ID */
+    std::string PersonName;     /* 人员名称 */
 };
 
 /**
@@ -169,23 +191,25 @@ struct CameraThreadInfo
  */
 struct AlarmInfo
 {
+    bool Is_Alarm;              /* 是否报警 */
     int AlarmID;                /* 报警ID */
     int DeviceID;               /* 设备ID,数据库表格中对应的是CamerID */
     
     int RoomID;                 /* 房间ID */
     int ChannelID;              /* 通道ID */
     int OnWork;                 /* 是否在工作 */
-    bool State;                 /* 状态 */
     std::string ActionID;       /* 算法ID */
     std::string StartTime;      /* 报警开始时间 */
     std::string EndTime;        /* 报警结束时间 */
     std::string EventTime;      /* 事件时间(报警发生时间,在数据库里对应的是CreateTime) */
     std::string PicUrl;         /* 报警图片URL */
+    std::string ImageInfo;      /* 图片信息 */
     std::string AppID;          /* 客户端应用ID */
     std::string ActionDes;      /* 算法描述信息 */
     std::string FaceIDList;     /* 人脸ID列表 */
     std::string FaceNameList;   /* 人脸名称列表 */
-    
+    std::string BboxList;       /* Bbox列表,应该图片中的报警位置 */
+    std::vector<PersonInfo> vecPersonInfo;    /* 人员信息 */
 };
 
 

+ 89 - 16
SecurePlayAuxServer/SPAServer.cpp

@@ -22,7 +22,7 @@ SPAServer::SPAServer()
     /* 初始化WebAPI */
     m_toEQMDataBase.initWebApi("http://192.1.3.133:31000/v6/", "", "4c2f9fc91c22dd98331e47af2e2964f4");
     /* 模拟违禁品算法ID,后续需要动态调整 */
-    m_contrabandKey = "OD210_026_005246_001-IZRTKyEx";
+    m_keyContraband = "OD210_026_005246_001-IZRTKyEx";
     
 }
 
@@ -44,8 +44,9 @@ void SPAServer::startServer()
     info.RedisPWD = "Ff1z@TOFr^iwd%Ra";
     info.DeviceID = 117;
     info.vecAction.push_back("OD210_026_005246_001-IZRTKyEx");
-    CPPTP.add_task(&SPAServer::threadFromRedis, this, info);
-
+    m_keyContraband = "OD210_026_005246_001-IZRTKyEx";
+    // CPPTP.add_task(&SPAServer::threadFromRedis, this, info);
+    threadFromRedis(info);
 }
 
 
@@ -371,7 +372,7 @@ void SPAServer::threadFromRedis(const CameraThreadInfo& info)
         SPDLOG_LOGGER_ERROR(m_logger, "连接Redis失败");
         return;
     }
-
+    CameraThreadInfo threadInfo = info;
     // std::string strKey = "117:OD210_026_005246_001-IZRTKyEx";
     /* 取出该设备的Key */
     std::vector<std::string> vecKey;
@@ -381,6 +382,7 @@ void SPAServer::threadFromRedis(const CameraThreadInfo& info)
         vecKey.push_back(strKey);
     }
     std::string strRetValue;
+    /* 进入线程循环 */
     while (m_threadRunning)
     {
         /* 循环读取这个设备关联的算法信息 */
@@ -391,12 +393,16 @@ void SPAServer::threadFromRedis(const CameraThreadInfo& info)
             SPDLOG_LOGGER_TRACE(m_logger, "Redis Value:\n{}", strRetValue);
             /* 解析数据 */
             AlarmInfo alarmInfo;
-            alarmInfo.ActionID = it;
+            alarmInfo.ActionID = it.substr(it.find(":") + 1);
+            /* 解析数据 */
             parseRedisData(strRetValue, alarmInfo);
+            /* 时间有效性判断 */
+            
+            /* 是否需要写入EQM数据库判断 */
         }
 
 
-        std::this_thread::sleep_for(std::chrono::seconds(1));
+        std::this_thread::sleep_for(std::chrono::seconds(2));
     }
     
     return;
@@ -405,15 +411,14 @@ void SPAServer::threadFromRedis(const CameraThreadInfo& info)
 /* 解析Redis基础数据 */
 void SPAServer::parseRedisData(const std::string& strData, AlarmInfo& alarmInfo)
 {
-
     try
     {
         nJson json0;
         json0 = nJson::parse(strData);
         alarmInfo.AlarmID = json0["alarmId"].get<int>();
-        alarmInfo.ActionDes = json0["actionDes"].get<std::string>();
         alarmInfo.ChannelID = json0["channel"].get<int>();
         alarmInfo.PicUrl = json0["picUrl"].get<std::string>();
+        alarmInfo.ImageInfo = json0["imageInfo"].get<std::string>();
         
         /* 解析时间,需要将时间中的“T”换成空格 */
         alarmInfo.StartTime = json0["beginTime"].get<std::string>();
@@ -424,30 +429,98 @@ void SPAServer::parseRedisData(const std::string& strData, AlarmInfo& alarmInfo)
         std::replace(alarmInfo.EventTime.begin(), alarmInfo.EventTime.end(), 'T', ' ');
         /* 判断bBoxes有无数据,有数据就解析,没数据就直接返回了 */
         nJson json1 = json0["bBoxes"];
+        
+        std::string labelList;              /* 记录违禁品 */
+        std::string bboxList;               /* 记录bbox */
         if(!json1.empty())
         {
             for(auto& it0 : json1)
             {
                 /* 如果status是true,就不是报警,直接跳过 */
                 bool status = it0["status"].get<bool>();
-                if(alarmInfo.State)
+                if(status)
                 {
                     continue;
                 }
-                /* 判断这个是不是违禁品检测的算法ID */
-                if(alarmInfo.ActionID == m_contrabandKey)
+                /* 这一条Box数据报警了将其内容存储起来 */
+                alarmInfo.Is_Alarm = true;
+                /* 解析label,违禁品关键字,先判断这个是不是违禁品检测的算法ID */
+                if(alarmInfo.ActionID == m_keyContraband)
                 {
-                    /* 解析报警 */
+                    /* 解析报警,取出报警类型 */
+                    nJson label = it0["label"];
+                    for(auto& it1 : label)
+                    {
+                        std::string strLabel = it1.get<std::string>();
+                        /* 检测是否已经加入到字符串中了 */
+                        strLabel += "|";
+                        if(labelList.find(strLabel) != std::string::npos)
+                        {
+                            continue;
+                        }
+                        labelList += strLabel;
+                    }
+                }
+                /* 解析bbox,貌似是在图像中的位置 */
+                nJson bbox = it0["bbox"];
+                std::string strBbox;
+                for(auto& it1 : bbox)
+                {
+                    strBbox += std::to_string(it1.get<int>()) + ",";
                 }
+                /* 去掉最后一个“,” */
+                if(!strBbox.empty())
+                {
+                    strBbox.pop_back();
+                }
+                bboxList += strBbox + "|";
             }
+            /* 去掉最后一个“|” */
+            if(!labelList.empty())
+            {
+                labelList.pop_back();
+            }
+            if(!bboxList.empty())
+            {
+                bboxList.pop_back();
+            }
+            SPDLOG_LOGGER_DEBUG(m_logger, "违禁品列表:{}", labelList);
+            SPDLOG_LOGGER_DEBUG(m_logger, "bbox列表:{}", bboxList);
         }
         
-
-        alarmInfo.ActionDes = json0["actionDes"].get<std::string>();
-        if(alarmInfo.ActionDes.empty())
+        /* 如果有报警的Box */
+        if(alarmInfo.Is_Alarm)
         {
-            alarmInfo.ActionDes = "出现违禁品";
+            /* 添加报警信息的提示信息 */
+            alarmInfo.BboxList = bboxList;
+            if( (alarmInfo.ActionID == m_keyContraband) && !labelList.empty() )
+            {
+                alarmInfo.ActionDes = fmt::format("出现违禁品[{}]告警", labelList);
+                SPDLOG_LOGGER_INFO(m_logger, "{}", alarmInfo.ActionDes);
+            }else {
+                alarmInfo.ActionDes = json0["actionDes"].get<std::string>();
+            }
+            /* 判断有没有报警数据 */
+            if(alarmInfo.ImageInfo.empty())
+            {
+                SPDLOG_LOGGER_ERROR(m_logger, "有报警区域,但是没有图片信息");
+                return;
+            }
+            /* 如果是人员报警,就存储人员报警信息 */
+            if(alarmInfo.ActionID == m_KeyFace)
+            {
+                nJson jsonArray = json0["personList"];
+                for(auto& it : jsonArray)
+                {
+                    PersonInfo personInfo;
+                    personInfo.PersonID = it["personId"].get<std::string>();
+                    personInfo.PersonName = it["personName"].get<std::string>();
+                    alarmInfo.vecPersonInfo.push_back(personInfo);
+                }
+            }
         }
+
+        
     }
     catch (const nJson::parse_error& e)
     {

+ 2 - 1
SecurePlayAuxServer/SPAServer.h

@@ -43,7 +43,8 @@ private:
     FromSuperBrain m_fromSuperBrain;
     ToEQMDataBase m_toEQMDataBase;
 
-    std::string m_contrabandKey;                        /* 违禁品检测的Key */
+    std::string m_keyContraband;                        /* 违禁品检测的Key,这个Key后面可能随时会变动 */
+    std::string m_KeyFace;                              /* 人脸检测的Key */
 
     /* 算法信息,这个就是tAction在内存中的数据,方便后续对比,程序启动的时候会先获取一份 */
     std::vector<AlgorithmInfo> m_vecEqmAlgInfo;

+ 669 - 558
json.json

@@ -1,575 +1,686 @@
+{
+  "code": 0,
+  "data": [
+    {
+      "id": "e9ae71e6d68ef79a5569b7e30eced077",
+      "name": "DM_192.1.2.44_EQM",
+      "busiType": "EQM",
+      "dbType": "Dm"
+    },
+    {
+      "id": "cb19819fb8eb5f27c1d909ed6b4faa7c",
+      "name": "sqlserver_192.1.3.142_prodsv2",
+      "busiType": "",
+      "dbType": "SqlServer"
+    },
+    {
+      "id": "eb16d1ca7669a48261756eda567a2a83",
+      "name": "sqlserver_192.1.3.153_Superlink_LYLB",
+      "busiType": "Prolink_Superlink",
+      "dbType": "SqlServer"
+    },
+    {
+      "id": "6c634bdc4975e4b73f8307df706bd7b3",
+      "name": "sqlserver_192.1.3.142_prolink_xm",
+      "busiType": "Prolink_Superlink",
+      "dbType": "SqlServer"
+    },
+    {
+      "id": "f21512c566358300943b194f7e850ad7",
+      "name": "192.1.3.153_Prolink_FJ_BC",
+      "busiType": "ProMusic",
+      "dbType": "SqlServer"
+    },
+    {
+      "id": "5a897bbdb8d9585b2a7093a87711d5b7",
+      "name": "61(Superlink_LYLB_B)",
+      "busiType": "Prolink_Superlink",
+      "dbType": "SqlServer"
+    },
+    {
+      "id": "4ecdc473a485148f0a3a127672b63820",
+      "name": "DM_192.1.2.10_EQM",
+      "busiType": "EQM",
+      "dbType": "Dm"
+    },
+    {
+      "id": "a0e44ef1cb650d2e1fc2ab5857b9277f",
+      "name": "49(Promusic_z4_b)",
+      "busiType": "ProMusic",
+      "dbType": "SqlServer"
+    },
+    {
+      "id": "6f3e5707785e2689130d5be880361a12",
+      "name": "61(Prolink_TY)",
+      "busiType": "Prolink_Superlink",
+      "dbType": "SqlServer"
+    },
+    {
+      "id": "019fac32befb831c60f3df76018ba360",
+      "name": "153(Prolink_CNR_20210611)",
+      "busiType": "Prolink_Superlink",
+      "dbType": "SqlServer"
+    },
+    {
+      "id": "aac6ca614ed4888dca36e11abadb12d8",
+      "name": "DM_192.1.2.44_EQM_ZBT",
+      "busiType": "EQM",
+      "dbType": "Dm"
+    },
+    {
+      "id": "60979a8faf99f16053540f9d7e990300",
+      "name": "61(EQM)",
+      "busiType": "EQM",
+      "dbType": "Dm"
+    },
+    {
+      "id": "4d91d3b9394343053e818a0d7790f7b4",
+      "name": "GBase_192.1.2.44_EQM",
+      "busiType": "EQM",
+      "dbType": "GBase"
+    },
+    {
+      "id": "c0723e144c8f3674b45d9903a03019c0",
+      "name": "DM_192.1.2.44_EQM_BJ",
+      "busiType": "EQM",
+      "dbType": "Dm"
+    },
+    {
+      "id": "4c2f9fc91c22dd98331e47af2e2964f4",
+      "name": "SQL_SERVER_192.1.3.105_EQM_BJ",
+      "busiType": "EQM",
+      "dbType": "SqlServer"
+    },
+    {
+      "id": "ee045e6eb09a9e7f344ecb87e6d49afd",
+      "name": "61(DBO)",
+      "busiType": "Prolink_Superlink",
+      "dbType": "Dm"
+    },
+    {
+      "id": "c1acfd2615f58826fe0dc93267bd6d5f",
+      "name": "105(Prolink_z9_ceshi)",
+      "busiType": "Prolink_Superlink",
+      "dbType": "SqlServer"
+    },
+    {
+      "id": "372f33529b10651d6c96523cfac77bcf",
+      "name": "DM_192.1.2.178_EQM",
+      "busiType": "EQM",
+      "dbType": "Dm"
+    }
+  ]
+}
+
 /* 算法信息 */
 {
-    "code": "0",
-    "message": "成功",
-    "data": [
-        {
-            "aiName": "疲劳检测",
-            "muAiName": "疲劳检测",
-            "sceneName": null,
-            "muAiTypeId": 6,
-            "taskTypeId": 6,
-            "taskTypeCode": "TaskType89j46ace4bx",
-            "needMark": false,
-            "supportSequential": false,
-            "isGaoTie": false,
-            "frequency": [
-                "5s",
-                "10s",
-                "15s",
-                "30s",
-                "60s",
-                "5min",
-                "15min",
-                "60min"
-            ],
-            "calTypeName": "自建应用",
-            "abilityType": 5,
-            "baseConfig": true,
-            "osConfig": false,
-            "ability": "OD210_021_004790_001-l2MahE4v",
-            "appStatus": 0,
-            "status": 0,
-            "orderType": 0,
-            "errorMsg": "安装成功",
-            "isUsed": null
-        },
-        {
-            "aiName": "摔倒识别",
-            "muAiName": "摔倒识别",
-            "sceneName": null,
-            "muAiTypeId": 5,
-            "taskTypeId": 5,
-            "taskTypeCode": "TaskType9gusadr93ou",
-            "needMark": false,
-            "supportSequential": false,
-            "isGaoTie": false,
-            "frequency": [
-                "5s",
-                "10s",
-                "15s",
-                "30s",
-                "60s",
-                "5min",
-                "15min",
-                "60min"
-            ],
-            "calTypeName": "自建应用",
-            "abilityType": 5,
-            "baseConfig": true,
-            "osConfig": false,
-            "ability": "OD210_021_001871_051-l2MahE4v",
-            "appStatus": 0,
-            "status": 0,
-            "orderType": 0,
-            "errorMsg": "安装成功",
-            "isUsed": null
-        },
-        {
-            "aiName": "睡岗识别",
-            "muAiName": "睡岗识别",
-            "sceneName": null,
-            "muAiTypeId": 4,
-            "taskTypeId": 4,
-            "taskTypeCode": "TaskTypeahabqwzwl1x",
-            "needMark": false,
-            "supportSequential": false,
-            "isGaoTie": false,
-            "frequency": [
-                "5s",
-                "10s",
-                "15s",
-                "30s",
-                "60s",
-                "5min",
-                "15min",
-                "60min"
-            ],
-            "calTypeName": "自建应用",
-            "abilityType": 5,
-            "baseConfig": true,
-            "osConfig": false,
-            "ability": "OD210_021_001870_017-l2MahE4v",
-            "appStatus": 0,
-            "status": 0,
-            "orderType": 0,
-            "errorMsg": "安装成功",
-            "isUsed": null
-        },
-        {
-            "aiName": "玩手机识别",
-            "muAiName": "玩手机识别",
-            "sceneName": null,
-            "muAiTypeId": 3,
-            "taskTypeId": 3,
-            "taskTypeCode": "TaskTypec2e94flbyyq",
-            "needMark": false,
-            "supportSequential": false,
-            "isGaoTie": false,
-            "frequency": [
-                "5s",
-                "10s",
-                "15s",
-                "30s",
-                "60s",
-                "5min",
-                "15min",
-                "60min"
-            ],
-            "calTypeName": "自建应用",
-            "abilityType": 5,
-            "baseConfig": true,
-            "osConfig": false,
-            "ability": "OD210_021_001866_001-l2MahE4v",
-            "appStatus": 0,
-            "status": 0,
-            "orderType": 0,
-            "errorMsg": "安装成功",
-            "isUsed": null
-        },
-        {
-            "aiName": "违禁品检测",
-            "muAiName": "违禁品检测",
-            "sceneName": null,
-            "muAiTypeId": 2,
-            "taskTypeId": 2,
-            "taskTypeCode": "TaskType49rugxtp855",
-            "needMark": false,
-            "supportSequential": false,
-            "isGaoTie": false,
-            "frequency": [
-                "5s",
-                "10s",
-                "15s",
-                "30s",
-                "60s",
-                "5min",
-                "15min",
-                "60min"
-            ],
-            "calTypeName": "自建应用",
-            "abilityType": 5,
-            "baseConfig": true,
-            "osConfig": false,
-            "ability": "OD210_021_002162_002-l2MahE4v",
-            "appStatus": 0,
-            "status": 0,
-            "orderType": 0,
-            "errorMsg": "安装成功",
-            "isUsed": null
-        },
-        {
-            "aiName": "盯屏",
-            "muAiName": "盯屏",
-            "sceneName": null,
-            "muAiTypeId": 1,
-            "taskTypeId": 1,
-            "taskTypeCode": "TaskType5h3ifgna34s",
-            "needMark": false,
-            "supportSequential": false,
-            "isGaoTie": false,
-            "frequency": [
-                "5s",
-                "10s",
-                "15s",
-                "30s",
-                "60s",
-                "5min",
-                "15min",
-                "60min"
-            ],
-            "calTypeName": "自建应用",
-            "abilityType": 5,
-            "baseConfig": true,
-            "osConfig": false,
-            "ability": "OD210_101_004362_006-l2MahE4v",
-            "appStatus": 0,
-            "status": 0,
-            "orderType": 0,
-            "errorMsg": "安装成功",
-            "isUsed": null
-        }
-    ],
-    "success": true
+  "code": "0",
+  "message": "成功",
+  "data": [
+    {
+      "aiName": "疲劳检测",
+      "muAiName": "疲劳检测",
+      "sceneName": null,
+      "muAiTypeId": 6,
+      "taskTypeId": 6,
+      "taskTypeCode": "TaskType89j46ace4bx",
+      "needMark": false,
+      "supportSequential": false,
+      "isGaoTie": false,
+      "frequency": [
+        "5s",
+        "10s",
+        "15s",
+        "30s",
+        "60s",
+        "5min",
+        "15min",
+        "60min"
+      ],
+      "calTypeName": "自建应用",
+      "abilityType": 5,
+      "baseConfig": true,
+      "osConfig": false,
+      "ability": "OD210_021_004790_001-l2MahE4v",
+      "appStatus": 0,
+      "status": 0,
+      "orderType": 0,
+      "errorMsg": "安装成功",
+      "isUsed": null
+    },
+    {
+      "aiName": "摔倒识别",
+      "muAiName": "摔倒识别",
+      "sceneName": null,
+      "muAiTypeId": 5,
+      "taskTypeId": 5,
+      "taskTypeCode": "TaskType9gusadr93ou",
+      "needMark": false,
+      "supportSequential": false,
+      "isGaoTie": false,
+      "frequency": [
+        "5s",
+        "10s",
+        "15s",
+        "30s",
+        "60s",
+        "5min",
+        "15min",
+        "60min"
+      ],
+      "calTypeName": "自建应用",
+      "abilityType": 5,
+      "baseConfig": true,
+      "osConfig": false,
+      "ability": "OD210_021_001871_051-l2MahE4v",
+      "appStatus": 0,
+      "status": 0,
+      "orderType": 0,
+      "errorMsg": "安装成功",
+      "isUsed": null
+    },
+    {
+      "aiName": "睡岗识别",
+      "muAiName": "睡岗识别",
+      "sceneName": null,
+      "muAiTypeId": 4,
+      "taskTypeId": 4,
+      "taskTypeCode": "TaskTypeahabqwzwl1x",
+      "needMark": false,
+      "supportSequential": false,
+      "isGaoTie": false,
+      "frequency": [
+        "5s",
+        "10s",
+        "15s",
+        "30s",
+        "60s",
+        "5min",
+        "15min",
+        "60min"
+      ],
+      "calTypeName": "自建应用",
+      "abilityType": 5,
+      "baseConfig": true,
+      "osConfig": false,
+      "ability": "OD210_021_001870_017-l2MahE4v",
+      "appStatus": 0,
+      "status": 0,
+      "orderType": 0,
+      "errorMsg": "安装成功",
+      "isUsed": null
+    },
+    {
+      "aiName": "玩手机识别",
+      "muAiName": "玩手机识别",
+      "sceneName": null,
+      "muAiTypeId": 3,
+      "taskTypeId": 3,
+      "taskTypeCode": "TaskTypec2e94flbyyq",
+      "needMark": false,
+      "supportSequential": false,
+      "isGaoTie": false,
+      "frequency": [
+        "5s",
+        "10s",
+        "15s",
+        "30s",
+        "60s",
+        "5min",
+        "15min",
+        "60min"
+      ],
+      "calTypeName": "自建应用",
+      "abilityType": 5,
+      "baseConfig": true,
+      "osConfig": false,
+      "ability": "OD210_021_001866_001-l2MahE4v",
+      "appStatus": 0,
+      "status": 0,
+      "orderType": 0,
+      "errorMsg": "安装成功",
+      "isUsed": null
+    },
+    {
+      "aiName": "违禁品检测",
+      "muAiName": "违禁品检测",
+      "sceneName": null,
+      "muAiTypeId": 2,
+      "taskTypeId": 2,
+      "taskTypeCode": "TaskType49rugxtp855",
+      "needMark": false,
+      "supportSequential": false,
+      "isGaoTie": false,
+      "frequency": [
+        "5s",
+        "10s",
+        "15s",
+        "30s",
+        "60s",
+        "5min",
+        "15min",
+        "60min"
+      ],
+      "calTypeName": "自建应用",
+      "abilityType": 5,
+      "baseConfig": true,
+      "osConfig": false,
+      "ability": "OD210_021_002162_002-l2MahE4v",
+      "appStatus": 0,
+      "status": 0,
+      "orderType": 0,
+      "errorMsg": "安装成功",
+      "isUsed": null
+    },
+    {
+      "aiName": "盯屏",
+      "muAiName": "盯屏",
+      "sceneName": null,
+      "muAiTypeId": 1,
+      "taskTypeId": 1,
+      "taskTypeCode": "TaskType5h3ifgna34s",
+      "needMark": false,
+      "supportSequential": false,
+      "isGaoTie": false,
+      "frequency": [
+        "5s",
+        "10s",
+        "15s",
+        "30s",
+        "60s",
+        "5min",
+        "15min",
+        "60min"
+      ],
+      "calTypeName": "自建应用",
+      "abilityType": 5,
+      "baseConfig": true,
+      "osConfig": false,
+      "ability": "OD210_101_004362_006-l2MahE4v",
+      "appStatus": 0,
+      "status": 0,
+      "orderType": 0,
+      "errorMsg": "安装成功",
+      "isUsed": null
+    }
+  ],
+  "success": true
 }
 /* 获取到的设备信息 */
 {
-    "code": "0",
-    "message": "成功",
-    "data": [
+  "code": "0",
+  "message": "成功",
+  "data": [
+    {
+      "deviceId": 2,
+      "deviceName": "111222333",
+      "deviceSerial": "VID9cwyv6fiv0x",
+      "port": null,
+      "userAccount": null,
+      "userPWD": null,
+      "deviceType": "本地视频",
+      "taskTypeList": [
         {
-            "deviceId": 2,
-            "deviceName": "111222333",
-            "deviceSerial": "VID9cwyv6fiv0x",
-            "port": null,
-            "userAccount": null,
-            "userPWD": null,
-            "deviceType": "本地视频",
-            "taskTypeList": [
-                {
-                    "taskTypeId": 1,
-                    "ability": "OD210_101_004362_006",
-                    "taskTypeName": "盯屏"
-                }
-            ]
-        },
+          "taskTypeId": 1,
+          "ability": "OD210_101_004362_006",
+          "taskTypeName": "盯屏"
+        }
+      ]
+    },
+    {
+      "deviceId": 6,
+      "deviceName": "广电研发",
+      "deviceSerial": "rtsp://admin:HZlh123456@172.16.3.229/Streaming/Channels/1601",
+      "port": null,
+      "userAccount": null,
+      "userPWD": null,
+      "deviceType": "视频流地址",
+      "taskTypeList": [
         {
-            "deviceId": 6,
-            "deviceName": "广电研发",
-            "deviceSerial": "rtsp://admin:HZlh123456@172.16.3.229/Streaming/Channels/1601",
-            "port": null,
-            "userAccount": null,
-            "userPWD": null,
-            "deviceType": "视频流地址",
-            "taskTypeList": [
-                {
-                    "taskTypeId": 3,
-                    "ability": "OD210_021_001866_001",
-                    "taskTypeName": "玩手机识别"
-                }
-            ]
+          "taskTypeId": 3,
+          "ability": "OD210_021_001866_001",
+          "taskTypeName": "玩手机识别"
         }
-    ],
-    "success": true
+      ]
+    }
+  ],
+  "success": true
 }
 /* Redis数据 */
 {
-    "actionId": "M100111000",
-    "actionName": "鑴卞矖绂诲矖璇嗗埆",
-    "actionResult": true,
-    "alarmId": 177157,
-    "bBoxes": [],
-    "beginTime": "2022-06-12T14:38:05",
-    "channel": 48,
-    "classifyId": 2,
-    "classifyName": "榛樿鍒嗙粍",
-    "deviceName": "test",
-    "deviceSerial": "172.16.3.229",
-    "endTime": "2022-06-12T14:39:05",
-    "eventTime": "2022-06-12T14:38:35",
-    "imageInfo": "",
-    "isKeyPoint": 0,
-    "picUrl": "1438351535874182926041088.jpg",
-    "taskId": 1,
-    "taskName": "1"
+  "actionId": "M100111000",
+  "actionName": "鑴卞矖绂诲矖璇嗗埆",
+  "actionResult": true,
+  "alarmId": 177157,
+  "bBoxes": [],
+  "beginTime": "2022-06-12T14:38:05",
+  "channel": 48,
+  "classifyId": 2,
+  "classifyName": "榛樿鍒嗙粍",
+  "deviceName": "test",
+  "deviceSerial": "172.16.3.229",
+  "endTime": "2022-06-12T14:39:05",
+  "eventTime": "2022-06-12T14:38:35",
+  "imageInfo": "",
+  "isKeyPoint": 0,
+  "picUrl": "1438351535874182926041088.jpg",
+  "taskId": 1,
+  "taskName": "1"
 }
-
 /* 117数据,应该和要读取的一样 */
 {
-    "actionDes": "",
-    "actionResult": true,
-    "alarmId": 73113,
-    "beginTime": "2024-09-01T16:52:38.426",
-    "channel": 1,
-    "classifyId": 64,
-    "classifyName": "培训教室-海康",
-    "deviceSerial": "172.16.9.31",
-    "endTime": "2024-09-01T16:53:38.426",
-    "eventTime": "2024-09-01T16:53:08.426",
-    "imageInfo": "http://webdav-read.default:80/webdav//GUI/1/PUMPING/2024/09/01//66d42b74e4b02066478c1ace.jpg",
-    "isKeyPoint": 0,
-    "personList": [],
-    "picUrl": "66d42b74e4b02066478c1ace.jpg",
-    "taskId": 452,
-    "taskName": "夜晚001",
-    "bBoxes": [
-      {
-        "bbox": [
-          1692,
-          369,
-          1791,
-          604
-        ],
-        "colorFlag": 1,
-        "conf": [
-          "0.03"
-        ],
-        "label": [
-          "未成年人"
-        ],
-        "match_id": "",
-        "status": false
-      },
-      {
-        "bbox": [
-          1755,
-          1402,
-          1975,
-          1539
-        ],
-        "colorFlag": 1,
-        "conf": [
-          "0.02"
-        ],
-        "label": [
-          "未成年人"
-        ],
-        "match_id": "",
-        "status": false
-      },
-      {
-        "bbox": [
-          1572,
-          1036,
-          1996,
-          1576
-        ],
-        "colorFlag": 1,
-        "conf": [
-          "0.02"
-        ],
-        "label": [
-          "未成年人"
-        ],
-        "match_id": "",
-        "status": false
-      },
-      {
-        "bbox": [
-          2257,
-          927,
-          2335,
-          1058
-        ],
-        "colorFlag": 1,
-        "conf": [
-          "0.02"
-        ],
-        "label": [
-          "未成年人"
-        ],
-        "match_id": "",
-        "status": false
-      },
-      {
-        "bbox": [
-          2052,
-          445,
-          2157,
-          650
-        ],
-        "colorFlag": 1,
-        "conf": [
-          "0.01"
-        ],
-        "label": [
-          "未成年人"
-        ],
-        "match_id": "",
-        "status": false
-      },
-      {
-        "bbox": [
-          2038,
-          716,
-          2099,
-          873
-        ],
-        "colorFlag": 1,
-        "conf": [
-          "0.01"
-        ],
-        "label": [
-          "未成年人"
-        ],
-        "match_id": "",
-        "status": false
-      },
-      {
-        "bbox": [
-          2250,
-          682,
-          2360,
-          1055
-        ],
-        "colorFlag": 1,
-        "conf": [
-          "0.01"
-        ],
-        "label": [
-          "未成年人"
-        ],
-        "match_id": "",
-        "status": false
-      },
-      {
-        "bbox": [
-          1521,
-          871,
-          1766,
-          1450
-        ],
-        "colorFlag": 1,
-        "conf": [
-          "0.01"
-        ],
-        "label": [
-          "未成年人"
-        ],
-        "match_id": "",
-        "status": false
-      },
-      {
-        "bbox": [
-          2104,
-          716,
-          2213,
-          907
-        ],
-        "colorFlag": 1,
-        "conf": [
-          "0.01"
-        ],
-        "label": [
-          "未成年人"
-        ],
-        "match_id": "",
-        "status": false
-      },
-      {
-        "bbox": [
-          2063,
-          441,
-          2150,
-          532
-        ],
-        "colorFlag": 1,
-        "conf": [
-          "0.01"
-        ],
-        "label": [
-          "未成年人"
-        ],
-        "match_id": "",
-        "status": false
-      }
-    ]
-  }
-
-
+  "actionDes": "",
+  "actionResult": true,
+  "alarmId": 73113,
+  "beginTime": "2024-09-01T16:52:38.426",
+  "channel": 1,
+  "classifyId": 64,
+  "classifyName": "培训教室-海康",
+  "deviceSerial": "172.16.9.31",
+  "endTime": "2024-09-01T16:53:38.426",
+  "eventTime": "2024-09-01T16:53:08.426",
+  "imageInfo": "http://webdav-read.default:80/webdav//GUI/1/PUMPING/2024/09/01//66d42b74e4b02066478c1ace.jpg",
+  "isKeyPoint": 0,
+  "personList": [],
+  "picUrl": "66d42b74e4b02066478c1ace.jpg",
+  "taskId": 452,
+  "taskName": "夜晚001",
+  "bBoxes": [
+    {
+      "bbox": [
+        1692,
+        369,
+        1791,
+        604
+      ],
+      "colorFlag": 1,
+      "conf": [
+        "0.03"
+      ],
+      "label": [
+        "未成年人"
+      ],
+      "match_id": "",
+      "status": false
+    },
+    {
+      "bbox": [
+        1755,
+        1402,
+        1975,
+        1539
+      ],
+      "colorFlag": 1,
+      "conf": [
+        "0.02"
+      ],
+      "label": [
+        "未成年人"
+      ],
+      "match_id": "",
+      "status": false
+    },
+    {
+      "bbox": [
+        1572,
+        1036,
+        1996,
+        1576
+      ],
+      "colorFlag": 1,
+      "conf": [
+        "0.02"
+      ],
+      "label": [
+        "未成年人"
+      ],
+      "match_id": "",
+      "status": false
+    },
+    {
+      "bbox": [
+        2257,
+        927,
+        2335,
+        1058
+      ],
+      "colorFlag": 1,
+      "conf": [
+        "0.02"
+      ],
+      "label": [
+        "未成年人"
+      ],
+      "match_id": "",
+      "status": false
+    },
+    {
+      "bbox": [
+        2052,
+        445,
+        2157,
+        650
+      ],
+      "colorFlag": 1,
+      "conf": [
+        "0.01"
+      ],
+      "label": [
+        "未成年人"
+      ],
+      "match_id": "",
+      "status": false
+    },
+    {
+      "bbox": [
+        2038,
+        716,
+        2099,
+        873
+      ],
+      "colorFlag": 1,
+      "conf": [
+        "0.01"
+      ],
+      "label": [
+        "未成年人"
+      ],
+      "match_id": "",
+      "status": false
+    },
+    {
+      "bbox": [
+        2250,
+        682,
+        2360,
+        1055
+      ],
+      "colorFlag": 1,
+      "conf": [
+        "0.01"
+      ],
+      "label": [
+        "未成年人"
+      ],
+      "match_id": "",
+      "status": false
+    },
+    {
+      "bbox": [
+        1521,
+        871,
+        1766,
+        1450
+      ],
+      "colorFlag": 1,
+      "conf": [
+        "0.01"
+      ],
+      "label": [
+        "未成年人"
+      ],
+      "match_id": "",
+      "status": false
+    },
+    {
+      "bbox": [
+        2104,
+        716,
+        2213,
+        907
+      ],
+      "colorFlag": 1,
+      "conf": [
+        "0.01"
+      ],
+      "label": [
+        "未成年人"
+      ],
+      "match_id": "",
+      "status": false
+    },
+    {
+      "bbox": [
+        2063,
+        441,
+        2150,
+        532
+      ],
+      "colorFlag": 1,
+      "conf": [
+        "0.01"
+      ],
+      "label": [
+        "未成年人"
+      ],
+      "match_id": "",
+      "status": false
+    }
+  ]
+}
 /* 图片识别 */
 {
-    "code": 0,
-    "result": [
-        {
-            "pkid": 1,
-            "actionId": "M100121000",
-            "actionTaskid": 112,
-            "actionName": "疲劳检测"
-        },
-        {
-            "pkid": 2,
-            "actionId": "M100101000",
-            "actionTaskid": 104,
-            "actionName": "未戴口罩"
-        },
-        {
-            "pkid": 3,
-            "actionId": "M100107000",
-            "actionTaskid": 105,
-            "actionName": "吸烟识别"
-        },
-        {
-            "pkid": 4,
-            "actionId": "P100104000",
-            "actionTaskid": 106,
-            "actionName": "人员计数"
-        },
-        {
-            "pkid": 5,
-            "actionId": "C100107000",
-            "actionTaskid": 107,
-            "actionName": "违禁物品"
-        },
-        {
-            "pkid": 6,
-            "actionId": "E100111000",
-            "actionTaskid": 109,
-            "actionName": "动物识别"
-        },
-        {
-            "pkid": 7,
-            "actionId": "P100101000",
-            "actionTaskid": 111,
-            "actionName": "人脸识别"
-        },
-        {
-            "pkid": 8,
-            "actionId": "C100109000",
-            "actionTaskid": 110,
-            "actionName": "老鼠识别"
-        },
-        {
-            "pkid": 9,
-            "actionId": "M100105000",
-            "actionTaskid": 108,
-            "actionName": "睡岗识别"
-        },
-        {
-            "pkid": 10,
-            "actionId": "M100102000",
-            "actionTaskid": 103,
-            "actionName": "玩手机识别"
-        },
-        {
-            "pkid": 11,
-            "actionId": "002976",
-            "actionTaskid": 113,
-            "actionName": "摔倒识别"
-        },
-        {
-            "pkid": 12,
-            "actionId": "004160",
-            "actionTaskid": 118,
-            "actionName": "离岗识别"
-        },
-        {
-            "pkid": 21,
-            "actionId": "OD210_021_001879_001-IZRTKyEx",
-            "actionTaskid": 47,
-            "actionName": "未戴口罩识别"
-        },
-        {
-            "pkid": 22,
-            "actionId": "OD210_021_002162_002-IZRTKyEx",
-            "actionTaskid": 49,
-            "actionName": "违禁品检测"
-        },
-        {
-            "pkid": 23,
-            "actionId": "OD210_021_001871_051-IZRTKyEx",
-            "actionTaskid": 54,
-            "actionName": "摔倒识别"
-        },
-        {
-            "pkid": 24,
-            "actionId": "VC004_021_002601_026-IZRTKyEx",
-            "actionTaskid": 16,
-            "actionName": "人脸识别"
-        },
-        {
-            "pkid": 25,
-            "actionId": "OD210_021_001866_001",
-            "actionTaskid": 53,
-            "actionName": "玩手机识别"
-        },
-        {
-            "pkid": 26,
-            "actionId": "OD210_101_004533_002-IZRTKyEx",
-            "actionTaskid": 46,
-            "actionName": "港口异物识别"
-        },
-        {
-            "pkid": 27,
-            "actionId": "OD210_210_002111_001-IZRTKyEx",
-            "actionTaskid": 38,
-            "actionName": "人员识别"
-        },
-        {
-            "pkid": 28,
-            "actionId": "OD210_101_004362_006-IZRTKyEx",
-            "actionTaskid": 56,
-            "actionName": "盯屏"
-        }
-    ]
+  "code": 0,
+  "result": [
+    {
+      "pkid": 1,
+      "actionId": "M100121000",
+      "actionTaskid": 112,
+      "actionName": "疲劳检测"
+    },
+    {
+      "pkid": 2,
+      "actionId": "M100101000",
+      "actionTaskid": 104,
+      "actionName": "未戴口罩"
+    },
+    {
+      "pkid": 3,
+      "actionId": "M100107000",
+      "actionTaskid": 105,
+      "actionName": "吸烟识别"
+    },
+    {
+      "pkid": 4,
+      "actionId": "P100104000",
+      "actionTaskid": 106,
+      "actionName": "人员计数"
+    },
+    {
+      "pkid": 5,
+      "actionId": "C100107000",
+      "actionTaskid": 107,
+      "actionName": "违禁物品"
+    },
+    {
+      "pkid": 6,
+      "actionId": "E100111000",
+      "actionTaskid": 109,
+      "actionName": "动物识别"
+    },
+    {
+      "pkid": 7,
+      "actionId": "P100101000",
+      "actionTaskid": 111,
+      "actionName": "人脸识别"
+    },
+    {
+      "pkid": 8,
+      "actionId": "C100109000",
+      "actionTaskid": 110,
+      "actionName": "老鼠识别"
+    },
+    {
+      "pkid": 9,
+      "actionId": "M100105000",
+      "actionTaskid": 108,
+      "actionName": "睡岗识别"
+    },
+    {
+      "pkid": 10,
+      "actionId": "M100102000",
+      "actionTaskid": 103,
+      "actionName": "玩手机识别"
+    },
+    {
+      "pkid": 11,
+      "actionId": "002976",
+      "actionTaskid": 113,
+      "actionName": "摔倒识别"
+    },
+    {
+      "pkid": 12,
+      "actionId": "004160",
+      "actionTaskid": 118,
+      "actionName": "离岗识别"
+    },
+    {
+      "pkid": 21,
+      "actionId": "OD210_021_001879_001-IZRTKyEx",
+      "actionTaskid": 47,
+      "actionName": "未戴口罩识别"
+    },
+    {
+      "pkid": 22,
+      "actionId": "OD210_021_002162_002-IZRTKyEx",
+      "actionTaskid": 49,
+      "actionName": "违禁品检测"
+    },
+    {
+      "pkid": 23,
+      "actionId": "OD210_021_001871_051-IZRTKyEx",
+      "actionTaskid": 54,
+      "actionName": "摔倒识别"
+    },
+    {
+      "pkid": 24,
+      "actionId": "VC004_021_002601_026-IZRTKyEx",
+      "actionTaskid": 16,
+      "actionName": "人脸识别"
+    },
+    {
+      "pkid": 25,
+      "actionId": "OD210_021_001866_001",
+      "actionTaskid": 53,
+      "actionName": "玩手机识别"
+    },
+    {
+      "pkid": 26,
+      "actionId": "OD210_101_004533_002-IZRTKyEx",
+      "actionTaskid": 46,
+      "actionName": "港口异物识别"
+    },
+    {
+      "pkid": 27,
+      "actionId": "OD210_210_002111_001-IZRTKyEx",
+      "actionTaskid": 38,
+      "actionName": "人员识别"
+    },
+    {
+      "pkid": 28,
+      "actionId": "OD210_101_004362_006-IZRTKyEx",
+      "actionTaskid": 56,
+      "actionName": "盯屏"
+    }
+  ]
 }