Device WebHook upload data interface description

C1C2 upload data format

Description

The AI face capture machine can be configured with Webhook to send face images, passenger flow data and device status information to the corresponding server address

Data Format

  • The delivery content is in json format, consisting of basic fields plus event-specific fields
  • Both the request and the returned result are encoded using the UTF-8 character set
  • All of the following Timestamp timestamp types, the default is GMT time, Unix timestamp (the number of seconds since January 1, 1970)

basic fields

Fields Type Required fields Description
type int yes To distinguish specific field content, see the table below
cid string yes device identification number
time timestamp yes Message reporting time, in seconds
type Type Description Triggering conditions
1 capture event Basic information of face picture, scene picture and face picture When a face is detected
2 Passenger Statistics Statistics on the number of visitors per unit time, delivery success and failure Report every 10 minutes by default, and the cycle can be configured
3 device status Device local IP, device MAC, boot time, GPS information Report every 60 seconds by default, and the period can be configured

capture event

Fields Type Required fields Description
upload_id uint yes How many times to report the face image after booting (used by the server to judge whether the uploaded face image is discontinuous or missing)
track_id uint yes The tracking identification number of the face image. cid, time, track_id can constitute the unique id number of the face picture
faces Array yes A list of base64 strings of facial images, which will be in jpg format after base64 transcoding, depending on whether "upload snapshot face image" is checked in the web, which is checked by default
image String no Scene image base64 string, base64 converted to jpg format, depends on whether "upload snapshot baseimage" is checked in the web, it is checked by default
front_value int yes 0~100 face positive degree, judge this value to filter the suitable recognition face image, it is recommended that the face image greater than 80 be used for recognition, and the lower one can be used for passenger flow statistics
sharpen_ness int yes 0~100 sharpness, judge this value to filter suitable face images for recognition, it is recommended that face images greater than 80 be used for recognition, and those lower than 80 can be used for passenger flow statistics
scale_out_y float yes The vertical expansion coefficient is used for the expansion of the face image, which can intercept a more beautiful face image, and take the first two decimal places, such as 1.00
scale_out_x float yes The horizontal expansion coefficient is used for the expansion of the face-cutting image. It can intercept a more beautiful face image. Take the first two decimal places, such as 0.40
upload_face_size uint yes The upper limit of the width and height pixel size of the uploaded face image. If it exceeds this value, it will be proportionally reduced. The face image only refers to the facial features
position array yes The coordinates of the face image in the scene graph, the Array format is: "[x1, y1], [x2, y2]", where x1, y1 are the coordinates of the upper left corner, x2, y2 are the coordinates of the lower right corner
result object yes Face recognition result object, including the following person_type, person_id, person_name, sex, age, confidence
person_type int no Whether the face is registered or not 1: Registered 0: Not registered.
person_id String no The unique identifier of the character filled in during registration, with a maximum length of 32 bytes. (Specific field for in-device identification)
person_name String no The name filled in during registration, the maximum length is 32 bytes. (Specific field for in-device identification)
sex String no Gender filled in during registration, male: male, female: female, with a maximum length of 8 bytes. (Specific field for in-device identification)
age int no The age filled in when registering. (Specific field for in-device identification)
confidence float no The confidence calculated for this recognition. (Specific field for in-device identification)
temperature float no Body temperature, range 30.0-43.0 degrees Celsius, accurate to one decimal place. (Specific field for temperature measurement equipment)
mask int no Whether to wear a mask, 0: not worn, 1: worn

return value

After the third-party http server receives the capture event information delivered by the device (that is, the type value is equal to 1), it can return the result recognized by the server to the device, and the device will display information according to the recognition result, and enable gpio and other operations. If the display field is included, it will be displayed in the video stream as the recognition result. If the display field is not included, the "name age sexual" information will be displayed in sequence.

