Sfoglia il codice sorgente

V0.1.10
1、获取基础信息并写入数据库完成
2、开始解析Redis信息

Apple 7 mesi fa
parent
commit
d4137bbdf3

+ 12 - 3
SecurePlayAuxServer/GlobalInfo.h

@@ -107,9 +107,9 @@ struct DeviceInfo
         return true;
     }
     /* 对比设备关联的算法信息是否相等 */
-    bool isEqualAlgorithmInfo(const DeviceInfo& other) const {
+    bool isEqualAlgorithmInfo(const std::vector<AlgorithmInfo>& other) const {
         /* 算法数目不相等,直接返回false */
-        if(vecAlgorithmInfo.size() != other.vecAlgorithmInfo.size()) {
+        if(vecAlgorithmInfo.size() != other.size()) {
             return false;
         }else {
             /* 算法数目相等,进一步对比算法信息 */
@@ -117,7 +117,7 @@ struct DeviceInfo
             /* 逐步对比算法信息 */
             for(const auto& it0 : vecAlgorithmInfo) {
                 bool isEq2 = true;
-                for(const auto& it1 : other.vecAlgorithmInfo) {
+                for(const auto& it1 : other) {
                     if(it0 == it1) {
                         continue;
                     }else {
@@ -139,6 +139,15 @@ struct DeviceInfo
 };
 
 
+/* 算法和设备关联的相关信息 */
+struct DeviceAlgorithmInfo
+{
+    int DeviceID;               /* 设备ID */
+    int ActionTaskID;           /* 算法任务ID */
+    std::string ActionID;       /* 算法ID */
+    std::string ActionName;     /* 算法名称 */
+};
+
 
 
 

+ 103 - 30
SecurePlayAuxServer/SPAServer.cpp

@@ -50,19 +50,40 @@ void SPAServer::fromSuperBrainThread()
     std::vector<AlgorithmInfo> vecAlgNewInfo;
     std::vector<DeviceInfo> vecDevNewInfo;
     
-    /* 从EQM数据库中读取到数据信息到内存中,后续对比需要 */
-    m_toEQMDataBase.getAlgorithmInfo(m_vecEqmAlgInfo);
-    m_toEQMDataBase.getDeviceInfo(m_vecEqmDevInfo);
-    m_toEQMDataBase.getDeviceAlgorithmInfo(m_vecEqmDevInfo);
+    /* 测试读取Redis信息 */
+    m_fromRedis.setRedisIPAndPort("172.16.36.80", 32222);
+    m_fromRedis.setRedisPassword("Ff1z@TOFr^iwd%Ra");
+    if(m_fromRedis.connectRedis())
+    {
+        SPDLOG_LOGGER_INFO(m_logger, "连接Redis成功");
+    }else {
+        SPDLOG_LOGGER_ERROR(m_logger, "连接Redis失败");
+        return;
+    }
+
+    std::string strKey = "117:OD210_026_005246_001-IZRTKyEx";
+    std::string strRetValue;
+    while (m_threadRunning)
+    {
+        SPDLOG_LOGGER_INFO(m_logger, "读取Redis信息");
+        m_fromRedis.getRedisString(strKey, strRetValue);
+        SPDLOG_LOGGER_DEBUG(m_logger, "Redis Value:\n{}", strRetValue);
+        
+        std::this_thread::sleep_for(std::chrono::seconds(1));
+    }
+    
+    return;
+
     /* 获取一次token,后续失效了再获取 */
     m_fromSuperBrain.getToken();
     while (m_threadRunning)
     {
         SPDLOG_LOGGER_INFO(m_logger, "刷新算法和设备信息");
-        /* 先更新数据库的信息,防止从其他地方并更改了数据库,这里没有刷新本地缓存 */
+        /* 先更新数据库的信息,防止从其他地方更改了数据库,这里没有刷新本地缓存 */
         m_toEQMDataBase.getAlgorithmInfo(m_vecEqmAlgInfo);
         m_toEQMDataBase.getDeviceInfo(m_vecEqmDevInfo);
-        /* 获取基础信息 */
+        m_toEQMDataBase.getDeviceAlgorithmInfo(m_vecEqmDevInfo, m_listDevIDDelete);
+        /* 从超脑获取基础信息 */
         m_fromSuperBrain.getTaskTypeList(vecAlgNewInfo);
         m_fromSuperBrain.getDeviceList(vecDevNewInfo);
 
@@ -118,8 +139,9 @@ bool SPAServer::processDeviceInfo(std::vector<DeviceInfo> vecNewDevInfo)
     std::vector<DeviceInfo> vecDevUpdate;
     std::vector<DeviceInfo> vecDevDelete;
 
-    /**************************************************************************/
-    /* 这里只对比设备信息,不对比设备的算法信息,算法信息在下面单独对比 */
+    /*-------------------------------------------------------------------------
+     ****** 这里只对比设备信息,不对比设备的算法信息,算法信息在下面单独对比 *******
+     *------------------------------------------------------------------------*/
 
     /* 如果本地缓存没有数据,那么就全部插入 */
     if(m_vecEqmDevInfo.size() > 0)
@@ -198,8 +220,9 @@ bool SPAServer::processDeviceInfo(std::vector<DeviceInfo> vecNewDevInfo)
         isUpdate = true;
     }
 
-    /**************************************************************************/
-    /* 处理设备和算子关联的表格,单独对比设备的算法信息 */
+    /*-------------------------------------------------------------------------
+     ************* 处理设备和算子关联的表格,单独对比设备的算法信息 *************
+     *------------------------------------------------------------------------*/
 
     /* 插入新的设备信息 */
     if(vecDevInsert.size() > 0)
@@ -208,31 +231,24 @@ bool SPAServer::processDeviceInfo(std::vector<DeviceInfo> vecNewDevInfo)
         m_toEQMDataBase.insertDeviceAlgorithmInfo(vecDevInsert);
         isUpdate = true;
     }
-    /* 删除消失的设备信息 */
-    if(vecDevDelete.size() > 0)
-    {
-        SPDLOG_LOGGER_DEBUG(m_logger, "删除设备和算法关联表");
-        m_toEQMDataBase.deleteDeviceAlgorithmInfo(vecDevDelete);
-        isUpdate = true;
-    }
 
     vecDevUpdate.clear();
-    /* 取出需要更新的设备 */
-    for(const auto& it0 : vecNewDevInfo)
+    /* 对比现有的设备是否需要更新算法 */
+    compareDeviceAlgorithmInfo(vecNewDevInfo, vecDevUpdate);
+    if(vecDevUpdate.size() > 0)
     {
-        /* 取出ID相等的设备 */
-        for(const auto& it1 : m_vecEqmDevInfo)
-        {
-            if(!it0.isEqualAlgorithmInfo(it1))
-            {
-                vecDevUpdate.push_back(it0);
-                break;
-            }
-        }
-        
+        SPDLOG_LOGGER_DEBUG(m_logger, "更新设备和算法关联表, 更新设备数目:{}", vecDevUpdate.size());
+        m_toEQMDataBase.updateDeviceAlgorithmInfo(vecDevUpdate);
     }
-    SPDLOG_LOGGER_DEBUG(m_logger, "更新设备和算法关联表, 更新设备数目:{}", vecDevUpdate.size());
     
+    
+    /* 删除tActionCamer表中消失的设备信息 */
+    if(m_listDevIDDelete.size() > 0)
+    {
+        SPDLOG_LOGGER_DEBUG(m_logger, "删除消失的设备关联的算法");
+        m_toEQMDataBase.deleteDeviceAlgorithmInfo(m_listDevIDDelete);
+        isUpdate = true;
+    }
 
 
     return isUpdate;
@@ -290,5 +306,62 @@ void SPAServer::compareAlgorithmInfo(const std::vector<AlgorithmInfo>& vecNewInf
 }
 
 
+/**
+ * @brief 对比设备和算法关联表是否需要更新
+ *        对比规则:
+ *        1、这里只对比已有的设备ID,需要删除的ID在获取到tActionCamer表是就已经取出来了
+ *        2、如果设备ID相等,那么进一步对比算法信息是否相等
+ *        3、如果设备ID相等,但是算法信息数目不相等,那么直接加入更新列表
+ *        4、如果设备ID相等,算法信息数目相等,进一步对比算法信息
+ * 
+ * @param vecNewInfo 
+ * @param vecDevUpdate 
+ */
+void SPAServer::compareDeviceAlgorithmInfo(const std::vector<DeviceInfo>& vecNewInfo, std::vector<DeviceInfo>& vecDevUpdate)
+{
+    vecDevUpdate.clear();
+    for(const auto& it0 : vecNewInfo)
+    {
+        for(const auto& it1 : m_vecEqmDevInfo)
+        {
+            if(it0.DeviceID == it1.DeviceID)
+            {
+                /* 设备的算法信息数目不相等,直接加入更新列表 */
+                if(it0.vecAlgorithmInfo.size() != it1.vecAlgorithmInfo.size())
+                {
+                    vecDevUpdate.push_back(it0);
+                    break;
+                }
+                /* 设备的算法信息数目相等,进一步对比算法信息 */
+                bool isEquality = true;
+                for(const auto& it2 : it0.vecAlgorithmInfo)
+                {
+                    bool isEq2 = false;
+                    for(const auto& it3 : it1.vecAlgorithmInfo)
+                    {
+                        /* 这里只对比算法ID */
+                        if(it2.ActionID != it3.ActionID)
+                        {
+                            continue;
+                        }else {
+                            isEq2 = true;
+                            break;
+                        }
+                    }
+                    if(!isEq2)
+                    {
+                        isEquality = false;
+                        break;
+                    }
+                }
+                if(!isEquality)
+                {
+                    vecDevUpdate.push_back(it0);
+                    break;
+                }
+            }
+        }
+    }
+}
 
 

+ 4 - 2
SecurePlayAuxServer/SPAServer.h

@@ -27,8 +27,8 @@ private:
     bool processDeviceInfo(std::vector<DeviceInfo> vecNewDevInfo);
     /* 对比算法信息现有的数据和新获取到的数据,取出要删除和添加的数据 */
     void compareAlgorithmInfo(const std::vector<AlgorithmInfo>& vecNewInfo, std::vector<AlgorithmInfo>& vecAlgUpdate, std::vector<AlgorithmInfo>& vecAlgDelete);
-    
-
+    /* 对比设备和算法关联表是否需要更新 */
+    void compareDeviceAlgorithmInfo(const std::vector<DeviceInfo>& vecNewInfo, std::vector<DeviceInfo>& vecDevUpdate);   
 
 private:
     std::shared_ptr<spdlog::logger> m_logger = nullptr;
@@ -43,6 +43,8 @@ private:
     std::vector<AlgorithmInfo> m_vecEqmAlgInfo;
     /* 设备信息,这个是tActionCamer的信息 */
     std::vector<DeviceInfo> m_vecEqmDevInfo;
+    /* 设备和算法关联信息,这里存储着已经删除的设备对应的算法信息,将在这一轮循环中删除 */
+    std::list<int> m_listDevIDDelete;
 
 };
 

+ 4 - 0
SecurePlayAuxServer/communication/FromRedis.cpp

@@ -80,6 +80,7 @@ bool FromRedis::getRedisString(const std::string& key, std::string& value)
         FMTLOG_ERROR( "Redis no connect");
         return false;
     }
+    value.clear();
     /* 获取数据 */
     auto reply = (redisReply*)redisCommand(m_redisContext, "GET %s", key.c_str());
     // auto reply = (redisReply*)redisCommand(m_redisContext, "GET 113:P100104000");
@@ -128,3 +129,6 @@ bool FromRedis::authRedis(const std::string& password)
         return false;
     }
 }
+
+
+

+ 86 - 17
SecurePlayAuxServer/communication/ToEQMDataBase.cpp

@@ -494,7 +494,7 @@ bool ToEQMDataBase::updateDeviceAlgorithmInfo(std::vector<DeviceInfo>& vecInfo)
                 SPDLOG_LOGGER_DEBUG(m_logger,"插入设备信息到tActionCamer失败:{}, 错误信息:{}",ret,m_httpApi->DoGetLastError(&ret).toStdString());
                 isSuccess = false;
             }
-            SPDLOG_LOGGER_DEBUG(m_logger,"插入DeviceID {} ActionID {} 到 ActionCamer 成功!", it0.DeviceID, it1.ActionID);
+            SPDLOG_LOGGER_DEBUG(m_logger,"插入DeviceID {} ActionID {} 到 ActionCamer 成功!", it0.DeviceID, it1.ActionID);
         }
     }
 
