文字识别 OCR-火车票识别:响应参数
响应参数
根据识别的结果,可能有不同的HTTP响应状态码(status code)。例如,200表示API调用成功,400表示调用失败,详细的状态码和响应参数说明如下。
状态码: 200
参数 |
参数类型 |
描述 |
---|---|---|
result |
TrainTicketResult object |
识别结果。 调用失败时不返回此字段。 |
参数 |
参数类型 |
描述 |
归属 |
---|---|---|---|
ticket_id |
String |
火车票左上角的车票ID。 |
纸质火车票/新版退票 |
check_port |
String |
检票口信息。 |
纸质火车票/新版退票 |
train_number |
String |
车次。 |
纸质火车票/新版退票/电子发票 |
departure_station |
String |
始发站。 |
纸质火车票/新版退票/电子发票 |
destination_station |
String |
终点站。 |
纸质火车票/新版退票/电子发票 |
departure_station_en |
String |
始发站拼音。 |
纸质火车票/新版退票/电子发票 |
destination_station_en |
String |
终点站拼音。 |
纸质火车票/新版退票/电子发票 |
departure_time |
String |
开车时间。 |
纸质火车票/新版退票/电子发票 |
seat_number |
String |
座位号。 |
纸质火车票/新版退票/电子发票 |
ticket_price |
String |
票价。 |
纸质火车票/新版退票/电子发票 |
sale_method |
String |
售票方式。 |
纸质火车票/新版退票 |
seat_category |
String |
座位类别。 |
纸质火车票/新版退票/电子发票 |
ticket_changing |
String |
改签信息。 |
纸质火车票/新版退票 |
id_number |
String |
车票持有人的身份证号。 |
纸质火车票/新版退票/电子发票 |
name |
String |
车票持有人姓名。 |
纸质火车票/新版退票/电子发票 |
log_id |
String |
车票最下方的售票码。 |
纸质火车票/新版退票 |
sale_location |
String |
车票售票地点。 |
纸质火车票/新版退票 |
invoice_style |
String |
类型。包含以下几种类型:
|
共享字段 |
issue_date |
String |
开票时间。 |
电子发票 |
discount_mark |
String |
打折标识。 |
电子发票 |
serial_number |
String |
电子客票号。 |
电子发票 |
tax_amount |
String |
税金价格。 |
电子发票 |
tax_rate |
String |
税率。 |
电子发票 |
air_conditioning |
String |
是否是空调车厢。 |
电子发票 |
original_invoice_number |
String |
原发票号码。 |
电子发票 |
unified_social_credit_code |
String |
统一社会信用号码。 |
电子发票 |
buyer_name |
String |
购买方名称。 |
电子发票 |
total_amount_excluding_tax |
String |
不含税价格 |
电子发票 |
invoice_number |
String |
发票号码。 |
电子发票 |
seal_mark |
Boolean |
是否有印章,True表示有印章,False表示不含印章,字段默认为False。 |
旧版退票 |
title |
String |
标题。 |
旧版退票 |
area |
String |
地区。 |
旧版退票 |
receipt_number |
String |
收据编码。 |
旧版退票 |
amount_in_figures |
String |
小写票据金额。 |
旧版退票 |
amount_in_words |
String |
大写票据金额。 |
旧版退票 |
confidence |
Object |
字段的置信度,取值范围0~1。 置信度越大,本次识别的字段的可靠性越高,在统计意义上,置信度越大,准确率越高。 置信度由算法给出,不直接等价于字段的准确率。 |
共享字段 |
text_location |
Object |
对应所有在原图上识别到的字段位置信息,包含所有文字区域四个顶点的二维坐标(x,y)。采用图像坐标系,坐标原点为图片左上角,x轴沿水平方向,y轴沿竖直方向。 |
共享字段 |
状态码: 400
参数 |
参数类型 |
说明 |
---|---|---|
error_code |
String |
调用失败时的错误码,具体请参见错误码。 当出现错误码“ModelArts.4204”时,请参考为什么调用API时提示“ModelArts.4204”?章节。 调用成功时不返回此字段。 |
error_msg |
String |
调用失败时返回的错误信息。 调用成功时不返回此字段。 |