Fields Type Required fields Description
result object no Recognition result obj
name string no name, the maximum length is 32 bytes
sexual string no Gender, male/female, maximum length 8 bytes
display string no The identification information to be displayed, the maximum length is 128 bytes
age int no age
unlock_gpio int no gpio unlock, 0: off, 1: on
unlock_bluetooth int no Bluetooth unlock, 0: off, 1: on (not implemented)
box_color int no The color of the recognition frame is the corresponding value (24bit RGB 0xRRGGBB) (not implemented)
text_color int no The color of the displayed information is the corresponding value (24bit RGB 0xRRGGBB) (unimplemented)
sound_url string no Download the sound file to play (the file size is preferably within 32KB, the format is 8KHz 16-bit PCM, and MP3 is not supported yet)

example

{
    "result": {
    "name": "lui",
    "age": 50,
    "sexual": "male",
    "display": "VIP-lui/male/50",
    "box_color": 654321,
    "text_color": 123456,
    "unlock_gpio": 1,
    "unlock_bluetooth": 1,
    "sound_url", "http://www.example.com/welcome.mp3"
    }
}

C1 Passenger flow statistics

Fields Type Required fields Description
from timestamp yes 0:00:00 local time of the day.
track_exc uint yes The number of faces: the total number of track ids outside the detection area since from (cnt_outMd)
track_inc uint yes The number of faces: the total number of track ids in the detection area since from (cnt_inMd)
track_upload uint yes Number of eligible faces: the total number of track ids that meet the upload conditions in the detection area from the time of from (cnt_eligible)
upload_total uint yes The number of times the face image information is reported from the time of from. (cnt_upload)
upload_success uint yes Report the number of successful face image information from the time of from. (cnt_uploadOK)

C2 Passenger flow statistics

Fields Type Required fields Description
count_time timestamp yes 0:00:00 local time of the day.
time timestamp yes Send message time, unit second
total uint yes The total number of visitors for the day
count_per_hour object yes This object stores the number of passengers for each hour of the day. (Includes begin_time, end_time, number below)
begin_time uint yes The start time of the hour (0 minutes 0 seconds).
end_time uint yes The end time of the hour (equal to begin_time plus 3600).
number uint yes The number of visitors for that hour

return value

none

Remark

  • The device starts to calculate daily passenger flow statistics at 0:00:00 local time of the day.
  • The device saves the passenger flow statistics data every 10 minutes. If the device is restarted, the data will be reloaded from the flash to continue the statistics. If there is a cross-day, the passenger flow statistics data will be reported immediately. The data of the previous day will be cleared, and the data of the current day will be reported after 10 minutes. .

Device status information

Fields Type Required fields Description
uptime timestamp yes Device startup time (calculated from the first successful NTP after the device is started or the time obtained from other time synchronization methods)
mode int yes Current device mode, 0: platform mode; 1: stand-alone mode; others are invalid
app_version String yes Current device firmware version number, for example 1.5.1.888
gps Array yes Latitude and longitude and speed, where the unit of speed is m/s, if there is no gps information or the output is 0, then the field content is empty, and the field should keep "gps":{"longitude":"","latitude":""," speed":""}
lan object no See the network information json below
wifi object no See the network information json below
mac String no Network card mac address
ip String no network card ip address
gw String no gateway address
dns String no dns domain name resolution server address
dhcp int no 0: static ip, 1: dynamic ip
ssid String no wifi name, there is this field when using wireless network
sig int no wifi signal strength, this field exists when using wireless network
seq int ye When the facelib_manage operation is successful, it will return

The device can be controlled by returning parameters

After the third-party http server receives the status information of the device (that is, the type value is equal to 3), it can return the time_interval to the device, and set the sending interval of the device status information (use this field as the heartbeat interval), and the return parameter must include the time_interval field.

Fields Type Required fields Description
time_interval int yes heartbeat interval

After the third-party http server receives the status information of the device (that is, the type value is equal to 3), it can return the control information of the rtmp push stream to the device, thereby realizing the control of the device push stream. There are two control sources for the push stream control information, One comes from the control information returned by the third party, and the other comes from the Cylan platform. The two methods can be mutually robbed. The device responds to the latest control information received, and the old control information will be overwritten by the new one.