@@ -534,8 +534,41 @@ bool ToEQMDataBase::deleteDeviceAlgorithmInfo(std::vector<DeviceInfo>& vecInfo)
     return isSuccess;
 }
 
+
+/* 删除设备和算法关联表 */
+bool ToEQMDataBase::deleteDeviceAlgorithmInfo(std::list<int>& vecID)
+{
+    if(m_httpApi == nullptr)
+    {
+        SPDLOG_LOGGER_ERROR(m_logger,"WebApi is nullptr");
+        return false;
+    }
+    bool isSuccess = true;
+    /* 更新之前先删除相关的信息 */
+    for(const auto& it : vecID)
+    {
+        nJson json0;
+        json0["opName"] = "SPSS_DeleteFromActionCamer";
+        nJson json1;
+        json1["camerID"] = it;
+        json0["paramList"] = json1;
+        QString strCmd = QString::fromStdString(json0.dump());
+        QString strRet;
+        auto ret = m_httpApi->DBQDoInterface(enDBOperatorType::EDBOT_Delete, strCmd, strRet);
+        if(ret < 0)
+        {
+            SPDLOG_LOGGER_DEBUG(m_logger,"删除设备信息到tActionCamer失败:{}, 错误信息:{}",ret,m_httpApi->DoGetLastError(&ret).toStdString());
+            // return false;
+            isSuccess = false;
+        }
+        SPDLOG_LOGGER_DEBUG(m_logger,"从 ActionCamer 删除DeviceID {} 成功!", it);
+    }
+
+    return isSuccess;
+}
+
 /* 获取设备和算法信息关联表,需要先从EQM数据库中获取到设备信息 */
