From aa7c8d325fb831d32934e5ad20f95965475292ac Mon Sep 17 00:00:00 2001
From: panlei <2799247126@qq.com>
Date: 星期一, 16 十二月 2019 14:38:34 +0800
Subject: [PATCH] ---
---
structure/rule.go | 79 ++++++++++++++++++++++-----------------
1 files changed, 44 insertions(+), 35 deletions(-)
diff --git a/structure/rule.go b/structure/rule.go
index 60fe306..3479096 100644
--- a/structure/rule.go
+++ b/structure/rule.go
@@ -1,18 +1,31 @@
package structure
-import "basic.com/pubsub/protomsg.git"
+import (
+ "basic.com/pubsub/protomsg.git"
+)
// 姣忎釜鐩爣鐨勫弬鏁帮細鐩镐技搴︼紝鍗犳瘮锛屽昂瀵�
+type SourceArg struct {
+ Id string
+ Uuid string
+ Score float64 // 鍖哄煙鍐呯殑鐩爣鐨勭浉浼煎害
+ Proportion float64 // 鍖哄煙鍐呯殑鐩爣鐨勫崰姣�
+ Size float64 // 鍖哄煙鍐呯殑鐩爣鐨勫昂瀵�
+ AreaJson string // 鎵�灞炲尯鍩�
+ Type string // 璁拌浇鏁版嵁绫诲瀷
+ Location Rect // 璁颁笅姣忎釜鐩爣鐨勪綅缃弬鏁帮紝鏈�鍚庣粰缁撴灉瑁呴厤鐩爣鏁版嵁鐨勬椂鍊欑敤鐨勫埌
+ Car *protomsg.PlateIDVehicle // 杞﹁締鍙傛暟
+ Feature []byte
+ BodyFeature []float32
+ ThftRes protomsg.ThftResult
+ Liker []*BaseInfo
+ TimeLable string
+ CacheData ResultMsg
+}
+
type Arg struct {
- Id uint64
- Score float64 // 鍖哄煙鍐呯殑鐩爣鐨勭浉浼煎害
- Proportion float64 // 鍖哄煙鍐呯殑鐩爣鐨勫崰姣�
- Size float64 // 鍖哄煙鍐呯殑鐩爣鐨勫昂瀵�
- IsYolo bool // 鏄惁鏄痽olo鏁版嵁
- Location Rect // 璁颁笅姣忎釜鐩爣鐨勪綅缃弬鏁帮紝鏈�鍚庣粰缁撴灉瑁呴厤浜鸿劯鏁版嵁鐨勬椂鍊欑敤鐨勫埌
- Feature []byte
- ThftRes protomsg.ThftResult
- Liker []*BaseInfo
+ SourceArg
+ AttachArg SourceArg
}
// 姣忎釜鍖哄煙鍐呯殑鍥剧墖鏁版嵁闆嗗悎
@@ -29,20 +42,26 @@
TargetNum int // 鍖哄煙鍐呯洰鏍囨暟閲�
Args []*Arg // 鍖哄煙鍐呯洰鏍囬泦鍚�
FilterData []*Arg // 杩囨护鍚庡尯鍩熷唴鐩爣闆嗗悎
+ AlarmObj []*Arg // 鍖哄煙鍐呮渶鍚庢弧瓒宠鍒欑殑鐩爣
Time string // 褰撳墠鏃堕棿锛堢敤浠ュ尮閰嶆椂闂磋鍒欙級
IsEffective bool // 瑙勫垯涓槸鍚︾敤鍒颁簡姝ゅ尯鍩�
- KeepRight bool // 鏄惁闈犲彸琛�
- IsStatic bool // 鏄惁闈欐
+}
+
+type SourcePhoto struct {
+ Id string
+ Rects Rect // 鐭╁舰鍖哄煙鍙傛暟
+ Score float64 // 鐩镐技搴﹀緱鍒嗭紙鏈夊澶х▼搴﹀儚涓�涓洰鏍囥�備汉鑴革紝浜轰綋鎴栬溅绛夌瓑锛�
+ Type string // 璁拌浇鏁版嵁绫诲瀷
+ ThftRes protomsg.ThftResult
+ Feature []byte
+ BodyFeature []float32
+ Car *protomsg.PlateIDVehicle
}
// sdk杈撳嚭鐨勫浘鐗囦笂鍗曚釜鐩爣鐨勬暟鎹�
type PhotoMap struct {
- Id uint64
- Rects Rect // 鐭╁舰鍖哄煙鍙傛暟
- Score float64 // 鐩镐技搴﹀緱鍒嗭紙鏈夊澶х▼搴﹀儚涓�涓洰鏍囥�備汉鑴革紝浜轰綋鎴栬溅绛夌瓑锛�
- IsYolo bool // 鏄惁鏄痽olo鏁版嵁
- ThftRes protomsg.ThftResult
- Feature []byte
+ SourcePhoto
+ AttachObj SourcePhoto
}
// 姣忎釜绠楁硶瀵逛簬褰撳墠甯х敾闈㈣嚜宸辨彁鍙栫殑鏁版嵁
@@ -51,8 +70,6 @@
IpcId string
IsYolo bool
Photo []PhotoMap // yolo绠楁硶缁撴瀯锛屼篃鍙互瀛樹汉鑴哥殑鏁版嵁锛屾瘯绔熶汉鑴镐腑鑳界敤瑙勫垯鏉ユ祴鐨勮繕鏄偅浜涘弬鏁�
- KeepRight bool // 鏄惁闈犲彸琛� 绠楁硶鍒ゆ柇鐨勪笌涓婁竴甯у浘鍍忕殑姣旇緝缁撴灉
- IsStatic bool // 鏄惁闈欐
ImageWidth int // 鎽勫儚鏈烘媿鎽勭殑鍥惧儚瀹� 鍍忕礌
ImageHeight int // 鎽勫儚鏈烘媿鎽勭殑鍥惧儚楂� 鍍忕礌
AreaMapList []*AreaMap // 鏈瑂dk鎻愬彇鐨勬暟鎹寜鐓у尯鍩熷垝鍒嗗悗鐨勬暟鎹泦鍚�
@@ -68,18 +85,18 @@
type ResultMsg struct {
*protomsg.SdkMessage
- RuleResult map[string]interface{} // 杩囧畬瑙勫垯鍚庢墦鐨勬爣绛� face: []FaceResult, yolo: []Result
+ RuleResult map[string]interface{} // 杩囧畬瑙勫垯鍚庢墦鐨勬爣绛� face: []FaceResult, yolo: []Result target
}
// 杩囪鍒欏簱鎵撲笂鐨勬爣绛�
type Result struct {
TaskId string // 浠诲姟id
- SdkName string
+ SdkName string // 绠楁硶鍚嶇О
RuleGroupId string // 瑙勫垯缁刬d
DefenceState bool // 鏄惁甯冮槻
AlarmLevel int32 // 鎶ヨ绛夌骇
RuleText string // 鏂囧瓧鐗堣鍒欑粍
- Location []TargetInfo // 鐩爣鐨勫潗鏍�
+ AlarmObj []*Arg // 鎶ヨ鐨勭洰鏍囨暟鎹�
AlarmPolygon string // 瑙﹀彂鐨勬姤璀︽
IsLink bool // 鏄惁鏄仈鍔ㄤ换鍔�
Others
@@ -94,12 +111,6 @@
Rect
TargetId uint64
TargetScore float64
-}
-
-// 杩囪鍒欏簱鎵撲笂鐨勬爣绛�
-type FaceResult struct {
- Result
- Args []Arg
}
type LittleRuleResult struct {
SdkName string // 璁板綍涓嬫缁撴灉鏄摢涓猻dk鐨勭粨鏋�
@@ -121,12 +132,10 @@
TableName string `json:"tableName"`
BwType string `json:"bwType"`
CompareScore float64 `json:"compareScore"`
- PersonId string `json:"personId"`
- PersonName string `json:"personName"`
- PersonPicUrl string `json:"personPicUrl"`
- PhoneNum string `json:"phoneNum"`
- Sex string `json:"sex"`
- IdCard string `json:"idCard"`
+ TargetId string `json:"targetId"`
+ TargetName string `json:"targetName"`
+ TargetPicUrl string `json:"targetPicUrl"`
MonitorLevel string `json:"monitorLevel"`
Content string `json:"content"`
+ DbLabel string `json:"labels"`
}
--
Gitblit v1.8.0