zhangzengfei
2024-10-19 1ca4879df9cc3c22181b2a200aa4b793116d3d35
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
package model
 
type pushDataInfo struct {
    SourceData   interface{} `json:"sourceData"`
    PicMaxImages [][]byte    `json:"picMaxImages"`
    PicSmImages  [][]byte    `json:"picSmImages"`
}
 
var PushDataInfo = &pushDataInfo{
    SourceData:   nil,
    PicMaxImages: nil,
    PicSmImages:  nil,
}
 
type BaseCompareInfo struct {
    BwType       string  `json:"bwType"`
    TableId      string  `json:"tableId"`
    TableName    string  `json:"tableName"`
    CompareScore float32 `json:"compareScore"`
    OriginScore  float32 `json:"originScore"`
    TargetId     string  `json:"targetId"`
    TargetPicUrl string  `json:"targetPicUrl"`
    MonitorLevel string  `json:"monitorLevel"`
    Content      string  `json:"content"`
    DbLabel      string  `json:"labels"`
}
 
type AlarmRule struct {
    RuleId     string `json:"ruleId"`
    RuleText   string `json:"ruleText"`
    AlarmLevel string `json:"alarmLevel"`
}
 
type Point struct {
    X int32 `json:"x"`
    Y int32 `json:"y"`
}
 
type Points struct {
    TopLeft     Point `json:"topLeft"`
    BottomRight Point `json:"bottomRight"`
}
 
type TargetInfo struct {
    TargetId       string  `json:"targetId"`
    TargetScore    float64 `json:"targetScore"`
    FrontFaceScore float64 `json:"frontFaceScore"`
    ImgQuality     float64 `json:"imgQuality"`
    FaceQuality    float64 `json:"faceQuality"`
    TargetType     string  `json:"targetType"`
    Feature        string  `json:"-"`
    PicSmUrl       string  `json:"picSmUrl"`
    TargetLocation Points  `json:"targetLocation"`
    Attribute      string  `json:"attribute"`
}
 
type PicWidHei struct {
    PicW int `json:"picW"`
    PicH int `json:"picH"`
}
 
type PushDataInfoV2 struct {
    CameraId     string   `json:"cameraId"`
    CameraFloor  string   `json:"cameraFloor"` //摄像机楼层
    Direction    string   `json:"direction"`   // 摄像机运行方向 up or down
    PicDate      string   `json:"picDate"`
    PicId        string   `json:"picId"`
    DataSource   string   `json:"dataSource"`
    PicMaxImages [][]byte `json:"picMaxImages"`
    PicSmImages  [][]byte `json:"picSmImages"`
}
 
type TaskResultInfoV2 struct {
    Id              string           `json:"id"`
    AnalyServerId   string           `json:"analyServerId"`
    AnalyServerName string           `json:"analyServerName"`
    AnalyServerIp   string           `json:"analyServerIp"`
    ClusterId       string           `json:"clusterId"`
    CameraId        string           `json:"cameraId"`
    CameraAddr      string           `json:"cameraAddr"` // 摄像机地址
    CameraName      string           `json:"cameraName"` // 摄像机名称
    CommunityId     string           `json:"communityId"`
    CommunityName   string           `json:"communityName"`
    CameraLocation  CameraLocation   `json:"cameraLocation"`
    DocumentNumber  string           `json:"documentNumber"` // 档案编号
    OrgId           string           `json:"orgId"`          //机构名称
    OrgName         string           `json:"orgName"`        //机构名称
    PicDate         string           `json:"picDate"`
    PicId           string           `json:"picId"`
    PicMaxUrl       string           `json:"picMaxUrl"`
    PicWH           PicWidHei        `json:"picWH"`
    TaskId          string           `json:"taskId"`
    TaskName        string           `json:"taskName"`
    SdkName         string           `json:"sdkName"`
    Content         string           `json:"content"`
    ShowLabels      string           `json:"showLabels"`
    OtherLabels     string           `json:"otherLabels"`
    VideoUrl        string           `json:"videoUrl"`
    IsAlarm         bool             `json:"isAlarm"`
    IsAckAlarm      bool             `json:"isAckAlarm"`
    IsDelete        bool             `json:"isDelete"`
    IsKeyPerson     bool             `json:"isKeyPerson"`
    KeyPersonType   []string         `json:"keyPersonType"`
    AlarmRules      []AlarmRule      `json:"alarmRules"`
    BaseInfo        *BaseCompareInfo `json:"baseInfo"`
    TargetInfo      TargetInfo       `json:"targetInfo"`
    DataSource      string           `json:"dataSource"` // 数据来源:摄像机, 数据栈
}
 
type CameraLocation struct {
    Building  string `json:"building"`
    Unit      string `json:"unit"`
    Pos       string `json:"pos"`
    Floor     string `json:"floor"`
    Direction string `json:"direction"`
}
 
func (cl *CameraLocation) Join() string {
    return cl.Building + cl.Unit + cl.Pos + cl.Floor
}
 
// es视频分析的数据结构
type ESInfoV2 struct {
    TaskResultInfoV2
    Version    string `json:"version"`
    UpdateTime string `json:"updateTime"`
    LikeDate   string `json:"likeDate"`
}