-bool ToEQMDataBase::getDeviceAlgorithmInfo(std::vector<DeviceInfo>& vecInfo)
+bool ToEQMDataBase::getDeviceAlgorithmInfo(std::vector<DeviceInfo>& vecInfo, std::list<int>& listDevIDDelete)
 {
     if(m_httpApi == nullptr)
     {
@@ -547,6 +580,8 @@ bool ToEQMDataBase::getDeviceAlgorithmInfo(std::vector<DeviceInfo>& vecInfo)
         SPDLOG_LOGGER_WARN(m_logger,"Device info is empty");
         return false;
     }
+    listDevIDDelete.clear();
+
     nJson json0;
     json0["opName"] = "SPSS_SelectFromActionCamer";
     QString strCmd = QString::fromStdString(json0.dump());
@@ -557,6 +592,8 @@ bool ToEQMDataBase::getDeviceAlgorithmInfo(std::vector<DeviceInfo>& vecInfo)
         SPDLOG_LOGGER_DEBUG(m_logger,"获取ActionCamer失败:{}, 错误信息:{}",ret,m_httpApi->DoGetLastError(&ret).toStdString());
         return false;
     }
+    /* 设备和算法关联信息容器 */
+    std::vector<DeviceAlgorithmInfo> vecNewInfo;
     /* 解析信息 */
     try {
         nJson json1 = nJson::parse(strRet.toStdString());
@@ -571,22 +608,16 @@ bool ToEQMDataBase::getDeviceAlgorithmInfo(std::vector<DeviceInfo>& vecInfo)
         {
             return false;
         }
-        /* 根据缓存中的设备ID解析json字符串 */
-        for(auto& it0 : vecInfo)
+        /* 取出所有的设备算法信息 */
+        
+        for(const auto& it : result)
         {
-            for(auto& it1 : result)
-            {
-                /* 对比设备ID */
-                if(it0.DeviceID == it1["camerId"].get<int>())
-                {
-                    AlgorithmInfo info;
-                    info.ActionID = it1["actionId"].is_null() ? "" : it1["actionId"].get<std::string>();
-                    info.ActionName = it1["actionName"].is_null() ? "" : it1["actionName"].get<std::string>();
-                    info.ActionTaskID = it1["actionTaskid"].is_null() ? 0 : it1["actionTaskid"].get<int>();
-
-                    it0.vecAlgorithmInfo.push_back(info);
-                }
-            }
+            DeviceAlgorithmInfo info;
+            info.DeviceID = it["camerId"].get<int>();
+            info.ActionID = it["actionId"].is_null() ? "" : it["actionId"].get<std::string>();
+            info.ActionName = it["actionName"].is_null() ? "" : it["actionName"].get<std::string>();
+            info.ActionTaskID = it["actionTaskid"].is_null() ? 0 : it["actionTaskid"].get<int>();
+            vecNewInfo.push_back(info);
         }
     }
     catch (const nJson::parse_error& e) {
@@ -598,6 +629,44 @@ bool ToEQMDataBase::getDeviceAlgorithmInfo(std::vector<DeviceInfo>& vecInfo)
         return false;
     }
 