Fields Type Required fields Description
rtmp obj yes rtmp control information obj
rtmp_enable int yes rtmp streaming switch, 1 starts streaming, 0 ends streaming.
rtmp_timeout int yes The duration of rtmp streaming, in seconds, for example, set 120s, after 120s, if this message is not received again, the streaming will stop.
rtmp_url string yes rtmp streaming address, the length cannot be greater than 512 bytes.

After the third-party http server receives the status information of the device (that is, the type value is equal to 3), it can return the face database management information to the device, and then perform operations such as querying, registering, deleting, and clearing the device's face database. Because C1 and C2 The algorithms used by the devices are different, and the messages managed by the face database are also partially different. Please choose the protocol managed by the face database according to the device type. C1 and C2 devices can be distinguished according to the app_version in the device status information. The face recognition device app_version of C1 is Start with 3 (3.x.x.xxx), for example 3.5.3.783. C2’s face recognition device app_version starts with 4 (4.x.x.xxx), for example 4.2.0.286.

The following are C1 device face database management request parameters:

Fields Type Required fields Description
facelib_manage obj yes Face database management obj
type int yes Face database management message type, 1: Incremental registration, adding face images on the basis of retaining the original face database, if there are duplicate face images, they will be covered by new face images, 2: Clear all faces in the device first Figure, and then register the currently issued face image, 3: Delete the face image corresponding to person_ids, 4: Clear all face images in the device, 5: Request the personid and name name of all faces in the device.
seq int yes The message sequence number can be assigned with utc timestamp (in seconds). The device will compare the local seq with the received seq. If they are not equal, it will download the characteristic value file and register it. Therefore, when the characteristic value file does not change, The seq does not need to be changed, unless it needs to re-register or clear the face database. If the face database management operation is successful, the device will save this seq and return the same seq when sending a heartbeat next time.
facelib_url string yes Face library download address, the length cannot be greater than 512 bytes.
person_ids string yes A list of person ids to be deleted, separated by commas.

The following are the reply parameters of C1 device face database management: | Fields | Type | Required fields | Description | | -------------- | --------- | ---- | ----------------------------------------------------------------------------------- | | total_face | uint | yes | The total number of faces registered in the device | | face | Array | yes | array of face information | | person_id | String | no | The unique identifier of the character filled in during registration, with a maximum length of 32 bytes| | person_name | String | no | The name filled in during registration, the maximum length is 32 bytes |

C1 Example of device face database management

Type1 ,Registration request:

{
    "facelib_manage":
    {
        "type": 1,
        "seq": 1566358435,
        "facelib_url": "http://192.168.102.55:8000/test.json.gz"
    }
}

Type 1, no reply:

Type 2, first clear the face database of the device, and then register:

{
    "facelib_manage":
    {
        "type": 1,
        "seq": 1566358435,
        "facelib_url": "http://192.168.102.55:8000/test.json.gz"
    }
}

Type 2, no reply:

Type 3, delete the face request corresponding to person_ids:

{
    "facelib_manage": {
    "type": 3,
    "seq": 1566358435,
    "person_ids": "1530328053_xRW2UVaF,1530328061_4DKCgzJ7,1530328068_JHL0Fa8x,1530328075_lla9K0QQ"
    },
    "time_interval":120
}

Type 3, no reply:

Type 4, clear device face database request:

{
    "facelib_manage": {
    "type": 4,
    "seq": 1566358435
    },
    "time_interval":120,
}

Type 4, no reply:

Type 5, query device face library request:

{
    "facelib_manage": {
    "type": 4,
    "seq": 1566358435
    },
    "time_interval":120,
}

Type 5, query device face library reply:

{
        "cid" : "294300000005",
        "type" : 4,
        "time" : 1542430377,
        "total_face" : 5,
        "face" :
        [
                {
                        "person_id" : "20190629153538m3CH6Jdtc2DHnANaab",
                        "person_name" : "penson1"
                },
                {
                        "person_id" : "20190629153538MFwkbpkVeRXQVCmiYi",
                        "person_name" : "penson2"
                },
                {
                        "person_id" : "201906291535388Di0THqo0wDgNzrWHK",
                        "person_name" : "penson3"
                },
                {
                        "person_id" : "20190629153539Kh2y5dvAW7Sg5fxZQC",
                        "person_name" : "penson4"
                },
                {
                        "person_id" : "2018110814232977K3PJOTsvrLC5twRq",
                        "person_name" : "penson5"
                }
        ]
}

The following are the C2 device face library management request parameters:

Fields Type Required fields Description
facelib_manage obj yes Face database management obj, all fields related to face database management are included in this obj
type int yes type 1-register, 2-logout, 3-clear, 6-clear the face database in the device before registering, 7-get face database information
seq int yes Message sequence number, which can be assigned with utc timestamp (in seconds). The device will compare the local seq with the received seq, and only perform this operation if they are different
datas obj no Type 1 or 6 is required, face registration information obj, including the following person_id, person_name, age, sex, person_type, face_url.
person_id string no The unique identifier of the character filled in during registration, with a maximum length of 32 bytes, required during registration.
person_name string no Name is required when registering.
person_type string no Face permission 1 VIP, 3 blacklist, 4 whitelist, required when registering.
age int no age
sex string no gender
face_url string no Face image download path (face images need to support http get method to download), required when registering.
person_ids obj no Required for type 2, the array of person ids that need to be deleted.

The following are the reply parameters of C2 device face database management:

Fields Type Required fields Description
cid string yes device cid
result obj no Type 1, 2, 3, 6, 7 will be returned. The result obj of this face database management operation includes the following person_id, person_name, ret.
person_id string no The unique identifier of the character filled in during registration, with a maximum length of 32 bytes, required during registration.
person_name string no Type 7 will return, name.
total_face obj no When type 7, it will return the total number of registered faces on the device.
ret int no Whether this personid operation is successful.
sign string no Not used yet.
time int no current time.

C2 Example of device face library management

Type1 ,Registration request:

{
    "facelib_manage":{"type":1,"seq":1579573779,"datas":[
    {"age":27,"face_url":"http://oss-cn-hangzhou.aliyuncs.com/jiafeigou-test/long/cm/13058172585/201907021356317Ptv3uA2AcAIVW2KhH.jpg?OSSAccessKeyId=xjBdwD1du8lf2wMI&Expires=1579573774&Signature=vwT4gGDbBanum%2BuY8tDMYpoS4RQ%3D","person_id":"m20190702135701NScfPqeva0r0fZrDYR","person_name":"小钟","sex":"male"},
    {"age":27,"face_url":"http://oss-cn-hangzhou.aliyuncs.com/jiafeigou-test/long/cm/13058172585/20190702140325qP57VvRhxpQj8W2DR5.jpg?OSSAccessKeyId=xjBdwD1du8lf2wMI&Expires=1579573774&Signature=5S4g8Za5VksXO6WrH%2FxiU%2FJiFh0%3D","person_id":"m20190702140406DVKugCr9QLMWJ648ET","person_name":"小王","sex":"male"},
    {"age":41,"face_url":"http://oss-cn-hangzhou.aliyuncs.com/jiafeigou-test/long/cm/13058172585/20191204163025RnscHe9eGiNJoRPcaV.jpg?OSSAccessKeyId=xjBdwD1du8lf2wMI&Expires=1579573774&Signature=lbwczB5nAGrBtXch3MzYqyCtMKI%3D","person_id":"m20191204163102b7rHD1QjgZ3Cihg64g","person_name":"老曹","sex":"male"}]
    }
}

Type 1, registration reply:

{
    "cid":"293900000002",
    "result":[{"person_id":"m20190702135701NScfPqeva0r0fZrDYR","ret":0},
              {"person_id":"m20190702140406DVKugCr9QLMWJ648ET","ret":0},
              {"person_id":"m20191204163102b7rHD1QjgZ3Cihg64g","ret":0}
             ],
    "sign":"",
    "time":1579077769,
    "type":1
}

Type 2, delete the face request corresponding to personids:

{
    "facelib_manage":
    {
        "type":2,
        "seq":1579573774,
        "person_ids":
        [
            "m20191204163102b7rHD1QjgZ3Cihg64g",
            "m20190702135701NScfPqeva0r0fZrDYR",
            "m20190702140406DVKugCr9QLMWJ648ET"
        ]
    }
}

Type 2, delete the face reply corresponding to personids:

{
    "cid":"293900000002",
    "result":
    [
        {"person_id":"m20191204163102b7rHD1QjgZ3Cihg64g","ret":0},
        {"person_id":"m20190702135701NScfPqeva0r0fZrDYR","ret":0},
        {"person_id":"m20190702140406DVKugCr9QLMWJ648ET","ret":0}
    ],
    "sign":"",
    "time":1579078006,
    "type":2
}

Type 3, clear face library request:

{
    "facelib_manage":
    {
        "type":3,
        "seq":1579573778
    }
}

Type 3, clear the face database and reply:

{
    "cid":"293900000002",
    "result":[{"person_id":"","ret":0}],
    "sign":"",
    "time":1579078215,
    "type":3
}

Type 6 After clearing the face database, register the request again:

{
    "facelib_manage":{"type":6,"seq":1579573779,"datas":[
    {"age":27,"face_url":"http://oss-cn-hangzhou.aliyuncs.com/jiafeigou-test/long/cm/13058172585/201907021356317Ptv3uA2AcAIVW2KhH.jpg?OSSAccessKeyId=xjBdwD1du8lf2wMI&Expires=1579573774&Signature=vwT4gGDbBanum%2BuY8tDMYpoS4RQ%3D","person_id":"m20190702135701NScfPqeva0r0fZrDYR","person_name":"小钟","sex":"male"},
    {"age":27,"face_url":"http://oss-cn-hangzhou.aliyuncs.com/jiafeigou-test/long/cm/13058172585/20190702140325qP57VvRhxpQj8W2DR5.jpg?OSSAccessKeyId=xjBdwD1du8lf2wMI&Expires=1579573774&Signature=5S4g8Za5VksXO6WrH%2FxiU%2FJiFh0%3D","person_id":"m20190702140406DVKugCr9QLMWJ648ET","person_name":"小王","sex":"male"},
    {"age":41,"face_url":"http://oss-cn-hangzhou.aliyuncs.com/jiafeigou-test/long/cm/13058172585/20191204163025RnscHe9eGiNJoRPcaV.jpg?OSSAccessKeyId=xjBdwD1du8lf2wMI&Expires=1579573774&Signature=lbwczB5nAGrBtXch3MzYqyCtMKI%3D","person_id":"m20191204163102b7rHD1QjgZ3Cihg64g","person_name":"老曹","sex":"male"}]
    }
}

Type 6 After clearing the face database, register and reply:

{
    "cid":"293900000002",
    "result":[{"person_id":"m20190702135701NScfPqeva0r0fZrDYR","ret":0},
              {"person_id":"m20190702140406DVKugCr9QLMWJ648ET","ret":0},
              {"person_id":"m20191204163102b7rHD1QjgZ3Cihg64g","ret":0}
             ],
    "sign":"",
    "time":1579077769,
    "type":6
}

Type 7, request to obtain face database information:

{
    "facelib_manage":{"type":7,"seq":1579573778}
}

Type 7, get face database information reply:

 {
     "cid":"293900000002",
     "result":
     [
         {"person_id":"m20190702135701NScfPqeva0r0fZrDYR","person_name":"小钟"},
         {"person_id":"m20190702140406DVKugCr9QLMWJ648ET","person_name":"小王"},
         {"person_id":"m20191204163102b7rHD1QjgZ3Cihg64g","person_name":"老曹"}
     ],
     "sign":"",
     "time":1579078726,
     "total_face":3,
     "type":7
 }

