CN104111971B - 过往微博数据收集与处理方法 - Google Patents
过往微博数据收集与处理方法 Download PDFInfo
- Publication number
- CN104111971B CN104111971B CN201410254061.0A CN201410254061A CN104111971B CN 104111971 B CN104111971 B CN 104111971B CN 201410254061 A CN201410254061 A CN 201410254061A CN 104111971 B CN104111971 B CN 104111971B
- Authority
- CN
- China
- Prior art keywords
- microblogging
- microblog
- microblog data
- data
- user
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/951—Indexing; Web crawling techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/279—Recognition of textual entities
Abstract
本发明公开了一种过往微博数据收集与处理方法,首先获取活跃微博用户ID,然后获取活跃微博用户微博数据,最后对微博数据进行处理。本发明改进了新浪第三方API,以弥补微博接口获得数据精确度的不足,能够满足过往微博数据收集与处理的要求。
Description
技术领域
本发明涉及微博数据处理方法领域,具体是一种过往微博数据收集与处理方法。
背景技术
随着微博的兴起,这种包含了大量微观点并带有情感倾向的短文本迅速富集,微博文本分析成为热门研究方向。
在微博数据搜集过程中,大量的微博数据搜集策略通常采用爬虫抓取方法,该方法抓取速度快、效率高,但是抓取的数据噪音大,虽然减少了数据搜集的时间,但是却成倍的增加了获得精确数据的预处理时间;且爬虫不稳定,常常面临被新浪封禁的危险。少量微博数据一般采用新浪微博第三方API进行调用搜集,该方法搜集的数据噪音少、区域明显,但是包含了大量的推送广告,又额外增加了无用数据比例。
无论是爬虫方法还是传统的新浪第三方API调用,都无法大量获得指定域下的微博数据,特别是过往微博数据的处理,爬虫方法和新浪第三方API调用皆无法适用。
发明内容
本发明的目的是提供一种过往微博数据收集与处理方法,以解决现有技术中爬虫方法或第三方API调用无法大量获取过往微博数据的问题。
为了达到上述目的,本发明所采用的技术方案为:
过往微博数据收集与处理方法,其特征在于:包括以下步骤:
(1)、获取活跃微博用户ID:
调用微博第三方API接口获取微博广场上公开的微博数据,公开的微博数据为微博作者的用户信息字段,其中包括用户UID、用户所在城市ID信息;根据获取到的微博广场上公开的微博数据,提取出用户UID,去重后即为可用的活跃微博用户ID;
(2)、获取活跃微博用户微博数据:
将获取到的用户UID拆分为7个本地用户UID库,分别使用7个微博第三方APIToken并行运行,提升单位时间内获取微博的数量;然后根据用户UID账号,调用微博第三方API应用接口获得对应账号下的所有微博数据文件,微博数据文件包括微博创建时间、微博信息内容、微博来源、微博作者的用户信息字段,微博数据文件保存为UTF-8格式的TXT文本文件,设微博数据文件为D;
(3)、微博数据处理:
根据相关热点事件,指定热点事件种子关键词,确定热点事件发生时间段;根据确定的热点事件时间段,从本地的微博数据文件D中提取指定事件时间段内的微博文本数据;微博文本数据包括微博创建时间、微博信息内容、用户昵称、用户所在地;提取后的微博精细内容文件本地保存为UTF-8格式的TXT文本文件,设微博精细内容文件为根据用户所在地,对微博精细内容文件再次提取拆分为文本文件Dall以及文本文件类其中文本文件Dall为该微博事件对应的全国微博数据,文本文件类为该微博热点事件对应的某城市微博数据,i≠0,为对应的城市代码;文本文件Dall以及文本文件类中微博数据包括微博创建时间、微博信息内容,根据确定的热点事件发生时间段,进一步将文本文件Dall与文本文件类拆分为该热点事件对应的全国微博数据单日数据集及该热点事件对应的某城市微博单日数据集其中t为日期号。
本发明改进了新浪第三方API,采用并行多用户调用方式增加数据搜集流量;采用多信息点覆盖搜集微博数据,以弥补微博接口获得数据精确度的不足,能够满足过往微博数据收集与处理的要求。
具体实施方式
过往微博数据收集与处理方法,过往微博数据是指用户在当前时间以前所发布的微博数据,其特点是数据固定,事后分析方便,包括以下步骤:
(1)、获取活跃微博用户ID:
调用微博第三方API接口获取微博广场上公开的微博数据,公开的微博数据为微博作者的用户信息字段,其中包括用户UID、用户所在城市ID信息;根据获取到的微博广场上公开的微博数据,提取出用户UID,去重后即为可用的活跃微博用户ID;
(2)、获取活跃微博用户微博数据:
将获取到的用户UID拆分为7个本地用户UID库,分别使用7个微博第三方APIToken并行运行,提升单位时间内获取微博的数量;然后根据用户UID账号,调用微博第三方API应用接口获得对应账号下的所有微博数据文件,微博数据文件包括微博创建时间、微博信息内容、微博来源、微博作者的用户信息字段,微博数据文件保存为UTF-8格式的TXT文本文件,设微博数据文件为D;
(3)、微博数据处理:
根据相关热点事件,指定热点事件种子关键词,确定热点事件发生时间段;根据确定的热点事件时间段,从本地的微博数据文件D中提取指定事件时间段内的微博文本数据;微博文本数据包括微博创建时间、微博信息内容、用户昵称、用户所在地;提取后的微博精细内容文件本地保存为UTF-8格式的TXT文本文件,设微博精细内容文件为根据用户所在地,对微博精细内容文件再次提取拆分为文本文件Dall以及文本文件类其中文本文件Dall为该微博事件对应的全国微博数据,文本文件类为该微博热点事件对应的某城市微博数据,i≠0,为对应的城市代码;文本文件Dall以及文本文件类中微博数据包括微博创建时间、微博信息内容,根据确定的热点事件发生时间段,进一步将文本文件Dall与文本文件类拆分为该热点事件对应的全国微博数据单日数据集及该热点事件对应的某城市微博单日数据集其中t为日期号。
Claims (1)
1.过往微博数据收集与处理方法,其特征在于:可以获得指定过往时间点或时间段内的微博数据;包括以下步骤:
(1)、获取活跃微博用户ID:
调用微博第三方API接口获取微博广场上公开的微博数据,公开的微博数据为微博作者的用户信息字段,其中包括用户UID、用户所在城市ID的信息;根据获取到的微博广场上公开的微博数据,提取出用户UID,去重后即为可用的活跃微博用户ID;
(2)、获取活跃微博用户微博数据:
将获取到的用户UID拆分为7个本地用户UID库,分别使用7个微博第三方API Token并行运行,提升单位时间内获取微博的数量;然后根据用户UID账号,调用微博第三方API应用接口获得对应账号下的所有微博数据文件,微博数据文件包括微博创建时间、微博信息内容、微博来源、微博作者的用户信息字段,微博数据文件保存为UTF-8格式的TXT文本文件,设微博数据文件为D;
(3)、微博数据处理:
根据相关热点事件,指定热点事件种子关键词,确定热点事件发生时间段;根据确定的热点事件时间段,从本地的微博数据文件D中提取指定事件时间段内的微博文本数据;微博文本数据包括微博创建时间、微博信息内容、用户昵称、用户所在地;提取后的微博精细内容文件本地保存为UTF-8格式的TXT文本文件,设微博精细内容文件为根据用户所在地,对微博精细内容文件再次提取拆分为文本文件Dall以及文本文件类其中文本文件Dall为该热点事件对应的全国微博数据,文本文件类为该热点事件对应的某城市微博数据,i≠0,为对应的城市代码;文本文件Dall以及文本文件类中微博数据包括微博创建时间、微博信息内容,根据确定的热点事件发生时间段,进一步将文本文件Dall与文本文件类拆分为该热点事件对应的全国微博数据单日数据集及该热点事件对应的某城市微博单日数据集其中t为日期号。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410254061.0A CN104111971B (zh) | 2014-06-09 | 2014-06-09 | 过往微博数据收集与处理方法 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410254061.0A CN104111971B (zh) | 2014-06-09 | 2014-06-09 | 过往微博数据收集与处理方法 |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104111971A CN104111971A (zh) | 2014-10-22 |
CN104111971B true CN104111971B (zh) | 2018-03-13 |
Family
ID=51708764
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410254061.0A Active CN104111971B (zh) | 2014-06-09 | 2014-06-09 | 过往微博数据收集与处理方法 |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104111971B (zh) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107480222B (zh) * | 2017-08-02 | 2018-07-03 | 中国科学院地理科学与资源研究所 | 基于微博数据的城市群空间联系强度测度系统 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102663101A (zh) * | 2012-04-13 | 2012-09-12 | 北京交通大学 | 一种基于新浪微博的用户等级排序算法 |
CN103092921A (zh) * | 2012-12-26 | 2013-05-08 | 中国科学院深圳先进技术研究院 | 一种面向微博热门话题社区的动态预测方法及系统 |
CN103279483A (zh) * | 2013-04-23 | 2013-09-04 | 中国科学院计算技术研究所 | 一种面向微博客的话题流行范围评估方法及系统 |
CN103324665A (zh) * | 2013-05-14 | 2013-09-25 | 亿赞普(北京)科技有限公司 | 一种基于微博的热点信息提取的方法和装置 |
CN103366017A (zh) * | 2013-08-02 | 2013-10-23 | 人民搜索网络股份公司 | 一种微博信息抓取方法及装置 |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20140047226A (ko) * | 2012-10-10 | 2014-04-22 | 한국전자통신연구원 | 이슈 일지를 제공하는 단말기, 이슈 일지를 생성하는 서버 및 이슈 일지 제공 및 생성 방법 |
-
2014
- 2014-06-09 CN CN201410254061.0A patent/CN104111971B/zh active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102663101A (zh) * | 2012-04-13 | 2012-09-12 | 北京交通大学 | 一种基于新浪微博的用户等级排序算法 |
CN103092921A (zh) * | 2012-12-26 | 2013-05-08 | 中国科学院深圳先进技术研究院 | 一种面向微博热门话题社区的动态预测方法及系统 |
CN103279483A (zh) * | 2013-04-23 | 2013-09-04 | 中国科学院计算技术研究所 | 一种面向微博客的话题流行范围评估方法及系统 |
CN103324665A (zh) * | 2013-05-14 | 2013-09-25 | 亿赞普(北京)科技有限公司 | 一种基于微博的热点信息提取的方法和装置 |
CN103366017A (zh) * | 2013-08-02 | 2013-10-23 | 人民搜索网络股份公司 | 一种微博信息抓取方法及装置 |
Non-Patent Citations (1)
Title |
---|
一种改进的微博用户影响力评价算法;王琛等;《信息工程大学学报》;20130615;第14卷(第3期);第380-384页 * |
Also Published As
Publication number | Publication date |
---|---|
CN104111971A (zh) | 2014-10-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104504024B (zh) | 基于微博内容的关键词挖掘方法及系统 | |
CN104111971B (zh) | 过往微博数据收集与处理方法 | |
Sengupta | Monument preservation and the vexing question of religious structures in colonial India | |
Mungal-Singh | United nations high level meeting and NCD in South Africa | |
Heo et al. | Feature extraction to detect hoax articles | |
Lichtwardt | Dacryodiomyces, a new genus of Harpellales in Chironomidae larvae | |
Devos | Negin Nabavi. Readership, the Press and the Public Sphere in the First Constitutional Era | |
O'Sullivan et al. | Telling Stories at DHSI: Interviews with Ray Siemens, Diane Jakacki, and Alyssa Arbuckle | |
Batt et al. | Building research capacity in paramedicine: the McNally Group | |
Block | The Land on Which We Live: Life on the Cariboo Plateau--70 Mile House to Bridge Lake. | |
Butler | Irish neo-paganism: worldview, ritual and identity | |
Mahardika | Abbreviations within military jargons in" Generation Kill" movie series | |
Revely-Calder | Violent as upturned books: A collection with'the barbed humour of the carnival'. | |
Bryant | Australia's Trumpian turn: The ruthless rise of Scott Morrison | |
Chen et al. | The media feature analysis of microblog topics | |
Grissmer | Sandcastles | |
Heather | Vandals | |
O'Donnell | Check in | |
Ritter | What the Women in My Family Do | |
Sinisi | Edward Dąbrowa. Hellenistic Elements in the Parthian Kingship: The Numismatic Portrait and Titolature | |
Wu | A study of the Zhiqing identity | |
Messina | Tadashi Tanabe. Diffusion of the Greek gesture of touching another’s chin with raised hand in the East | |
Sinisi | Edward Dąbrowa. ΑΡΣΑΚΕΣ ΘΕΟΣ. Observations on the nature of the Parthian ruler-cult | |
Soleo-Shanks | Natalie Crohn Schmitt. Befriending the Commedia dell'Arte of Flaminio Scala: The Comic Scenarios | |
Mcgrath | At home in Australia, New York and writing |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |