Vehicle fault detection methods, devices and vehicles

By establishing a long connection between the vehicle data layer and the application, sending heartbeat data packets and performing parsing and comparison, the timeliness problem of vehicle fault detection is solved, realizing automated fault detection and real-time data transmission, and reducing security risks.

CN119437736BActive Publication Date: 2026-03-06CHONGQING SELIS PHOENIX INTELLIGENT INNOVATION TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-18
Publication Date
2026-03-06

AI Technical Summary

Technical Problem

In existing technologies, vehicle fault detection requires manual data retrieval, which results in poor timeliness, failure to detect faults in a timely manner, and poses safety risks.

Method used

By establishing a long connection between the vehicle data layer and the application, heartbeat data packets are sent at preset intervals. The application parses and compares the data, automatically detects vehicle faults, uses pulse signals to determine the new data generation status, and sends heartbeat data packets in a timely manner. Real-time data transmission is achieved using the UDP protocol.

Benefits of technology

It enables automatic detection of vehicle faults, reduces manual intervention, improves the real-time performance and accuracy of data transmission, detects faults in a timely manner, and reduces safety risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119437736B_ABST
    Figure CN119437736B_ABST
Patent Text Reader

Abstract

This application relates to the field of vehicle technology and proposes a vehicle fault detection method, device, and vehicle. The method pre-constructs a vehicle application terminal and a vehicle data terminal, establishes a long connection between the vehicle application terminal and the vehicle data layer, and sends a heartbeat data packet containing initial vehicle data and initial data packet sequence data to the vehicle application terminal at a first preset time interval. The application terminal's own generated application terminal data packet sequence data is compared with the parsed data packet sequence data obtained by parsing the received heartbeat data packet. If the comparison is successful, the parsed vehicle data is sent to the vehicle data terminal. The vehicle data terminal judges whether there is a target code in the parsed vehicle data. If it exists, a vehicle fault prompt message is generated and a fault prompt is given. This method can automatically report vehicle data and detect vehicle faults, which is time-saving, more convenient, and can detect vehicle faults in a timely manner, reducing vehicle safety risks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of vehicle technology, and in particular to a vehicle fault detection method, device, and vehicle. Background Technology

[0002] With technological advancements, vehicle fault detection has become an increasingly important area. In traditional onboard testing platforms, data collection from the client data layer is written to disk, followed by manual processing to retrieve hardware data. This method is time-consuming and lacks real-time performance, requiring precise timing and skilled personnel for data retrieval. Furthermore, if a vehicle malfunctions but the fault data is not retrieved and analyzed promptly to generate timely warnings, it could pose a safety risk. Therefore, ensuring timely uploading of vehicle data to the backend for processing and timely fault detection to identify problems and mitigate safety risks is a critical issue that needs to be addressed. Summary of the Invention

[0003] This application provides a vehicle fault detection method, device, and vehicle to solve the technical problem in related technologies that vehicle data needs to be manually retrieved, which is not timely, time-consuming, and cannot detect vehicle faults in a timely manner, thus potentially leading to vehicle safety risks.

[0004] This application provides a vehicle fault detection method, which includes: a vehicle data layer sending heartbeat data packets to a vehicle application terminal at a first preset time interval; the heartbeat data packets including initial vehicle data and initial data packet sequence data; the vehicle data layer and the vehicle application terminal establishing a long connection in advance; the initial data packet sequence data being generated according to a preset sequence data generation rule; the vehicle application terminal receiving the heartbeat data packets, parsing the heartbeat data packets to obtain parsed vehicle data and parsed data packet sequence data; the vehicle application terminal generating application terminal data packet sequence data according to the preset sequence data generation rule; comparing the initial data packet sequence data with the application terminal data packet sequence data; if the comparison is successful, sending the parsed vehicle data to the vehicle data terminal; the vehicle data terminal receiving the parsed vehicle data and determining whether a target code exists in the parsed vehicle data; if a target code exists, generating a vehicle fault prompt message and providing a fault prompt to detect the vehicle fault.

[0005] In one embodiment of this application, before the vehicle data layer sends a heartbeat data packet to the vehicle application terminal at a first preset time interval, the method includes: the vehicle application terminal sending a pulse signal to the vehicle data layer at a second preset time interval to determine the new data generation status of the new vehicle data in the vehicle data layer by sending the pulse signal; if the new data generation status is "generated", triggering the step of the vehicle data layer sending a heartbeat data packet to the vehicle application terminal at the first preset time interval.