After the third-party http server receives the status information of the device (that is, the type value is equal to 3), it can return the upgrade file path to the device to upgrade the device.

Fields Type Required fields Description
upgrade_url string yes Upgrade file download path.

After the third-party http server receives the status information of the device (that is, the type value is equal to 3), it can modify the third-party http server address.

Fields Type Required fields Description
http_server_url string yes Third-party http server address

After the third-party http server receives the status information of the device (that is, the type value is equal to 3), the time calibration information can be returned to the device to perform time calibration on the device.

Fields Type Required fields Description
time_set obj yes Proofreading time information obj.
time_stamp uint yes UTC timestamp, in seconds.
time_zone int yes Time zone information, the unit is second. For example, in the eighth district of the East, it will issue 8x3600, that is, 28800. If it is in the eighth district of West, it will issue -8x3600, that is, -28800.

Rtmp control example

{
    "rtmp": {
        "rtmp_enable": 1,
        "rtmp_timeout": 120,
        "rtmp_url": "rtmp://sz.jfgou.com/hls/%CID%"
    },
    "time_interval":60
}

Upgrade push example

{
    "upgrade_url":"http://192.168.102.55:8000/JFG17WJCA_1gb_V3-3.5.3.560-App.bin"
}

proofreading time example

{
    "time_set":
    {
        "time_stamp": 1566459660,
        "time_zone": 28800
    }
}

Example of modifying the third-party server address

{
    "http_server_url":"http://192.168.102.55:8000",
    "time_interval":30
}

Request the personid and name of all faces in the device

{
    "facelib_manage": {
    "type": 5,
    "seq": 1566358435
    },
    "time_interval":30
}

The above control information can also be combined in the same json to reply to the device

{
    "rtmp":
    {
        "rtmp_enable": 1,
        "rtmp_timeout": 120,
        "rtmp_url": "rtmp://sz.jfgou.com/hls/%CID%"
    },
    "facelib_manage":
    {
        "type": 1,
        "seq": 1566358435,
        "facelib_url": "http://192.168.102.55:8000/EFS_26.json.gz",
        "person_ids": "1530328053_xRW2UVaF,1530328061_4DKCgzJ7,1530328068_JHL0Fa8x,1530328075_lla9K0QQ"
    },
    "time_interval":120,
    "time_set":
    {
        "time_stamp": 1566459660,
        "time_zone": 28800
    },
    "upgrade_url":"http://192.168.102.55:8000/JFG17WJCA_1gb_V3-3.5.3.560-App.bin"
}

Remarks:

  • Report the wifi node only when using a wireless network card, report the lan node only when using a wired network card, lan, wifi only report one of the nodes.
  • Report GPS information only when the GPS switch is turned on

request example

Report face image information (with scene image and offline recognition information)

curl -H "Content-Type: application/json"
-X POST -d {
        "cid" : "290200001002",
        "front_value" : 89,
        "position" :
        [
                "[688,240],[1520,1072]"
        ],
        "result" :
        {
                "age" : "28",
                "confidence" : 0.63847750425338745,
                "person_id" : "20181025111910JWq9bNaycdmDXozub9",
                "person_name" : "Leo",
                "person_type" : 1,
                "sex" : "male"
        },
        "scale_out_x" : 1.1000000238418579,
        "scale_out_y" : 0.5,
        "sharpen_ness" : 86,
        "time" : 1542433807,
        "track_id" : 139,
        "type" : 1,
        "upload_face_size" : 180,
        "upload_id" : 2,
         "faces": ["face_data..."],
         "image": ["base_data..."]
}

Report face image information (without scene image and offline recognition information)

