文档

类目预测

调用须知

  • 该服务为行业版的能力,需要开通行业版才能免费调用。点击这里确认开通状态:开通服务

  • 开通服务后可购买资源包进行调用:资源包购买

  • 支持语言:中文

  • 支持行业:电商行业

请求参数

名称

示例值

位置

类型

是否必

描述

Action

GetCateChEcom

body

string

固定值,不要省略

ServiceCode

alinlp

body

string

固定值,不要省略

Text

58包邮!优衣库回馈活动:仅3000套! 东西好不好收到摸一摸手感才知道,大公司出品,品质一流,只有一年一次内部特供款才享受此价格,活动仅限七天! 现回馈活动力度超前给力! 面料:一级优等品贡棉 130g磨毛 尺寸:被套200*230 床单230*250 枕套48*74*2只 每套重4.5斤!

body

string

中文电商商品标题

最大长度不超过800字

ImageUrl

https://example.aliyundoc.com/20200530/i1590816112_2841_0.jpg

body

string

中文电商商品图片

1. 压缩图500x500可以降低RT而且不影响性能;

2. ImageUrl可以为空,ImageUrl不存在会返回单独文本预测的结果

返回数据

参数名

示例值

参数描述

tracerId

6038368d47195915eff81a8f49ae0b45

唯一请求id,排查问题的依据

data

{
    "cate_path":"床上用品>>床品套件>>床品套件>>床品套件",
    "img_url":"https://example.aliyundoc.com/20200530/i1590816112_2841_0.jpg",
    "text":"58包邮!优衣库回馈活动:仅3000套! 东西好不好收到摸一摸手感才知道,大公司出品,品质一流,只有一年一次内部特供款才享受此价格,活动仅限七天! 现回馈活动力度超前给力! 面料:一级优等品贡棉  130g磨毛 尺寸:被套200*230 床单230*250 枕套48*74*2只 每套重4.5斤!",
    "cate_merge_model_result":[
        {
            "score":0.9104,
            "cate_name":"床品套件",
            "rank":0,
            "cate_id":3176
        },
        {
            "score":0.0549,
            "cate_name":"被套",
            "rank":1,
            "cate_id":6696
        },
        {
            "score":0.0049,
            "cate_name":"睡衣套装",
            "rank":2,
            "cate_id":9647
        },
        {
            "score":0.0027,
            "cate_name":"面料",
            "rank":3,
            "cate_id":1645
        },
        {
            "score":0.0026,
            "cate_name":"套装",
            "rank":4,
            "cate_id":6316
        },
        {
            "score":0.0018,
            "cate_name":"化纤被",
            "rank":5,
            "cate_id":1319
        },
        {
            "score":0.0016,
            "cate_name":"枕套",
            "rank":6,
            "cate_id":3816
        },
        {
            "score":0.0012,
            "cate_name":"床单",
            "rank":7,
            "cate_id":9800
        },
        {
            "score":0.0008,
            "cate_name":"时尚套装",
            "rank":8,
            "cate_id":3724
        },
        {
            "score":0.0004,
            "cate_name":"内衣套装",
            "rank":9,
            "cate_id":1024
        }
    ],
    "status":"0"
}
  • cate_path:top1类目路径

  • img_url:输入的图片地址

  • text:输入的文本

  • cate_merge_model_result:top10结果列表,按置信度从高到低

  • score:置信度

  • cate_name:类目名称

  • rank:排名

  • cate_id:类目Id

调用接入

  1. 代码接入请参考:快速入门

  2. 在线快速试用请参考:在线试用

错误码

调用过程中如果出现错误可对照下表,查看对应描述,描述中包含具体错误原因和解决方案

HttpCode

错误码

错误信息

描述

400

UserStatusInvalid

The user status is invalid.

用户状态无效,请检查账户是否欠费和有未支付的账单

400

BasicServiceNotActivated

The NLP API (Version : base) service has not been activated. Please click the url to confirm the activation status:https://common-buy.aliyun.com/?commodityCode=nlp_alinlpBasePost_public_cn#/buy

NLP API(基础版)服务未开通,请点击链接确认开通状态:https://common-buy.aliyun.com/?commodityCode=nlp_alinlpBasePost_public_cn#/buy

400

AdvancedServiceNotActivated

The NLP API (Version : advanced) service has not been activated. Please click the url to confirm the activation status:https://common-buy.aliyun.com/?commodityCode=nlp_alinlpAdvancedPost_public_cn#/buy

NLP API(高级版)服务未开通,请点击链接确认开通状态:https://common-buy.aliyun.com/?commodityCode=nlp_alinlpAdvancedPost_public_cn#/buy

400

IndustryServiceNotActivated

The NLP API (Version : industry) service has not been activated. Please click the url to confirm the activation status:https://common-buy.aliyun.com/?commodityCode=nlp_alinlpIndustryPost_public_cn#/buy

NLP API(行业应用版)服务未开通,请点击链接确认开通状态:https://common-buy.aliyun.com/?commodityCode=nlp_alinlpIndustryPost_public_cn#/buy

401

InvalidParameter

The parameter is invalid.

参数无效,请检查入参

403

Forbidden.NoAuth

You are not authorized to operate on the specified resource. Please click the URL for help information:https://help.aliyun.com/document_detail/177209.html

您的账号无权限操作指定的资源,请点击URL以获取帮助信息:为RAM子用户授权

405

TextLimitExceeded

The maximum length of the text is exceeded.

文本长度超过限制

406

TextCodingError

An encoding error occurred to the input text.

输入文本编码错误

410

FrameworkError

Framework internal server error.

框架错误

411

FrameworkApiError

Framework API error.

框架API错误

412

FrameworkFormatError

Framework request format error.

框架请求格式错误

413

FrameworkReturnError

Framework return type format error.

框架返回格式错误

429

Throttling.User

Flow control has been triggered.

超过了每秒最大查询数(QPS),请单击URL以获取帮助信息:QPS增量服务定价(限时低价)

500

InternalError

A server error occurred while processing your request. Please try again later or contact customer support.

处理您的请求时发生服务错误,请稍后再试或联系客户支持。

  • 本页导读 (0)
文档反馈