Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Protocol encoding and decoding method based on protocol model

An encoding and decoding method and protocol technology, applied in the field of communication and control, can solve the problems of unfavorable code maintenance, update and upgrade, poor reusability, and high redundancy, and achieve easy maintenance, update and upgrade, good reusability, and code reduction. The effect of quantity and redundancy

Inactive Publication Date: 2010-10-06
WUHAN HONGXIN TELECOMM TECH CO LTD
View PDF2 Cites 9 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The traditional protocol encoding and decoding method is to encode and decode the byte order specified in the protocol from front to back in the protocol frame byte by byte, because the code needs to be written byte by byte for the protocol frame during encoding, and for repeated and repeated occurrences in the protocol For bytes with the same format (such as 1-byte unsigned integer, Boolean, etc.), it is still necessary to write code again, so this protocol encoding and decoding method has a large amount of code, high redundancy, and poor reusability
In addition, when the protocol changes, this method of protocol encoding and decoding needs to rewrite and change the code, which is not conducive to code maintenance and update

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
  • Protocol encoding and decoding method based on protocol model
  • Protocol encoding and decoding method based on protocol model
  • Protocol encoding and decoding method based on protocol model

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0015] Embodiments of the present invention will now be described with reference to the drawings, in which like reference numerals represent like elements.

[0016] Such as figure 1 In this embodiment, the protocol encoding and decoding method based on the protocol model includes the following steps:

[0017] Step S1, classify the data of the protocol content, use the same kind of data as a data type field, express the protocol content as a plurality of continuous data type fields, and form a protocol model.

[0018] Step S2, in order from front to back, sort the data type fields of the protocol model to obtain the sequence number of the data type field (starting from 1), summarize the data length of the data type field with the sequence number, and use the record form Store the protocol model to obtain the protocol model record table. Each record in the protocol model record table describes a data type field in the protocol model, including the sequence number, data type, an...

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 protocol encoding and decoding method based on a protocol model. The method comprises the steps of: classifying data of protocol contents into data tyep fields so as to form a protocol model consisting of the data type fields; storing the protocol model by the linking modes of sequencing numbers, data types and data lengths of the data type fields; encoding the numerical values of corresponding data type fields according to the sequencing numbers, the data lengths and the data types in the protocol model so as to form protocol frames after protocol encoding; and reverse decoding the data of the corresponding protocol frames according to the data lengths and the data types so as to obtain the protocol frames after the protocol decoding. The method carries out protocol encoding and decoding on the basis of the protocol model, has small code quantity, low redundancy and good reusability during encoding and can carry out program upgrade and maintenance.

Description

technical field [0001] The invention relates to a processing method related to protocols in the field of communication and control, in particular to a codec method of the protocol. Background technique [0002] Protocol encoding and decoding is a process involved in interactive communication and control applications based on protocols. A general protocol definition adopts a byte-oriented form, and data containing various contents is defined as a byte form organized in a protocol frame, and arranged sequentially from front to back in the protocol frame. The traditional protocol encoding and decoding method is to encode and decode the byte order specified in the protocol from front to back in the protocol frame byte by byte, because the code needs to be written byte by byte for the protocol frame during encoding, and for repeated and repeated occurrences in the protocol For bytes with the same format (such as 1-byte unsigned integer, Boolean, etc.), codes still need to be wri...

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/00
Inventor 舒念
Owner WUHAN HONGXIN TELECOMM TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products