智能小程序OPENCARD
开放类目

宠物品种大全

用户在搜索“猫猫”、“狗狗智商排名”等需求时,结果页会展现宠物品种大全卡片。卡片展示该类宠物排行榜单的 top3 品种;切换 tab 可调整排序依据;点击特定品种的左图右文结构体可跳转至相应品种的图文详情页(端内小程序+端外 H5);点击子链可跳转至完整榜单、宠物问答、萌宠趣闻等服务的资源方落地页。

示意图

intent 上传接口

当前资源 intent 意图参数

key 类型 含义 示例/说明
pet_type   string 宠物类别 必选,资源方数据覆盖的宠物类别,如:"狗","猫","兔子" 等
order_key   string 排序依据 可选,选后不可为空。资源方数据覆盖的各类宠物榜单的排序依据,如:"热度","智商","友善" 等

通过平台上传 txt 文件

资源方需要将自己落地页数据能够覆盖的所有 intent 参数组合通过 txt 文件上传到平台上,txt 文件的具体要求参见接入流程-上传 Intent 数据

当前资源分类 txt 上传文件内容示例如下:

1
2
{"pet_type":"狗","order_key":"智商"}
{"pet_type":"狗","order_key":""}

注意:以上两种 intent 组合分别在以下两类 query 下召回此卡片:

intent 组合 query 类型 举例
pet_type 上传实体名、order_key 上传实体名 某类宠物的特定榜单查询需求 如“狗智商排名”
pet_type 上传实体名、order_key 为空 某类宠物的品种或热度排行榜查询 如“狗类排行榜”“狗品种大全”

通过开放 API 上传

详细接入方式参见API 上传方式

Webhook API

发送给 webhook 的请求

公共字段

key 类型 含义 示例/说明
type string 请求类型 在小程序阿拉丁下永远为 “sp_ala”
surface string 搜索场景 mobile: 支持小程序的移动搜索,web_h5: 支持 H5 的移动搜索
srcid string 资源编号 每个资源分类不同
intent object 搜索意图参数 JSON 对象,每个资源分类不同

当前资源 srcid 资源编号

key 类型 含义 设定
srcid string 资源编号 48035

当前资源的 intent 参数参考上节 “intent 上传接口“。

举例:发送给 webhook 的 JSON (解密后)

1
2
3
4
5
6
7
8
9
{
"type": "sp_ala",
"srcid": "48035",
"surface": "mobile",
"intent": {
"pet_type": "狗",
"order_key": "智商"
}
}

从 webhook 返回的结果

外层通用数据字段

key 类型 含义 示例/说明
status integer 结果状态码,0 代表正确,1 代表无结果,
2 代表请求参数错误,3 代表内部服务错误
0
msg string 出错消息,当非 0 时提供 “”
data object 要返回的资源数据内容 JSON 对象,每个资源分类不同

当前资源分类的 data object 字段内容

key 类型 要求 说明
jump_url string 必选 点击卡片除左图右文结构体、tab、子链以外其余位置的跳转链接,跳转至能满足宠物榜单查看需求的落地页。该字段需返回 H5 或智能小程序页面路径,例如:“/page/of/target”。
tab_list array 必选 Tab 列表数据,最少 2 个,最多 5 个
tab_list.tab_text string 必选 Tab 文案,宠物排序规则,例如:“热度排名”,“不掉毛”,“爱粘人”。注:4 个 Tab 的情况下每个文案不超过 6 个字,5 个 Tab 的情况下每个文案不超过 5 个字,否则将导致换行
tab_list.item_list array 必选 左图右文列表数据配置,最少 3 个,最多 3 个
tab_list.item_list.title string 必选 文字标题,宠物类型,例如:“暹罗猫”、“布偶猫”
tab_list.item_list.image string 必选 第一张图片链接,相应品种宠物的图片,例如:https://ss0.baidu.com/6ONWsjip0QIZ8tyhnq/it/u=2379086268,2130850456&fm=58
tab_list.item_list.pet_feature string 必选 品种的特点,例如:“中型”、“短毛”、“容易饲养”
tab_list.item_list.pet_price string 必选 品种的大致单价,例如:“2000-4000 元”
tab_list.item_list.url string 必选 单个左图右文结构体的跳转链接,一般为具体宠物品种的介绍详情页,例如:“/page/of/target”
tab_list.slink_list array 必选 子链,最少 2 个,最多 3 个
tab_list.slink_list.text string 必选 子链文案,资源方其他宠物相关服务的名称,例如:“完整热度榜单”、“萌宠问答”。注:第一个子链“完整 xx 榜单”须与 Tab 文案保持一致,2 个子链的情况下,子链文案不超过 8 个字;3 个子链的情况下,子链文案不超过 7 个字,否则将被截断
tab_list.slink_list.url string 必选 子链跳转链接,一般为资源方其他宠物相关服务的落地页,该字段需返回 H5 或智能小程序页面路径,例如:“/page/of/target”

