Data serialization and deserialization method and device

A deserialization and data technology, applied in the field of data processing, can solve the problems of poor versatility, low serialization and deserialization efficiency, and high cost

Pending Publication Date: 2021-01-12
ZHUZHOU CSR TIMES ELECTRIC CO LTD
View PDF0 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] In view of the above problems, this application provides a method and device for serialization and deserialization of data, which solves the problem of poor versatility due t...

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 serialization and deserialization method and device
  • Data serialization and deserialization method and device
  • Data serialization and deserialization method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0051] figure 1 A schematic flow chart of a data serialization method provided in the embodiment of this application, such as figure 1 As shown, this method includes:

[0052] S101. Structure the data to be serialized according to the preset data structure format of elements, objects, and packages to obtain structured data.

[0053] In step S101, the structural format of the package includes a package description header, package tags and one or more objects, the structural format of the objects includes an object tag and a plurality of elements or sub-objects, and the structural format of the elements Contains an element label and element data.

[0054] S102. Convert the structured data into a byte data stream to complete serialization.

[0055] It should be noted that elements in this application can represent the data content of any data type, and at the same time support user-defined elements; an object can contain multiple elements or other objects, and each element is ...

Embodiment 2

[0127] Figure 11 A schematic flow chart of a data deserialization method provided in the embodiment of this application, as shown in Figure 11 As shown, the method includes:

[0128] S201. Convert data to be deserialized from a byte data stream into structured data.

[0129] S202. Perform data extraction on the structured data according to a preset data structure format of elements, objects, and packages, obtain data content included in the structured data, and complete deserialization.

[0130] Wherein, the structural format of the package includes a package description header, a package tag and one or more objects, the structural format of the object includes an object tag and a plurality of elements or sub-objects, and the structural format of the element includes an element tags and element data.

[0131] It should be noted that the serialization process is the process of arranging the data to be serialized in bytes according to the element structure; the deserializat...

Embodiment 3

[0135] Based on the data serialization method disclosed in the above-mentioned embodiments of the present invention, Figure 12 Specifically disclosed is a data serialization device applying the data serialization method.

[0136] Such as Figure 12 As shown, the embodiment of the present invention discloses a data serialization device, which includes:

[0137] The structuring unit 301 is used to structure the data to be serialized according to the preset data structure format of elements, objects, and packages to obtain structured data; wherein, the structure format of the package includes a package description header, package label and one or more objects whose structural format includes an object tag and a plurality of elements or sub-objects whose structural format includes an element tag and element data.

[0138] The conversion unit 302 is configured to convert the structured data into a byte data stream to complete serialization.

[0139] Optionally, the elements, ob...

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 technical field of data processing, in particular to a data serialization and deserialization method and device, and solves the problems of relatively poor universality and relatively high cost caused by relatively low serialization and deserialization efficiency, no unified specification and repeated development in related technologies. The method comprises the following steps: structuring data to be serialized according to a preset data structure format of elements, objects and packets to obtain structured data; and converting the structured data into a byte datastream to finish serialization. According to the invention, data structuralization is carried out through combination of different levels of elements, objects, packets and the like, so that serialization of the data is realized, the elements, the objects and the packets in standard formats are adopted to carry out data structuralization on the data, and the invention has relatively high applicability and universality, can be suitable for serialization of data contents in most real-time systems, does not need repeated development, and can realize great cost reduction.

Description

technical field [0001] The present application relates to the technical field of data processing, in particular to a data serialization and deserialization method and device. Background technique [0002] Data serialization means that during data transmission, the data structure or object needs to be encoded, and then transmitted according to this encoding in the network or other transmission media, and the data receiver needs to decode according to the corresponding deserialization rules , get the data. Similarly, in the process of data storage, serialization and deserialization methods are also required to store the serialized data in a storage medium that is not easy to lose, and to decode the serialized data in the storage medium when the data needs to be obtained Get raw data. [0003] Currently common serialization and deserialization methods, such as data exchange (JavaScript Object Notation, JSON), Extensible Markup Language (Extensible Markup Language, XML), etc.,...

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/2455G06F16/2458
CPCG06F16/24568G06F16/2474
Inventor 李雪江李子先李龙标任三刚郝洪伟谢佳彬唐鸿华杨栋新岳佳锋
Owner ZHUZHOU CSR TIMES ELECTRIC 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