Communication data and fault record display method and device based on CAN

Through the combination of CAN communication module, NVS storage module and LVGL interface module, the visualization and user experience problems of CAN bus data display are solved, rapid processing of CAN bus data and instant fault feedback are realized, and fault diagnosis and processing efficiency are improved.

CN118567644APending Publication Date: 2024-08-30SHENZHEN SILICON MOUNTAIN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410736749.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-07
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

When the existing technology uses text or digital display devices to display the data transmitted by the CAN bus, there are limitations in the degree of visualization and user experience. It is difficult to intuitively convey the meaning and correlation of the data, and it lacks immediate and intuitive fault prompts and feedback. mechanism, leading to inefficiency in fault diagnosis and processing.

Method used

The display method of communication data and fault records based on CAN is adopted, and the graphical display of data and instant feedback of fault messages are realized through the combination of CAN communication module, NVS storage module and LVGL interface module. The CAN communication module is responsible for data sending and receiving. The NVS storage module stores data and fault codes in the form of key-value pairs. The LVGL interface module creates a variety of control combinations through the graphics library to realize interface beautification and data display refresh. The FreeRTOS task module uses task management and Message queue performs message notification and data delivery.

Benefits of technology

It achieves rapid processing of CAN bus data and instant, intuitive fault feedback, improves the operator's visualization and user experience, and improves fault diagnosis and processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118567644A
    Figure CN118567644A
Patent Text Reader

Abstract

The invention relates to the technical field of graphical interface design, and particularly discloses a CAN-based communication data and fault record display method and device, and the device comprises a CAN communication module, an NVS storage module, an LVGL interface module and a FreeRTOS task module. The CAN bus data processing system is connected with the CAN bus equipment, the CAN communication module in the CAN bus data processing system is used for sending a specific ID number to the CAN bus equipment and waiting for reply of the CAN bus equipment, and different task processes are executed by taking a data frame in data and a first byte and a second byte of a data field as judgment bases, so that the CAN bus data are processed; therefore, rapid processing of CAN bus data transmission data is realized, the LVGL interface module is matched to timely and visually feed back fault data, and the visualization degree of operators and the user experience are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of graphical interface design, and in particular to a method and device for displaying communication data and fault records based on CAN. Background Art

[0002] An embedded system refers to a device that consists of hardware and software and can operate independently. The software content includes the software operating environment and its operating system, and the hardware content includes signal processors, memory, communication modules, etc. In embedded systems, especially in modern industry and automobile fields, CAN bus has become a common data communication protocol. CAN is the abbreviation of Controller Area Network, which is an ISO internationally standardized serial communication protocol. There are various electronic control systems in the world. Due to the different types of data used in communication between systems and the requirements for reliability, there are many cases where multiple buses are used, and the number of wiring harnesses also increases accordingly. Through the CAN bus, various devices and control units can achieve efficient data exchange. These data cover a wide range from sensor data to control commands. Therefore, it is crucial for engineers and operators to effectively monitor and understand the data transmitted through the CAN bus.

[0003] At present, the commonly used method is to display the data transmitted by the CAN bus through simple text or digital display devices. However, this display method has certain limitations in terms of visualization and user experience, and it is difficult to intuitively convey the meaning and association of the data. At the same time, in terms of fault detection, the existing systems often lack immediate and intuitive fault prompts and feedback mechanisms, resulting in inefficient fault diagnosis and processing. Summary of the invention

[0004] The purpose of the present invention is to provide a method and device for displaying communication data and fault records based on CAN, so as to solve the problems in the above-mentioned background technology that the display of data transmitted by CAN bus using text or digital display devices has limitations in visualization and user experience.

[0005] To achieve the above object, the present invention provides the following technical solutions: A method for displaying communication data and fault records based on CAN, comprising: The CAN communication module connects to the CAN bus device, sends the ID number, and then waits for a reply to achieve data transmission, data reception, and data processing; The NVS storage module allocates space to store the communication data address, communication data description and fault code description string in the form of key-value pairs through the set flash partition table; The LVGL interface module creates a variety of control combinations through the graphics library to achieve interface control beautification layout, data display refresh, sliding between canvases, interface switching and fault message display, and uses the LVGL interface callback mechanism to achieve circular focus between controls; The FreeRTOS task module enables the program to run efficiently through task management, and performs message notification and data delivery through event groups and message queues.

