Processing method and device of protocol interpreter

A protocol parsing and processing method technology, applied in the field of protocol parser processing methods and devices, can solve the problem of high cost, and achieve the effects of reducing maintenance costs, improving development efficiency, and increasing security

Inactive Publication Date: 2013-05-08
AEROSPACE SCI & IND SHENZHEN GROUP
View PDF4 Cites 12 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] The technical problem to be solved by the present invention is to provide a processing method and device for a protocol parser in view of the high cost of the hard-coded method in the prior art. The method of assignment automatically encapsulates the message i

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
  • Processing method and device of protocol interpreter
  • Processing method and device of protocol interpreter

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0039] see figure 1 , figure 1 It is a flow chart of the processing method of the protocol parser of the present invention, such as figure 1 As shown, the processing method includes the following steps:

[0040] In step S0, the configuration information of the message to be parsed is added to the message frame configuration table and the message detailed configuration table respectively; specifically, the configuration information of the message to be parsed is added to the message In the text frame configuration table and message detailed configuration table, because the database generally saves the configuration information of the message to be parsed in the form of a table, that is, each row represents a record. It should be noted that this step can be omitted if the configuration information of the message to be parsed has been added to the above message frame configuration table and message detailed configuration table.

[0041] In step S1, the class information cor...

Embodiment 2

[0047] The programming language is JAVA, the declared object is MeteorologicalData, and the class field information is java.lang.Integer as an example to illustrate the processing method of the protocol analysis processor.

[0048] In step S1, the class information com.casic.ca2000.MeteorologicalData corresponding to the message to be parsed is read from the message frame configuration table.

[0049] In step S2, the MeteorologicalData object of the class information is declared through the reflection mechanism of the programming language.

[0050] In step S3, the class field information java.lang.Integer corresponding to the message to be parsed is read from the message detailed configuration table.

[0051] In step S4, obtain all attributes of the object MeteorologicalData according to the reflection mechanism, and assign values ​​to each attribute of the object MeteorologicalData according to the class field information java.lang.Integer, each attribute in the object Meteorol...

Embodiment 3

[0055] see figure 2 , figure 2 is a schematic structural diagram of the processing device of the protocol parser of the present invention, such as figure 2 As shown, the protocol parser has a built-in message frame configuration table and a detailed message configuration table, and the processing device includes:

[0056] The adding module 100 is configured to add the configuration information of the message to be parsed to the message frame configuration table and the message detailed configuration table in a record manner. It should be noted that if the configuration information of the message to be parsed has already been added to the above-mentioned message frame configuration table and message detailed configuration table, the adding module 100 can be omitted.

[0057] The first reading module 200 is connected with the adding module 100 and is used for reading the class information corresponding to the message to be parsed from the message frame configuration table. ...

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 processing method and a device of a protocol interpreter. The protocol interpreter is externally provided with a message frame configuration table and a message detailed configuration table. The processing method comprises the steps of reading class information corresponding to a message to be analyzed from the message frame configuration table, stating an object of the class information through a reflex mechanism of a programming language, reading class field information corresponding to the message to be analyzed from the message detailed configuration table, obtaining all attributes of the object according to the reflex mechanism and carrying out assignment on all attributes of the object according to the class field information, and returning to the object, wherein assignment is carried out on the object. Through the message frame configuration table and the message detailed configuration table, the message is automatically encapsulated to be a class object in an application program according to the reflex mechanism of the programming language. The processing method and the device of the protocol interpreter not only reduce maintenance cost and code writing complexity but also increase security of a core code, and therefore development efficiency of a project is improved.

Description

technical field [0001] The invention relates to the field of protocol analysis, in particular to a processing method and device for a protocol parser. Background technique [0002] At present, some internal communications, especially for internal transmission of character data and communications that do not require high communication security, often reduce the complexity of the protocol structure, and usually use a simple message structure, such as using the Special characters (such as commas, semicolons, etc.) are used to separate data boundaries, instead of using the fixed-length message frame structure shown in Table 1: [0003] Table 1 [0004] header message length frame type message type message content Check Digit 2Byte 2Byte 1Byte 1Byte lengthen 2Byte [0005] For the above messages that use special characters to separate the boundaries of each data, when currently parsing the protocol and converting it into a class object in t...

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): H04L29/06
Inventor 朱泽才
Owner AEROSPACE SCI & IND SHENZHEN GROUP
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