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
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
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...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com