每天早上8点,我的飞书都会准时收到一份AI行业早报,内容精选自36氪、量子位和新智元三大平台的热点资讯,经过智能去重和摘要生成,3分钟就能掌握全天行业动态。这不是什么付费服务,而是我用OpenClaw搭建的自动化资讯推送系统。
这个项目的核心价值在于实现了"信息找人"的范式转换。传统AI工具需要用户主动查询才能获取信息,而这个系统能够按照预设规则自动完成信息采集、处理和推送全流程。根据我的实测数据,系统每天为我节省约20分钟的信息收集时间,相当于每年释放出120+小时的深度工作时间。
技术架构上,系统主要包含三个核心模块:
系统的核心控制逻辑通过YAML配置文件实现,这种设计使得非技术人员也能轻松调整系统行为。以下是我的完整配置方案:
yaml复制system:
timezone: "Asia/Shanghai"
log_level: "info"
max_retries: 3
fetch_jobs:
- id: "morning_ai_digest"
sources: ["36kr", "qbitai", "aixinwu"]
collect_count: 20
timeout: 30
deduplication: true
push_jobs:
- id: "push_morning"
fetch_job_id: "morning_ai_digest"
schedule:
time: "08:00"
frequency:
unit: "day"
value: 1
content:
max_length: 500
sections: ["headlines", "trends", "investments"]
delivery:
primary: "feishu"
fallback: "webhook"
sources:
- name: "36kr"
url: "https://36kr.com"
selector: ".article-item"
enabled: true
- name: "qbitai"
url: "https://www.qbitai.com"
selector: ".post-list"
enabled: true
- name: "aixinwu"
url: "https://www.aixinwu.cn"
selector: ".news-list"
enabled: true
配置中的几个关键点:
在实际运行中,我遇到了几个典型问题并设计了相应解决方案:
重要提示:初始配置时建议将collect_count设为较小值(如10),待系统稳定后再逐步增加,避免因内容过多导致处理超时。
内容处理是系统的核心价值所在,我的处理流程包括:
原始内容清洗:
关键信息提取:
python复制def extract_keyinfo(text):
# 使用预训练模型识别实体
ner_model = load_ner_model()
entities = ner_model.predict(text)
# 基于规则的关键句提取
sentences = split_sentences(text)
scored_sentences = []
for sent in sentences:
score = 0
score += len([e for e in entities if e in sent]) * 2
score += len(re.findall(r'\b(突破|融资|发布)\b', sent)) * 1.5
scored_sentences.append((sent, score))
return sorted(scored_sentences, key=lambda x: x[1], reverse=True)[:3]
摘要生成优化:
推送环节的可靠性直接影响用户体验,我的实现方案:
飞书API集成:
备用通道设计:
bash复制# Webhook调用示例
curl -X POST \
-H "Content-Type: application/json" \
-d '{"text": "$摘要内容", "attachments": ["$链接"]}' \
https://hooks.example.com/webhook
状态监控:
我采用的部署方案兼顾了性能与成本:
针对不同操作系统的调度方案:
macOS (推荐):
xml复制<!-- ~/Library/LaunchAgents/com.ai.digest.plist -->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.ai.digest</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/python3</string>
<string>/path/to/digest_system/main.py</string>
</array>
<key>StartCalendarInterval</key>
<dict>
<key>Hour</key>
<integer>7</integer>
<key>Minute</key>
<integer>55</integer>
</dict>
<key>StandardOutPath</key>
<string>/var/log/ai_digest.log</string>
<key>StandardErrorPath</key>
<string>/var/log/ai_digest.err</string>
</dict>
</plist>
Linux:
bash复制# crontab -e
55 7 * * * /usr/bin/python3 /path/to/digest_system/main.py >> /var/log/ai_digest.log 2>&1
Windows:
使用任务计划程序,创建基本任务:
| 问题现象 | 可能原因 | 解决方案 |
|---|---|---|
| 推送内容为空 | 1. 采集规则失效 2. 网络连接问题 |
1. 检查源站HTML结构变化 2. 测试网络连通性 |
| 推送时间不准 | 1. 时区配置错误 2. 系统时间不同步 |
1. 确认时区设置为Asia/Shanghai 2. 启用NTP时间同步 |
| 摘要质量差 | 1. 文本清洗不彻底 2. 关键参数设置不当 |
1. 检查清洗规则 2. 调整摘要长度参数 |
缓存优化:
并行处理:
python复制from concurrent.futures import ThreadPoolExecutor
def process_sources(sources):
with ThreadPoolExecutor(max_workers=3) as executor:
results = list(executor.map(fetch_source, sources))
return results
资源监控:
经过三个月的持续运行和迭代,系统目前的稳定运行指标:
这个项目给我的最大启示是:AI落地的价值往往体现在那些日常重复性工作中。通过自动化这些"小事情",我们才能真正释放出大块时间用于创造性思考。系统后续计划增加个性化推荐功能,基于用户阅读偏好动态调整内容权重。