syntax = "proto3"; package protomsg; message TaskLabel { string taskid = 1; repeated string sdkids = 2; int32 index = 3 ; } //SdkMessage struct test message SdkMessage { string cid = 1; TaskLabel tasklab = 2; bytes data =3 ; Personaction personaction =4; Vediopersons vedioperson = 5; } message Personaction{ string imgKey = 1; string videoReqNum = 2; string sdkType = 3; string picName = 4; string content = 5; string cluster_id = 6; string personPicUrl = 7; string channlId = 8; string likeDate = 9; string picAddress = 10; string picMaxUrl = 11; string picDate = 12; string picLocalUrl = 13; string isDelete = 14; string likePer = 15; string baseName = 16; string videoNum = 17; string collection = 18; string picSmUrl = 19; string indeviceid = 20; string idcard = 21; string ack_alarm = 22; string personId = 23; string id = 24; string indevicename = 25; string faceFeature = 26; string personIsHub = 27; string videoIp = 28; string taskId = 29; } message PersonBaseInfo { string personNamae = 1; string iDCard = 2; string gender = 3; string personPicUrl = 4; string likePer = 5; string tableId = 6; string monitorLevel = 7; string personId = 8; string phoneNum = 9; string content = 10; string tableName = 11; } message Vediopersons { string iD string videoReqNum string sdkType string gender string picName string content string personPicUrl string channlId string likeDate string race string pciAddress string picMaxUrl string age string picDate string picLocalUrl string isDelete repeated string tableName repeated string tableId string videoNum string picSmUrl string simleLevel string indeviceId repeated string iDcard repeated string personId string beautyLevel string indeviceName string faceFeature string personIsHub string videoIp string ackAlarm string clusterId string taskId string taskName repeated PersonBaseInfo baseinfo string collection string ageDescription } // Image ipc struct message Image{ int32 width = 1; int32 height = 2; bytes data = 3; } //Area结构体 message Area{ int32 id = 1; int32 parentid = 2; string name = 3; } //Camera结构体 message Camera { string id = 1; string name = 2; int32 type = 3; string addr = 4; int32 areaid = 5; float longitude = 6; float latitude = 7; string rtsp = 8; string ip = 9; int32 port = 10; string username = 11; string password = 12; string brand = 13; string reserved = 14; } //摄像机的任务信息 message CameraAndTaskInfo { Camera camera = 1;//摄像机信息 repeated Task tasks = 2;//任务列表 } //Task结构体 message Task { string taskid = 1; string taskname = 2; string create_at = 3; string create_by = 4; string update_at = 5; bool enable = 6; bool is_alarm = 7; bool del_flag = 8; } message TaskSdkInfo { Task task = 1; repeated Sdk sdks = 2; } //摄像机任务 message CameraTask { string id = 1; string camera_ids = 2;//摄像机id string task_id = 3;//任务id repeated DayCtl time_rule = 4;//布防时间 string react_rule = 5;//联动方式 string react_device = 6;//联动设备 bool del_flag = 7; //逻辑删除标记 bool update_flag = 8;//是否参数更新了 bool enable = 9; //是否启用 int32 sort = 10; //任务排序 bool is_full = 11;//参数是否设置完整 string link_group_id = 12; } //摄像机布防的时间规则,可以设置多个,用id关联到具体的规则配置中 message CameraTimerule { string id = 1;//id string name = 2;//规则名称 string time_rule = 3;//具体时间规则设置 } //DayCtl struct 每天的时间控制规则 message DayCtl { int32 day = 1;//1-7表示星期一到星期日 repeated TimeRange time_range = 2; } //时间起始范围 message TimeRange { string start = 1;//开始 string end = 2;//结束 } //Polygon struct message Polygon { string id = 1;//形状id string name = 2;//形状的名称 repeated Point points = 3;//点的集合 } message CameraTaskArgs { string camera_id = 1; repeated TaskGroupArgs task_args = 2; } message TaskGroupArgs { string task_id = 1; repeated GroupRule group_rules = 2; } message GroupRule { string group_id = 1; repeated Rule rules = 2; } message Rule { string id =1; string camera_task_id =2; string camera_id =3; string polygon_id =4; string sdk_id = 5; string sdk_arg_alias = 6; string operator = 7; string operator_type = 8; string sdk_arg_value = 9; int32 sort = 10; string rule_with_pre = 11; string group_id =12; } //Sdk struct message Sdk { string id = 1; string sdk_type = 2;//算法类型 string sdk_name = 3;//sdk名称 repeated SdkArg args = 4;//算法参数 string icon = 5;//算法图标 string url = 6;//算法下载地址 string create_time = 7; string update_time = 8; string create_by = 9; bool enabled = 10;//是否启用 int32 del_flag = 11;//是否删除 } //SdkArg struct message SdkArg { string alias = 1;//参数别名 string name = 2;//参数名称 string type = 3;//参数类型 bool must = 4;//参数是否必填 string unit = 5;//单位 string range = 6;//参数的范围 int32 sort = 7;//参数排序 } // struct for sdk message Point{ int32 x = 1; int32 y = 2; } message Rect{ int32 left = 1; int32 top = 2; int32 right = 3; int32 bottom = 4; } message FaceAngle{ int32 yaw = 1; int32 pitch =2; int32 roll = 3; float confidence =4; } message ThftResult{ int32 gender = 1; int32 age = 2; int32 race = 3; int32 beauty = 4; int32 smile = 5; } message FacePos{ Rect rcFace = 1; Point ptLeftEye = 2; Point ptRightEye = 3; Point ptMouth = 4; Point ptNose = 5; FaceAngle fAngle = 6; int32 quality = 7; bytes facialData = 8; } message FaceInfo{ Rect rcFace = 1; Point ptLeftEye = 2; Point ptRightEye = 3; Point ptMouth = 4; Point ptNose = 5; FaceAngle fAngle = 6; int32 quality = 7; bytes facialData = 8; int64 faceID = 9; } message ObjInfo{ Rect rcObj = 1; int32 typ = 2; float prob = 3; } // sdk face property message ParamFacePos{ FacePos pos = 1; ThftResult result = 2; Image img = 3; } // sdk face extract message ParamFaceCompare{ bytes feat1 = 1; bytes feat2 = 2; } // sdk yolo detect message ParamYoloObj{ repeated ObjInfo infos = 1; Image img = 2; } //TableChanged enum enum TableChanged { T_Camera = 0;//摄像机变化 T_CameraTask = 1;//摄像机任务变化 T_CameraTaskArgs = 2;//摄像机任务参数变化 T_Task = 3;//任务表变化 T_TaskSdk = 4;//任务算法变化 T_TaskSdkRule = 5;//任务算法规则变化 T_Sdk = 6;//sdk变化 } enum DbAction { Insert = 0;//Insert Update = 1;//Update Delete = 2;//Delete } //publish db change message message DbChangeMessage { TableChanged table = 1;//变化的表 string id = 2;//变化数据id DbAction action = 3;//action string info = 4;//变化内容 } message CameraPolygon { string id = 1; string camera_id = 2;//摄像机id string name = 3;//名称 string polygon = 4;//坐标点集合 string trigger_line = 5; string direction_line = 6; string type = 7; int32 defence_state = 8; }