[0006] Optionally, the bus data processing flow of the CAN communication module is as follows: The CAN bus device clears the CAN receiving flag and blocks to wait for receiving CAN data messages; Determine whether the message is sent to this device. If it is, set the CAN receiving flag, otherwise return; Determine the first byte of the data frame-data field of the CAN data message; When the first byte is Monitor_Switch, the display flag is read, the display event is sent, and the data field is sent according to the data type assignment, and the message queue sends the data field; When the first byte is Shake_Hand, continue to judge the second byte of the data frame-data field, and execute the tasks of sending the LVGL task frame quantity information, saving the sending device ID, and turning on the update flag NVS to save the new version number according to different bytes; When the first byte is Param_String, read the update flag, use the dynamically allocated space to temporarily receive a large amount of string data, open the namespace of the NVS specified partition, store it in key-value pairs, and start the 100ms heartbeat packet timer to send.

[0007] Optionally, the heartbeat packet receiving and processing flow is as follows: The server side receiving the heartbeat packet data sets the heartbeat online flag and determines the fault status; The processor that sends the heartbeat packet data starts the 100ms heartbeat packet timer and uses the TWAI driver to detect the CAN bus status. After clearing the transmission queue, it sends the heartbeat packet data to the server.

[0008] Optionally, the graphical design processing flow of the LVGL interface module is as follows: After the initial setting, the dead loop delays for 10ms and then blocks to acquire the UI mutex lock; the initial setting includes a series of settings such as initializing the active screen, configuring the index function pointer, creating the UI event task, creating the event tag group, and creating the message queue; Determine the task type and execute different processes; Under the event task, the event acquisition is not blocked, and the meaning display flag in the display event type is displayed. If it is true, the display channel is opened, otherwise the display channel is closed and the string is searched from NVS according to the address and displayed one by one; the progress channel is opened in the update event type, the flag for receiving update information is set, and the update icon is set; the fault channel is opened in the fault event type, the flag for receiving fault messages is set, and the fault icon is set; Under the main task, determine whether the index has changed. If there is a change, determine the exit function pointer - interface exit. At this time, the interface has different settings, such as exiting the display interface and clearing the display mark, etc. Determine the entry function pointer - enter the interface. At this time, the interface has different settings, such as the display interface sends the setting display mark, etc. After completing the determination, set the return index and save the current index; Under the message task, it can obtain various messages without blocking, determine the opening of each channel, receive the messages of each channel, and pop up the top-level misalignment information for fault messages; the progress message refreshes the progress bar or icon rotation; the display message is used for data display and typesetting; After the process is completed, the UI mutex is released, the jump delay is performed, the mutex lock operation is acquired, and the process is ended.

[0009] Optionally, a display canvas is set in the LVGL interface module, and the position canvas is created as a middle canvas (0), a right canvas (1) and a left canvas (2). The actual initial display position of the display canvas is left-middle-right, and the canvas is set cyclically. Each canvas is provided with 5 display controls and 1 prompt icon. When a signal is generated, the data meaning display is changed, that is, the text display; The canvas page number is incremented and decremented: it increments by 1 when shifting right and decrements by 1 when shifting left, and the calculation is repeated. The page number also represents the position in the address array. In the page number design, the required page number is calculated according to the number of recorded frames using the method of: n / 5+n%5==0?0:1; The canvas position is changed. A variable of the currently displayed canvas is created with an initial value of 0. The LV_KEY_LEFT event is used to move the canvas and the picture to the left. The variable is decremented by 1 and loops in the manner of 2-1-0-2-1-0. The LV_KEY_RIGHT event is used to move the canvas and the picture to the right. The variable is incremented by 1 and loops in the manner of 0-1-2-0-1-2.

[0010] Optionally, the simple interface for simulating faults in the LVGL interface module is configured as three parallel frame-shaped display areas, and the display areas from left to right are respectively the fault ID display, the fault meaning display and the fault time display.

