文档

边缘应用LinkVisual对接

更新时间:
一键部署

登录并获取鉴权信息

1.接口描述

授权类型

APPSIGN

协议

HTTP

请求方法

Post

域名(环境变量中获取)

30.42.82.42(集群服务地址)

路径

/vision/edge/console/user/login

2.入参说明

入参名称

数据类型

是否必须

入参示例

入参描述

userName

string

test_model1

用户名

password

string

1C35315598****

密码

3.出参列表

出参名称

数据类型

出参描述

code

整形

响应码, 200: 成功

systemInitializeGuideFinish

字符串

系统初始化标志位(暂未使用,可忽略)

token

字符串

令牌信息

userId

string

用户ID

message

string

返回信息

4.请求示例

 public static void main(String[] args) {
        geturl();//测试发送请求
    }

    private Logger logger = LoggerFactory.getLogger("iot_edge");
    private static final String PATH_LOGIN_HOST = "/vision/edge/console/user/login";
    private static final String apiGatewayDomain = "30.42.82.42";
    private static final int port = 8080;

    /**
     * 发送HttpPost请求
     * <p>
     * <p>
     * json字符串,例如: "{ \"id\":\"12345\" }" ;其中属性名必须带双引号<br/>
     *
     * @return 成功:返回json字符串<br/>
     */
    public static String geturl() {
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("userName", "admin");
        jsonObject.put("password", "admin");
        String params = String.valueOf(jsonObject);
        String url = "http://" + apiGatewayDomain + ":" + port + PATH_LOGIN_HOST;
        String reString = postUtil.post(url, params);
        System.out.println(url);
        System.out.println(reString);
        return reString;
    }

5.返回结果示例 JSON

{
  "code": 200, 
  "data": {
    "systemInitializeGuideFinish": false, 
    "token": "cc8579b8be7711e991750242ac14****", 
    "userId": "1"
  }, 
  "message": "success"
}

6.失败返回结果示例 JSON

{
  "code": 500, 
  "data": 
  }, 
  "message": "failed"
}

新增算法任务

1.接口描述

鉴权方式

Cookie:{“token”: “cc8579b8be7711e991750242ac14****”, “userId”: “1”}

协议

HTTP

请求方法

Post

域名(环境变量中获取)

30.42.82.42(集群服务地址)

路径

/vision/edge/console/algorithm/createAlgoJob

2.入参说明

入参名称

数据类型

是否必须

入参示例

入参描述

jobName

string

test_model1

任务名称

jobDesc

string

1C35315598694F

string

deviceId

int

01

IPC的设备ID

algoName

string

personVehicleDetect

算法名称,当前支持的算法名称有”personVehicleDetect”,”regionalInvasion”,”vehiclesRecognize”, “faceRecognize”, “keyAreaOccupation”(人车检测、区域入侵、车牌识别、人脸检测、重点区域占用)

name

string

ipcName

IPC名称

3.出参列表

出参名称

数据类型

出参描述

code

整形

响应码, 200: 成功

message

string

返回信息

4.请求示例

 public static void main(String[] args) {
        geturl();//测试发送请求
    }

    private Logger logger = LoggerFactory.getLogger("iot_edge");
    private static final String PATH_LOGIN_HOST = "/vision/edge/console/algorithm/createAlgoJob";
    private static final String apiGatewayDomain = "30.42.82.42";
    private static final int port = 8080;

    /**
     * 发送HttpPost请求
     * <p>
     * <p>
     * json字符串,例如: "{ \"id\":\"12345\" }" ;其中属性名必须带双引号<br/>
     *
     * @return 成功:返回json字符串<br/>
     */
    public static String geturl() {
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("jobName", "人车检测");
        jsonObject.put("jobDesc", "111");
        jsonObject.put("deviceId", 318);
        jsonObject.put("algoName", "personVehicleDetect");
        jsonObject.put("name", "hik");
        String params = String.valueOf(jsonObject);
        String url = "http://" + apiGatewayDomain + ":" + port + PATH_LOGIN_HOST;
        String reString = postUtil.post(url, params);
        System.out.println(url);
        System.out.println(reString);
        return reString;
    }

5.返回结果示例 JSON

{
  "code": 200,
  "message": "success"
}

6.失败返回结果示例 JSON

{
  "code": 500, 
  "data": 
  }, 
  "message": "failed"
}

删除算法任务

1.接口描述

鉴权方式

Cookie:{“token”: “cc8579b8be7711e991750242ac14****”, “userId”: “1”}

协议

HTTP

请求方法

Post

域名(环境变量中获取)

30.42.82.42(集群服务地址)

路径

/vision/edge/console/algorithm/deleteAlgoJob

2.入参说明

入参名称

数据类型

是否必须

入参示例

入参描述

jobId

