多种技术融合的API接口数据采集策略
Data Acquisition Strategy of API Interface Based on Multi-Technology Integration
DOI: 10.12677/CSA.2020.1011203, PDF,    国家自然科学基金支持
作者: 杨 光, 吴明芬*:五邑大学智能制造学部,广东 江门
关键词: 数据开放共享数据采集API接口自动化测试最优线程Open Data Sharing Data Collection API Interface Automated Testing Optimal Thread
摘要: 数据开放共享在大数据时代变得越来越重要,API接口在数据共享上扮演着重要的角色,如何从开放共享的API接口快速、高效、便捷地获取数据是迫切需要解决的问题。本文从实用性的角度出发,融合了自动化测试技术、最优线程、Python和ETL技术等,构建了一种基于API接口的数据采集策略,该策略采集速度快、操作简单、线程可控制并推导出数据采集时间公式,该公式在5个线程以上准确率达90%以上,在7~8个线程准确率达97%,在9~10个线程准确率可达99%,在采集之前就可通过该公式以最合理的线程计算出最合理的采集时间,极大地节省采集时间。
Abstract: Data open sharing is becoming more and more important in the era of big data. API interfaces play an important role in data sharing. How to quickly, efficiently and conveniently obtain data from open and shared API interfaces is an urgent problem to be solved. From the perspective of practicability, this article integrates automated testing technology, optimal threading, Python and ETL technology, etc., and constructs a data collection strategy based on API interface, which has fast collection speed, simple operation, thread control and deducing and formulating the formula of data collection time. This formula has an accuracy rate of more than 90% for more than 5 threads, an accuracy rate of 97% for 7 - 8 threads, and an accuracy rate of 99% for 9 - 10 threads. Through this formula, the most reasonable acquisition time is calculated with the most reasonable thread, which greatly saves the acquisition time.
文章引用:杨光, 吴明芬. 多种技术融合的API接口数据采集策略[J]. 计算机科学与应用, 2020, 10(11): 1927-1937. https://doi.org/10.12677/CSA.2020.1011203

参考文献

[1] 王震, 周颖, 黄赪东, 等. 面向大数据应用的区块链解决方案综述[J]. 计算机科学, 2019, 46(S1): 6-10.
[2] 李迅雷, 徐驰. 以“新基建”推进国家治理现代化[J]. 人民论坛∙学术前沿, 2020(10): 70-74.
[3] 谢裕清, 王渊, 江樱, 等. 便于数据共享的电网数据湖隐私保护方法[J/OL]. 计算机工程与应用: 1-9. http://kns.cnki.net/kcms/detail/11.2127.TP.20200429.0920.004.html, 2020-06-25.
[4] Reinsel, D., Gantz, J. and Ry-dning, J. IDC-全球白皮书《世界的数字化从边缘到核心》[EB/OL]. 2018-11-08.
https://www.doc88.com/p-7876468738713.html, 2020-9-14.
[5] 赵颖, 侯俊杰, 于成龙, 徐皓, 张伟. 面向生产管控的工业大数据研究及应用[J]. 计算机科学, 2019, 46(S1): 45-51.
[6] 李正, 吴敬征, 李明树. API使用的关键问题研究[J]. 软件学报, 2018, 29(6): 1716-1738.
[7] 妮可的平凡时光. 如何使用API爬取数据, 它和网页爬虫有什么区别? [EB/OL].
https://blog.csdn.net/weixin_43944997/article/details/105502469, 2020-9-14.
[8] 王科特, 王力生. 信号实时采集系统的最佳并行线程数的研究[J]. 计算机应用, 2011, 31(10): 2593-2596.
[9] 朱晓姝, 许桂秋. 大数据预处理技术[M]. 人民邮电出版社: 北京, 2019: 14-41.
[10] 王华志. 基于JSON的异构数据源数据交换技术研究[D]: [硕士学位论文]. 武汉: 武汉理工大学, 2015.
[11] 忧伤的比目鱼. XML与JSON比较[EB/OL].
https://blog.csdn.net/luoyoub/article/details/80290145, 2020-9-14.
[12] 高升. 基于JSON的数据库访问层研究与应用[D]: [硕士学位论文]. 北京: 北方工业大学, 2019.
[13] 张明, 程宝雷, 査伟忠, 等. 面向安卓手机App功能测试技术的方法[J]. 计算机工程与设计, 2018, 39(3): 684-689.
[14] 谢业欣. 一个基于数据共享的接口开发平台[J]. 软件, 2020, 41(8): 152-157.
[15] Goetz, B., Peierls, T., Bloch, J., et al. (2006) Java Concurrency in Practice. Addison-Wesley Educational Publishers Inc., New York, 182-190.
[16] 杜晓旭, 贾小云. 基于Python的新浪微博爬虫分析[J]. 软件, 2019, 40(4): 182-185.
[17] 刘鹏, 张燕. 数据清洗[M]. 北京: 清华大学出版社, 2018: 199-222.
[18] 郭丹, 樊红. 基于ETL-KETTLE的贵州卷烟营销大数据分析及可视化[J]. 计算机系统应用, 2017, 26(1): 74-80.