Generalized data analysis method based on xml file

A data analysis and generalization technology, applied in the field of data processing, can solve the problems of unapplied code and cumbersome process, and achieve the effect of expanding the scope of application and enhancing the versatility

Inactive Publication Date: 2019-11-15
NANJING UNIV OF SCI & TECH
View PDF0 Cites 7 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

This method often requires modifying the software code every time a protocol is parsed. This process is cumbersome, and when there is no compilation environment on the device, the modified code will not be applicable.
In the communication system, multiple devices need to be monitored, and the communication protocols between different devices are also different, so this single data analysis method is far from meeting the needs

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
  • Generalized data analysis method based on xml file
  • Generalized data analysis method based on xml file
  • Generalized data analysis method based on xml file

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0041] A generalized data parsing method based on xml files, comprising the steps of:

[0042] Step 1, by analyzing the communication protocol, each field of the communication protocol includes: features such as name, length (number of bytes), type, etc., the length has 1, 2, 4 bytes, and the type has unsigned integer (UINT), Integer (INT), floating point (FLOAT), unsigned floating point (UFLOAT), enumeration (ENUM), hexadecimal output (HEX), address (ADDRESS) and other types.

[0043] Step 2. Write the communication protocol into a corresponding xml file according to the determined field characteristics; write the xml file whose root element includes file, identification, SID, and DID attributes according to the protocol, and the format is as follows:

[0044] Table 1 xml file format

[0045]

[0046]

[0047] Step 3, create the target file file.txt according to the file attribute of the root element of the xml file, and write the name attribute of each element in the ...

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 provides a generalized data analysis method based on an xml file. The generalized data analysis method comprises the following steps: determining characteristics of each field in a communication protocol; writing a communication protocol into a corresponding xml file; creating a target file according to the root element of the xml file, and writing the field name of each element in the xml file into the target file as a header; storing the message in a binary form, selecting a message file to be analyzed, and finding the message meeting the xml file description according to the xml file root element; and sequentially reading each element of the xml file, reading the data with the corresponding length in the message according to the length attribute of the element, analyzing the data according to the data type attribute, and storing the analyzed data into the target file until the end label of the root element is read. According to the generalized data analysis method, theproblem that analysis software needs to be modified for each protocol is solved, and the universality is enhanced, and the data can be accurately analyzed as long as the xml file conforming to the rule is compiled.

Description

technical field [0001] The invention belongs to data processing technology, in particular to a generalized data parsing method based on xml files. Background technique [0002] At present, the main way to analyze data at home and abroad is to encode each protocol. When parsing, the received binary file is parsed into a natural language file according to the length, name, type and other information of each field in the code. This method often requires modifying the software code every time a protocol is parsed. This process is cumbersome, and when there is no compilation environment on the device, the modified code will not be applicable. In a communication system, multiple devices need to be monitored, and the communication protocols between different devices are also different, so this single data analysis method is far from meeting the needs. Contents of the invention [0003] The purpose of the present invention is to propose a generalized data parsing method based on ...

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): G06F16/80G06F16/16
CPCG06F16/16G06F16/80
Inventor 王升王军
Owner NANJING UNIV OF SCI & TECH
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