int

01

任务号

3.出参列表

出参名称

数据类型

出参描述

code

整形

响应码, 200: 成功

message

string

返回信息

4.请求示例

 public static void main(String[] args) {
        geturl();//测试发送请求
    }

    private Logger logger = LoggerFactory.getLogger("iot_edge");
    private static final String PATH_LOGIN_HOST = "/vision/edge/console/algorithm/deleteAlgoJob";
    private static final String apiGatewayDomain = "30.42.82.42";
    private static final int port = 8080;

    /**
     * 发送HttpPost请求
     * <p>
     * <p>
     * json字符串,例如: "{ \"id\":\"12345\" }" ;其中属性名必须带双引号<br/>
     *
     * @return 成功:返回json字符串<br/>
     */
    public static String geturl() {
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("jobId", 13);
        String params = String.valueOf(jsonObject);
        String url = "http://" + apiGatewayDomain + ":" + port + PATH_LOGIN_HOST;
        String reString = postUtil.post(url, params);
        System.out.println(url);
        System.out.println(reString);
        return reString;
    }

5.返回结果示例 JSON

{
  "code": 200,
  "message": "success"
}

6.失败返回结果示例 JSON

{
  "code": 500, 
  "data": 
  }, 
  "message": "failed"
}

查询算法任务

1.接口描述

鉴权方式

Cookie:{“token”: “cc8579b8be7711e991750242ac14****”, “userId”: “1”}

协议

HTTP

请求方法

Post

域名(环境变量中获取)

30.42.82.42(集群服务地址)

路径

/vision/edge/console/algorithm/queryJobList

2.入参说明

入参名称

数据类型

是否必须

入参示例

入参描述

size

int

10

每页显示的算法任务数

offset

int

121

当前的算法任务索引

3.出参列表

参数

是否必须

类型

说明

code

int

错误码

message

string

错误信息

algoName

string

算法名称

createTime

int

创建时间

deviceId

int

设备ID

jobDesc

string

任务描述

jobId

int

任务ID

jobName

string

任务名称

name

string

IPC名称

status

int

任务状态,0表示关闭,1表示开启

updateTime

int

更新时间

totalNum

int

任务的个数

4.请求示例

 public static void main(String[] args) {
        geturl();//测试发送请求
    }

    private Logger logger = LoggerFactory.getLogger("iot_edge");
    private static final String PATH_LOGIN_HOST = "/vision/edge/console/algorithm/queryJobList";
    private static final String apiGatewayDomain = "30.42.82.42";
    private static final int port = 8080;

    /**
     * 发送HttpPost请求
     * <p>
     * <p>
     * json字符串,例如: "{ \"id\":\"12345\" }" ;其中属性名必须带双引号<br/>
     *
     * @return 成功:返回json字符串<br/>
     */
    public static String geturl() {
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("offset", 0);
        jsonObject.put("size", 10);
        String params = String.valueOf(jsonObject);
        String url = "http://" + apiGatewayDomain + ":" + port + PATH_LOGIN_HOST;
        String reString = postUtil.post(url, params);
        System.out.println(url);
        System.out.println(reString);
        return reString;
    }

5.返回结果示例 JSON

{
    "code": 200,
    "data": {
        "list": [{
            "algoName": "personVehicleDetect",
            "createTime": 1564477661000,
            "deviceId": 318,
            "jobDesc": "",
            "jobId": 15,
            "jobName": "人车检测",
            "name": "hik",
            "status": 0,
            "updateTime": 1564477661000
        }],
        "totalNum": 1
    },
    "message": "success"
}

6.失败返回结果示例 JSON

{
  "code": 500, 
  "data": 
  }, 
  "message": "failed"
}

添加设备

1.接口描述

鉴权方式

Cookie:{“token”: “cc8579b8be7711e991750242ac14****”, “userId”: “1”}

协议

HTTP

请求方法

Post

域名(环境变量中获取)

30.42.82.42(集群服务地址)

路径

/vision/edge/console/device/add

2.入参说明

参数

是否必须

类型

说明

type

string

当前的设备索引

name

string

每页显示的设备数

protocol

string

协议

onvifUsr

string

ONVIF登录名

onvifSecret

string

ONVIF登录密码

ip

string

IPC的IP地址

port

string

IPC的端口号

extraInfo

string

用户自定义信息

3.出参列表

参数

是否必须

类型

说明

code

int

错误码

cloudStatus

string

云端连接状态,取值为”INACTIVATED”和”ACTIVATED”,分别表示未激活和激活

deviceId

int

设备的ID

name

string

设备名称

protocol

string

接入协议,当前支持”ONVIF”,”GB”

status

string

本地连接状态,取值为”ONLINE”和”OFFLINE”,分别表示在线和离线

type

string

