Check patentability & draft patents in minutes with Patsnap Eureka AI!

Data serialization method for Internet of Things equipment communication

A technology for IoT devices and data, which is applied in the direction of link quality-based transmission modification, digital transmission system, and channel coding adjustment. , the parsing speed is fast, the effect of small footprint

Inactive Publication Date: 2020-02-21
WUHAN WUTOS
View PDF6 Cites 6 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Struct uses the most basic structure for transmission. The client and server use the same structure, and convert the transmitted data stream into a structure for use. This seems to be the most simple and direct, but when encountering variable-length data, it must The maximum length must be considered, that is to say, the protocol must be sent with the maximum length every time, which not only takes up more storage, but also takes up more bandwidth during data transmission
In summary, the existing data serialization encoding and decoding process requires a large amount of memory, and must dynamically allocate memory, which cannot be applied to embedded systems that need to represent complex data structures but have very limited memory and code space

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 method for Internet of Things equipment communication
  • Data serialization method for Internet of Things equipment communication
  • Data serialization method for Internet of Things equipment communication

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0030] Such as figure 1 As shown, a data serialization method for IoT device communication of the present invention includes the following steps:

[0031] S1. Obtain the data packet to be processed, and read the data in the data packet to be processed;

[0032] S2. Encode according to the data type of the data in the data packet using a preset data encoding method, and serialize and store the encoded data.

[0033] Further preferably, the data in the data packet includes a type code ID and an element value for distinguishing each data type.

[0034] Further preferably, the data types of the data in the data packet include basic data types and composite data types; wherein, the basic data types include Boolean data, integer data, floating point data, character data and byte stream data; composite data Types include arrays and objects.

[0035] Further preferably, the array includes an array of objects and an array of basic types; wherein, the array of objects includes a plur...

Embodiment 2

[0038] On the basis of Embodiment 1, the data types of this embodiment are basic data types, and basic data types include Boolean data, integer data, floating point data, character data and byte stream data, wherein Boolean data , Integer data and floating-point data have a fixed value length, while character data and byte stream data have a variable length. Therefore, in this embodiment, two encoding methods are divided according to whether the value length is fixed or not.

[0039] When the data is a type with a fixed value length, that is, when the data type in the data packet is Boolean data, integer data or floating point data, the preset data encoding method is: Boolean data, integer data or Encoding ID of floating-point data plus data value. Among them, the encoding ID and value are as follows.

[0040]

[0041] When the data type is a type whose value length is not fixed, that is, when the data type in the data packet is character data or byte stream data, the pre...

Embodiment 3

[0044] On the basis of Embodiment 1, this embodiment provides an encoding method for data types. Wherein, the object includes multiple fields whose data types are basic data types, arrays or objects.

[0045] When the data type of the data in the data packet is an object, the preset data encoding method is: the encoding ID of the object + the total length of the encoding + the number of fields + each field encoding; where the format of each field encoding is: field serial number + field encoding, The encoded ID of the object is 0. Since the types of each field can be different, the type of each field can be a basic data type, an array, or an object, and the value of the field can be empty. Therefore, the field encoding here is basic data type encoding, array encoding or object encoding. If the field is a basic data type, refer to Embodiment 2 for field encoding. If the field is an array, the field encoding reference

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

According to the data serialization method for communication of the Internet of Things equipment, the basic data type and the field of the object are provided with type code IDs, so that after the field is newly added, a receiver can analyze the value of the newly added field as well; if the type of the field of the object is the object; if so, referred to as a nested object, wherein the object code has the total length of the code; for a nested object, the next field can be skipped to by adding the total length to the current offset without analysis, so that quick analysis can be realized, the object on the outermost layer is analyzed at a data entry and then distributed to each sub-module, and each sub-module analyzes the interested object, thereby being beneficial to reducing module coupling and being high in analysis speed; because binary coding is adopted, the occupied space is smaller than that of character string coding.

Description

technical field [0001] The present invention relates to the field of device communication of the Internet of Things, in particular to a data serialization method for device communication of the Internet of Things. Background technique [0002] At present, when it comes to the information interaction between different devices, such as the interaction between the client and the server, the data to be transmitted needs to be encoded according to the specified protocol and then transmitted. At present, the encoding definition of the protocol message mainly includes XML (can be Extensible Markup Language, Extensible Markup Language), JSON (JavaScript ObjectNotation), Protocol Buffers (a data description language) and data structure (using the data block defined by the structure in C&C++ language, defined by struct) and so on. [0003] When using XML for data interaction, it is more convenient to debug, but both the server and the client need to spend a lot of code to parse the XM...

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
Patent Type & Authority Applications(China)
IPC IPC(8): H04L1/00H04L29/06H04L29/08
CPCH04L1/0009H04L67/12H04L69/22H04L67/5651
Inventor 张浩霖欧涛涛杨智龙张金平杨刘阳周扬胡铁
Owner WUHAN WUTOS
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More