+    /* 根据缓存中的设备ID取出关联的算法 */
+    for(auto& it0 : vecInfo)
+    {
+        for(auto& it1 : vecNewInfo)
+        {
+            /* 对比设备ID */
+            if(it0.DeviceID == it1.DeviceID)
+            {
+                AlgorithmInfo info;
+                info.ActionID = it1.ActionID;
+                info.ActionName = it1.ActionName;
+                info.ActionTaskID = it1.ActionTaskID;
+                it0.vecAlgorithmInfo.push_back(info);
+            }
+        }
+    }
+    /* 取出关联表中已经消失的设备ID,在本轮循环中删除 */
+    for(const auto& it : vecNewInfo)
+    {
+        bool isExist = false;
+        for(const auto& it0 : vecInfo)
+        {
+            if(it.DeviceID == it0.DeviceID)
+            {
+                isExist = true;
+                break;
+            }
+        }
+        if(!isExist)
+        {
+            /* 检查是否重复,一个ID只需要记录一次 */
+            if(std::find(listDevIDDelete.begin(), listDevIDDelete.end(), it.DeviceID) == listDevIDDelete.end())
+            {
+                listDevIDDelete.push_back(it.DeviceID);
+            }
+        }
+    }
+
 
     return true;
 }

+ 6 - 2
SecurePlayAuxServer/communication/ToEQMDataBase.h

