简介

  • 工地车辆检测的业务逻辑部分实现
  • 触发告警的标签:
    • “20015”: “卡车”

底层流媒体服务输出的结构化数据

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
{
    "frame": {
        "detector": [
            {
                "boxs": [
                    {
                        "index": -1,
                        "index2": "-1",
                        "keypoint": [
                            {
                                "x": 910,
                                "y": 1010
                            },
                            {
                                "x": 817,
                                "y": 1009
                            },
                            {
                                "x": 817,
                                "y": 979
                            },
                            {
                                "x": 907,
                                "y": 981
                            }
                        ],
                        "label": 20001,
                        "number": 15,
                        "ocr": [
                            90276,
                            90076,
                            90053,
                            90075,
                            90051,
                            90049,
                            90050
                        ],
                        "score": 94,
                        "sort": [
                            {
                                "index": 20503,
                                "score": 99,
                                "type": -1
                            }
                        ],
                        "ttid": "-1",
                        "x1": 685,
                        "x2": 1081,
                        "y1": 595,
                        "y2": 1050
                    },
                    {
                        "index": -1,
                        "index2": "-1",
                        "label": 20199,
                        "number": 16,
                        "score": 87,
                        "ttid": "-1",
                        "x1": 146,
                        "x2": 250,
                        "y1": 0,
                        "y2": 186
                    }
                ],
                "id": "29422646025"
            }
        ],
        "height": 1080,
        "index": 1322,
        "number": 1300,
        "width": 1920
    },
    "monotonic": 29467302,
    "next_protocol": {
        "param": "{\"alert_time\":3,\"detect_region\":[{\"x\":0,\"y\":0},{\"x\":2560,\"y\":0},{\"x\":2560,\"y\":1440},{\"x\":0,\"y\":1440}],\"threshold\":60}",
        "seqnum": 1
    },
    "product_uuid": "9933ff4b-d920-8074-411a-64a563481f2c",
    "realtime": 1713781415891,
    "task": "5v4cl",
    "version": "6.4.0"
}

心跳推送地址

  • http://47.122.2.41:12000/wisdomSiteSnap/cameraSubscribe/algorithmHeart2H

  • 添加心跳推送

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    
    curl --location --request POST 'http://127.0.0.1:8000/api/device/addCloudPlatform' \
    --header 'User-Agent: Apifox/1.0.0 (https://apifox.com)' \
    --header 'Content-Type: application/json' \
    --header 'Accept: */*' \
    --header 'Host: 127.0.0.1:8000' \
    --header 'Connection: keep-alive' \
    --data-raw '{
      "name": "南京匠造心跳测试",
      "type": "heart_beat_push",
      "protocol":"nanjing_jiangzao",
      "address": "http://47.122.2.41:12000/wisdomSiteSnap/cameraSubscribe/algorithmHeart2H",
      "appKeyId": "qian001",
      "appKeySecret": "12345678"
    }'
    

告警推送地址

  • http://47.122.2.41:12000/wisdomSiteSnap/cameraSubscribe/algorithmResult2H

  • 添加云平台地址

1
2
3
4
5
6
7
8
9
10
11
12
13
14
curl --location --request POST 'http://127.0.0.1:8000/api/device/addCloudPlatform' \
--header 'User-Agent: Apifox/1.0.0 (https://apifox.com)' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--header 'Host: 127.0.0.1:8000' \
--header 'Connection: keep-alive' \
--data-raw '{
    "name": "南京匠造测试",
    "type": "event_push",
    "protocol":"nanjing_jiangzao",
    "address": "http://47.122.2.41:12000/wisdomSiteSnap/cameraSubscribe/algorithmResult2H",
    "appKeyId": "qian001",
    "appKeySecret": "12345678"
}'