接入类型,取值为”IPC”和”NVR”

message

string

错误信息

4.请求示例

 public static void main(String[] args) {
        geturl();//测试发送请求
    }

    private Logger logger = LoggerFactory.getLogger("iot_edge");
    private static final String PATH_LOGIN_HOST = "/vision/edge/console/device/add";
    private static final String apiGatewayDomain = "30.42.82.42";
    private static final int port = 8080;

    /**
     * 发送HttpPost请求
     * <p>
     * <p>
     * json字符串,例如: "{ \"id\":\"12345\" }" ;其中属性名必须带双引号<br/>
     *
     * @return 成功:返回json字符串<br/>
     */
    public static String geturl() {
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("type", "IPC");
       jsonObject.put("name", "hik");
      jsonObject.put("protocol", "ONVIF");
      jsonObject.put("onvifUsr", "admin");
      jsonObject.put("onvifSecret", "admin");
      jsonObject.put("ip", apiGatewayDomain);
      jsonObject.put("port", "8080");
      jsonObject.put("extraInfo", "value");
        String params = String.valueOf(jsonObject);
        String url = "http://" + apiGatewayDomain + ":" + port + PATH_LOGIN_HOST;
        String reString = postUtil.post(url, params);
        System.out.println(url);
        System.out.println(reString);
        return reString;
    }

5.返回结果示例 JSON

{
  "code": 200, 
  "data": {
    "device": {
      "cloudStatus": "INACTIVATED", 
      "deviceId": 2, 
      "name": "hik", 
      "protocol": "ONVIF", 
      "status": "RECONNECT", 
      "type": "IPC"
    }
  }, 
  "message": "success"
}

6.失败返回结果示例 JSON

{
  "code": 500, 
  "data": 
  }, 
  "message": "failed"
}

删除设备

1.接口描述

鉴权方式

Cookie:{“token”: “cc8579b8be7711e991750242ac14****”, “userId”: “1”}

协议

HTTP

请求方法

Post

域名(环境变量中获取)

30.42.82.42(集群服务地址)

路径

/vision/edge/console/device/delete

2.入参说明

参数

是否必须

类型

说明

deviceId

int

设备的ID

3.出参列表

参数

是否必须

类型

说明

code

int

错误码

message

string

错误信息

4.请求示例

 public static void main(String[] args) {
        geturl();//测试发送请求
    }

    private Logger logger = LoggerFactory.getLogger("iot_edge");
    private static final String PATH_LOGIN_HOST = "/vision/edge/console/device/delete";
    private static final String apiGatewayDomain = "30.42.82.42";
    private static final int port = 8080;

    /**
     * 发送HttpPost请求
     * <p>
     * <p>
     * json字符串,例如: "{ \"id\":\"12345\" }" ;其中属性名必须带双引号<br/>
     *
     * @return 成功:返回json字符串<br/>
     */
    public static String geturl() {
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("deviceId", 2);
        String params = String.valueOf(jsonObject);
        String url = "http://" + apiGatewayDomain + ":" + port + PATH_LOGIN_HOST;
        String reString = postUtil.post(url, params);
        System.out.println(url);
        System.out.println(reString);
        return reString;
    }

5.返回结果示例 JSON

{
  "code": 200, 
  "message": "success"
}

6.失败返回结果示例 JSON

{
  "code": 500, 
  "data": 
  }, 
  "message": "failed"
}

查询设备列表

1.接口描述

鉴权方式

Cookie:{“token”: “cc8579b8be7711e991750242ac14****”, “userId”: “1”}

协议

HTTP

请求方法

Post

域名(环境变量中获取)

30.42.82.42(集群服务地址)

路径

/vision/edge/console/device/list

2.入参说明

参数

是否必须

类型

说明

size

int

每页显示的设备数

offset

int

当前的设备索引

3.出参列表

参数

是否必须

类型

说明

code

int

错误码

cloudStatus

string

云端连接状态,取值为”INACTIVATED”和”ACTIVATED”,分别表示未激活和激活

deviceId

int

设备的ID

name

string

设备名称

ip

string

设备IP地址

protocol

string

接入协议,当前支持”ONVIF”,”GB”

status

string

本地连接状态,取值为”ONLINE”和”OFFLINE”,分别表示在线和离线

type

string

接入类型,取值为”IPC”和”NVR”

message

string

错误信息

