From 5d483655e888dbb97a1011c45f890669b7a74cc5 Mon Sep 17 00:00:00 2001 From: cheliequan <liequanche@126.com> Date: 星期五, 10 二月 2023 14:02:22 +0800 Subject: [PATCH] 增加SOResult相关结构体 --- protomsg.proto | 527 ++++++++++++++++++++++++++++++++++++++-------------------- 1 files changed, 345 insertions(+), 182 deletions(-) diff --git a/protomsg.proto b/protomsg.proto index 02463bd..3efc3e0 100644 --- a/protomsg.proto +++ b/protomsg.proto @@ -1,25 +1,9 @@ syntax = "proto3"; + package protomsg; -message TaskLabel { - string taskid = 1; - repeated string sdkids = 2; - int32 index = 3 ; -} +import "base.proto"; -//SdkMessage struct test -message SdkMessage { - string cid = 1; - TaskLabel tasklab = 2; - bytes data =3 ; -} - -// Image ipc struct -message Image{ - int32 width = 1; - int32 height = 2; - bytes data = 3; -} //Area缁撴瀯浣� message Area{ @@ -32,58 +16,65 @@ 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; + string alias = 3; + string snapshot_url = 4;//鎽勫儚鏈哄簳鍥惧揩鐓� + int32 type = 5; + string addr = 6; + float longitude = 7; + float latitude = 8; + int32 floor = 9; + string rtsp = 10; + string ip = 11; + int32 port = 12; + string username = 13; + string password = 14; + string brand = 15; + string reserved = 16; + + bool is_running = 17;//鏄惁姝e湪鍋氫换鍔★紙0:鍚︼紝1锛氭槸锛� + bool run_enable = 18;//鏄惁鍚敤瀹炴椂鎴栬疆璇�(0:鍚︼紝1锛氭槸) + int32 run_type = 19;//鍋氫换鍔$殑绫诲瀷锛�0锛氳疆璇紝1锛氬疄鏃讹級 + string run_server_id = 20;//褰撳墠姝e湪鍝彴鏈嶅姟鍣ㄤ笂鍋氫换鍔� + + int32 resolution_width = 21; //鍒嗚鲸鐜囧 + int32 resolution_height = 22; //鍒嗚鲸鐜囬珮 + int32 fps = 23; //fps璁剧疆 + + repeated Sensor sensors = 24; //浼犳劅鍣� + + bool voiceEnable = 25; + string voiceId = 26; + string coordTransform = 27; //鍧愭爣杞崲淇℃伅 + + int32 status = 28; } -//鎽勫儚鏈虹殑浠诲姟淇℃伅 -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 { +message Sensor { string id = 1; - string camera_ids = 2;//鎽勫儚鏈篿d - 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; + string type = 2; + string ip = 3; + int32 port = 4; + string username = 5; + string password = 6; + int32 threshold = 7; + bool enable = 8; } + +//鎽勫儚鏈鸿仈鍔� +message CameraLink { + string camera_ids = 1; + string link_task_id = 2; +} + +message SdkRun { + string ipc_id = 1; + string sdk_type = 2; + int32 isTriggerByPreSdk = 3; + int32 confidence = 4; + bool bReid = 5; + int32 triggerNextSdkType = 6; +} + //鎽勫儚鏈哄竷闃茬殑鏃堕棿瑙勫垯锛屽彲浠ヨ缃涓�,鐢╥d鍏宠仈鍒板叿浣撶殑瑙勫垯閰嶇疆涓� message CameraTimerule { @@ -108,131 +99,150 @@ message Polygon { string id = 1;//褰㈢姸id string name = 2;//褰㈢姸鐨勫悕绉� - repeated Point points = 4;//鐐圭殑闆嗗悎 + repeated Point points = 3;//鐐圭殑闆嗗悎 } -message CameraTaskArgs { - 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_next = 11; - string group_id =12; +message CameraInfo { + string runServerName = 1; + string id = 2; + string name = 3; + int32 run_type= 4; +} +message CameraAndRules { + CameraInfo cameraInfo = 1; + repeated GroupRule rules = 2; +} +message GroupRule { + repeated string cameraIds = 1; + string id = 2; + + string group_text = 3; + int32 alarm_level = 4; + repeated Rule rules = 5; + string set_type = 6; + + string template_id = 7; + string template_rule = 8; + string time_rule_id = 9; + string scene_name = 10; + string desc = 11; + bool enable = 12; + string voiceId = 13; //浜嬩欢澹伴煶 +} + +message GroupRuleSdks { + string id = 1; + string scene_name = 2; + repeated SdkRun sdks = 3; + repeated string sdkIds = 4; +} + +message Rule { + string id =1; + string camera_id =2; + string polygon_id =3; + string sdk_id = 4; + repeated SdkSetBase sdk_set = 5; + string rule_with_pre = 6; + bool is_save_anyhow = 7; //rule_with_pre鏄Е鍙戞椂锛屾槸鍚︽棤璁鸿瑙﹀彂鐨勬潯浠舵弧涓嶆弧瓒筹紝閮戒繚鐣欐暟鎹� + string group_id =8; + int32 sort = 9; +} + +message RuleTemplate { + string id = 1; + string name = 2; + string desc = 3; + string txt = 4; + repeated TemplateArg rules = 5; +} + +message RuleTemplateList { + repeated RuleTemplate list = 1; +} + +message TemplateArg { + string sdk_id = 1; + string sdk_arg_alias = 2; + string operator = 3; + string sdk_arg_value = 4; + string sort = 5; + string rule_with_pre = 6; +} + +message SdkSetBase { + string sdk_arg_alias = 1; + string operator = 2; + string operator_type = 3; + string sdk_arg_value = 4; + int32 sort = 5; } //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; - string enabled = 10;//鏄惁鍚敤 - string del_flag = 11;//鏄惁鍒犻櫎 + string ipc_id = 2; + string sdk_type = 3;//绠楁硶绫诲瀷 + string sdk_name = 4;//sdk鍚嶇О + repeated SdkArg args = 5;//绠楁硶鍙傛暟 + string icon = 6;//绠楁硶鍥炬爣 + string url = 7;//绠楁硶涓嬭浇鍦板潃 + string create_time = 8; + string update_time = 9; + string create_by = 10; + bool enable = 11;//鏄惁鍚敤 + int32 del_flag = 12;//鏄惁鍒犻櫎 + string iconBlob = 13; //鍥剧墖浜岃繘鍒� + string version = 14; //鐗堟湰 + bool enTrack = 15; //鏄惁寮�鍚窡韪� + string argDef = 16; //榛樿鍙傛暟 + string ruleSo = 17; //瑙勫垯鐢╯o + string iconBlob2 = 18; //绗簩濂楀浘鐗囦簩杩涘埗 + string activateCode = 19; // } //SdkArg struct message SdkArg { - string alias = 2;//鍙傛暟鍒悕 - string name = 3;//鍙傛暟鍚嶇О - string type = 4;//鍙傛暟绫诲瀷 - bool must = 5;//鍙傛暟鏄惁蹇呭~ + string alias = 1;//鍙傛暟鍒悕 + string name = 2;//鍙傛暟鍚嶇О + string type = 3;//鍙傛暟绫诲瀷 + bool must = 4;//鍙傛暟鏄惁蹇呭~ + string unit = 5;//鍗曚綅 string range = 6;//鍙傛暟鐨勮寖鍥� - int32 sort = 7;//鍙傛暟鎺掑簭 + string default_value = 7;//鍙傛暟榛樿鍊� + string default_operator = 8;//鍙傛暟榛樿璁$畻绗﹀彿 + int32 sort = 9;//鍙傛暟鎺掑簭 } -// 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; +message SdkChanSet { + string sdk_type = 1; + int32 chan_num = 2; + int32 confidenceInc = 3; + int32 minMovePos = 4; } -// sdk face property -message ParamFacePos{ - FacePos pos = 1; - Image img = 2; -} -// sdk face extract -message ParamFaceCompare{ - bytes feat1 = 1; - bytes feat2 = 2; -} -// sdk face property -message ParamFaceProperty{ - ThftResult result = 1; - Image img = 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鍙樺寲 + T_CameraRule = 1;//鎽勫儚鏈轰换鍔″弬鏁板彉鍖� + T_Sdk = 2;//sdk鍙樺寲 + T_CameraPolygon = 3;//鎽勫儚鏈哄杈瑰舰鍙樺寲 + T_TimeRule = 4;//鏃堕棿瑙勫垯鍙樺寲 + T_Server = 5;//鏈嶅姟鍣ㄤ俊鎭彉鍖� + T_PollConfig = 6;//杞閰嶇疆鍙樺寲 + T_File = 7;//鏈湴鏂囦欢鍙樺寲 + T_FileSetting = 8;//鏈湴鏂囦欢鍒嗘瀽璁剧疆 + T_SdkChanSet = 9;//绠楁硶閫氶亾璁剧疆鍙樺寲 + T_FileStack = 10;//鏁版嵁鏍堝彉鍖� + T_ResourceConfig = 11;//瀵瑰鏈嶅姟閰嶇疆鍙樺寲 + T_CalculationPower = 12;//闇�瑕侀噸鏂拌绠楃畻鍔涘崰鐢ㄦ儏鍐� + T_EventPush = 13; //浜嬩欢鎺ㄩ�佹湁鍙樺寲 + T_Cluster = 14; //闆嗙兢鍒涘缓銆佸姞鍏ユ垨閫�鍑� + T_CameraPolygonRelation = 15; //鎽勫儚鏈哄尯鍩熺殑鍏宠仈鍏崇郴 + T_Voice = 16;//鎶ヨ澹伴煶鍙戠敓鍙樺寲 } enum DbAction { @@ -258,19 +268,172 @@ string direction_line = 6; string type = 7; int32 defence_state = 8; + string camera_name = 9; //鎽勫儚鏈哄悕绉� } -message CameraTaskArg { +message CameraPolygonRelation { 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; + string source_camera_id = 2; + string source_polygon_id = 3; + string target_camera_id = 4; + string target_polygon_id = 5; +} + +message VideotapeInfo { + string esDataId = 1; + string cameraId = 2; + string taskId = 3; + int64 imgId = 4; + string videoUrl = 5; + repeated string sdkIds = 6; + int32 type = 7; +} + +message Voice { + string id = 1; + string name = 2; + string path = 3; +} + +message VoiceList { + repeated Voice list = 1; +} + +message CompareArgs { + repeated string tableIds = 1; + float compareThreshold = 2; + bytes faceFeature = 3; + repeated string tasks = 4; + repeated string treeNodes = 5; + repeated string tabs = 6; + string alarmLevel = 7; + repeated string searchTime = 8; + string inputValue = 9; + string collection = 10; + bool source = 11; + string analyServerId = 12; + string compareTarget = 13;//姣斿鐨勭洰鏍� + bool isCompareAll = 14; //鏄惁姣斿鍏ㄩ儴,鍋氭祴璇曠敤 + repeated string serverIds = 15; //绠$悊骞冲彴姣斿澶氫釜璁惧浜х敓鐨勬暟鎹� +} + +message CompareEvent { + CompareEventType eventType =1; + bytes payload = 2; +} + +enum CompareEventType { + ReInitCache = 0; // 閲嶆柊鍒濆鍖栧簳搴撶紦瀛橈紙鍔犲叆闆嗙兢鍚庢墽琛岋級 + UpdateCache = 1; // 鏇存柊搴曞簱鍜屼汉鍛樼紦瀛� + Compare = 2; // 鍋氭瘮瀵硅姹� +} + +message SdkCompareEach { + string id = 1; + string tableid = 2; + float compareScore = 3; +} + +message SdkCompareResult { + repeated SdkCompareEach compareResult = 1; +} + +message EventPush { + string id = 1; + string name = 2; + string time_start = 3; + string time_end = 4; + bool is_satisfy_all = 5; + string rule_text = 6; + bool enable = 7; + string link_type = 8; + string link_device = 9; + repeated PushIpPort ip_ports = 10; + repeated PushUrl urls = 11; + repeated EventPushRule rules = 12; + map<string,string> filtRename = 13; + repeated PushSetMenu push_set = 14; +} + +message PushSetMenu { + string id = 1; + string name = 2; + bool checked = 3; + string alias = 4; + repeated PushSetMenu children = 5; +} + +message EventPushRule { + string id = 1; + string topic_type = 2; + string topic_arg = 3; + string operator = 4; + string operator_type = 5; + string rule_value = 6; + string event_push_id = 7; +} + +message PushIpPort { + string server_ip = 1; + int32 port = 2; + bool enable = 3; +} + +message PushUrl { + string url = 1; + bool enable = 2; +} + +message PushAttach { + string push_id = 1; + Camera cam = 2; + string server_id = 3; + string server_name = 4; + string local_ip = 5; + string video_url = 6; +} + +enum EsCacheChanged { + T_DbTable = 0;//搴曞簱鏈夋晥鐘舵�佸彉鍖� + T_DbTablePerson = 1;//搴曞簱浜哄憳鏈夋晥鐘舵�佸彉鍖� +} + +message EsPersonCacheChange { + EsCacheChanged type = 1; + repeated string table_id = 2;//搴曞簱id + string person_id = 3;//浜哄憳id + string feature = 4;//鐗瑰緛鍊糱ase64 + DbAction action = 5; + int32 enable = 6; + string carNo = 7; +} + +message ClusterAndNodes { + string clusterId = 1; + string clusterName = 2; + repeated Node nodes = 3; + string virtualIp = 4; + string password = 5; +} + +message Node { + string id = 1; + string cluster_id=2; + string node_name = 3; + string node_id = 4; + string node_ip = 5; + string create_time = 6; + bool isDelete = 7; + string drift_state = 8; + string device_type = 9; +} + +message Dic { + string id = 1; + string value = 2; + string name = 3; + string type = 4; + string description = 5; + int32 sort = 6; + string parent_id = 7; } \ No newline at end of file -- Gitblit v1.8.0