| | |
| | | race := getRaceString(face.ThftRes.Race) |
| | | ageDescription := getDescription(face.ThftRes.Age) |
| | | logger.Info(ageDescription) |
| | | esDataId := uuid.NewV4().String() |
| | | //esDataId := uuid.NewV4().String() |
| | | linksId := "" |
| | | if linkId != "" { |
| | | linksId = linkId |
| | |
| | | //logger.Info("人脸的id:",strconv.FormatUint(face.Id, 10)) |
| | | logger.Info("%%%%%%%%%%%%%%%%%%%%%目标信息:",*target) |
| | | pervideo := PerVideoPicture{ |
| | | esDataId, |
| | | msg.Push.PushId, |
| | | msg.Cid, |
| | | msg.Push.Cam.Addr, |
| | | picTime, |
| | |
| | | face.ThftRes.Beauty, |
| | | base64.StdEncoding.EncodeToString(face.Feature), |
| | | []string{resp["fileUrl"].(string)}, |
| | | "暂无集群", |
| | | "", |
| | | msg.Push.ServerId, |
| | | msg.Push.ServerName, |
| | | msg.Push.LocalIp, |
| | |
| | | } else { |
| | | logger.Info("插入es返回的信息:", resp1) |
| | | // 发出录像信号 |
| | | ruleserver.AddLxMessage(&protomsg.VideotapeInfo{EsDataId: esDataId, CameraId: msg.Cid, TaskId: msg.Tasklab.Taskid, VideoUrl:msg.Push.VideoUrl,ImgId: i.Id, SdkIds: []string{}, Type: 1}) |
| | | ruleserver.AddLxMessage(&protomsg.VideotapeInfo{EsDataId: msg.Push.PushId, CameraId: msg.Cid, TaskId: msg.Tasklab.Taskid, VideoUrl:msg.Push.VideoUrl,ImgId: i.Id, SdkIds: []string{}, Type: 1}) |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | if resp["fileUrl"] != nil { |
| | | url = append(url, resp["fileUrl"].(string)) |
| | | esDataId := uuid.NewV4().String() |
| | | //esDataId := uuid.NewV4().String() |
| | | linksId := "" |
| | | if linkId != "" { |
| | | linksId = linkId |
| | | } |
| | | peraction := Personaction{ |
| | | esDataId, |
| | | msg.Push.PushId, |
| | | msg.Cid, |
| | | msg.Push.Cam.Name, |
| | | msg.Push.Cam.Addr, |
| | |
| | | if err != nil { |
| | | logger.Info("json parse error ", err) |
| | | return |
| | | |
| | | } |
| | | resp1, err2 := EsReq("POST", personAction, requstbody) |
| | | if err2 != nil { |
| | |
| | | } else { |
| | | logger.Debug("插入es返回的数据信息是:", resp1) |
| | | // 发出录像信号 |
| | | logger.Info("给录像的视频地址:",msg.Push.VideoUrl) |
| | | ruleserver.AddLxMessage(&protomsg.VideotapeInfo{EsDataId: esDataId, CameraId: msg.Cid, TaskId: msg.Tasklab.Taskid,VideoUrl:msg.Push.VideoUrl, ImgId: i.Id, SdkIds: []string{}, Type: 2}) |
| | | ruleserver.AddLxMessage(&protomsg.VideotapeInfo{EsDataId: msg.Push.PushId, CameraId: msg.Cid, TaskId: msg.Tasklab.Taskid,VideoUrl:msg.Push.VideoUrl, ImgId: i.Id, SdkIds: []string{}, Type: 2}) |
| | | logger.Warn("__________________________________________往ES插入yolo数据成功") |
| | | //os.Exit(1) |
| | | } |