4.请求示例

 public static void main(String[] args) {
        geturl();//测试发送请求
    }

    private Logger logger = LoggerFactory.getLogger("iot_edge");
    private static final String PATH_LOGIN_HOST = "/vision/edge/console/device/list";
    private static final String apiGatewayDomain = "30.42.82.42";
    private static final int port = 8080;

    /**
     * 发送HttpPost请求
     * <p>
     * <p>
     * json字符串,例如: "{ \"id\":\"12345\" }" ;其中属性名必须带双引号<br/>
     *
     * @return 成功:返回json字符串<br/>
     */
    public static String geturl() {
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("size", 256);
      jsonObject.put("offset", 0);
        String params = String.valueOf(jsonObject);
        String url = "http://" + apiGatewayDomain + ":" + port + PATH_LOGIN_HOST;
        String reString = postUtil.post(url, params);
        System.out.println(url);
        System.out.println(reString);
        return reString;
    }

5.返回结果示例 JSON

{
  "code": 200, 
  "data": {
    "list": [
      {
        "cloudStatus": "INACTIVATED", 
        "deviceId": 6, 
        "name": "aihua111", 
        "params": {
          "device_id": 6, 
          "gmt_create": "Mon, 23 Sep 2019 18:16:23 GMT", 
          "gmt_modified": "Mon, 23 Sep 2019 18:16:23 GMT", 
          "id": 6, 
          "ip": "192.168.1.111", 
          "onvif_secret": "admin123", 
          "onvif_user": "admin", 
          "params": "{\"onvifUsr\": \"admin\", \"onvifSecret\": \"admin123\", \"ip\": \"192.168.1.111\", \"port\": \"80\"}", 
          "port": 80
        }, 
        "protocol": "ONVIF", 
        "status": "ONLINE", 
        "type": "IPC",
        "extraInfo": ""
      }
    ], 
    "totalNum": 1
  }, 
  "message": "success"
}

6.失败返回结果示例 JSON

{
  "code": 500, 
  "data": 
  }, 
  "message": "failed"
}

查询单个设备列表

1.接口描述

鉴权方式

Cookie:{“token”: “cc8579b8be7711e991750242ac14****”, “userId”: “1”}

协议

HTTP

请求方法

Post

域名(环境变量中获取)

30.42.82.42(集群服务地址)

路径

vision/edge/console/device/get

2.入参说明

参数

是否必须

类型

说明

deviceId

int

设备ID信息

3.出参列表

参数

是否必须

类型

说明

code

int

错误码

cloudStatus

string

云端连接状态,取值为”INACTIVATED”和”ACTIVATED”,分别表示未激活和激活

deviceId

int

设备的ID

name

string

设备名称

ip

string

设备IP地址

protocol

string

接入协议,当前支持”ONVIF”,”GB”

status

string

本地连接状态,取值为”ONLINE”和”OFFLINE”,分别表示在线和离线

type

string

接入类型,取值为”IPC”和”NVR”

message

string

4.请求示例

 public static void main(String[] args) {
        geturl();//测试发送请求
    }

    private Logger logger = LoggerFactory.getLogger("iot_edge");
    private static final String PATH_LOGIN_HOST = "/vision/edge/console/device/get";
    private static final String apiGatewayDomain = "30.42.82.42";
    private static final int port = 8080;

    /**
     * 发送HttpPost请求
     * <p>
     * <p>
     * json字符串,例如: "{ \"id\":\"12345\" }" ;其中属性名必须带双引号<br/>
     *
     * @return 成功:返回json字符串<br/>
     */
    public static String geturl() {
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("deviceId", 1);
        String params = String.valueOf(jsonObject);
        String url = "http://" + apiGatewayDomain + ":" + port + PATH_LOGIN_HOST;
        String reString = postUtil.post(url, params);
        System.out.println(url);
        System.out.println(reString);
        return reString;
    }

5.返回结果示例 JSON

{
  "code": 200, 
  "data":
      {
        "cloudStatus": "INACTIVATED", 
        "deviceId": 1, 
        "name": "aihua111", 
        "params": {
          "device_id": 1, 
          "gmt_create": "Mon, 23 Sep 2019 18:16:23 GMT", 
          "gmt_modified": "Mon, 23 Sep 2019 18:16:23 GMT", 
          "id": 6, 
          "ip": "192.168.1.111", 
          "onvif_secret": "admin123", 
          "onvif_user": "admin", 
          "params": "{\"onvifUsr\": \"admin\", \"onvifSecret\": \"admin123\", \"ip\": \"192.168.1.111\", \"port\": \"80\"}", 
          "port": 80
        }, 
        "protocol": "ONVIF", 
        "status": "ONLINE", 
        "type": "IPC",
        "extraInfo": ""
        }, 
  "message": "success"
}

6.失败返回结果示例 JSON

{
  "code": 500, 
  "data": 
  }, 
  "message": "failed"
}

区域入侵算法任务配置

1.接口描述

鉴权方式

Cookie:{“token”: “cc8579b8be7711e991750242ac140****”, “userId”: “1”}

协议

HTTP

请求方法

Post

域名(环境变量中获取)

30.42.82.42(集群服务地址)

路径

