文字识别 OCR-火车票识别:响应示例

时间:2024-04-15 09:41:19

响应示例

状态码:200

成功响应示例

{
  "result" : {
    "ticket_id" : "K090841",
    "check_port" : "B6",
    "train_number" : "G1138",
    "departure_station" : "长沙南站",
    "destination_station" : "武汉站",
    "departure_station_en" : "Changshanan",
    "destination_station_en" : "Wuhan",
    "departure_time" : "2017年12月12日20:39",
    "seat_number" : "03车03C号",
    "ticket_price" : "164.5元",
    "sale_method" : "网",
    "seat_category" : "二等座",
    "ticket_changing" : "No",
    "id_number" : "1402271998****0012",
    "name" : "xxx",
    "log_id" : "65818301991213K090841",
    "sale_location" : "长沙南售",
    "invoice_style" : "paper",
    "issue_date" : "",
    "discount_mark" : "",
    "serial_number" : "",
    "tax_amount" : "",
    "tax_rate" : "",
    "air_conditioning" : "",
    "original_invoice_number" : "",
    "unified_social_credit_code" : "",
    "buyer_name" : "",
    "total_amount_excluding_tax" : "",
    "invoice_number" : "",
    "seal_mark" : false,
    "title" : "",
    "area" : "",
    "receipt_number" : "",
    "amount_in_figures" : "",
    "amount_in_words" : "",
    "confidence" : {
      "ticket_id" : 0.9992,
      "check_port" : 0.9165,
      "train_number" : 0.9968,
      "starting_station" : 0.9982,
      "destination_station" : 0.9998,
      "starting_station_en" : 0.9254,
      "destination_station_en" : 0.9848,
      "starting_time" : 0.5141,
      "seat_number" : 0.9985,
      "ticket_rates" : 0.9977,
      "sale_method" : 0.9836,
      "seat_category" : 0.9958,
      "ticket_changing" : 0.9,
      "id_number" : 0.9986,
      "name" : 0.996,
      "log_id" : 0.9968,
      "ticket_office" : 0.9984,
      "issue_date" : 0,
      "discount_mark" : 0,
      "serial_number" : 0,
      "tax_amount" : 0,
      "tax_rate" : 0,
      "air_conditioning" : 0,
      "original_invoice_number" : 0,
      "unified_social_credit_code" : 0,
      "buyer_name" : 0,
      "total_amount_excluding_tax" : 0,
      "invoice_number" : 0,
      "seal_mark" : false,
      "title" : 0,
      "area" : 0,
      "receipt_number" : 0,
      "amount_in_figures" : 0,
      "amount_in_words" : 0
    }
  }
}

状态码:400

失败响应示例

{
    "error_code": "AIS.0103", 
    "error_msg": "The image size does not meet the requirements." 
}
support.huaweicloud.com/api-ocr/ocr_03_0103.html