DBC file parsing and message analyzing method based on regular expression

A technology of message analysis and file parsing, which is applied in the field of CAN bus of new energy vehicles, can solve the problems of increased operation difficulty, waste of manpower and time costs, complexity and difficulty, etc., to reduce the probability of definition errors and quickly transplant Use and expandable effects

Active Publication Date: 2018-09-28
NANJING YUEBOO POWER SYST CO LTD
View PDF6 Cites 25 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, because the message IDs and bus data between controllers are different, the amount of data on the CAN network is very large, and it is difficult to manage the data on the CAN network and quickly extract the required data. Different understanding of the protocol will lead to different parsing methods for the same frame message, resulting in parsing errors
[0003] At present, the traditional message analysis method is to manually extract and then calculate, or write corresponding calculation scripts according to the communication protocol, and then complete the data calculation in the Excel table. This method needs to waste a lot of manpower and time. Moreover, it is easy to cause errors in the analyzed data due to operator errors and omissions, especially when the CAN network data sample is very large, the difficulty of operation will also increase
In addition, the method of scripting is not suitable for data analysis between different car models, because different scripts must be written for each communication protocol, and different scripts are applied for different communication protocols of different car models, which is complex and difficult. Poor compatibility, troublesome modification, and cannot support reverse analysis of data, cannot quickly recompose data into CAN network messages, and the application has limitations

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
  • DBC file parsing and message analyzing method based on regular expression

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0077] Embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings. Such as figure 1 Shown, method of the present invention comprises the following steps:

[0078] Step 1. Analyze the DBC file, read the DBC file in the form of text, and then use regular expressions to match, find the corresponding CAN network message block in the DBC file, and extract the corresponding CAN message ID and node name , message name, and then search down the content contained in the CAN network, extract the corresponding data type, start bit, bit length, offset, proportional coefficient, and analysis type, and store them in the structure array.

[0079] The CAN network message block in the DBC file is that a message will immediately follow a multi-line signal until another message is parsed, indicating that a CAN network message block ends, and when all lines are parsed, all CAN network message blocks are is parsed. It is ignored w...

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 DBC file parsing and message analyzing method based on a regular expression. In the method, a content of a DBC file is parsed through a processing method of matching and substituting of the regular expression, the parsed DBC data is used for analyzing a CAN message acquired from a finished automobile, a corresponding CAN network message block in the DBC file and signals contained in the CAN network message block are found according to a message ID, actual data is obtained through data type, start bit, bit length, offset, proportionality coefficient and parsing type ofthe CAN network message block, and the data is stored in a corresponding file. The method provided by the invention has excellent effects of being simple and highly expandable, not only being capableof performing CAN message parsing, but also being capable of performing acquisition and calibration of use completed data of protocols of XCP and CCP.

Description

technical field [0001] The invention relates to a DBC file analysis and message analysis method based on regular expressions, and belongs to the technical field of CAN bus of new energy vehicles. Background technique [0002] At present, with the development of new energy vehicle technology, the functions of the vehicle are becoming more and more complex, and the safety requirements are getting higher and higher, so more and more controllers are applied to the vehicle. In order to realize real-time communication between different controllers, CAN bus is also widely used. Through the CAN network, the data of different controllers are sent to the CAN bus with ID as the distinction, and the controller quickly finds the required data from the bus. The CAN bus has the functions of arbitration and inspection, which can ensure the accuracy of the data. Reliable and stable fieldbus. However, because the message IDs and bus data between controllers are different, the amount of data...

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): H04L29/06H04L12/40H04L29/08
CPCH04L12/40H04L67/12H04L69/22H04L2012/40215H04L2012/40273
Inventor 李占江高超蒋元广李麟朱震海
Owner NANJING YUEBOO POWER SYST CO LTD
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