/vision/edge/console/algorithm/createAlgoJob

2.入参说明

参数

是否必须

类型

说明

jobName

string

任务名称

jobDesc

string

任务描述

deviceId

int

IPC的设备ID

algoName

string

算法名称:keyAreaOccupation(重点区域占用)

areaIndex

int

区域索引

areaPoint

string

区域的坐标点信息

areaDirection

string

区域的方向

targetType

string

目标类型

areaType

string

区域类型

name

string

IPC名称

firstDuration

int

初次告警时间间隔

alertDuration

int

间隔告警时间

3.请求示例

 public static void main(String[] args) {
        geturl();//测试发送请求
    }

    private Logger logger = LoggerFactory.getLogger("iot_edge");
    private static final String PATH_LOGIN_HOST = "/vision/edge/console/algorithm/createAlgoJob";
    private static final String apiGatewayDomain = "30.42.82.42";
    private static final int port = 8080;

    /**
     * 发送HttpPost请求
     * <p>
     * <p>
     * json字符串,例如: "{ \"id\":\"12345\" }" ;其中属性名必须带双引号<br/>
     *
     * @return 成功:返回json字符串<br/>
     */
    public static String geturl() {
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("jobName", "1231");
      jsonObject.put("deviceId", 1);
      jsonObject.put("key", "value");
      ...
        String params = String.valueOf(jsonObject);
        String url = "http://" + apiGatewayDomain + ":" + port + PATH_LOGIN_HOST;
        String reString = postUtil.post(url, params);
        System.out.println(url);
        System.out.println(reString);
        return reString;
    }

4.返回结果示例 JSON

{
  "jobName": "重点区域占用",
  "jobDesc": "",
  "deviceId": 1,
  "algoName": "keyAreaOccupation",
  "algoParam": {
    "detectArea": [{
      "areaIndex": 1,
      "areaPoint": [{
        "point": [0.105, 0.2167]
      }, {
        "point": [0.1605, 0.864]
      }, {
        "point": [0.5269, 0.9283]
      }, {
        "point": [0.3782, 0.2093]
      }, {
        "point": [0.2008, 0.139]
      }],
      "areaDirection": 2,
      "targetType": 2,
      "areaType": 2
    }],
    "firstDuration": 60,
    "alertDuration": 3600
  },
  "name": "hik"
}

5.失败返回结果示例 JSON

{
  "code": 500, 
  "data": 
  }, 
  "message": "failed"
}

其他算法任务配置

  1. 接口描述:指定其他算法任务(非区域入侵或重点区域占用)算法任务配置

  2. 鉴权方式:Cookie:{“token”: “cc8579b8be7711e991750242ac14****”, “userId”: “1”}

  3. 请求方式:POST

  4. 请求地址:http://30.42.82.42:8080/vision/edge/console/algorithm/createAlgoJob

  5. 参数说明:

参数

是否必须

类型

说明

jobName

string

任务名称

jobDesc

string

任务描述

deviceId

int

IPC的设备ID

algoName

string

算法名称,当前支持:“personVehicleDetect”, “vehiclesRecognize”, “faceRecognize”, “keyAreaOccupation”

algoParam

string

填入””即可

name

string

IPC名称

{
    "jobName": "区域入侵",
    "jobDesc": "",
    "deviceId": 1,
    "algoName": "personVehicleDetect",
    "algoParam": "",
    "name": "hik"
}

人脸识别算法图片推理

  1. 接口描述:传入人脸图片进行人脸检测和特征提取

  2. 鉴权方式:Cookie:{“token”: “cc8579b8be7711e991750242ac14****”, “userId”: “1”}

  3. 请求方式:POST

  4. 请求地址:http://30.42.82.42:8080/vision/edge/aibiz/image/inference

  5. 参数说明

参数

是否必须

类型

说明

type

string

图片类型,当前的值为”local”表示本地图片,”url”表示网络图片

algorithm

string

算法名称,填写”faceRecognize”

data

string

文件名,当type为local时填写本地图片的绝对或相对路径;当type为URL时填写图片的URL地址

示例

{
    "type": "url",
    "algorithm": "faceRecognize",
  "data": "http://www.aliyundoc.com/test.jpeg"
}

响应参数

参数

是否必须

类型

说明

message

string

接口返回结果信息

result

int

接口返回结果的错误码

algorithm_code

int

算法结果的错误码

algorithm_message

string

算法结果的信息

+rect

number[4]

检测到的人脸的坐标信息

+alarmType

int

报警类型

+eventTime

int

人脸检测时间

+captureTime

int

图片采集时间

+track_id

int

跟踪ID

+conf

float

人脸检测的置信度

+frame_index

int

人脸检测所在的帧号

+ossUrl

string

存储小视频的OSS的url(暂未使用)

