# Analysis and Visualization of New Energy Vehicle Battery Data
## 4 Methods
### GB/T32960 Standard Introduction and Data Format Analysis
#### 4.1.2 Data Format Analysis  
GB/T 32960.3 specifies the protocol structure, communication connection, data packet structure and definition, data unit format, and definition in the electric vehicle remote service and management system. Before introducing the packet structure, first, the data types in the packet specified in the protocol are analyzed. The defined data types specify the composition of battery message information. The protocol has five data types: byte, word, dword, string, and byte[n]. It should be noted that the protocol uses the big end mode to transfer multi-byte data types.  
A complete data message consists of a start, command cell, unique vehicle identifier, data encryption method, data unit length, data unit and check code. A battery packet sent  
Figure 3: Structure of electric vehicle remote service and management system.  
from the vehicle terminal to the server side always follows the general structure, as shown in Table 1.  
The header of the packet is first composed of two ASCII characters '#', representing the beginning of the packet. Then, the definition of response ID and command ID is shown in Table 2.  
It can be seen that if it is a real-time information reporting frame, the third byte should be filled with 0 \(\times\) 02. Next, you should fill in the unique vehicle identification number, namely VIN (vehicle identification number). Because the information length is not fixed, the data unit length represents the length of the next data information, so that the server can find the end of the frame when parsing. This paper mainly discusses the protocol content and packet structure involved in the most commonly used real-time information reporting as an example.  
The real-time information reporting first includes the data collection time, which is represented by a 6-byte BCD code in the format of month, year, and day. Then is the information type; information type does not require the order and items can be freely combined. There are many types of information, such as vehicle data, drive motor data, fuel cell data, engine data, etc. See Table 3 for specific information type definitions. Finally, there is the message body, whose length and data type will vary depending on the type of message [23].  
\begin{table}
\begin{tabular}{c c c c} \hline
**Start Byte** & **Definition** & **Type of Data** & **Describe** \\ \hline
0 & Starter & STRING & Fixed to ASCII characters ‘#’ \\  & & & i.e., 0 \(\times\) 23, 0 \(\times\) 23 \\
2 & Command ID & BYTE & See Table 2 \\
3 & Response ID & BYTE & 0 \(\times\) FE: command packet, received \\  & & & Party does not answer \\
4 & VIN & STRING & Vehicle Unique VIN Car \\
21 & Data encryption method & BYTE & 0 \(\times\) 01: Data is not encrypted \\  & & & 0 \(\times\) 02: RSA encryption \\  & & & 0 \(\times\) 03: AES128 encryption \\
22 & Data unit length & WORD & Data Unit Length Total Words \\
24 & Data unit & COMPOUND & Divided into information type flag \\ Penultimate & Check code & BYTE & and information body \\ \hline \end{tabular}
\end{table}
Table 1: Packet structure definition.  
\begin{table}
\begin{tabular}{c c c} \hline
**Coding** & **Definition** & **Directions** \\ \hline
0 \(\times\) 01 & Vehicle login & Go up \\
0 \(\times\) 02 & Real-time information reporting & Up \\
0 \(\times\) 03 & Real-time information reporting & Up \\
0 \(\times\) 04 & Vehicle logout & Go up \\
0 \(\times\) 07 & Heartbeat & Go up \\
0 \(\times\) 08 & Terminal time & Up \\
0 \(\times\) 80 & Query command & Down \\
0 \(\times\) 81 & Set command & Down \\ \hline \end{tabular}
\end{table}
Table 2: Command identification.  
Because there are many types of information, this paper uses the vehicle data format for example analysis. The vehicle data format, fuel cell data, drive motor data and other information types are detailed in the literature [23].