Data format conversion method and device

A data format conversion and data technology, which is applied in the field of network communication, can solve the problems of complicated and cumbersome data format conversion process and low efficiency, and achieve the effect of improving efficiency and simplicity, high efficiency and reducing the probability of errors.

Pending Publication Date: 2020-03-31
CHINA MOBILEHANGZHOUINFORMATION TECH CO LTD +1
View PDF4 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] Embodiments of the present invention provide a data format conversion method and device to solve the prob

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Data format conversion method and device
  • Data format conversion method and device
  • Data format conversion method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0043] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

[0044] Protobuf (Protocol Buffers) is a portable and efficient structured data storage format developed by Google. It can be used in communication protocols and data storage. Protobuf data has the advantages of strong scalability and fast analysis speed.

[0045] Json (JavaScript Object Notation) is a lightweight data exchange format. Json adopts a completely language-independent text format, making Json an ideal data exchange language. It is ea...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention relates to the field of network communication, in particular to a data format conversion method and a device, and the method comprises the steps: obtaining a Proto file, compiling the Proto file, and obtaining a Java file corresponding to the Proto file; wherein the Proto file is a definition file of the Proto buf data; based on a java-based reflection mechanism, according to Json data, constructing a message object corresponding to a preset message name, serializing the message object; converting Json data into Probuf data; and carrying out deserialization on the Probuf data toobtain a message object, converting the Probuf data into the Json data, so that during compiling, the Probuf data is compiled into the Java file, compiling is simple, errors are not prone to occurring, mutual conversion of the Probuf data and the Json data is achieved on the basis of a Java reflection mechanism, and efficiency is improved.

Description

technical field [0001] The invention relates to the field of network communication, in particular to a data format conversion method and device. Background technique [0002] Protobuf (Protocol Buffers) is a portable and efficient structured data storage format developed by Google. It can be used in communication protocols and data storage. Protobuf has the advantages of strong scalability and fast analysis speed, but Protobuf format data The construction and analysis process of is cumbersome and complicated. Json (JavaScript ObjectNotation) is a lightweight data exchange format that is easy for users to read and write. In practice, different data formats may need to be selected according to different needs and scenarios. [0003] A method for converting Protobuf data and Json data is provided in the prior art, mainly for converting the Proto file into a FileDescriptor file through a series of compiling processes, including lexical, grammatical, and semantic analysis, where...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G06F16/25G06F8/41
CPCG06F8/41Y02D10/00
Inventor 杨莉金剑超
Owner CHINA MOBILEHANGZHOUINFORMATION TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products