[0006] In one embodiment of this application, determining the new data generation status of new vehicle data in the vehicle data layer by sending a pulse signal includes: the vehicle data layer responding to the pulse signal to obtain the current memory usage of a preset vehicle data storage space; if the current memory usage is greater than the previous memory usage, the new data generation status is determined to be generation, wherein the previous memory usage is the memory usage of the preset vehicle data storage space obtained by the vehicle data layer in response to the previous pulse signal; or, the vehicle data layer responding to the pulse signal to obtain the current number of files in the preset vehicle data storage space; if the current number of files is greater than the previous number of files, the new data generation status is determined to be generation, wherein the previous number of files is the number of files in the preset vehicle data storage space obtained by the vehicle data layer in response to the previous pulse signal.

[0007] In one embodiment of this application, the method further includes: the vehicle application sorting the parsed data packet sequence data of all received heartbeat data packets to determine missing sequence information; the vehicle application determining the missing data time based on the missing sequence information and the preset sequence data generation rule, the preset sequence data generation rule including a data time sub-rule; the vehicle application generating a missing data request message based on the missing data time, sending the missing data request message to the vehicle data layer to trigger the vehicle data layer to generate a resend data packet based on the missing data request message, and resending the resend data packet to the vehicle application, the resend data packet including the initial vehicle data corresponding to the missing data time.

[0008] In one embodiment of this application, after the vehicle data terminal receives the parsed vehicle data, the method further includes: the vehicle data terminal determining the data transit time of the received parsed vehicle data; if the data transit time is greater than a preset time threshold, the received parsed vehicle data is determined to be timed out, and the vehicle application terminal is requested to resend the parsed vehicle data.

[0009] In one embodiment of this application, after comparing the initial data packet sequence data with the application-side data packet sequence data, the method further includes: if the comparison is successful, the vehicle application sends a cancellation signal to the vehicle data layer to trigger the vehicle data layer to mark the heartbeat data packet as transmitted and clear the heartbeat data packet.

[0010] In one embodiment of this application, determining whether a target code exists in the parsed vehicle data includes: converting the parsed vehicle data into a preset data format; determining sub-data representing the vehicle state from the converted parsed vehicle data based on preset data structure rules; matching the sub-data with multiple preset target codes; and if the matching is successful, determining that a target code exists in the parsed vehicle data.

[0011] In one embodiment of this application, if a target code exists, the method further includes: persistently storing the parsed vehicle data containing the target code.

[0012] This application embodiment also provides a vehicle fault detection device, which includes a vehicle data layer, a vehicle application terminal, and a vehicle data terminal. The vehicle data layer sends heartbeat data packets to the vehicle application terminal at first preset time intervals. The heartbeat data packets include initial vehicle data and initial data packet sequence data. The vehicle data layer and the vehicle application terminal have a pre-established long connection. The initial data packet sequence data is generated according to a preset sequence data generation rule. The vehicle application terminal receives the heartbeat data packets, parses them to obtain parsed vehicle data and parsed data packet sequence data, and generates application-end data packet sequence data according to the preset sequence data generation rule. It compares the initial data packet sequence data with the application-end data packet sequence data. If the comparison is successful, it sends the parsed vehicle data to the vehicle data terminal. The vehicle data terminal receives the parsed vehicle data and determines whether a target code exists in the parsed vehicle data. If a target code exists, it generates a vehicle fault prompt message and provides a fault indication to detect vehicle faults.

[0013] This application also provides a vehicle that includes the vehicle fault detection device described in any of the above embodiments.

[0014] This application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method described in any of the above embodiments.

[0015] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described in any of the above embodiments.

[0016] In the vehicle fault detection method, device, and vehicle solution provided above, the vehicle fault detection method pre-constructs a vehicle application terminal and a vehicle data terminal, and pre-establishes a long connection between the vehicle application terminal and the vehicle data layer. The vehicle data layer sends a heartbeat data packet containing initial vehicle data and initial data packet sequence data to the vehicle application terminal at a first preset time interval. Then, the application terminal's own generated application terminal data packet sequence data is compared with the parsed data packet sequence data obtained by parsing the received heartbeat data packet. If the comparison is successful, the parsed vehicle data is sent to the vehicle data terminal. The vehicle data terminal judges whether there is a target code in the parsed vehicle data. If it exists, a vehicle fault prompt message is generated and a fault prompt is given to detect the vehicle fault. This eliminates the need for manual retrieval of vehicle data, and can automatically report vehicle data and detect vehicle faults. It is time-saving, more convenient, and can promptly detect vehicle faults, avoiding or further reducing vehicle safety risks. Attached Figure Description

[0017] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 A schematic flowchart of a vehicle fault detection method provided in an embodiment of this application;

[0019] Figure 2 A schematic diagram of the converted and parsed vehicle data provided in an embodiment of this application;

[0020] Figure 3 This is a schematic diagram illustrating a process for data interaction between a vehicle data terminal and a vehicle application terminal, as provided in an embodiment of this application.

[0021] Figure 4 A schematic diagram of the vehicle fault detection device provided in the embodiments of this application;