举例:从 webhook 返回的 JSON (加密前)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
{
"status": 0,
"msg": "",
"data": {
"jump_url": "/page/of/target?id=1",
"tab_list": [
{
"tab_text": "热度排名",
"item_list": [
{
"title": "暹罗猫",
"image": "https://ss1.baidu.com/6ONXsjip0QIZ8tyhnq/it/u=2665214509,3868179391&fm=179&app=35&f=JPEG?w=800&h=599&s=FFC1D8095E6343115E94E8CE030080B3",
"pet_feature": "中型、短毛、容易饲养",
"pet_price": "身价:2000-4000元",
"url": "/page/of/target?id=1"
},
{
"title": "布偶猫",
"image": "https://ss1.baidu.com/6ONXsjip0QIZ8tyhnq/it/u=2665214509,3868179391&fm=179&app=35&f=JPEG?w=800&h=599&s=FFC1D8095E6343115E94E8CE030080B3",
"pet_feature": "大型、长毛、容易饲养",
"pet_price": "身价:3000-10000元",
"url": "/page/of/target?id=1"
},
{
"title": "折耳猫",
"image": "https://ss1.baidu.com/6ONXsjip0QIZ8tyhnq/it/u=2665214509,3868179391&fm=179&app=35&f=JPEG?w=800&h=599&s=FFC1D8095E6343115E94E8CE030080B3",
"pet_feature": "中型、短毛、容易饲养",
"pet_price": "身价:500-10000元",
"url": "/page/of/target?id=1"
}
],
"slink_list": [
{ "text": "完整热度排名", "url": "/page/of/target?id=1" },
{ "text": "宠物问答", "url": "/page/of/target?id=1" }
]
},
{
"tab_text": "不掉毛",
"item_list": [
{
"title": "暹罗猫",
"image": "https://ss1.baidu.com/6ONXsjip0QIZ8tyhnq/it/u=2665214509,3868179391&fm=179&app=35&f=JPEG?w=800&h=599&s=FFC1D8095E6343115E94E8CE030080B3",
"pet_feature": "中型、短毛、容易饲养",
"pet_price": "身价:2000-4000元",
"url": "/page/of/target?id=1"
},
{
"title": "布偶猫",
"image": "https://ss1.baidu.com/6ONXsjip0QIZ8tyhnq/it/u=2665214509,3868179391&fm=179&app=35&f=JPEG?w=800&h=599&s=FFC1D8095E6343115E94E8CE030080B3",
"pet_feature": "大型、长毛、容易饲养",
"pet_price": "身价:3000-10000元",
"url": "/page/of/target?id=1"
},
{
"title": "折耳猫",
"image": "https://ss1.baidu.com/6ONXsjip0QIZ8tyhnq/it/u=2665214509,3868179391&fm=179&app=35&f=JPEG?w=800&h=599&s=FFC1D8095E6343115E94E8CE030080B3",
"pet_feature": "中型、短毛、容易饲养",
"pet_price": "身价:500-10000元",
"url": "/page/of/target?id=1"
}
],
"slink_list": [
{ "text": "完整不掉毛排名", "url": "/page/of/target?id=1" },
{ "text": "萌宠趣闻", "url": "https://m.baidu.com" }
]
},
{
"tab_text": "爱粘人",
"item_list": [
{
"title": "暹罗猫",
"image": "https://ss1.baidu.com/6ONXsjip0QIZ8tyhnq/it/u=2665214509,3868179391&fm=179&app=35&f=JPEG?w=800&h=599&s=FFC1D8095E6343115E94E8CE030080B3",
"pet_feature": "中型、短毛、容易饲养",
"pet_price": "身价:2000-4000元",
"url": "/page/of/target?id=1"
},
{
"title": "布偶猫",
"image": "https://ss1.baidu.com/6ONXsjip0QIZ8tyhnq/it/u=2665214509,3868179391&fm=179&app=35&f=JPEG?w=800&h=599&s=FFC1D8095E6343115E94E8CE030080B3",
"pet_feature": "大型、长毛、容易饲养",
"pet_price": "身价:3000-10000元",
"url": "/page/of/target?id=1"
},
{
"title": "折耳猫",
"image": "https://ss1.baidu.com/6ONXsjip0QIZ8tyhnq/it/u=2665214509,3868179391&fm=179&app=35&f=JPEG?w=800&h=599&s=FFC1D8095E6343115E94E8CE030080B3",
"pet_feature": "中型、短毛、容易饲养",
"pet_price": "身价:500-10000元",
"url": "/page/of/target?id=1"
}
],
"slink_list": [
{ "text": "完整爱粘人排名", "url": "/page/of/target?id=1" },
{ "text": "养宠课堂", "url": "/page/of/target?id=1" }
]
},
{
"tab_text": "容易饲养",
"item_list": [
{
"title": "暹罗猫",
"image": "https://ss1.baidu.com/6ONXsjip0QIZ8tyhnq/it/u=2665214509,3868179391&fm=179&app=35&f=JPEG?w=800&h=599&s=FFC1D8095E6343115E94E8CE030080B3",
"pet_feature": "中型、短毛、容易饲养",
"pet_price": "身价:2000-4000元",
"url": "/page/of/target?id=1"
},
{
"title": "布偶猫",
"image": "https://ss1.baidu.com/6ONXsjip0QIZ8tyhnq/it/u=2665214509,3868179391&fm=179&app=35&f=JPEG?w=800&h=599&s=FFC1D8095E6343115E94E8CE030080B3",
"pet_feature": "大型、长毛、容易饲养",
"pet_price": "身价:3000-10000元",
"url": "/page/of/target?id=1"
},
{
"title": "折耳猫",
"image": "https://ss1.baidu.com/6ONXsjip0QIZ8tyhnq/it/u=2665214509,3868179391&fm=179&app=35&f=JPEG?w=800&h=599&s=FFC1D8095E6343115E94E8CE030080B3",
"pet_feature": "中型、短毛、容易饲养",
"pet_price": "身价:500-10000元",
"url": "/page/of/target?id=1"
}
],
"slink_list": [
{ "text": "完整容易饲养排名", "url": "/page/of/target?id=1" },
{ "text": "萌宠图片", "url": "/page/of/target?id=1" }
]
}
]
}
}
反 馈帮 助 回 到顶 部