[0011] A display device that implements any of the above-mentioned methods for displaying CAN-based communication data and fault records, comprising: a CAN communication module, an NVS storage module, an LVGL interface module and a FreeRTOS task module; the CAN communication module is connected to a CAN bus device, the CAN communication module is connected to the LVGL interface module, the CAN communication module and the LVGL interface module are respectively connected to the NVS storage module, and the FreeRTOS task module is respectively connected to the CAN communication module, the NVS storage module and the LVGL interface module.

[0012] A storage medium stores a plurality of instructions, wherein the instructions are suitable for a processor to load to execute the steps in any of the above-mentioned methods for displaying communication data and fault records based on CAN.

[0013] Compared with the prior art, the present invention has the following beneficial effects: 1. The present invention is connected to a CAN bus device, and uses the CAN communication module therein to send a specific ID number to the CAN bus device, and waits for the CAN bus device to reply, and filters the messages that do not belong to the specific ID, and opens a larger data receiving buffer to store the received data in the buffer, so as to ensure that the bus data can be received in time when the bus load is too high, and the data will not be missed due to improper processing, and the data frame and the first byte and the second byte of the data domain in the data are used as the judgment basis to execute different task processes, realize the processing of the CAN bus data, thereby realizing the rapid processing of the CAN bus data transmission data, and cooperate with the LVGL interface module to provide instant and intuitive feedback on the fault data, thereby improving the visualization and user experience of the operator; 2. The present invention sets up an LVGL interface module, which creates a variety of control combinations through a graphics library to achieve interface control beautification layout, data display refresh, sliding between canvases, interface switching and fault message display, thereby realizing an interface or control for real-time monitoring of CAN bus data or listening to events and timely feedback. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1 It is a schematic diagram of the overall design scheme of the present invention; Figure 2 This is a schematic diagram of the CAN bus data processing flow of the present invention; Figure 3 This is a schematic diagram of the heartbeat packet receiving and processing of the present invention; Figure 4 This is a schematic diagram of the LVGL graphical design process of the present invention; Figure 5 A schematic diagram of the display canvas design process of the present invention; Figure 6 It is a simplified graphical schematic diagram of the simulated canvas of the present invention; Figure 7 This is a schematic diagram of a simple interface for simulating faults of the present invention. DETAILED DESCRIPTION

[0015] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0016] See also Figure 1-7 The present invention provides a display device for communication data and fault records based on CAN, the device includes a CAN communication module, an NVS storage module, an LVGL interface module and a FreeRTOS task module, the CAN communication module is connected to a CAN bus device, the CAN communication module is connected to the LVGL interface module, the CAN communication module and the LVGL interface module are respectively connected to the NVS storage module, and the FreeRTOS task module is respectively connected to the CAN communication module, the NVS storage module and the LVGL interface module.

[0017] The display method of communication data and fault records based on CAN of the device comprises: the CAN communication module sends a specific ID number after connecting to the CAN bus device and then waits for a reply, thereby specifically realizing data sending, data receiving and data processing; the NVS storage module allocates a certain space to store communication data addresses, communication data descriptions and fault code description strings in the form of key-value pairs by setting a specific flash partition table; the LVGL interface module creates a variety of control combinations through a graphics library, specifically realizes interface control beautification layout, data display refresh, sliding between canvases, interface switching and fault message display, and realizes cyclic focusing between controls by using the callback mechanism of the LVGL interface; the FreeRTOS task module makes the program run efficiently and speeds up the processing efficiency through task management, and performs message notification and data transmission through event groups and message queues; like Figure 1As shown, the present invention sets a CAN communication module, an NVS storage module, an LVGL interface module and a FreeRTOS task module, controls the program operation through the ESP32C3 chip of Espressif Technology, and cooperates with 4M Flash to provide a large space for storing data string arrays, wherein the CAN communication module is used to realize data sending, data receiving and data processing processes, the NVS storage module is used to store communication data addresses, communication data descriptions and fault code description strings, the LVGL interface module is used for visual display of data messages, and the FreeRTOS task module makes the program run efficiently through task management, and performs message notification and data transmission.

