发票云(智能特性)
旗舰版标准版智能特性生态版
旗舰版标准版智能特性生态版
  1. 三单匹配
  • 整体介绍
  • 开发指南
  • 授权
    • token获取
      POST
  • 智能特性
    • 文档信息识别
      • 国际发票识别
      • 国际发票识别(明细)
      • 文档信息识别(反馈)
      • 银行回单识别
    • 三单匹配
      • 三单匹配-同步接口
        POST
      • 三单匹配-异步匹配任务提交
        POST
      • 三单匹配-异步匹配结果查询
        POST
      • 三单匹配-异步数据入库
        POST
      • 三单匹配-异步数据入库结果查询
        POST
      • 三单匹配-异步标注数据导入
        POST
      • 三单匹配-异步标注数据导入结果查询
        POST
      • 三单匹配-异步训练接口
        POST
      • 三单匹配-异步训练结果查询
        POST
      • 三单匹配-异步模型一键部署接口
        POST
      • 三单匹配-异步模型一键部署查询接口
        POST
    • 统一反馈
      • 三单匹配反馈详细说明
      • 算法服务统一反馈接口
    • 文档分类(区分发票、附件)
      POST
    • 智能赋码税收分类编码识别
      POST
  • 文档中心
    • 外部文件上传接口
      POST
  • 国际发票
  • 数据模型
    • 示例数据模型
      • Pet
      • Category
      • Tag
  1. 三单匹配

三单匹配-异步标注数据导入结果查询

POST
/ai/knowledge/nlpService/item/label/import/query

一、接口描述#

异步标注数据导入的结果查询接口

二、请求参数#

参数参数类型必填描述
taskIdstringY任务的唯一标识符,由提交接口返回

三、主要输出参数#

输出参数类型参数说明
errcodeString返回码("0000" 表示请求成功)
descriptionString操作信息描述
data.taskIdString任务的唯一标识
data.statusString任务状态:COMPLETED / PROCESSING / FAILED
data.resultObject导入结果明细,仅 COMPLETED 时返回,字段见下表
data.taskTraceIdString任务执行时的 trace_id
data.errorString错误描述,仅 FAILED 时返回
traceIdString请求唯一标识

data.result 字段说明#

字段类型说明
clientId / supplierIdString本次导入的租户与供应商(回显请求入参;一批只有一个,见「批次粒度」)
targetItemsWrittenNumber写入的发票明细条数
candidateItemsWrittenNumber写入的入库明细条数
labelPairsWrittenNumber写入标注匹配对表的条数
historySkippedBoolean历史库是否被跳过(降级)
historySkipReasonString跳过原因,仅 historySkipped=true 时返回
historyPairsWrittenNumber写入历史匹配库的匹配对数(余弦低于阈值的那些)
historyVectorsWrittenNumber写入向量库的向量数(按发票侧向量去重,≤ 匹配对数)
historyPairsAboveThresholdNumber因余弦 ≥ 阈值而未写历史库的匹配对数
historySimilarityThresholdNumber本次生效的写入阈值
elapsedSecondsNumber任务耗时
完成示例返回值(含历史库写入):
{
    "errcode": "0000",
    "description": "Success",
    "data": {
        "taskId": "8a99a18a3ca66a8fb332c66130b09f44",
        "status": "COMPLETED",
        "result": {
            "clientId": "client_001",
            "supplierId": "supplier_001",
            "targetItemsWritten": 2,
            "candidateItemsWritten": 3,
            "labelPairsWritten": 3,
            "historySkipped": false,
            "historyPairsWritten": 1,
            "historyVectorsWritten": 1,
            "historyPairsAboveThreshold": 2,
            "historySimilarityThreshold": 0.7,
            "elapsedSeconds": 2.4
        },
        "taskTraceId": "d4e5e33e57bf0237"
    },
    "traceId": "abf23ef9bde547789193e5338b622cad"
}
上例的含义:3 个匹配对中,2 对的名称向量余弦 ≥ 0.7(线上向量召回本来就能捞到,不写历史库),
1 对低于 0.7(真正的召回 miss,写入历史库)。

错误码#

返回码描述常见原因
0000操作成功—
2001参数错误必填字段缺失、请求体超过 10MB、匹配对超过 5000、item_id 重复、match_result 引用了不存在的 item_id、明细里有未被 match_result 引用的 item_id
3001服务暂不可用Kafka 发送缓冲区已满,稍后重试
3000服务器错误MySQL 未配置、内部异常
历史库不可用不会导致错误码 —— 它走降级路径,任务仍为 COMPLETED,
通过 data.result.historySkipped 判断。

请求参数

Query 参数

Header 参数

Body 参数application/json

示例
{
    "taskId": "string"
}

请求示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --globoff '/ai/knowledge/nlpService/item/label/import/query?access_token={{access_token}}' \
--header 'client-platform: common' \
--header 'Content-Type: application/json' \
--data '{
    "taskId": "string"
}'

返回响应

🟢200成功
application/json
Bodyapplication/json

示例
{
    "errcode": "0000",
    "description": "Success",
    "data": {
        "taskId": "8a99a18a3ca66a8fb332c66130b09f44",
        "status": "COMPLETED",
        "result": {
            "clientId": "client_001",
            "supplierId": "supplier_001",
            "targetItemsWritten": 2,
            "candidateItemsWritten": 3,
            "labelPairsWritten": 3,
            "historySkipped": false,
            "historyPairsWritten": 1,
            "historyVectorsWritten": 1,
            "historyPairsAboveThreshold": 2,
            "historySimilarityThreshold": 0.7,
            "elapsedSeconds": 2.4
        },
        "taskTraceId": "d4e5e33e57bf0237"
    },
    "traceId": "abf23ef9bde547789193e5338b622cad"
}
修改于 2026-08-18 09:03:34
上一页
三单匹配-异步标注数据导入
下一页
三单匹配-异步训练接口
Built with