[0022] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0023] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0024] Please see Figure 1 As shown, Figure 1 A flowchart illustrating a vehicle fault detection method provided in this application embodiment, the method comprising the following steps:

[0025] In step S110, the vehicle data layer sends a heartbeat data packet to the vehicle application at a first preset time interval.

[0026] The heartbeat data packet includes initial vehicle data and initial data packet sequence data. A long connection is pre-established between the vehicle data layer and the vehicle application. The initial data packet sequence data is generated according to a preset sequence data generation rule. The initial vehicle data can be collected through one or more target domain controllers.

[0027] The first preset time can be an equal time or a time composed of multiple time value sequences. Those skilled in the art can choose the specific implementation method of the first preset time as needed, and no limitation is made here.

[0028] As an example, heartbeat data packets can be transmitted using pulse signals. A heartbeat mechanism sends a signal every second. The signal itself is a data packet; here, this signal data packet is modified to include a sequence number (an ordered number encrypted using hash rules based on time, protocol rules, and specific scenario requirements) for identification by the vehicle application. The sequence number is a concatenated string of characters encrypted using hash rules based on time, protocol rules, and specific scenario requirements. This method ensures the ordered transmission of data packets.

[0029] The method for creating a long connection between the vehicle data layer and the vehicle application can be implemented in a manner known to those skilled in the art, and is not limited here.

[0030] As an example, the preset sequence data generation rule can be to generate initial sequence data based on time, protocol rules, and specific scenario requirements, and then hash-encrypt this initial sequence data to obtain a sequence of ordered numbers. Of course, those skilled in the art can also use other encryption methods to replace hash encryption.

[0031] In one embodiment, before the vehicle data layer sends a heartbeat data packet to the vehicle application at a first preset time interval, the method includes: the vehicle application sending a pulse signal to the vehicle data layer at a second preset time interval to determine the new data generation status of new vehicle data in the vehicle data layer by sending the pulse signal; if the new data generation status is "generated", the method triggers the step of the vehicle data layer sending a heartbeat data packet to the vehicle application at a first preset time interval.

[0032] The first preset time and the second preset time can be the same or different, and can be set according to the needs of those skilled in the art, such as both being set to 1 second.

[0033] It is understandable that vehicle data is not constantly updated. If invalid data is continuously sent, it will lead to a waste of resources. In this case, the preset vehicle data storage space can be monitored to determine whether new data has been generated. If new data is generated, a heartbeat data packet is generated and sent. If no new data is generated and only old data is available, the old data will not be sent repeatedly without a request.

[0034] Following the above embodiments, determining the new data generation status of vehicle data in the vehicle data layer by sending pulse signals includes: the vehicle data layer responding to the pulse signal to obtain the current memory usage of the preset vehicle data storage space; if the current memory usage is greater than the previous memory usage, the new data generation status is determined to be generated, wherein the previous memory usage is the memory usage of the preset vehicle data storage space obtained by the vehicle data layer in response to the previous pulse signal. It can be understood that if the memory usage changes, it indicates that new data has been generated, and the new data can then be sent to the vehicle application.

[0035] Following the above embodiments, the new data generation status of vehicle data in the vehicle data layer is determined by sending pulse signals. This includes: the vehicle data layer responding to the pulse signal to obtain the current number of files in the preset vehicle data storage space; if the current number of files is greater than the previous number of files, the new data generation status is determined to be generated, where the previous number of files is the number of files in the preset vehicle data storage space obtained by the vehicle data layer in response to the previous pulse signal. Similar to the previous embodiments, if the number of files increases, it can also be considered that new data has been generated, and at this time, the new data can be sent to the vehicle application terminal.

[0036] For example, to check if data packets (new vehicle data) have been generated at the vehicle data layer, a pulse signal method can be used, sending a signal every second to read whether data packets have been generated at the client data layer. The process of determining whether data packets have been generated can use Java's `folder.listFiles()`, looping through the files and comparing the size with the previous size; alternatively, shell commands can be used, such as: `total_memory_mb = $(free-m|awk' / Mem: / {print$2}')`. There are two ways to determine if data packets have been generated: 1. Check the memory size under the path where the data packets are stored; 2. Check the number of files under the path where the data packets are stored.

[0037] In one embodiment, the vehicle application can be an embedded client, pre-configured with protocol rules such as UDP / IP with the vehicle data layer. This vehicle application can continuously and automatically retrieve new vehicle data generated by the vehicle data layer.

[0038] In step S120, the vehicle application receives the heartbeat data packet, parses the heartbeat data packet to obtain the parsed vehicle data and the parsed data packet sequence data, and generates application data packet sequence data according to the preset sequence data generation rules. The initial data packet sequence data is compared with the application data packet sequence data. If the comparison is successful, the parsed vehicle data is sent to the vehicle data terminal.