[0018] The CAN communication module bus data processing flow is as follows: the CAN bus device clears the CAN receive flag and then blocks to wait for the reception of CAN data messages; determines whether the message is sent to this device, if it is, sets the CAN receive flag, otherwise returns; performs data frame-data field first byte judgment on the CAN data message; when the first byte is Monitor_Switch, reads the display flag, sends a display event, and sends the data field according to the data type assignment, and the message queue sends the data field; when the first byte is Shake_Hand, continues to judge the second byte of the data frame-data field, and executes the sending LVGL task frame quantity information and saves it according to different bytes. The task of sending the device ID and opening the update flag NVS to save the new version number; when the first byte is Param_String, read the update flag, use the dynamically allocated space to temporarily receive a large amount of string data, and open the namespace of the partition specified by NVS, store it in the form of key-value pairs, and start the 100ms heartbeat packet timer to send. The heartbeat packet receiving and processing flow is as follows: the server side that receives the heartbeat packet data sets the heartbeat online flag and judges the fault status; the processor side that sends the heartbeat packet data starts the 100ms heartbeat packet timer to send, and uses the TWAI driver to detect the CAN bus status, and sends the heartbeat packet data to the server side after clearing the transmission queue; like Figure 2 and Figure 3 As shown, the CAN communication module is connected to the CAN bus. The CAN communication module sends a specific ID to the CAN bus and filters messages that do not belong to the specific ID. Different task processes are executed by judging the first byte and the second byte of the data frame and the data field. In the data process of the CAN communication module, a 100ms heartbeat packet program is set. Every 100ms, the processor sends heartbeat packet data to the server, and judges the fault status according to the heartbeat online flag set by the server. If there is no fault, the top-level fault event and fault flag are cleared. If there is a fault, the fault flag is set. At the same time, the fault index, fault attribute and fault event are sent to the LVGL interface module for visual output.

[0019] The graphical design processing flow in the LVGL interface module is as follows: initialize the active screen, configure the index function pointer, create the UI event task, create the event tag group, create the message queue and then delay 10ms to block the acquisition of the UI mutex lock; determine the task type and execute different processes; under the event task, do not block the acquisition of events, display the meaning of the display flag in the event type to see if it is true, if so, open the display channel, otherwise close the display channel and search for the string from NVS according to the address and display them one by one; open the progress channel in the update event type, set the flag for receiving update information and set the update icon; open the fault channel in the fault event type, set the flag for receiving fault information Fault message flag and set fault icon; Under the main task, determine whether the index has changed. If there is a change, determine the exit function pointer - interface exit. At this time, the interface has different settings, such as exiting the display interface and clearing the display flag, etc., determine the entry function pointer - enter the interface. At this time, the interface has different settings, such as the display interface sends the setting display flag, etc. After the judgment is completed, set the return index and save the current index; Under the message task, do not block the acquisition of various messages, determine that each channel is open, receive messages from each channel, and the fault message pops up the top-level misalignment information; progress message refreshes the progress bar or icon rotation; display messages for data display and typesetting; complete the process Then release the UI mutex lock, jump delay, obtain the mutex lock operation, and end the process; set the display canvas in the LVGL interface module, create the position canvas as the middle canvas (0), the right canvas (1) and the left canvas (2), the actual initial display position of the display canvas is left-middle-right, and the canvas is set in a loop. Each canvas is set with 5 display controls and 1 prompt icon. When a signal is generated, the data meaning display is changed, that is, the text display; the canvas page number is automatically increased and decreased: it is automatically increased by 1 when it is shifted to the right, and it is automatically decreased by 1 when it is shifted to the left, and it is calculated in a loop. The page number also represents the position in the address array. The page number design is based on the number of recorded frames: n / 5+n%5==0 ?0:1 method is used to calculate the required page number; the canvas position is changed, a current display canvas variable is created, the initial value is 0, and the LV_KEY_LEFT event is used to realize the operation of moving the canvas and the picture to the left, and the variable is decremented by 1, and the cycle is 2-1-0-2-1-0; the LV_KEY_RIGHT event is used to realize the operation of moving the canvas and the picture to the right, and the variable is incremented by 1, and the cycle is 0-1-2-0-1-2; the simple interface for simulating faults in the LVGL interface module is set as three parallel frame display areas, and the display areas from left to right are fault ID display, fault meaning display and fault time display; like Figure 4 , Figure 5 , Figure 6 and Figure 7As shown, the LVGL interface module receives the fault data from the CAN communication module and uses a graphical design to visualize the fault information. First, a series of initial settings such as initializing the active screen, configuring the index function pointer, creating the UI event task, creating the event tag group, and creating the message queue are performed to determine the task type and execute different processes. In the case of an event task, the display event opens the display channel, and the update event sets the update icon; the fault event sets the fault icon; in the case of the main task, the interface has different settings, such as exiting the display interface to clearly display the logo, etc., or setting the return index after completing the judgment and saving the current index; in the case of a message task, the fault message pops up the top-level misalignment information; the progress message refreshes the progress bar or the icon rotates; the display message is used for data display and typesetting. According to the data information, it is determined that the information serves the fault generation, and the specific fault information is recorded. That is, the fault ID, fault attributes and fault occurrence time. Before receiving a new fault ID, it will first be judged with the ID in the fault queue. If the fault ID already exists, the new fault ID will not be received. Otherwise, the new fault ID will be received to the top layer of the fault queue, and a fault event will be sent to send the new fault information to the message queue. At this time, the display of the fault message box will give priority to displaying the top layer fault in the fault queue. When the data carries a fault clearing signal, the fault ID will be found inside the fault queue and removed. If the top layer fault is eliminated, a fault event signal will be sent to refresh the fault message box to display the top layer fault. When entering the fault display interface, all fault information in the fault queue will be refreshed on the interface, that is, the fault ID, fault meaning, and fault occurrence time. If the fault queue is detected to be empty, that is, the fault array is empty, the fault disappears and a no fault signal is sent.

