| | |
| | | syntax = "proto3"; |
| | | import "base.proto"; |
| | | |
| | | package protomsg; |
| | | |
| | | message SdkmsgWithTask { |
| | | string sdkid = 1; |
| | | string sdktype = 2; |
| | | string sdkName = 3; |
| | | bytes sdkdata = 4; |
| | | } |
| | | import "base.proto"; |
| | | |
| | | message TaskLabel { |
| | | string taskid = 1; |
| | | string taskname = 2; |
| | | repeated SdkmsgWithTask sdkinfos = 3; |
| | | int32 index = 4 ; |
| | | } |
| | | |
| | | //SdkMessage struct test |
| | | message SdkMessage { |
| | | string cid = 1; |
| | | string caddr = 2; |
| | | TaskLabel tasklab =3 ; |
| | | bytes data = 4; |
| | | } |
| | | |
| | | //Area结构体 |
| | | message Area{ |
| | |
| | | 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;//是否正在做任务(0:否,1:是) |
| | | bool run_enable = 18;//是否启用实时或轮询(0:否,1:是) |
| | | int32 run_type = 19;//做任务的类型(0:轮询,1:实时) |
| | | string run_server_id = 20;//当前正在哪台服务器上做任务 |
| | | |
| | | } |
| | | |
| | | //摄像机的任务信息 |
| | |
| | | message TaskSdkInfo { |
| | | Task task = 1; |
| | | repeated Sdk sdks = 2; |
| | | } |
| | | |
| | | message SdkRun { |
| | | string ipc_id = 1; |
| | | string sdk_type = 2; |
| | | } |
| | | |
| | | message TaskSdkRun { |
| | | Task task = 1; |
| | | repeated SdkRun sdks = 2; |
| | | } |
| | | |
| | | //摄像机任务 |
| | |
| | | message TaskGroupArgs { |
| | | string task_id = 1; |
| | | repeated GroupRule group_rules = 2; |
| | | bool enable = 3; |
| | | } |
| | | |
| | | message GroupRule { |
| | | string group_id = 1; |
| | | repeated Rule rules = 2; |
| | | string group_text = 2; |
| | | int32 alarm_level = 3; |
| | | repeated Rule rules = 4; |
| | | string set_type = 5; |
| | | bool defence_state = 6; |
| | | } |
| | | |
| | | message Rule { |
| | |
| | | //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 enable = 10;//是否启用 |
| | | int32 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;//是否删除 |
| | | } |
| | | |
| | | message TaskSdkRule { |
| | | string taskId = 1; |
| | | bool enable = 2; |
| | | repeated SdkRuleSet sdkRules = 3; |
| | | } |
| | | |
| | | message SdkRuleSet { |
| | | string sdkId = 1; |
| | | string ipcId = 2; |
| | | repeated SdkRule rules = 3; |
| | | int32 sort = 4; |
| | | } |
| | | |
| | | message SdkRule { |
| | | string id = 1; |
| | | string sdk_arg_alias = 2; |
| | | string operator = 3; |
| | | string sdk_arg_value = 4; |
| | | } |
| | | |
| | | //SdkArg struct |
| | |
| | | bool must = 4;//参数是否必填 |
| | | string unit = 5;//单位 |
| | | string range = 6;//参数的范围 |
| | | int32 sort = 7;//参数排序 |
| | | string default_value = 7;//参数默认值 |
| | | string default_operator = 8;//参数默认计算符号 |
| | | int32 sort = 9;//参数排序 |
| | | } |
| | | |
| | | //TableChanged enum |
| | |
| | | T_TaskSdk = 4;//任务算法变化 |
| | | T_TaskSdkRule = 5;//任务算法规则变化 |
| | | T_Sdk = 6;//sdk变化 |
| | | T_CameraPolygon = 7;//摄像机多边形变化 |
| | | T_TimeRule = 8;//时间规则变化 |
| | | T_Server = 9;//服务器信息变化 |
| | | T_PollConfig = 10;//轮询配置变化 |
| | | } |
| | | |
| | | enum DbAction { |
| | |
| | | string type = 7; |
| | | int32 defence_state = 8; |
| | | } |
| | | |
| | | 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 CompareArgs { |
| | | repeated string tableIds = 1; |
| | | float compareThreshold = 2; |
| | | bytes faceFeature = 3; |
| | | repeated string tasks = 4; |
| | | repeated string treeNodes = 5; |
| | | repeated string tabs = 6; |
| | | repeated int32 alarmLevel = 7; |
| | | repeated string searchTime = 8; |
| | | string inputValue = 9; |
| | | string collection = 10; |
| | | bool source = 11; |
| | | string analyServerId = 12; |
| | | } |
| | | |
| | | 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; |
| | | } |
| | | |
| | | 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;//特征值base64 |
| | | DbAction action = 5; |
| | | int32 enable = 6; |
| | | } |