[0039] The heartbeat data packets can be parsed using methods known to those skilled in the art, and are not limited here. The vehicle application uses the same preset sequence data generation rules as the vehicle data layer to generate its own application-side data packet sequence data. Under normal circumstances, the initial data packet sequence data and the application-side data packet sequence data should be identical; a successful comparison indicates that the data is error-free. If the comparison fails, it indicates that either an anomaly occurred during data transmission, previous data is missing, or other abnormalities have occurred. In this case, the vehicle data layer needs to resend the heartbeat data packets to ensure the security and accuracy of data transmission.

[0040] In one embodiment, after comparing the initial data packet sequence data with the application-side data packet sequence data, the method further includes: if the comparison is successful, the vehicle application sends a cancellation signal to the vehicle data layer to trigger the vehicle data layer to mark the heartbeat data packet as transmitted and clear the heartbeat data packet.

[0041] It's understandable that by marking the status of data packets, if transmission is successful, the application sends a pulse signal (a reverse sequence number, i.e., a cancellation signal), and the vehicle data layer marks the data packet as transmitted and then clears it. This saves storage space.

[0042] In one embodiment, the method further includes: the vehicle application sorting the parsed data packet sequence data of all received heartbeat data packets to determine missing sequence information; the vehicle application determining the missing data time based on the missing sequence information and a preset sequence data generation rule, the preset sequence data generation rule including a data time sub-rule; the vehicle application generating a missing data request message based on the missing data time, sending the missing data request message to the vehicle data layer to trigger the vehicle data layer to generate a resend data packet based on the missing data request message, and resending the resend data packet to the vehicle application, the resend data packet including the initial vehicle data corresponding to the missing data time.

[0043] Since the heartbeat data packets are sequenced in time series, once data loss occurs, the time of data loss can be obtained by using the newly generated time of the previously detected data, thus finding the time of data loss so that the vehicle data layer can resend the missing data.