[0020] Working principle: The present invention sets up a CAN communication module, an NVS storage module, an LVGL interface module and a FreeRTOS task module, and organically combines CAN bus communication, LVGL interface creation and NVS data storage, and displays data based on the LVGL interface creation, and combines the functions of the CAN bus receiving and sending data, so that the CAN bus data is visualized in the interface created by LVGL, and is managed in combination with the FreeRTOS task, thereby realizing the functions of processing data reception, display and storage, and providing instant and intuitive fault prompts and feedback methods in the direction of fault detection, greatly improving the data processing efficiency and user experience in the engineering and automotive fields.

[0021] Those skilled in the art will appreciate that all or part of the steps in the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0022] To this end, an embodiment of the present invention provides a storage medium in which a plurality of instructions are stored. The instructions can be loaded by a processor to execute the steps of the method for displaying communication data and fault records based on CAN provided in an embodiment of the present invention.

[0023] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0024] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A method for displaying communication data and fault records based on CAN, characterized in that: include: The CAN communication module connects to the CAN bus device, sends the ID number, and then waits for a reply to achieve data transmission, data reception, and data processing; The NVS storage module allocates space to store the communication data address, communication data description and fault code description string in the form of key-value pairs through the set flash partition table; The LVGL interface module creates a variety of control combinations through the graphics library to achieve interface control beautification layout, data display refresh, sliding between canvases, interface switching and fault message display, and uses the LVGL interface callback mechanism to achieve circular focus between controls; The FreeRTOS task module enables the program to run efficiently through task management, and performs message notification and data delivery through event groups and message queues.

2. A method for displaying communication data and fault records based on CAN according to claim 1, characterized in that: The bus data processing flow of the CAN communication module is as follows: The CAN bus device clears the CAN receiving flag and blocks to wait for receiving CAN data messages; Determine whether the message is sent to this device. If it is, set the CAN receiving flag, otherwise return; Determine the first byte of the data frame-data field of the CAN data message; When the first byte is Monitor_Switch, the display flag is read, the display event is sent, and the data field is sent according to the data type assignment, and the message queue sends the data field; When the first byte is Shake_Hand, continue to judge the second byte of the data frame-data field, and execute the tasks of sending the LVGL task frame quantity information, saving the sending device ID, and turning on the update flag NVS to save the new version number according to different bytes; When the first byte is Param_String, read the update flag, use the dynamically allocated space to temporarily receive a large amount of string data, open the namespace of the NVS specified partition, store it in key-value pairs, and start the 100ms heartbeat packet timer to send.

