检索规则说明:AND代表“并且”;OR代表“或者”;NOT代表“不包含”;(注意必须大写,运算符两边需空一格)
检 索 范 例 :范例一: (K=图书馆学 OR K=情报学) AND A=范并思 范例二:J=计算机应用与软件 AND (U=C++ OR U=Basic) NOT M=Visual
作 者:田丹 张金杰 李翀[2,3] 曲艳华 焦昊 Tian Dan;Zhang Jinjie;Li Chong;Qu Yanhua;Jiao Hao(Sinosteel Group Corporation Limited,Beijing 100180,China;Computer Network Information Center,Chinese Academy of Sciences,Beijing 100190,China;University of Chinese Academy of Sciences,Beijing 100049,China;Strategic Support Force Space Systems Division,Beijing 100094,China)
机构地区:[1]中国中钢集团有限公司,北京100180 [2]中国科学院计算机网络信息中心,北京100190 [3]中国科学院大学,北京100049 [4]战略支援部队航天系统部,北京100094
出 处:《数据与计算发展前沿》2020年第4期155-164,共10页Frontiers of Data & Computing
摘 要:【背景】Protobuf和JSON是目前两种主流网络数据结构,有着各自的特点和应用场景,随着互联网应用的场景复杂,不同场景下数据交换上有了新的要求。JSON主要应用于Web浏览器到服务器数据传输,Protobuf主要用于客户端到服务器端高效安全数据传输。【目的】若能实现两者的转换,可以促进数据交互,极大地提高开发效率。【方法】本文基于动态解析和类型反射技术,实现了Protobuf和JSON数据动态转换,并搭建测试平台和编写测试用例进行了验证。【结果】实验表明,该方法可靠稳定兼容性好,在测试用例不同测试数据下转换效率保持20MB/s,Protobuf 2和Protobuf 3均可正常转换。[Background]Two mainstream network data structures,Protobuf and JSON,have their own characteristics and application scenarios.With the growing complexity of network applications,data exchanges under different scenarios are required.In traditional,JSON is mainly used for data transmission from the Web browser to the server,while Protobuf is mainly for efficient and safe data transmission from clients to servers.[Objective]Thus,if the data format of JSON and Protobuf exchange can be achieved,it will promote data interactions and greatly improve development efficiency.[Methods]This article implements the dynamic data conversion method to convert Protobuf data to JSON format based on dynamic parsing and type reflection technologies.Besides,a test platform with multiple test cases for verifications has been built.[Results]Experiments show the proposed method is reliable and stable with good compatibility.The conversion capacity maintains at 20MB/s under different test data of the test cases for both Protobuf 2 and Protobuf 3.
关 键 词:Protobuf JSON 转换 动态解析 类型反射
分 类 号:TP311.12[自动化与计算机技术—计算机软件与理论]
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在链接到云南高校图书馆文献保障联盟下载...
云南高校图书馆联盟文献共享服务平台 版权所有©
您的IP:216.73.216.28