sample_data.md
3.59 KB
数据采集输出示例
展示从各平台采集后的数据格式
1. 抖音数据示例
1.1 视频数据
{
"platform": "douyin",
"video_id": "7123456789012345678",
"video_title": "测试视频标题",
"author_id": "user_123456",
"publish_time": 1709308800,
"views": 15000,
"likes": 1200,
"comments": 89,
"shares": 45,
"favorites": 234,
"completion_rate": 0.65,
"avg_watch_time": 28.5,
"created_at": 1709400000
}
1.2 评论数据
[
{
"platform": "douyin",
"video_id": "7123456789012345678",
"comment_id": "c_123456",
"user_id": "user_789",
"content": "太棒了!",
"like_count": 25,
"sentiment": "positive",
"sentiment_score": 0.92
},
{
"platform": "douyin",
"video_id": "7123456789012345678",
"comment_id": "c_123457",
"user_id": "user_790",
"content": "一般般吧",
"like_count": 3,
"sentiment": "neutral",
"sentiment_score": 0.5
}
]
2. B站数据示例
2.1 视频信息
{
"platform": "bilibili",
"video_id": "BV1xx411c7mD",
"video_title": "【教程】如何入门编程",
"author_id": "UID123456",
"publish_time": 1709200000,
"views": 52000,
"likes": 2800,
"coins": 450,
"favorites": 1200,
"shares": 180,
"danmaku": 320,
"reply_count": 256,
"created_at": 1709400000
}
2.2 评论数据
[
{
"platform": "bilibili",
"video_id": "BV1xx411c7mD",
"comment_id": "r_123456",
"user_id": "UID789012",
"content": "学到了!感谢UP主",
"like_count": 56,
"sentiment": "positive",
"sentiment_score": 0.88
},
{
"platform": "bilibili",
"video_id": "BV1xx411c7mD",
"comment_id": "r_123457",
"user_id": "UID789013",
"content": "音质可以更好",
"like_count": 12,
"sentiment": "neutral",
"sentiment_score": 0.55
}
]
3. 聚合数据看板
3.1 日汇总
{
"date": "2024-03-01",
"platforms": {
"douyin": {
"total_views": 45000,
"total_likes": 3200,
"total_comments": 280,
"avg_completion_rate": 0.62
},
"bilibili": {
"total_views": 78000,
"total_likes": 4500,
"total_comments": 420,
"avg_completion_rate": 0.71
}
},
"generated_at": 1709400000
}
3.2 周趋势
{
"week": "2024-W13",
"trend": {
"douyin_views": [32000, 35000, 38000, 41000, 45000, 42000, 45000],
"bilibili_views": [65000, 68000, 72000, 75000, 78000, 76000, 78000],
"total_likes": [2100, 2300, 2500, 2800, 3200, 3000, 3400]
}
}
4. 情感分析汇总
4.1 每日情感分布
{
"date": "2024-03-01",
"source": "douyin",
"total_comments": 280,
"sentiment": {
"positive": 168,
"neutral": 84,
"negative": 28
},
"positive_rate": 0.60,
"negative_rate": 0.10,
"top_positive_comments": [
"太喜欢了",
"支持UP主",
"学到了很多"
],
"top_negative_comments": [
"音质太差",
"内容空洞"
]
}
5. 字段对照表
| 字段 | 抖音 | B站 | 统一字段 |
|---|---|---|---|
| 视频ID | video_id | bvid | video_id |
| 标题 | video_title | title | video_title |
| 作者 | author_id | owner.mid | author_id |
| 播放量 | play_count | play | views |
| 点赞 | like_count | like | likes |
| 投币 | - | coin | shares |
| 收藏 | favorite_count | favorite | favorites |
| 评论 | comment_count | reply | comments |
| 弹幕 | - | danmaku | danmaku |
| 分享 | share_count | share | shares |
| 完播率 | finish_rate | - | completion_rate |
| 平均观看 | avg_time | - | avg_watch_time |