curl -H "Content-Type: application/json"
-X POST -d {
        "cid" : "290200001002",
        "front_value" : 89,
        "position" :
        [
                "[688,240],[1520,1072]"
        ],
        "scale_out_x" : 1.1000000238418579,
        "scale_out_y" : 0.5,
        "sharpen_ness" : 86,
        "time" : 1542433807,
        "track_id" : 139,
        "type" : 1,
        "upload_face_size" : 180,
        "upload_id" : 2,
         "faces": ["face_data..."],
}

C1 passenger flow statistics information

{
        "cid" : "290200001002",
        "from" : 1542384000,
        "time" : 1542435760,
        "track_exc" : 3,
        "track_inc" : 58,
        "track_upload" : 2,
        "type" : 2,
        "upload_success" : 4,
        "upload_total" : 4
}

C2 passenger flow statistics information

{
    "type" : 2,
    "time": 1540545494,
    "cid": "290200001002",
    "count_time": 1540483200,
    "total": 1100,
    "count_per_hour": [
        {
            "begin_time": 1540508400,
            "end_time": 1540511999,
            "number": 500,
        },
        {
            "begin_time": 1540512000,
            "end_time": 1540515599,
            "number": 600,
        }
    ]
}

Device status information (wifi)

{
        "app_version" : "1.5.1.888",
        "cid" : "290200001002",
        "gps" :
        [
                0.0,
                0.0,
                0.0
        ],
        "mode" : 1,
        "time" : 1542430377,
        "type" : 3,
        "uptime" : 1542429740,
        "wifi" :
        {
                "dhcp" : 1,
                "dns" : "192.168.100.3",
                "gw" : "192.168.100.3",
                "ip" : "192.168.104.130",
                "mac" : "EC:3D:FD:28:33:48",
                "netmask" : "255.255.0.0",
                "sig" : -59,
                "ssid" : "Xiaomi_ACF2"
        }
}

Device status information (lan)

{
        "app_version" : "1.5.1.888",
        "cid" : "290200001002",
        "gps" :
        [
                0.0,
                0.0,
                0.0
        ],
        "mode" : 1,
        "time" : 1542430377,
        "type" : 3,
        "uptime" : 1542429740,
        "lan" :
        {
                "dhcp" : 1,
                "dns" : "192.168.100.3",
                "gw" : "192.168.100.3",
                "ip" : "192.168.104.130",
                "mac" : "EC:3D:FD:28:33:48",
                "netmask" : "255.255.0.0",
        }
}

XD500 upload data format

XD500 device status information

Note:Send device status information at specified intervals

Fields Type Required fields Description
app_version string yes Device firmware version
cid string yes Device CID
gps string yes gps information
mode int yes current device mode
type int yes message type
uptime timestamp yes Message reporting time
lan string yes See network information below
dhcp int yes 0: off 1: on
dns1 string yes dns domain name resolution server address
dns2 string yes dns domain name resolution server address
gw string yes gateway address
ip string yes device ip address
mac string yes Network card mac address
netmask string yes subnet mask
example:
{
 "app_version": "32-00-00-13",
 "cid": "330000000002",
 "gps": [0, 0, 0],
 "mode": 0,
 "time": 1639385565,
 "type": 3,
 "uptime": 1638867285,
 "lan": {
  "dhcp": 0,
  "dns1": "202.96.134.133",
  "dns2": "202.96.128.68",
  "gw": "192.168.0.1",
  "ip": "192.168.0.178",
  "mac": "30:57:ac:12:cc:13",
  "netmask": "255.255.255.0"
 }
}

XD500 face information

Note:When a face is detected, a face message will be reported