+ltlId

string

暂未使用

+feature

number[512]

人脸特征值,512维

+blur_score

float

人脸的模糊度得分

+pose_score

float

人脸的姿态得分

+land_mark

number[6]

人脸特征点坐标

返回示例

{
    "message": "success",
    "result": 0,
    "algorithm_code": 0,
    "algorithm_message": "success",
    "data": [{
        "rect": [0.387, 0.2146, 0.245, 0.4073],
        "alarmType": 10007,
        "eventTime": 1573120006201,
        "captureTime": 1573120006201,
        "track_id": -1,
        "conf": 0.9971,
        "frame_index": -1,
        "ossUrl": "",
        "ltlId": "",
        "feature": [0.7662, 0.2966, 0.0483, 0.4999, 0.8, 0.3786, 0.5138, 0.001, -0.2762,....
        "blur_score": -49.6351
        "pose_score": 69.8145,
        "land_mark": []
    }]
}

算法任务开关

开启算法任务

  1. 接口描述:开启算法任务

  2. 鉴权方式: Cookie:{“token”: “cc8579b8be7711e991750242ac14****”, “userId”: “1”}

  3. 请求方式:POST

  4. 请求地址:http://30.42.82.42:8080/vision/edge/console/algorithm/startAlgoJob

  5. 参数说明:

参数

是否必须

类型

说明

jobId

int

任务id

示例

{
    "jobId": 13
}
  1. 响应参数

参数

是否必须

类型

说明

code

int

错误码

message

string

错误信息

示例

{
    "code": 200,
    "message": "success"
}

关闭算法任务

  1. 接口描述:关闭算法任务

  2. 鉴权方式:Cookie:{“token”: “cc8579b8be7711e991750242ac14****”, “userId”: “1”}

  3. 请求方式:POST

  4. 请求地址:http://30.42.82.42:8080/vision/edge/console/algorithm/stopAlgoJob

  5. 参数说明:

参数

是否必须

类型

说明

jobId

int

任务id

示例

{
    "jobId": 13
}
  1. 响应参数

参数

是否必须

类型

说明

code

int

错误码

message

string

错误信息

示例

{
    "code": 200,
    "message": "success"
}

算法结果上报

  1. 接口描述:指定区域入侵的坐标信息创建区域入侵算法任务

  2. 鉴权方式:Cookie:{“token”: “cc8579b8be7711e991750242ac14****”, “userId”: “1”}

  3. 请求方式:GET

  4. 请求地址:http://30.42.82.42:8080/vision/edge/console/algorithm/noticeAlgoResult/15

  5. 参数说明:

  6. 响应参数:

参数

是否必须

类型

说明

deviceId

string

任务名称

type

string

任务描述

pictureUrl

string

原始图地址

cutoutUrl

string

抠图地址

pictureId

string

抓拍图id

taskId

string

任务id

AlarmType

int

报警类型

Algorithm

string

算法名称

ProductKey

string

产品密钥

DeviceName

string

设备名称

alarmType

int

报警类型

areaIndex

int

区域索引

areaPoint

string

区域点坐标

type

string

检测类型

rect

number[4]

检测到的坐标

conf

float

置信度

track_id

int

跟踪id

AlarmPicID

string

报警图片id

  1. 示例

    {
     "transParams": {
         "deviceId": 318,
         "type": "IntelligentAlarmEvent",
         "pictureUrl": "http://192.168.1.179:11005/static/images/T20_2019_07_30_20_46_20_732757.jpg",
         "cutoutUrl": "http://192.168.1.179:11005/static/images/0_T20_2019_07_30_20_46_20_732757.jpg",
     "pictureId": "96fc235be4034b4595564431b3ab03d5",
         "taskId": "20"
     },
     "payload": {
         "AlarmType": 10010,
         "Algorithm": "regionalInvasion",
         "ProductKey": "",
         "DeviceName": "",
         "Data": "{
             "alarmType": 10010,
             "areaIndex": 1,
             "areaPoint": [{
                 "point": [0.056539948453608255, 0.08247422680412371]
             }, {
                 "point": [0.9452319587628867, 0.08247422680412371]
             }, {
                 "point": [0.9452319587628867, 0.9561855670103093]
             }, {
                 "point": [0.056539948453608255, 0.9561855670103093]
             }],
             "type": "person",
             "rect": [0.58984375, 0.16111111111111112, 0.6390625, 0.2569444444444444],
             "conf": 0.6067625284194946,
             "track_id": 0
         }",
         "AlarmPicID": "96fc235be4034b4595564431b3ab****"
     }
    }

算法报警抓图上报

  1. 接口描述:获取算法报警抓拍图

  2. 鉴权方式:无

  3. 请求方式:GET

  4. 请求地址:http://30.42.82.42::11005/static/images/0_T20_2019_07_30_20_46_20_732757.jpg

  5. 参数说明:上述的请求地址是根据上面的算法结果上报的JSON字段中解析获得

