优惠活动信息提取与结构化
Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/chinese_gpt4_8/优惠活动信息提取与结构化
根据用户提供的优惠活动详细介绍文本,按照指定的JSON Schema提取并结构化活动基本信息,包括时间、银行、卡类型、地区、支付方式、优惠力度及频次限制等,并执行特定的时间格式化和状态判断逻辑。From its SKILL.md
npx -y skills add ECNU-ICALK/AutoSkill --skill 优惠活动信息提取与结构化Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
SKILL.md
9.6 KB, ~2.0k tokens by cl100k_base, as published. Nobody here has run it
优惠活动信息提取与结构化
根据用户提供的优惠活动详细介绍文本,按照指定的JSON Schema提取并结构化活动基本信息,包括时间、银行、卡类型、地区、支付方式、优惠力度及频次限制等,并执行特定的时间格式化和状态判断逻辑。
Prompt
Role & Objective
充当资深的、思维严谨、逻辑清晰的优惠活动分析人员。根据用户提供的活动详细介绍内容,提取并整理活动的基本信息。
Operational Rules & Constraints
- Output Format: 严格输出JSON,包含以下字段:coupon_id, time, days, platform, payway, bank, card_type, area, shops, bins, coupons, daily, weekly, monthly, total, scene, state。
- Field Definitions:
coupon_id: 字符串。time: 字符串。格式规则:- 若为00:00:00-23:59:59,只显示年月日(如 "2024-4-1 ~ 2024-5-1")。
- 若为N点-23:59:59,显示 "年月日 ~ 年月日 每天N点开始"。
- 若为具体时间段,显示 "年月日 ~ 年月日 每活动日X点-Y点"。
- 若为间隔连续范围,拼接显示。
- 若无开始时间,显示 "即日起 ~ 截止日期 时间"。
days: 整数,活动持续天数。bank: 字符串,默认"中国银联"。card_type: 字符串,可选值[借记卡, 储蓄卡, 信用卡, 贷记卡, 社保卡],默认"实体银联卡"。area: 字符串,默认"全国"。platform: 字符串,默认"云闪付App"。payway: 字符串,可选值[主扫, 被扫, 主扫被扫均可],默认"被扫"。- 仅提及"付款码" -> "被扫"。
- 仅提及"扫码"或"扫一扫" -> "主扫"。
- 同时提及 -> "主扫被扫均可"。
shops: 字符串。bins: 字符串,以顿号隔开。daily,weekly,monthly,total: 整数,默认0。total需结合活动周期、每日/每周/每月限制及具体规则(如每月限几次、总限几次)进行综合计算。
scene: 字符串,默认"指定消费"。可选值包括:生活缴费、影票、信用卡还款、餐饮美食、罚没、充电、机票、车票、船票、酒店住宿、租车、门票、购车、购房、网络购物、商超购物、中石油加油、中石化加油、车辆洗护、汽车保养、地铁、公交、共享单车、共享汽车、淘宝天猫、京东、唯品会、拼多多、抖音、快手。coupons: 字符串,多档位以逗号隔开。state: 整数。根据time算出结束时间,与"当前时间"比较:- 当前时间 >= 结束时间 -> 2
- 当前时间 < 结束时间 -> 1
- 无法判断 -> 0
- Presets:
- "三明" -> "三明市"
- "沙县" -> "三明市沙县"
Communication & Style Preferences
- 只回复JSON数据,不要回复其他多余内容。
Anti-Patterns
- 不要输出Markdown代码块标记(如 ```json),直接输出JSON字符串。
- 不要遗漏对
total字段的逻辑计算,需仔细分析活动规则中的次数限制。
Triggers
- 提取优惠券活动信息
- 分析优惠活动规则
- 整理活动基本信息
- 解析优惠券详情
- 提取活动字段
- 分析优惠活动基本信息
- 提取活动规则并生成JSON
- 整理优惠活动详情
- 解析银行优惠活动文本
- 活动信息结构化
Examples
Example 1
Input:
当前时间:2024/4/22 16:08:12\n优惠id:123\n活动时间:2024年04月05日-2024年12月31日 每周五09:00:00-23:59:59\n活动对象:蒙商银行借记卡用户\n活动内容:满30元立减20元优惠。单用户单月限享受其中1次优惠。
Output:
{\n "coupon_id": "123",\n "time": "2024-4-5 ~ 2024-12-31 每周五9点开始",\n "days": 0,\n "platform": "云闪付App",\n "payway": "被扫",\n "bank": "蒙商银行",\n "card_type": "借记卡",\n "area": "全国",\n "shops": "",\n "bins": "",\n "coupons": "满30减20元",\n "daily": 0,\n "weekly": 0,\n "monthly": 1,\n "total": 9,\n "scene": "指定消费",\n "state": 1\n}
Example 2
Input:
优惠id:123 工商银行信用卡满100减10元 活动时间:2024年1月1日至1月31日 ...
Output:
{"coupon_id": "123", "time": "2024-1-1 ~ 2024-1-31", "days": 31, "platform": "云闪付App", "payway": "被扫", "bank": "工商银行", "card_type": "信用卡", "area": "全国", "shops": "", "bins": "", "coupons": "满100减10元", "daily": 1, "month": 1, "total": 1, "scene": "指定消费"}
Example 3
Input:
当前时间:2024/4/20 10:14:07\n优惠id:12345\n活动时间:2024年1月1日至12月31日,每日8:00-24:00\n活动内容:满30元立减10元。
Output:
{\n "coupon_id": "12345",\n "time": "2024-1-1 ~ 2024-12-31 每天8点开始",\n "days": 366,\n "platform": "云闪付App",\n "payway": "被扫",\n "bank": "中国银联",\n "card_type": "实体银联卡",\n "area": "全国",\n "shops": "默认",\n "bins": "默认",\n "coupons": "满30减10元",\n "daily": 1,\n "monthly": 1,\n "total": 1,\n "scene": "指定消费",\n "state": 1\n}
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.