@@ -19,6 +19,7 @@ public:
     bool deleteAlgorithmInfo(std::vector<AlgorithmInfo>& vecDeleteInfo);
     /* 获取tAction数据 */
     bool getAlgorithmInfo(std::vector<AlgorithmInfo>& vecInfo);
+
     /* 插入设备信息 */
     bool insertDeviceInfo(std::vector<DeviceInfo>& vecInfo);
     /* 更新设备信息 */
@@ -27,14 +28,17 @@ public:
     bool deleteDeviceInfo(std::vector<DeviceInfo>& vecDeleteInfo);
     /* 从EQM获取CamerInfo信息 */
     bool getDeviceInfo(std::vector<DeviceInfo>& vecInfo);
+    
     /* 插入设备和算法关联信息 */
     bool insertDeviceAlgorithmInfo(std::vector<DeviceInfo>& vecInfo);
     /* 更新设备和算法关联表 */
     bool updateDeviceAlgorithmInfo(std::vector<DeviceInfo>& vecInfo);
     /* 删除设备和算法关联表 */
     bool deleteDeviceAlgorithmInfo(std::vector<DeviceInfo>& vecInfo);
-    /* 获取设备和算法信息关联表,需要先从EQM数据库中获取到设备信息 */
-    bool getDeviceAlgorithmInfo(std::vector<DeviceInfo>& vecInfo);
+    /* 删除设备和算法关联表 */
+    bool deleteDeviceAlgorithmInfo(std::list<int>& vecID);
+    /* 获取设备和算法信息关联表,需要先从EQM数据库中获取到设备信息,然后根据读取到的设备信息,取出已经删除的设备ID */
+    bool getDeviceAlgorithmInfo(std::vector<DeviceInfo>& vecInfo, std::list<int>& listDevIDDelete);
 
 private:
     std::shared_ptr<spdlog::logger> m_logger = nullptr;

+ 217 - 3
json.json

@@ -1,3 +1,4 @@
+/* 算法信息 */
 {
     "code": "0",
     "message": "成功",
@@ -191,7 +192,7 @@
     ],
     "success": true
 }
-
+/* 获取到的设备信息 */
 {
     "code": "0",
     "message": "成功",
@@ -231,8 +232,222 @@
     ],
     "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"
+}
+
+/* 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
+      }
+    ]
+  }
 
 
+/* 图片识别 */
 {
     "code": 0,
     "result": [
@@ -357,5 +572,4 @@
             "actionName": "盯屏"
         }
     ]
-}
-
+}

+ 2 - 2
安播辅助服务程序说明.md

@@ -54,8 +54,8 @@
     
     
 ## 从Redis获取数据
-1. `Key`的组成:`%d : %s`, `DeviceID`, `算子编号`
-2. `算子编号`通过获取摄像头算法列表获取到这个设备的算法编号,关键字是`ability`,存放在EQM数据库的tAction表格的ActionID,既算法ID
+1. `Key`的组成:`%d : %s`, `DeviceID`, `算法ID`
+2. `算法ID`通过获取摄像头算法列表获取到这个设备的算法编号,关键字是`ability`,存放在EQM数据库的tAction表格的ActionID,
 
 ## EQM数据库表格说明
 1. `tAction`是算法信息表,从超脑获取到的算法信息写入这个表格