Method and apparatus for serialization and deserialization

A deserialization and type technology, applied in the computer field

Active Publication Date: 2019-01-01
GUANGZHOU DUOYI NETWORK TECH +2
View PDF11 Cites 14 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0041] The purpose of the embodiments of the present invention is to provide a serialization and deserialization method and device, which can effecti...

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
  • Method and apparatus for serialization and deserialization
  • Method and apparatus for serialization and deserialization
  • Method and apparatus for serialization and deserialization

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0082] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to 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 creative efforts fall within the protection scope of the present invention.

[0083] see figure 2 , is a schematic flowchart of a serialization and deserialization method provided in Embodiment 1 of the present invention, including steps:

[0084] S1. In response to the serialization instruction, traverse all the source codes in the preset project, obtain the types of all objects in the source code, and serialize objects of different types according to the preset first rule; wherein, when the When the object is a preset type, ...

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 discloses a serialization and deserialization method. The method comprises: in response to a serialization instruction, all source codes in a preset project are traversed, the types of all objects in the source codes are obtained, and different types of objects are serialized according to a preset first rule; in response to the serialization instruction, all source codes in the preset project are traversed; wherein, when the object is of a preset type, serialization is performed according to a preset unique identifier and a mapping relationship of the object; deserializing different types of fields according to a preset second rule in response to the deserialization instruction; wherein, when a unique identifier is read, a field of a corresponding type is deserialized according to a mapping relationship between the unique identifier and the object. The invention can effectively solve the problem that the prior serialization technology can only serialize the tree data, andrealize automatic serialization of the graph data.

Description

technical field [0001] The invention relates to the field of computers, in particular to a serialization and deserialization method and device. Background technique [0002] Data serialization technology is widely used in various data interaction scenarios. For example, network transmission, data storage, reading and writing of configuration files, etc. The application scenarios of different serialization technologies are also different. The serialization methods in the prior art can mainly have the following types. [0003] 1. JSON serialization: This technology can directly serialize a structure A by calling a function. This technology uses the reflection method to traverse all the fields of structure A and perform serialization. The advantage is that it can be automatically serialized without defining additional data structure B. The disadvantage is that due to the implementation of reflection, the speed is slow, and only public fields can be serialized (private fields ...

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): G06F9/448G06F9/30
CPCG06F9/30087G06F9/4493
Inventor 徐波
Owner GUANGZHOU DUOYI NETWORK TECH
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