panlei
2019-09-12 153d80d308e1db97c0b2553a4ee9758c237ac2ba
algorithm/middleware/middleware.go
@@ -12,7 +12,7 @@
   "time"
)
func Entrance (args *structure.SdkDatas,groupRule protomsg.GroupRule) {
func Entrance (args *structure.SdkDatas,groupRule protomsg.GroupRule) ([]*structure.LittleRuleResult,string,string){
   resultSplice := []*structure.LittleRuleResult{}
   sdkNames := ""
   polygonId := ""
@@ -150,6 +150,7 @@
         }
      }
   }
   return resultSplice,sdkNames,polygonId
}
func timeRuleResult(rule *protomsg.Rule, am *structure.AreaMap) structure.LittleRuleResult {
@@ -216,11 +217,16 @@
      soName = "face.so"
   } else if sdkId == "812b674b-2375-4589-919a-5c1c3278a975"{
      soName = "intrusion.so"
   } else if sdkId == "812b674b-2375-4589-919a-5c1c3278a976" {
   } else if sdkId == "812b674b-2375-4589-919a-5c1c3278a976" || sdkId == "812b674b-2375-4589-919a-5c1c3278a973" {
      soName = "personUnsual.so"
   } else if sdkId == "812b674b-2375-4589-919a-5c1c3278a972" {
      soName = "faceCompare.so"
   }
   //soInfo,errr := cache.GetSoInfoById(sdkId)
   //if errr != nil {
   //   panic("没读到注册表")
   //}
   //soName := soInfo.SoName
   p,err :=  plugin.Open("./algorithm/"+soName)
   if err != nil {
      panic(err)