查询支持的算法

  1. 接口描述:查询支持的算法

  2. 请求方式:POST

  3. 请求地址http://30.42.82.42:8080/vision/edge/console/algorithm/querySupportAlgos

  4. 参数说明

参数

是否必须

类型

说明

示例

{

}
  1. 响应参数

示例

{
    "code": 200,
    "data": [
        {
            "algoName": "personVehicleDetect",
            "aliasName": "人车检测",
            "params": [
                {
                    "Annotation": false
                }
            ],
            "platform": "INTEL"
        },
        {
            "algoName": "regionalInvasion",
            "aliasName": "区域入侵",
            "params": [
                {
                    "max": "86400",
                    "min": "60",
                    "name": "alertDuration",
                    "type": "int"
                },
                {
                    "max": "86400",
                    "min": "60",
                    "name": "firstDuration",
                    "type": "int"
                },
                {
                    "Annotation": true
                }
            ],
            "platform": "INTEL"
        }
    ],
    "message": "success"
}

获取网络配置

  1. 接口描述:获取网络配置接口

  2. 请求方式:POST

  3. 请求地址http://30.42.82.42:8080/vision/edge/console/system/getNetwork

返回示例

{
  "code": 200, 
  "data": {
    "ipAddr": "192.168.31.12",
    "netMask": "255.255.255.0",
    "getwayIp": "192.168.31.1"
  }, 
  "message": "success"
}

配置网络

  1. 接口描述:获取配置网络的信息

  2. 请求方式:POST

  3. 请求地址http://30.42.82.42:8080/vision/edge/console/system/setNetwork

  4. 参数说明

参数

是否必须

类型

说明

示例

{
    "ipAddr":xxxx,
  "netmask":xxxx,
  "gateway":xxxx,
  "dns1":xxxx,
  "dns2":xxxx,
  "mainCard": true or false
}
  1. 响应参数

示例

{
  "code": 200, 
  "message": "success"
}

配置ntp

  1. 接口描述:配置ntp的信息参数

  2. 请求方式:POST

  3. 请求地址http://30.42.82.42:8080/vision/edge/console/system/setNTP

返回示例

{
  "code": 200, 
  "message": "success"
}

获取ntp配置

  1. 接口描述:获取ntp配置的网络信息

  2. 请求方式:POST

  3. 请求地址http://30.42.82.42:8080/vision/edge/console/system/getNTP

返回示例

{
  "code": 200, 
  "data":{
        "ntpEnable":True or False,
        "ntpServer":"ntp1.aliyun.com",
        "ntpPort":123,
        "synInterval":20
},
  "message": "success"
}

获取系统时间

  1. 接口描述:获取系统的时间

  2. 请求方式:POST

  3. 请求地址http://30.42.82.42:8080/vision/edge/console/system/getTime

返回示例

{
  "code": 200, 
  "data":{
        "time":"2019-09-09 11:12:11"
},
  "message": "success"
}

获取系统时间

  1. 接口描述:获取系统的时间

  2. 请求方式:POST

  3. 请求地址http://30.42.82.42:8080/vision/edge/console/system/setTime

  4. 参数说明

参数

是否必须

类型

说明

示例

{
   "time":"2019-09-09 11:12:11"
}
  1. 响应参数

示例

{
  "code": 200, 
  "message": "success"
}

批量删除任务

  1. 接口描述:批量删除任务

  2. 请求方式:POST

  3. 请求地址http://30.42.82.42:8080/vision/edge/console/algorithm/batchDelete

  4. 参数说明

参数

是否必须

类型

说明

示例

{
   "jobList":[1,2,3]
}
  1. 响应参数

示例

{
  "code": 200, 
  "message": "success"
}

更新算法任务

  1. 接口描述:对算法任务进行更新

  2. 请求方式:POST

  3. 请求地址http://30.42.82.42:8080/vision/edge/console/algorithm/updateAlgoJob

  4. 参数说明

参数

是否必须

类型

说明

示例

{
   "jobId":1, 
   "jobName":"测试",
   "deviceId":1,
   "name":"ipc",
   "algoName":"算法名",
   "jobDesc":"描述",
   "algoParam":"算法参数"
}
  1. 响应参数

示例

{
  "code": 200, 
  "message": "success"
}

系统信息

  1. 接口描述:获取系统信息

  2. 请求方式:POST

  3. 请求地址http://30.42.82.42:8080/vision/edge/console/system/info

返回示例