[0044] For example, after the vehicle data layer and the vehicle application establish a long connection, the vehicle application performs parsing. The parsing logic is that the application also generates a hash-encrypted concatenated value according to the signal generation rules of the data layer. The two encrypted hash values ​​from the application and data layers (comparing the initial data packet sequence data with the application's data packet sequence data) are compared. If they are equal, it means the data is from the same time period. If a sequence number is not sent within a certain time period (both the vehicle application and the vehicle data layer generate the corresponding sequence number for that time period and then perform a hash comparison), the vehicle application will send the sequence number for the missing time period to the UDP data layer (vehicle data layer), allowing the vehicle data layer to resend the missing vehicle data.

[0045] As an example, for ease of understanding, a code example of the vehicle application resending some data can be provided as follows:

[0046] if(data[0]==ack){# Confirm that the serial number matches the unique identifier

[0047] ack+=1

[0048] print('Received data:', data[1]) # Process the data

[0049] ack_packet = (ack,) # Send acknowledgment packet

[0050] socket.sendto(ack_packet,addr)

[0051] }

[0052] Else{

[0053] #Send duplicate ACK requests

[0054] ack_packet=(ack,)

[0055] socket.sendto(ack_packet,addr)

[0056] }

[0057] In step S130, the vehicle data terminal receives the parsed vehicle data and determines whether there is a target code in the parsed vehicle data. If there is a target code, a vehicle fault prompt message is generated and a fault prompt is made to detect the vehicle fault.

[0058] The target code indicates that the vehicle has a malfunction or abnormality. The target code can be preset by someone skilled in the art.

[0059] As an example, the vehicle data terminal can be a device deployed inside the vehicle or a device specified by those skilled in the art, such as a back-end server.

[0060] In one embodiment, after the vehicle data terminal receives the parsed vehicle data, the method further includes: the vehicle data terminal determining the data transit time of the received parsed vehicle data; if the data transit time exceeds a preset time threshold, the received parsed vehicle data is determined to be timed out and the vehicle application terminal is requested to resend the parsed vehicle data.

[0061] It is understandable that a timeout period is set on the vehicle data terminal, and the data is resent after the timeout. This is to prevent data from becoming unreliable due to external interference or other factors. The data transit time can be determined based on the data transmission timestamp in the parsed vehicle data and the current data reception timestamp, or it can be determined by other methods known to those skilled in the art.

[0062] The preset duration threshold can be set by those skilled in the art as needed.

[0063] In one embodiment, if a target code exists, the method further includes: persistently storing the parsed vehicle data containing the target code. This facilitates subsequent querying, retrieval, or statistical analysis of historical fault data by other applications or technicians.

[0064] In one embodiment, determining whether a target code exists in the parsed vehicle data includes: converting the parsed vehicle data into a preset data format; determining sub-data representing the vehicle state from the converted parsed vehicle data based on preset data structure rules; matching the sub-data with multiple preset target codes; and if the matching is successful, determining that a target code exists in the parsed vehicle data.

[0065] The preset data format can be a pre-defined format such as hexadecimal data. The preset data structure rules are the meanings represented by data at certain positions. For example, the first N digits of data represent time, the data at a certain position after that represents lights, and the data at a certain position after that represents vehicle status, etc.

[0066] For example, the data at the vehicle data terminal is the data collected, organized, and stored on disk by the underlying domain control program (the logic for data collection in the domain control system is completed by hardware development engineers). This data is then uniformly stored in a designated directory. The logic for determining the data packet based on pulse signals (obtaining a preset data format) is used to transmit the data packet to the software application layer at the vehicle data terminal for parsing. As an example, the parsing method is as follows: the data packet is machine language, a binary file. It can be converted according to the agreed-upon preset data format. For example, if hexadecimal is required, the binary string is converted to a decimal integer using the `Integer.parseInt(binaryString)` method. Then, the decimal integer is converted to a hexadecimal string using the `Integer.toHexString(decimal)` method. The software application layer can then parse the warning content according to the rules agreed upon with the vehicle data layer (preset data structure rules).

[0067] Please see Figure 2 , Figure 2 This is a schematic diagram of the converted and parsed vehicle data provided in an embodiment of this application, such as... Figure 2 As shown, the parsed vehicle data can be a Bin file. This Bin file is then parsed and its format converted using the methods described above. Several consecutive bits of data in the Bin file represent a format agreed upon by the vehicle data provider and the vehicle application. For example, the first red line ① represents the time, converted to time using a base system. The second red line ② represents information such as vehicle lights. The numbers 08 00 21 following the second red line represent fault codes or exception codes. The third red line ③ represents information such as vehicle speed. After receiving this data, the software application layer sends a notification message to the user and saves the data persistently.

[0068] As an example, the vehicle data terminal deploys a software application layer. This layer uses Java programs to obtain data packets from the hardware layer. A public method interface is written in the Java program to receive UDP signals (parsed vehicle data) from the hardware layer (deployed on the vehicle application terminal) for sensing (this requires the software application layer and the hardware program to be deployed on the same server; if they are not on the same server, their IP addresses and ports need to be configured; if the IPs are incompatible, the firewall must be disabled). For example, the code example for the software application layer is as follows:

[0069] In the application layer, write a loop to continuously receive signals sent by UDP, ensuring that broadcast information is always being listened to:

[0070] UdpClient uc = new UdpClient(Convert.ToInt32(textBox3.Text)); / / Create a client object

[0071] IPEndPoint RemoteIpEndPoint = new IPEndPoint(IPAddress.Any, 0); / / Create a combination of IP and port pairs.

[0072] Byte[] receiveBytes; / / Defines the byte stream for receiving data

[0073] tring returnData;

[0074] receiveBytes = uc.Receive(ref RemoteIpEndPoint); / / Receive and send data

[0075] returnData = Encoding.UTF8.GetString(receiveBytes); / / Encode and receive the data.

[0076] `returnData` is the data packet returned by UDP. Calling `read()` on `returnData` will persist the read data to the database according to business rules, making it available for use by other applications. If the returned data is incorrect, has an incorrect format, or is an empty packet, the program will automatically determine this and call the interface to upload the data file to disk.

[0077] The logic of the interface method is: on the same server, data files on the server can be downloaded and read in Java code.

[0078] Socket socket = new Socket("server address", port number); / / Create a socket service object

[0079] InputStream inputStream = socket.getInputStream(); / / Get the input stream object associated with the socket.

[0080] Reading file content: BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream)).

[0081] Please see Figure 3 , Figure 3 This is a schematic diagram illustrating a process for data interaction between a vehicle data terminal and a vehicle application terminal, as provided in an embodiment of this application. Figure 3 As shown, taking the transmission of parsed vehicle data via UDP (User Datagram Protocol, a message-oriented transport layer protocol) as an example, the software application layer of the vehicle data terminal pre-initializes the socket and binds it to the corresponding ID address and port. Then, it sends a UDP signal broadcast message to the vehicle application terminal and receives the response status data (parsed vehicle data) from the vehicle application terminal. After completing the collection of vehicle data, the vehicle data terminal closes the socket. On the vehicle application terminal, an embedded client is deployed. It first initializes a preset program package and negotiates the UDP / IP protocol. Then, it collects data from the vehicle data layer. The receiving and sending program modules write the IP address and port of the software application layer, respectively, to achieve the transmission and data transfer of the vehicle data layer.

[0082] The inventors discovered that in vehicle-mounted testing platforms, after collecting and storing data from the client data layer onto disk, manual processing and retrieval of hardware data are required, which is time-consuming and cannot achieve real-time data upload and parsing. Furthermore, some fault data may pose security risks because it is not uploaded to the software application layer for parsing and early warning in real time. One or more embodiments of the vehicle fault detection method provided in this application, when one or more of the heartbeat data packets, parsed vehicle data, and pulse signals are transmitted using the UDP protocol, leverages UDP's real-time network communication characteristics and its fast connection establishment speed. A modified UDP is used to continuously send pulse signals, maintaining a long connection between the vehicle data end and the vehicle application end. The software application layer sends broadcast information through the program to promptly obtain the signals sent by the UDP layer, enabling real-time data upload and parsing, and timely alerts for fault issues.

[0083] In some embodiments, the method provided in the above embodiments utilizes the advantages of UDP's real-time performance and fast connection to achieve rapid acquisition and parsing of hardware data (initial vehicle data at the vehicle data layer) and software application layer, promptly exposing fault information and providing early warnings. The modified UDP transmission is more stable, using pulse signals to establish long connections, and using sequence numbers to prevent signal and data packet loss. Furthermore, it can also solve the problems of packet loss and duplicate data packets during transmission.

[0084] By pre-constructing a vehicle application terminal and a vehicle data terminal, and establishing a long connection between the vehicle application terminal and the vehicle data layer, the vehicle data layer sends a heartbeat data packet containing initial vehicle data and initial data packet sequence data to the vehicle application terminal at a first preset time interval. Then, the application terminal's own generated application data packet sequence data is compared with the parsed data packet sequence data obtained by parsing the received heartbeat data packet. If the comparison is successful, the parsed vehicle data is sent to the vehicle data terminal. The vehicle data terminal checks whether the parsed vehicle data contains a target code. If it does, a vehicle fault prompt message is generated and a fault is indicated to detect the vehicle fault. This eliminates the need for manual retrieval of vehicle data, enabling automatic reporting of vehicle data and detection of vehicle faults. It is time-saving, more convenient, and can promptly detect vehicle faults, avoiding or further reducing vehicle safety risks.

[0085] In one embodiment, a vehicle fault detection device is provided, which is used to perform the steps in the vehicle fault detection method provided in any of the above embodiments. Please refer to [link to previous document]. Figure 4 , Figure 4 A schematic diagram of the vehicle fault detection device provided in the embodiments of this application is shown below. Figure 4As shown, the vehicle fault detection device 400 includes a vehicle data layer 401, a vehicle application terminal 402, and a vehicle data terminal 403. The vehicle data layer 401 sends heartbeat data packets to the vehicle application terminal 402 at first preset time intervals. The heartbeat data packets include initial vehicle data and initial data packet sequence data. A long connection is pre-established between the vehicle data layer 401 and the vehicle application terminal 402. The initial data packet sequence data is generated according to a preset sequence data generation rule. The vehicle application terminal 402 receives the heartbeat data packets, parses them to obtain parsed vehicle data and parsed data packet sequence data, and generates application terminal data packet sequence data according to the preset sequence data generation rule. It compares the initial data packet sequence data with the application terminal data packet sequence data. If the comparison is successful, it sends the parsed vehicle data to the vehicle data terminal 403. The vehicle data terminal 403 receives the parsed vehicle data and determines whether a target code exists in the parsed vehicle data. If a target code exists, it generates a vehicle fault prompt message and provides a fault indication to detect vehicle faults.

[0086] In one embodiment, the vehicle application terminal is further configured to send a pulse signal to the vehicle data layer at a second preset time interval before the vehicle data layer sends a heartbeat data packet to the vehicle application terminal at a first preset time interval, so as to determine the new data generation status of the new vehicle data in the vehicle data layer by sending the pulse signal; if the new data generation status is generated, the step of the vehicle data layer sending a heartbeat data packet to the vehicle application terminal at a first preset time interval is triggered.

[0087] In one embodiment, the vehicle application is configured to: in response to a pulse signal, obtain the current memory usage of a preset vehicle data storage space; if the current memory usage is greater than the previous memory usage, determine the new data generation status as generated, wherein the previous memory usage is the memory usage of the preset vehicle data storage space obtained by the vehicle data layer in response to the previous pulse signal.

[0088] In one embodiment, the vehicle application is configured to: in response to a pulse signal, obtain the current number of files in a preset vehicle data storage space; if the current number of files is greater than the previous number of files, determine the new data generation status as generated, wherein the previous number of files is the number of files in the preset vehicle data storage space obtained by the vehicle data layer in response to the previous pulse signal.

[0089] In one embodiment, the vehicle application is further configured to: sort the parsed data packet sequence data of all received heartbeat data packets to determine missing sequence information; determine the missing data time based on the missing sequence information and a preset sequence data generation rule, the preset sequence data generation rule including a data time sub-rule; generate a missing data request message based on the missing data time, send the missing data request message to the vehicle data layer to trigger the vehicle data layer to generate a resend data packet based on the missing data request message, and resend the resend data packet to the vehicle application, the resend data packet including the initial vehicle data corresponding to the missing data time.