3. A method for displaying communication data and fault records based on CAN according to claim 2, characterized in that: The receiving and processing flow of the heartbeat packet is as follows: The server side receiving the heartbeat packet data sets the heartbeat online flag and determines the fault status; The processor that sends the heartbeat packet data starts the 100ms heartbeat packet timer and uses the TWAI driver to detect the CAN bus status. After clearing the transmission queue, it sends the heartbeat packet data to the server.

4. The method for displaying communication data and fault records based on CAN according to claim 1, characterized in that: The graphical design process of the LVGL interface module is as follows: After the initial setting, the dead loop delays for 10ms and then blocks to acquire the UI mutex lock; the initial setting includes initializing the active screen, configuring the index function pointer, creating the UI event task, creating the event tag group and / or creating the message queue; Determine the task type and execute different processes; Under the event task, the event acquisition is not blocked, and the meaning display flag in the event type is displayed to see if it is true. If it is, the display channel is turned on, otherwise, the display channel is turned off and the string is searched from NVS according to the address and displayed one by one; In the update event type, the progress channel is opened, the flag for receiving update information is set, and the update icon is set; in the fault event type, the fault channel is opened, the flag for receiving fault messages is set, and the fault icon is set; Under the main task, determine whether the index has changed. If there is a change, determine the exit function pointer - interface exit. At this time, the interface has different settings, such as exiting the display interface and clearing the display mark, etc. Determine the entry function pointer - enter the interface. At this time, the interface has different settings, such as the display interface sends the setting display mark, etc. After completing the determination, set the return index and save the current index; Under the message task, it can obtain various messages without blocking, determine the opening of each channel, receive the messages of each channel, and pop up the top-level misalignment information for fault messages; the progress message refreshes the progress bar or icon rotation; the display message is used for data display and typesetting; After the process is completed, the UI mutex is released, the jump delay is performed, the mutex lock operation is acquired, and the process is ended.

5. A method for displaying communication data and fault records based on CAN according to claim 4, characterized in that: The display canvas is set in the LVGL interface module, and the position canvas is created as the middle canvas (0), the right canvas (1) and the left canvas (2). The actual initial display position of the display canvas is left-middle-right, and the canvas is set in a loop. Each canvas is provided with 5 display controls and 1 prompt icon. When a signal is generated, the data meaning display is changed, that is, the text display; The canvas page number is incremented and decremented: it increments by 1 when shifting right and decrements by 1 when shifting left, and the calculation is repeated. The page number also represents the position in the address array. In the page number design, the required page number is calculated according to the number of recorded frames using the method of: n / 5+n%5==0?0:1; The canvas position is changed. A variable of the currently displayed canvas is created with an initial value of 0. The LV_KEY_LEFT event is used to move the canvas and the picture to the left. The variable is decremented by 1 and loops in the manner of 2-1-0-2-1-0. The LV_KEY_RIGHT event is used to move the canvas and the picture to the right. The variable is incremented by 1 and loops in the manner of 0-1-2-0-1-2.

6. A method for displaying communication data and fault records based on CAN according to claim 1, characterized in that: The simple interface for simulating faults in the LVGL interface module is configured as three parallel frame-shaped display areas, and the display areas from left to right are respectively the fault ID display, the fault meaning display and the fault time display.

7. A display device for implementing the method for displaying communication data and fault records based on CAN as claimed in any one of claims 1 to 6, characterized in that: The display device includes: a CAN communication module, an NVS storage module, an LVGL interface module and a FreeRTOS task module; the CAN communication module is connected to a CAN bus device, the CAN communication module is connected to an LVGL interface module, the CAN communication module and the LVGL interface module are respectively connected to the NVS storage module, and the FreeRTOS task module is respectively connected to the CAN communication module, the NVS storage module and the LVGL interface module.

8. A storage medium, characterized in that: The storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the steps in the method for displaying communication data and fault records based on CAN as described in any one of claims 1 to 6.