Fields Type Required fields Description
IpAddr string yes IP address
MACAddress string yes MAC address
DeviceID string yes device ID
DeviceCID string yes Device CID
Count int yes number of lists
FaceID int yes face ID
TopLeftX int yes X upper left (0-1000)
TopLeftY int yes Y upper left (0-1000)
BottomRightX int yes X bottom right (0-1000)
BottomRightY int yes Y lower right (0-1000)
Confidence float yes Confidence (0-1, supported by some models)
Clarity float yes Clarity (0-1)
Frontal float yes Front face degree (0-1, supported by some models)
Quality float yes Quality (0-1, supported by some models)
Age float yes age
Gender string yes Gender Male:Male Female:Female
FeatureCode int yes face code
Time string yes Time (TZ format, such as: 2018-07-01T18:00:00Z)
IsRegistered int yes Whether the face has been registered 0: unregistered 1: registered
Similarity float no Similarity to registered face images
RegisteredID int no Registered face ID
Name string no The name of the registered face
WBAttribute string no Black and white list types of registered faces: White, Black, Other
CardType int no Card type of registered face 0: ID card 1: Passport 2: Work permit 3: Other
CardNum string no Card number with registered face
Station string no The location of the registered face
Department string no Department of registered faces
Remarks string no Remarks for registered faces
Addr string no The address of the registered face
RegSnapshot string no Register snapshot pictures, format: jpeg;base64
Snapshot string no Capture pictures, format: jpeg;base64
SnapshotNum int no Capture the serial number, and provide this value to the next request to reduce receiving duplicate information
FaceSnapFile string no Face image file name, you can get the image content through this file name
FullSnapFile string no The file name of the complete image, which can be used to obtain the image content, for example: http://[:port]/ISAPI/FaceDetection/Image/[file_name]
example:
{
    "DetectedFaceList":    {
        "IpAddr":    "192.168.0.178",
        "MACAddress":    "30:57:AC:12:CC:13",
        "DeviceID":    "1701080000",
        "DeviceCID":    "330000000002",
        "Count":    1,
        "Face_0":    {
            "FaceID":    13,
            "Position":    {
                "TopLeftX":    67,
                "TopLeftY":    309,
                "BottomRightX":    178,
                "BottomRightY":    531
            },
            "HumanPosition":    {
                "TopLeftX":    0,
                "TopLeftY":    161,
                "BottomRightX":    417,
                "BottomRightY":    999
            },
            "Clarity":    0.596436,
            "Quality":    0.865340,
            "Age":    13,
            "Glass":    "OrdinaryGlasses",
            "Beard":    "NoBeard",
            "Hair":    "LongHair",
            "Hat":    "None",
            "Respirator":    "OtherRespirator",
            "IsRegistered":    1,
            "RegisteredID":    1,
            "FeatureCode":    982645025,
            "Similarity":    0.836136,
            "Name":    "x",
            "CardType":    0,
            "CardNum":    "12345678",
            "Station":    "",
            "Department":    "",
            "Addr":    "",
            "Remarks":    "",
            "Gender":    "Female",
            "WBAttribute":    "White",
            "NodeID":    "",
            "Time":    "2021-12-17T16:01:53Z",
            "SnapshotNum":    12,
            "FaceSnapFile":    "face_13_44279.jpg",
            "FullSnapFile":    ""
        }
    }
}

XD500's C2 passenger flow statistics information

Note:Upload data every 10 minutes

Fields Type Required fields Description
type int yes message type
time timestamp yes Send message time, unit second
cid string yes Device CID
count_time timestamp yes 0:00:00 local time of the day
total int yes The total number of visitors for the day
count_per_hour int yes This object stores the number of passengers for each hour of the day. (Includes begin_time, end_time, number below)
begin_time timestamp yes The start time of the hour (0 minutes 0 seconds).
end_time timestamp yes The end time of the hour (equal to begin_time plus 3600).
number int yes The number of visitors for that hour
example:
{
 "type": 2,
 "time": 1639294526,
 "cid": "330000000008",
 "count_time": 1639267200,
 "total": 3,
 "count_per_hour": [{
   "begin_time": 1639267200,
   "end_time": 1639270799,
   "number": 0
  }, {
   "begin_time": 1639270800,
   "end_time": 1639274399,
   "number": 3
  }]
}
Copyright © 2019 all right reserved,powered by Gitbook文档修订时间: 2023-02-02 10:14:28

results matching ""

    No results matching ""