[0090] In one embodiment, the vehicle data terminal is further configured to: determine the data transit time of the received parsed vehicle data; if the data transit time exceeds a preset time threshold, determine the received parsed vehicle data as timed-out data and request the vehicle application terminal to resend the parsed vehicle data.

[0091] In one embodiment, the vehicle application terminal is further configured to compare the initial data packet sequence data with the application terminal data packet sequence data. If the comparison is successful, the vehicle application terminal sends a cancellation signal to the vehicle data layer to trigger the vehicle data layer to mark the heartbeat data packet as transmitted and clear the heartbeat data packet.

[0092] In one embodiment, the vehicle data terminal is further configured to: convert the parsed vehicle data into a preset data format; determine sub-data representing the vehicle state from the converted parsed vehicle data based on preset data structure rules; match the sub-data with multiple preset target codes; and if the match is successful, determine that the target code exists in the parsed vehicle data.

[0093] Specific limitations regarding the vehicle fault detection device can be found in the limitations of the vehicle fault detection method described above, and will not be repeated here. Each module in the aforementioned vehicle fault detection device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in the electronic device, or stored in the memory of the electronic device in software form, so that the processor can call and execute the corresponding operations of each module.

[0094] In this embodiment, the vehicle fault detection device is essentially configured with multiple modules to execute the steps performed by the client in any of the above embodiments of the vehicle fault detection method. The specific functions and technical effects can be referred to the above embodiments, and will not be repeated here.

[0095] In one embodiment, a vehicle is provided, which includes the vehicle fault detection device provided in any of the above embodiments. The specific functions and technical effects of the vehicle can be referred to the above embodiments, and will not be repeated here.

[0096] See Figure 5 The present invention also provides an electronic device 800, including a processor 801, a memory 802 and a communication bus 803; the communication bus 803 is used to connect the processor 801 and the memory 802; the processor 801 is used to execute a computer program stored in the memory 802 to implement the method provided in any of the above embodiments.

[0097] As an example, the electronic device could be a vehicle, in-vehicle infotainment system, or similar device.

[0098] This invention also provides a computer-readable storage medium having a computer program stored thereon, the computer program being used to cause a computer to perform the method provided in any of the above embodiments.

[0099] This application also provides a non-volatile readable storage medium storing one or more modules (programs). When these modules are applied to a device, they enable the device to execute the instructions included in Embodiment 1 of this application.

[0100] This application also provides a computer program product, including a computer program that, when executed by a processor, can implement the steps and corresponding content of the aforementioned method embodiments.

[0101] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0102] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.

[0103] Computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0104] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of methods and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0105] It should be understood that the terms "first," "second," etc., used in this application are used to distinguish similar objects and do not necessarily indicate a specific order or sequence. The technical features to which these terms are used can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in a sequence other than that shown in the figures or text.

[0106] It should be understood that although the flowcharts provided in the embodiments of this application indicate the various steps with arrows, the order indicated by the arrows does not necessarily limit the implementation order of these steps. Those skilled in the art can perform these steps in other orders according to different implementation scenarios and requirements.

[0107] The above embodiments are merely illustrative of the principles and effects of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in the present invention should still be covered by the claims of the present invention.

Claims

1. A vehicle malfunction detection method characterized by, The vehicle fault detection method comprises: The vehicle data layer sends a heartbeat data packet to the vehicle application end at a first preset time interval based on a UDP protocol, the heartbeat data packet comprising initial vehicle data and initial data packet sequence data, the vehicle data layer and the vehicle application end having previously established a long connection, and the initial data packet sequence data being generated according to a preset sequence data generation rule; The vehicle application end receives the heartbeat data packet, analyzes the heartbeat data packet to obtain analyzed vehicle data and analyzed data packet sequence data, generates application end data packet sequence data according to the preset sequence data generation rule, compares the initial data packet sequence data with the application end data packet sequence data, and if the comparison is successful, sends the analyzed vehicle data to the vehicle data end; the vehicle application end sorts the analyzed data packet sequence data of all the received heartbeat data packets to determine missing sequence information; the vehicle application end determines missing data time based on the missing sequence information and the preset sequence data generation rule, the preset sequence data generation rule comprising a data time sub-rule; the vehicle application end generates a missing data request message based on the missing data time, sends the missing data request message to the vehicle data layer, triggers the vehicle data layer to generate a retransmission data packet based on the missing data request message, and re-sends the retransmission data packet to the vehicle application end, the retransmission data packet comprising initial vehicle data corresponding to the missing data time; The vehicle data end receives the analyzed vehicle data and judges whether there is a target code in the analyzed vehicle data, generates a vehicle fault prompt message and performs fault prompting if there is a target code, so as to detect vehicle faults.

