本文讲解如何在流程管理系统中新建一套流程,将前面所述的“采集类目热搜词”(流程ID:8427)和“采集直通车相关词”(流程ID:8394)两个流程节点连接在一起。
流程图如下所示:
用户可复制以下流程配置内容导入到自己的流程管理系统进行测试。
[
{
"id": "0ab0fec2bfef69fd",
"type": "tab",
"label": "淘宝选词",
"disabled": false,
"info": "",
"env": []
},
{
"id": "c659397532fdc3d1",
"type": "inject",
"z": "0ab0fec2bfef69fd",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "{\"类目信息\":[\"50008898 女装/女士精品>卫衣/绒衫\",\"50000697 女装/女士精品>毛针织衫\",\"162104 女装/女士精品>衬衫\",\"162103 女装/女士精品>毛衣\"]}",
"payloadType": "json",
"x": 90,
"y": 80,
"wires": [
[
"a20bd42683fded51"
]
]
},
{
"id": "a20bd42683fded51",
"type": "dianshangji",
"z": "0ab0fec2bfef69fd",
"name": "采集类目热搜词",
"process": "8427",
"browser": "",
"closetab": true,
"x": 300,
"y": 80,
"wires": [
[
"9c05a3a92765b089"
],
[],
[]
]
},
{
"id": "9c05a3a92765b089",
"type": "file",
"z": "0ab0fec2bfef69fd",
"name": "",
"filename": "data/marketkeyword.json",
"filenameType": "str",
"appendNewline": true,
"createDir": false,
"overwriteFile": "true",
"encoding": "none",
"x": 590,
"y": 80,
"wires": [
[
"72f960dc3ecd143b"
]
]
},
{
"id": "72f960dc3ecd143b",
"type": "debug",
"z": "0ab0fec2bfef69fd",
"name": "调试 13",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 820,
"y": 80,
"wires": []
},
{
"id": "46a3b00f221f0b67",
"type": "file in",
"z": "0ab0fec2bfef69fd",
"name": "",
"filename": "data/marketkeyword.json",
"filenameType": "str",
"format": "utf8",
"chunk": false,
"sendError": false,
"encoding": "none",
"allProps": false,
"x": 310,
"y": 140,
"wires": [
[
"abf37c389db54a66"
]
]
},
{
"id": "dc5a0a923653275f",
"type": "watch",
"z": "0ab0fec2bfef69fd",
"name": "",
"files": "data/marketkeyword.json",
"recursive": "",
"x": 130,
"y": 200,
"wires": [
[
"46a3b00f221f0b67"
]
]
},
{
"id": "8998fb204f37b486",
"type": "inject",
"z": "0ab0fec2bfef69fd",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 90,
"y": 140,
"wires": [
[
"46a3b00f221f0b67"
]
]
},
{
"id": "abf37c389db54a66",
"type": "dianshangji",
"z": "0ab0fec2bfef69fd",
"name": "采集流量分析相关词列表",
"process": "8394",
"browser": "",
"closetab": true,
"x": 630,
"y": 140,
"wires": [
[
"8052833db9e31a2c"
],
[],
[]
]
},
{
"id": "f9f9b3d6b6ec1dec",
"type": "debug",
"z": "0ab0fec2bfef69fd",
"name": "调试 14",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 860,
"y": 220,
"wires": []
},
{
"id": "8052833db9e31a2c",
"type": "file",
"z": "0ab0fec2bfef69fd",
"name": "",
"filename": "data/subwaykeyword.json",
"filenameType": "str",
"appendNewline": true,
"createDir": false,
"overwriteFile": "false",
"encoding": "none",
"x": 630,
"y": 220,
"wires": [
[
"f9f9b3d6b6ec1dec"
]
]
}
]
在运行这个流程图之前,用户先从电商记的选词工具复制一组类目信息。
按图示步骤,将类目信息粘贴到“注入”节点中。
修改完成后,记得点击“部署”才能生效。
点击“注入”,先试着运行流程8427,可以看到“调试13”节点的输出内容即为类目热搜词列表。
流程图中,类目热搜词列表被写入到本地文件“data/marketkeyword.json”中。下一步,流程图中监视了该文件,只要内容发生变化,就会将其内容传递给流程8394,采集直通车流量分析的相关词列表,采集结果保存到本地文件“data/subwaykeyword.json”。
本示例中采集了4个类目,得到200个类目热搜词,逐一采集它们的直通车相关词,结果显示在流程页面的右侧输出区。
最终得到相关词列表如下表所示,数量有3、4千个,按展现指数和点击指数做了排序。