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

Algorithm for realizing protocol coding and decoding based on message tree

A message tree, encoding and decoding technology, applied in the field of computer programming, to achieve the effect of convenient network transmission, convenient management, and strong usability

Pending Publication Date: 2021-09-07
北京固源网络科技有限公司
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] The purpose of the present invention is: in order to solve the problem of using computer language to guide the computer to complete specific tasks, and to make the computer operate according to the description of the computer language to complete the described specific work, and at the same time realize the encoding and decoding of the protocol, there is an urgent need for a message-based The problem of implementing the algorithm of protocol encoding and decoding by tree, and propose an algorithm based on message tree to implement protocol encoding and decoding

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
  • Algorithm for realizing protocol coding and decoding based on message tree
  • Algorithm for realizing protocol coding and decoding based on message tree
  • Algorithm for realizing protocol coding and decoding based on message tree

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0034] The present invention provides a technical solution: an algorithm for implementing protocol encoding and decoding based on a message tree, comprising the following steps:

[0035] S1. Write the rules;

[0036] S2. Naming, the protocol name is capitalized, followed by camel case or underscore, and finally ends with "pcode.def";

[0037] S3. The protocol is described in a tree structure, where the field value types are byte, byte[], bit, bit[], string, string[], word(2bytes), dword(4bytes), if the field is modified with const , which means that the field does not need to be fuzzed, the field value: value(), fill in the int value directly or fill in hexadecimal, the string needs to be wrapped in double quotes, and the field value functions include LengthOf, Add, Sub, ValueIn, ValueRange, MAC2int With IP2int, fields need to be written in 1234 order.

[0038] In this embodiment, an algorithm is generated by encoding and decoding the protocol, which is convenient for manage...

Embodiment 2

[0040] The present invention provides a technical solution: an algorithm for implementing protocol encoding and decoding based on a message tree, comprising the following steps:

[0041] S1. Write the rules;

[0042] S2. Naming, the protocol name is capitalized, followed by camel case or underscore, and finally ends with "pcode.def";

[0043] S3. The protocol is described in a tree structure, where the field value types are byte, byte[], bit, bit[], string, string[], word(2bytes), dword(4bytes), if the field is modified with const , which means that the field does not need to be fuzzed, the field value: value(), fill in the int value directly or fill in hexadecimal, the string needs to be wrapped in double quotes, and the field value functions include LengthOf, Add, Sub, ValueIn, ValueRange, MAC2int With IP2int, the fields need to be written in 1234 order;

[0044] S4, based on lark, use form_parser to generate json message tree description;

[0045] S5, perform lexical ana...

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 an algorithm for realizing protocol coding and decoding based on a message tree. The algorithm belongs to the technical field of computer programming, and comprises the following steps of: compiling rules, naming, capitalizing protocol names, adopting humps or underlines behind, unfolding and describing protocols according to a tree structure, constructing and generating json message tree description based on a lark, performing lexical analysis, running a definition analysis algorithm, and generating an algorithm. The algorithm is generated through protocol coding and decoding, is convenient to manage, high in usability and convenient for network transmission, and when data are not convenient to process and store, the data need to be coded, for example, characters are coded because the characters in a natural language are not convenient to process and store by a computer; picture information, video information and sound information are compressed, optimized and formatted, so that the quality of media resources is guaranteed, and network bandwidth and local storage space are saved as much as possible.

Description

technical field [0001] The invention belongs to the technical field of computer programming, and in particular relates to an algorithm for realizing protocol encoding and decoding based on a message tree. Background technique [0002] The meaning of encoding is the process of converting information from one form or format to another also known as the code of a computer programming language for short encoding. Generally, words, numbers or other objects are coded into numbers by a predetermined method, or information and data are converted into specified electrical pulse signals. Coding is widely used in electronic computers, televisions, remote controls and communications. Encoding is the process of converting information from one form or format to another. Decoding, as the name suggests, is the inverse process of encoding. [0003] In order to use computer language to guide the computer to complete specific tasks, and make the computer operate according to the description...

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): G06F40/205G06F40/284H04L29/06
CPCG06F40/205G06F40/284H04L69/04
Inventor 董坤
Owner 北京固源网络科技有限公司
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