{
    "code": 200,
    "data": {
        "cpu": 4,
        "diskPercent": 72.8,
        "diskUsed":10.1,
        "diskTotal":50.1,
        "getway": "192.168.31.1",
        "ipAddr": "192.168.31.102",
        "mainCard": true,
        "memory": 11.2,
        "netmask": "255.255.255.0",
        "mac":"ec:d6:8a:36:f7:2c",
        "ntpEnable": false,
        "ntpPort": 123,
        "ntpServer": "ntp1.aliyun.com",
        "ntpSynInterval": 60,
        "os": "Linux",
        "processor": "x86_64",
        "softVersion":1.2,
          "versionInfo": ["aibox-1.2.2-20191108-bb4425de↵", "access-1.1-20191108-598d315↵",…],
        "time": "2019-09-11 14:22:13"
    },
    "message": "success"
}

设备更新

  1. 接口描述:设备更新

  2. 请求方式:POST

  3. 请求地址http://30.42.82.42:8080/vision/edge/console/device/update

  4. 参数说明

参数

是否必须

类型

说明

示例

{
  "deviceId":1
  "name":"deviceName",
  "protocol":"ONVIF",//GB,HK,DH
  "type":"IPC",//IPC, NVR
  "params":xxx
}
  1. 响应参数

示例

{
  "code": 200, 
  "message": "success"
}

ntp服务测试

  1. 接口描述:ntp服务测试

  2. 请求方式:POST

  3. 请求地址http://30.42.82.42:8080/vision/edge/console/system/ntpServerTest

  4. 参数说明

参数

是否必须

类型

说明

示例

{
  "ntpServer":"ntp1.aliyun.com",
  "ntpPort":123,
}
  1. 响应参数

示例

{
  "code": 200, 
  "message": "success"
}

设备证书(ProductKey、DeviceName、DeviceSecret)绑定

  1. 接口描述:设备3元组绑定

  2. 请求方式:POST

  3. 请求地址http://30.42.82.42:8080/vision/edge/console/licence/bind

  4. 参数说明

参数

是否必须

类型

说明

示例

{
  "productKey":xxxx,
  "deviceName":"设备证书(ProductKey、DeviceName、DeviceSecret)中的设备名",
  "localDeviceName":"本地ipc设备名"
}
  1. 响应参数

示例

{
  "code": 200, 
  "message": "success"
}

设备证书(ProductKey、DeviceName、DeviceSecret)解绑

  1. 接口描述:设备设备证书(ProductKey、DeviceName、DeviceSecret)解绑

  2. 请求方式:POST

  3. 请求地址http://30.42.82.42:8080/vision/edge/console/licence/unbind

  4. 参数说明

参数

是否必须

类型

说明

示例

{
  "productKey":xxxx,
  "deviceName":"三元组中的设备名",
  "localDeviceName":"本地ipc设备名"
}
  1. 响应参数

示例

{
  "code": 200, 
  "message": "success"
}

查询算法任务

  1. 接口描述:查询算法任务

  2. 请求方式:POST

  3. 请求地址http://30.42.82.42:8080/vision/edge/console/algorithm/queryJob

  4. 参数说明

参数

是否必须

类型

说明

示例

{
  "jobId":123
}
  1. 响应参数

示例

{
  "code": 200, 
  "message": "success"
  "data": {
            "algoName": "personVehicleDetect",
            "createTime": 1564477661000,
            "deviceId": 318,
            "jobDesc": "",
            "jobId": 123,
            "jobName": "人车检测",
            "name": "hik",
            "status": 0,
            "updateTime": 1564477661000
    },
}

系统重启

  1. 接口描述:系统重启

  2. 请求方式:POST

  3. 请求地址http://30.42.82.42:8080/vision/edge/console/system/reboot

返回示例

{
  "code": 200, 
  "message": "success"
}

重置网关

  1. 接口描述:重置网关信息

  2. 请求方式:POST

  3. 请求地址http://30.42.82.42:8080/vision/edge/console/licence/resetgateway

返回示例

{
  "code": 200, 
  "message": "success"
}

查询支持的协议

  1. 接口描述:查询支持的协议

  2. 请求方式:POST

  3. 请求地址http://30.42.82.42:8080/vision/edge/console/device/querySupportProtocol

返回示例

{
  "code": 200, 
  "message": "success",
  "data":['HIK','DH','ONVIF','GB']
}

获取stream url

  1. 接口描述:获取视频返回流

  2. 请求方式:POST

  3. 请求地址http://30.42.82.42:8080/vision/edge/console/streaming/geturl

  4. 参数说明

参数

是否必须

类型

说明

示例

{
  "deviceId":347,
 "streamType":0,
 "scheme":"RTMP"
}
  1. 响应参数

示例

{
  "code":200,
  "data":{"url":"rtmp://192.168.31.222:1935/live/1_0"},
  "message":"success"
}
  • 本页导读 (0)
文档反馈