2. The vehicle failure detection method according to claim 1, characterized by, Before the vehicle data layer sends a heartbeat data packet to the vehicle application end at a first preset time interval, the method comprises: The vehicle application end sends a pulse signal to the vehicle data layer at a second preset time interval, so as to determine the new data generation state of vehicle new data of the vehicle data layer by sending a pulse signal by the vehicle data layer; If the new data generation state is generation, the step of triggering the vehicle data layer to send a heartbeat data packet to the vehicle application end at a first preset time interval is triggered.

3. The vehicle failure detection method according to claim 2, characterized by, Determining the new data generation state of vehicle new data of the vehicle data layer by sending a pulse signal by the vehicle data layer comprises: The vehicle data layer acquires the current memory occupation size of the preset vehicle data storage space in response to the pulse signal, and if the current memory occupation size is greater than the previous memory occupation size, the new data generation state is determined as generation, wherein the previous memory occupation size is the memory occupation size of the preset vehicle data storage space acquired by the vehicle data layer in response to a previous pulse signal; Or, The vehicle data layer acquires a current file quantity of the preset vehicle data storage space in response to the pulse signal, and determines the new data generation state as generated if the current file quantity is greater than a previous file quantity, where the previous file quantity is a file quantity of the preset vehicle data storage space acquired by the vehicle data layer in response to a previous pulse signal.

4. The vehicle malfunction detection method according to any one of claims 1 to 3, characterized by, After the vehicle data terminal receives the parsed vehicle data, the method further includes: The vehicle data terminal determines a data in-transit duration of the received parsed vehicle data, and determines the received parsed vehicle data as timeout transmission data if the data in-transit duration is greater than a preset duration threshold, and requests the vehicle application terminal to resend the parsed vehicle data.

5. The vehicle malfunction detection method according to any one of claims 1 to 3, characterized by, After comparing the initial data packet sequence data with the application terminal data packet sequence data, the method further includes: If the comparison is successful, the vehicle application terminal sends an elimination signal to the vehicle data layer to trigger the vehicle data layer to mark the heartbeat data packet as having been transmitted and to clear the heartbeat data packet.

6. The vehicle malfunction detection method according to any one of claims 1 to 3, characterized by, Determining whether a target code exists in the parsed vehicle data includes: Converting the parsed vehicle data into a preset data format; Determining sub-data representing a vehicle state from the converted parsed vehicle data based on a preset data structure rule; Matching the sub-data with a plurality of preset target codes; If the matching is successful, it is determined that the target code exists in the parsed vehicle data.

7. The vehicle malfunction detection method according to any one of claims 1 to 3, characterized by, If the target code exists, the method further includes persistently storing the parsed vehicle data in which the target code exists.

8. A vehicle malfunction detection device characterized by comprising: The vehicle fault detection device includes a vehicle data layer, a vehicle application terminal, and a vehicle data terminal, where: The vehicle data layer is configured to send a heartbeat data packet to the vehicle application terminal based on a UDP protocol at intervals of a first preset time, the heartbeat data packet including initial vehicle data and initial data packet sequence data, the vehicle data layer and the vehicle application terminal having established a long connection in advance, and the initial data packet sequence data being generated according to a preset sequence data generation rule; The vehicle application end is configured to receive the heartbeat data packet, parse the heartbeat data packet to obtain parsed vehicle data and parsed data packet sequence data, generate application end data packet sequence data according to a preset sequence data generation rule, compare the initial data packet sequence data with the application end data packet sequence data, and if the comparison is successful, send the parsed vehicle data to the vehicle data end, and sort the parsed data packet sequence data of all received heartbeat data packets to determine missing sequence information; determine missing data time based on the missing sequence information and the preset sequence data generation rule, wherein the preset sequence data generation rule comprises a data time sub-rule; generate a missing data request message based on the missing data time, send the missing data request message to the vehicle data layer, trigger the vehicle data layer to generate a retransmission data packet based on the missing data request message, and resend the retransmission data packet to the vehicle application end, wherein the retransmission data packet comprises initial vehicle data corresponding to the missing data time; The vehicle data end is configured to receive the parsed vehicle data, and determine whether there is a target code in the parsed vehicle data, generate a vehicle fault prompt message and perform a fault prompt if there is a target code, so as to detect a vehicle fault.

9. A vehicle characterized by comprising: The vehicle fault detection device comprises the vehicle fault detection device according to claim 8. The vehicle fault detection device comprises the vehicle fault detection device according to claim 8.

Citation Information

Patent Citations

  • Vehicle fault diagnosis method and device, vehicle and storage medium

    CN112485019A

  • Vehicle fault detection method and device, electronic equipment and readable storage medium

    CN115237090A

  • Network receiver incorporating retransmission request sending mechanism

    JP2013038543A