JSON_AIRuleConfig

JSON message about AI rule configuration parameters

{
  "AIRuleConfig":{
    "VCA_config":{
/*optional, rule configuration parameters, which are provided by the algorithm; the following contents are for reference only*/
      "ConfigInfo":{
/*optional, object, configuration module information; this node can be ignored if there is no alarm rule, and it is valid only when the event module is enabled*/
        "EventRule":{
/*required, object, event rule information*/
          "RuleInfo":[{
/*required, array, rule information*/
            "RuleID":1, 
/*required, int, current rule ID*/
            "Valid":1, 
/*required, int, whether current rule is valid: 0 (invalid), 1 (valid)*/
            "TriggerType":1073758209, 
/*required, int, the event type triggered by current rule: 1073758209 (region target exception status detection), 1073758210 (region exception status detection), 1073758211 (line crossing target detection), 1073758212 (line crossing target counting), 1073758213 (region target number counting), 1073774593 (target trigger analysis, AI Open Platform full analysis)*/
            "TriggerCondition":{
/*required, object, current rule trigger condition*/
              "TriggerConditionValid":1, 
/*required, int, whether current trigger condition is valid: 0 (invalid), 1 (valid)*/
              "TriggerType":2, 
/*dependent, int, triggered target type, such as person or vehicle; it is required when the value of TriggerType is 1073758209 (region target exception status detection), 1073758211 (line crossing target detection), 1073758212 (line crossing target counting), 1073758213 (region target number counting)*/
              "TargetStatus":[{
/*required, array, trigger target status*/
                "StatusType":4, 
/*required, int, status type, such as 0 (cloth color), 1 (whether wearing glasses)*/ 
                "StatusValue":2, 
/*required, int, status value, such as the cloth color: 0 (red), 1 (green), 2 (blue)*/
                "ModelId":"4567defghigk"
/*required, string, model ID*/
              }], 
              "NumberCondition":{
/*dependent, object, the target quantity condition for triggering alarm/event; it is required when the value of TriggerType is 1073758209 (region target exception status detection) or 1073758211 (line crossing target detection)*/
                "NumberConditionValid":1, 
/*required, int, whether to enable the target quantity condition for triggering alarm/event: 0 (disable), 1 (enable)*/
                "MinTargetNum":1, 
/*required, int, the minimum quantity of targets*/
                "MaxTargetNum":5, 
/*required, int, the maximum quantity of targets*/
                "NumberJudgeCondition":3
/*required, int, the target quantity condition: 1 (less than or equal to the minimum value), 2 (less than or equal to the maximum value), 3 (larger than or equal to the maximum value), 4 (not in the range between the minimum and maximum value)*/
              }
            }, 
            "RuleParam":{
/*required, object, alarm rule parameters*/
              "Sensitive":80, 
/*dependent, int, alarm/event sensitivity, the higher the sensitivity, the easier to trigger the alarm, range: [0,100];it is valid when the value of TriggerType is 1073758209 (region target exception status detection) or 1073758210 (region exception status detection)*/
              "Duration":5, 
/*dependent, int, duration to trigger the alarm, range: [0,600]s;it is valid when the value of TriggerType is 1073758209 (region target exception status detection), 1073758211 (line crossing target detection), or 1073758212 (line crossing target counting)*/
              "TriggerInterval":3, 
/*dependent, int, time interval between two adjacent alarms, range: [0,600]s;it is valid when the value of TriggerType is 1073758209 (region target exception status detection), 1073758211 (line crossing target detection), or 1073758212 (line crossing target counting)*/
              "CountInterval":5, 
/*required, int, line crossing counting interval, range: (0,1800)s*/
              "AlertConfThreshold":0, 
/*required, int, alarm threshold, range: [0-1000)*/ 
              "MaxTriggerCondition":{
                "MaxTriggerValid":1, 
/*required, int, whether the current trigger condition is valid: 0 (invalid), 1 (valid)*/
                "MaxTriggerTimes":1
/*required, int, the maximum number of alarm trigger times*/
              }
            }, 
            "RuleRegion":{
/*required, object, alarm rule*/
              "Region":[{
/*required, array, rule region information*/
                "RegionId":1, 
/*required, rule region ID, each rule corresponds to one region/line*/
                "CrossDirection":0, 
/*optional, crossing line direction: 0 (no need to specify crossing line direction), 1 (both way), 2 (from left to right), 3 (from right to left);this node is required when configuring the line crossing detection event*/
                "RulePolygon":{
/*required, object, rule retion*/
                  "PolygonType":2, 
/*required, int, rule region type: 1 (polyline), 2 (polygon), 3 (rectangle)*/
                  "PolygonPoint":[{
                    "x":0.010000, 
/*required, float, X-coordinate of rule region*/
                    "y":0.010000
/*required, float, Y-coordinate of rule region*/
                  }]
                }
              }]
            }
          }]
        }
      }
    }, 
    "AlertIntervalList":[{
/*optional, report time interval; it is valid when the event type is region target number counting*/
      "ruleID":1, 
/*optional, int, rule ID of event (region target number counting)*/
      "value":1, 
/*optional, int, report time interval, range: [1,1800]s*/
      "ruleEnable":true
/*optional, boolean, whether to enable current rule*/
    }], 
    "OSDList":[{
/*optional, OSD configuration list*/
      "ruleID":1, 
/*required, int, rule ID*/
      "enabled":true, 
/*required, boolean, whether to enable OSD*/
      "OSDRegion":{
/*dependent, OSD region information;it is valid when the value of enabled is true*/
        "pointX":0.100, 
/*required, float, X-coordinate of OSD region, normalized value*/
        "pointY":0.100
/*required, float, Y-coordinate of OSD region, normalized value*/
      }, 
      "TriggerType":1073758212, 
/*required, int, the triggered event type: 1073758212 (line crossing target counting), 1073758213 (region target number counting)*/
      "ruleEnable":true
/*required, boolean, whether to enable current rule*/
    }], 
    "OverlayInPreviewList":[{
/*optional, list of enable status for overlaying rule frame and target frame; this node is supported by DeepinMind devices only*/
      "ruleID":1, 
/*required, int, rule ID for event (region target number counting)*/
      "ruleOverlayEnable":true, 
/*optional, boolean, whether to enable rule frame overlay*/
      "targetOverlayEnable":true
/*optional, boolean, whether to enable target frame overlay*/
    }], 
    "LineCrossingTargetStatisticsMode":[{
/*optional, line crossing target counting mode; the default mode is fixed time interval*/
      "rlueID":1, 
/*required, int, rule ID*/
      "mode":"", 
/*required, string, line crossing counting mode: ScheduledCounting (schedule counting), BatchCounting (counting in batches), ManualCounting (manual counting)*/
      "BatchCounting":{
/*dependent, parameters of counting in batches; it is valid when the value of mode is BatchCounting*/
        "timeInterval":1
/*required, int, counting interval, range: [1,60]min, default value: 5min*/
      }, 
      "ScheduledCounting":[{
/*dependent, schedule counting parameters; it is valid when the value of mode is ScheduledCounting*/
        "id":1, 
/*required, int, time range ID*/
        "startTime":"", 
/*required, string, start time, time format (hh:mm:ss); it is accurate to second, for example, 23:59:59*/
        "endTime":""
/*required, string, end time, time format (hh:mm:ss); it is accurate to second, for example, 23:59:59*/
      }]
    }], 
    "RuleNameInfo":[{
/*optional, rule name configuration information*/
      "ruleID":1, 
/*required, int, rule ID*/
      "ruleName":""
/*required, string, rule name*/
    }]
  }
}