Vehicle fault detection method and device and vehicle

By establishing a long connection between the vehicle data layer and the application end, and automatically sending and comparing heartbeat data packets, the timeliness problem caused by manual pulling of vehicle data is solved, and automatic reporting and fault detection of vehicle data is realized, improving Real-time and security.

CN119437736AActive Publication Date: 2025-02-14CHONGQING SELIS PHOENIX INTELLIGENT INNOVATION TECH CO LTD
View PDF 16 Cites 0 Cited by

Patent Information

Application Number
CN202411461172.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-18
Publication Date
2025-02-14
Estimated Expiration
2044-10-18

AI Technical Summary

Technical Problem

In the prior art, vehicle data needs to be manually pulled, resulting in poor timeliness, time-consuming and may lead to vehicle failure not being discovered in time, which poses a safety risk.

Method used

By establishing a long connection in advance between the vehicle data layer and the vehicle application end, heartbeat data packets are sent regularly, including initial vehicle data and data packet sequence data, and generating application-side data packet sequence data for comparison. If successful, the analyzed vehicle data will be sent to the data end to determine whether there is a target code to generate a fault prompt.

Benefits of technology

It realizes automatic reporting and fault detection of vehicle data, reduces the time of manual intervention, improves the real-time and accuracy of data transmission, promptly detects vehicle failures, and reduces safety risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119437736A_ABST
    Figure CN119437736A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to the technical field of vehicles, and provides a vehicle fault detection method and device and a vehicle. According to the method, a vehicle application end and a vehicle data end are pre-constructed, and long connection is established between the vehicle application end and a vehicle data layer; the vehicle data layer sends a heartbeat data packet comprising initial vehicle data and initial data packet sequence data to the vehicle application end at an interval of first preset time, and compares application end data packet sequence data generated by the vehicle application end with analyzed data packet sequence data obtained by analyzing the received heartbeat data packet; if the comparison is successful, the analyzed vehicle data is sent to a vehicle data terminal, whether a target code exists in the analyzed vehicle data is judged at the vehicle data terminal, if yes, a vehicle fault prompt message is generated, and fault prompt is carried out, so that vehicle data reporting and vehicle fault detection can be automatically carried out, time consumption is short, and the method is more convenient; vehicle faults can be found in time, and vehicle safety risks are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] With the development of technology, vehicle fault detection has become an area that everyone pays more and more attention to. In related technologies, on traditional vehicle-mounted test platforms, the data collection of the client data layer needs to be stored on the disk, and then manually processed to obtain the hardware data. This method has requirements for the timing and personnel of data pulling, which makes data pulling time-consuming and poor in real-time performance. Furthermore, if a vehicle breaks down, but these fault data are not manually pulled in time, and timely analyzed to obtain fault warnings, it may cause safety risks to the vehicle. Therefore, how to ensure that the vehicle data is uploaded to the back-end processing in a timely manner, and to perform vehicle fault detection in a timely manner, to discover vehicle fault problems as soon as possible, and to avoid or further reduce vehicle safety risks is an issue that needs to be solved urgently. Summary of the invention

[0003] The embodiments of the present application provide a vehicle fault detection method, device and vehicle to solve the technical problems in the related art that vehicle data needs to be manually retrieved, which is not timely, time-consuming, and cannot detect vehicle faults in time, resulting in possible vehicle safety risks.

[0004] An embodiment of the present application provides a vehicle fault detection method, which includes: a vehicle data layer sends a heartbeat data packet to a vehicle application end at a first preset time interval, the heartbeat data packet includes initial vehicle data and initial data packet sequence data, the vehicle data layer pre-establishes a long connection with the vehicle application end, and the initial data packet sequence data is generated according to a preset sequence data generation rule; the vehicle application end receives the heartbeat data packet, parses the heartbeat data packet to obtain parsed vehicle data and parsed data packet sequence data, and the vehicle application end 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 parsed vehicle data to the vehicle data end; the vehicle data end receives the parsed vehicle data, and determines whether there is a target code in the parsed vehicle data. If the target code exists, a vehicle fault prompt message is generated and a fault prompt is performed to detect the vehicle fault.

[0005] In one embodiment of the present application, before the vehicle data layer sends a heartbeat data packet to the vehicle application end at a first preset time interval, the method includes: the vehicle application end sends 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 of the vehicle data layer by sending the pulse signal through the vehicle data layer; if the new data generation status is generated, triggering the step of sending a heartbeat data packet to the vehicle application end at a first preset time interval by the vehicle data layer.

[0006] In one embodiment of the present application, the new data generation state of the new vehicle data of the vehicle data layer is determined by sending a pulse signal by the vehicle data layer, including: the vehicle data layer obtains the current memory occupancy size of the preset vehicle data storage space in response to the pulse signal, if the current memory occupancy size is greater than the previous memory occupancy size, the new data generation state is determined to be generated, wherein the previous memory occupancy size is the memory occupancy size 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 obtains the current number of files in the preset vehicle data storage space in response to the pulse signal, if the current number of files is greater than the previous number of files, the new data generation state is determined to be 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.

[0007] In one embodiment of the present application, the method also includes: the vehicle application end sorts the parsed data packet sequence data of all received heartbeat data packets to determine the missing sequence information; the vehicle application end determines the missing data time based on the missing sequence information and the preset sequence data generation rule, and the preset sequence data generation rule includes a data time sub-rule; the vehicle application end generates a missing data request message based on the missing data time, and sends the missing data request message to the vehicle data layer to trigger the vehicle data layer to generate a reissue data packet based on the missing data request message, and resend the reissue data packet to the vehicle application end, and the reissue data packet includes the initial vehicle data corresponding to the missing data time.

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

[0009] In one embodiment of the present application, after comparing the initial data packet sequence data with the application-end data packet sequence data, the method further includes: if the comparison is successful, the vehicle application end sends an elimination 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 the present 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 a vehicle state from the converted parsed vehicle data based on preset data structure rules; matching the sub-data with a plurality of preset target codes; and if the match is successful, determining that a target code exists in the parsed vehicle data.

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

[0012] The embodiment of the present application also provides a vehicle fault detection device, which includes a vehicle data layer, a vehicle application end and a vehicle data end, wherein: the vehicle data layer is used to send a heartbeat data packet to the vehicle application end at an interval of a first preset time, the heartbeat data packet includes initial vehicle data and initial data packet sequence data, the vehicle data layer and the vehicle application end have pre-established a long connection, and the initial data packet sequence data is generated according to a preset sequence data generation rule; the vehicle application end is used to receive the heartbeat data packet, parse the heartbeat data packet to obtain parsed vehicle data and parsed data packet sequence data, and the vehicle application end 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 parsed vehicle data to the vehicle data end; the vehicle data end is used to receive the parsed vehicle data, and determine whether there is a target code in the parsed vehicle data. If the target code exists, a vehicle fault prompt message is generated and a fault prompt is performed to detect the vehicle fault.

[0013] An embodiment of the present application also provides a vehicle, comprising the vehicle fault detection device described in any one of the above embodiments.

[0014] An embodiment of the present application further 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 implements the method described in any one of the above embodiments when executing the computer program.

[0015] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the method described in any one of the above embodiments is implemented.

[0016] In the scheme implemented by the vehicle fault detection method, device and vehicle provided above, the vehicle fault detection method pre-builds a vehicle application end and a vehicle data end, and pre-establishes a long connection between the vehicle application end and the vehicle data layer. The vehicle data layer sends a heartbeat data packet including initial vehicle data and initial data packet sequence data to the vehicle application end at a first preset time interval, and then compares the application-end data packet sequence data generated by the vehicle application end itself 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 end, and the vehicle data end determines whether there is a target code in the parsed vehicle data. If so, a vehicle fault prompt message is generated and a fault prompt is performed to detect the vehicle fault. In this way, there is no need to manually pull the vehicle data, and the vehicle data can be automatically reported and the vehicle fault can be detected, which is time-saving and more convenient. Vehicle faults can be discovered in a timely manner to avoid or further reduce vehicle safety risks. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor.

[0018] Figure 1 A schematic diagram of a process flow of a vehicle fault detection method provided in an embodiment of the present application;

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

[0020] Figure 3 A schematic diagram of a process for data interaction between a vehicle data terminal and a vehicle application terminal provided in an embodiment of the present application;

[0021] Figure 4 A schematic diagram of the structure of a vehicle fault detection device provided in an embodiment of the present application;

[0022] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

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

[0024] See also Figure 1 As shown, Figure 1 A flow chart of a vehicle fault detection method provided in an embodiment of the present application, the method comprising the following steps:

[0025] Step S110: The vehicle data layer sends a heartbeat data packet to the vehicle application end at a first preset time interval.

[0026] The heartbeat data packet includes initial vehicle data and initial data packet sequence data. The vehicle data layer has established a long connection with the vehicle application end in advance. The initial data packet sequence data is generated according to a preset sequence data generation rule. The initial vehicle data can be collected by one or more target domain controllers.

[0027] The first preset time may be an equal time or a time consisting of multiple time value sequences. Those skilled in the art may select a specific implementation method of the first preset time as needed, which is not limited here.

[0028] As an example, a heartbeat data packet can use a pulse signal method and a heartbeat mechanism to send a signal every second. The signal itself is a data packet. Here, this signal data packet is transformed into a data packet with a serial number (an ordered number encrypted with hash according to time, protocol rules, and rules required by specific scenarios) for identification at the vehicle application end. The serial number is the concatenation value of a string encrypted with hash according to time, protocol rules, and rules required by specific scenarios. This can achieve orderly transmission of data packets.

[0029] The method for establishing a long connection between the vehicle data layer and the vehicle application end 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 according to time, protocol rules and specific scenario requirements, and then perform hash encryption on the initial sequence data to obtain a sequence rule 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 end at a first preset time interval, the method includes: the vehicle application end sends a pulse signal to the vehicle data layer at a second preset time interval to determine the new data generation status of the vehicle's new data in the vehicle data layer by sending the pulse signal through the vehicle data layer; if the new data generation status is generated, trigger the step of sending a heartbeat data packet to the vehicle application end at a first preset time interval by the vehicle data layer.

[0032] The first preset time and the second preset time may be the same or different, and may be specifically set according to the needs of those skilled in the art, for example, both may be set to 1 second.

[0033] It is understandable that vehicle data does not have new data all the time. If invalid data is sent continuously, it will lead to a waste of resources. At this time, it is possible to monitor the preset vehicle data storage space that stores vehicle data to determine whether new data is generated. If new data is generated, a heartbeat data packet is generated and sent. If not, and there is only old data, the old data will not be sent repeatedly without a request.

[0034] Following the above embodiment, the new data generation state of the new vehicle data of the vehicle data layer is determined by sending a pulse signal through the vehicle data layer, including: the vehicle data layer obtains the current memory occupancy size of the preset vehicle data storage space in response to the pulse signal, and if the current memory occupancy size is greater than the previous memory occupancy size, the new data generation state is determined as generated, wherein the previous memory occupancy size is the memory occupancy size 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 occupancy changes, it can be understood that new data has been generated, and the new data can be sent to the vehicle application end at this time.

[0035] Following the above embodiment, the new data generation state of the new vehicle data of the vehicle data layer is determined by sending a pulse signal through the vehicle data layer, including: the vehicle data layer obtains the current number of files in the preset vehicle data storage space in response to the pulse signal, and if the current number of files is greater than the previous number of files, the new data generation state is determined to be 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. Similar to the previous embodiment, if the number of files increases, it can also be considered that new data has been generated, and the new data can be sent to the vehicle application end at this time.

[0036] For example, to determine whether a data packet (new vehicle data) is generated in the vehicle data layer, a pulse signal method can be used to send a signal every second to read whether a data packet is generated in the client data layer. To determine whether a data packet is generated, Java's folder.listFiles() can be used to loop through the file size and compare it with the previous size. Shell commands can also be used, for example: total_memory_mb = $(free-m|awk' / Mem: / {print$2}'). There are two ways to determine whether a data packet is generated: 1: determine the memory size of the path where the data packet is stored; 2: determine the number of files in the path where the data packet is stored.

[0037] In one embodiment, the vehicle application end may be an embedded client, and the vehicle data layer is pre-configured with protocol rules such as UDP / IP protocol, etc. The vehicle application end may continuously and automatically pull new vehicle data generated by the vehicle data layer.

[0038] In step S120, the vehicle application end receives the heartbeat data packet, parses the heartbeat data packet, obtains the parsed vehicle data and the parsed data packet sequence data, and the vehicle application end generates the application end data packet sequence data according to the preset sequence data generation rules, compares the initial data packet sequence data with the application end data packet sequence data, and if the comparison is successful, sends the parsed vehicle data to the vehicle data end.

[0039] The method for parsing the heartbeat data packet can be a method known to those skilled in the art, and is not limited here. The vehicle application end uses the same preset sequence data generation rules as the vehicle data layer to generate its own application-side data packet sequence data. Then, under normal circumstances, the initial data packet sequence data and the application-side data packet sequence data should be the same. At this time, the comparison is successful, indicating that the data is correct. If the comparison fails, it means that either an abnormality has occurred during the data transmission process, or the previous data is missing, or other abnormal situations have occurred. At this time, the vehicle data layer needs to resend the heartbeat data packet 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 side sends an elimination 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 can be understood that by marking the status of the data packet, if it is successfully transmitted, the application sends a pulse signal (a reverse sequence number, that is, a cancellation signal), and the vehicle data layer marks the data packet as transmitted and clears it. This can save storage space.

[0042] In one embodiment, the method also includes: the vehicle application end sorts the parsed data packet sequence data of all received heartbeat data packets to determine the missing sequence information; the vehicle application end determines the missing data time based on the missing sequence information and a preset sequence data generation rule, and the preset sequence data generation rule includes a data time sub-rule; the vehicle application end generates a missing data request message based on the missing data time, and sends the missing data request message to the vehicle data layer to trigger the vehicle data layer to generate a reissued data packet based on the missing data request message, and resend the reissued data packet to the vehicle application end, and the reissued data packet includes the initial vehicle data corresponding to the missing data time.

[0043] Since the sequence of heartbeat data packets is in time series order, once data missing occurs, the time of data missing can be obtained through the newly generated time of the previously detected data, and then the time of missing data can be found, so that the vehicle data layer can resend the missing data.

[0044] For example, after the vehicle data layer and the vehicle application end establish a long connection, the vehicle application end performs analysis. The analysis logic is that at the same time on the application end, a hash encrypted concatenation value will be generated according to the signal generation rules of the data end. The two encrypted hash values ​​of the application end and the data end are compared (the initial data packet sequence data is compared with the application end data packet sequence data). If they are equal, it means that they are data from the same time period. If it is found that no sequence number is sent within a certain time period (the vehicle application end and the vehicle data layer will simultaneously generate the sequence number of the corresponding time period, and then perform a hash comparison), the vehicle application end will pass the sequence number within the missing time period to the UDP data layer (vehicle data layer), so that the vehicle data layer can resend the missing vehicle data of that part.

[0045] As an example, for ease of understanding, the code example for the vehicle application end to resend part of the data can be:

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

[0047] ack+=1

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

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

[0050] socket.sendto(ack_packet,addr)

[0051] }

[0052] Else{

[0053] #Send repeated ACK request

[0054] ack_packet=(ack,)

[0055] socket.sendto(ack_packet,addr)

[0056] }

[0057] 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 given to detect the vehicle fault.

[0058] The target code indicates that the vehicle has a fault or anomaly. The target code may be preset by a person skilled in the art.

[0059] As an example, the vehicle data terminal may be deployed in a device inside the vehicle, or may be deployed in a device specified by a person skilled in the art, such as a background server.

[0060] In one embodiment, after the vehicle data end receives the parsed vehicle data, the method further includes: the vehicle data end determines the data in transit time of the received parsed vehicle data; if the data in transit time is greater than a preset time threshold, the received parsed vehicle data is determined as timed-out data, and the vehicle application end is requested to resend the parsed vehicle data.

[0061] It is understood that a timeout is set at the vehicle data end, and the data is sent when the timeout occurs, and then resent. This is to avoid data unreliability due to external interference and other factors. The data en route time can be determined based on the data sending timestamp in the parsed vehicle data and the current data receiving timestamp, or can be determined by other methods known to those skilled in the art.

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

[0063] In one embodiment, if the target code exists, the method further includes: persistently storing the parsed vehicle data with the target code. This method can facilitate subsequent query, call or statistics 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 a vehicle state from the converted parsed vehicle data based on preset data structure rules; matching the sub-data with a plurality of preset target codes; and if the match is successful, determining that the target code exists in the parsed vehicle data.

[0065] The preset data format can be a pre-set data format such as hexadecimal data. The preset data structure rule is also the data meaning represented by the data at a certain position, such as the first N bits of data represent time, the data at a certain position after that represent lights, and the data at a certain position after that represent vehicle status.

[0066] For example, the data at the vehicle data end is the data collected and sorted by the underlying domain control program (the logic of collecting data in the domain control system is completed by the hardware development engineer) after the warning or abnormal data is stored in a designated directory. The logic of the data packet is judged according to the pulse signal (the preset data format is obtained), and the data packet is transmitted to the software application layer of the vehicle data end through the interface for parsing. As an example, the parsing method is as follows: the data packet is a machine language and a binary file. At this time, it can be converted according to the agreed preset data format. For example, if hexadecimal is required, the binary string is converted to a decimal integer through the Integer.parseInt(binaryString) method. Then the decimal integer is converted to a hexadecimal string through the Integer.toHexString(decimal) method. The software application layer can parse the content of the warning according to the rules agreed with the vehicle data layer (preset data structure rules).

[0067] See also Figure 2 , Figure 2 A schematic diagram of the converted and parsed vehicle data provided in the embodiment of the present application, such as Figure 2 As shown, the parsed vehicle data can be a Bin file, and then the Bin file is parsed and formatted in the above manner. The consecutive bits of the Bin file data represent the format agreed upon by the vehicle data end and the vehicle application end. For example, the eight bits of the first red line ① represent the time, which is converted into time through the base system. The second red line ② represents the lights in the vehicle body, etc. The numbers 08 00 21 after the second red line represent the fault code or the abnormal code. The third red line ③ represents the speed in the vehicle body, etc. After the software application layer learns of these data, it will send a reminder message to the user and save the persistent data.

[0068] As an example, the vehicle data end is deployed with a software application layer. The software application layer uses a Java program 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 end) for perception (the premise is that the software application layer and the hardware program are deployed on a service. If it is not a server, the IP address and port of the other party need to be configured. If the IP is not accessible, the firewall needs to be closed). For example, the code example of the software application layer is as follows:

[0069] The software application layer writes a loop to keep receiving signals sent by UDP to ensure that it is always listening to broadcast information:

[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 pair

[0072] Byte[]receiveBytes; / / Define the byte stream of received data

[0073] string returnData;

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

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

[0076] returnData is the data packet returned by UDP. Read() is performed on returnData, and the read data is persisted to the database according to the business rules for use by other applications. If the returned data is incorrect, the format is incorrect, or it is an empty packet, the program will automatically determine and call the interface for uploading the data file to the disk.

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

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

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

[0080] Read file contents: BufferedReader reader = new BufferedReader(newInputStreamReader(inputStream)).

[0081] See also Figure 3 , Figure 3 A schematic diagram of a process for data interaction between a vehicle data terminal and a vehicle application terminal provided in an embodiment of the present application, such as Figure 3 As shown, taking the sending of parsed vehicle data through UDP (User Datagram Protocol, message-oriented transport layer protocol) protocol as an example, the software application layer of the vehicle data end pre-initializes the socket and binds the corresponding ID address and port, then sends the perception UDP signal broadcast information to the vehicle application end, and receives the reply status data (parsed vehicle data) fed back by the vehicle application end. After completing the collection of vehicle data, the vehicle data end closes the socket. At the vehicle application end, an embedded client is deployed, which first initializes the preset program package and negotiates the UDP / IP protocol, then collects data from the vehicle data layer, and writes the IP address and port of the software application layer through the receiving program module and the sending program module respectively, so as to realize the sending and data transmission of the vehicle data layer.

[0082] The inventor found that in the vehicle test platform, after the data collection of the client data layer is written to the disk, it is necessary to manually process and pull the hardware data, which is time-consuming and cannot be done in real time. Data upload and analysis cannot be done, and some fault data is not uploaded to the software application layer for analysis and warning in real time, which may cause security problems. One or more embodiments of the vehicle fault detection method provided in the embodiments of the present application, when one or more of the heartbeat data packet, the parsed vehicle data, the pulse signal, etc. are transmitted using the UDP protocol, through the real-time network communication characteristics of UDP, and the advantage of UDP's fast connection establishment speed, and using the modified UDP, pulse signals are continuously sent to maintain a long connection between the vehicle data end and the vehicle application end. The software application layer sends broadcast information through the program, and promptly obtains the signal sent by the data layer UDP, so that data can be uploaded and analyzed and early warning can be given in real time, and fault problems can be reminded in time.

[0083] In some embodiments, the method provided in the above embodiments is adopted, and the advantages of UDP's real-time and fast connection are utilized to realize the rapid acquisition and analysis of hardware data (initial vehicle data of the vehicle data layer) and software application layer, timely expose fault information, and prompt warning. The modified UDP transmission is more stable, and a long connection can be established by using pulse signals. By using sequence numbers, there will be no loss of signals and data packets. In addition, the problem of packet loss and duplication of transmitted data packets can also be solved.

[0084] By pre-building a vehicle application end and a vehicle data end, and pre-establishing a long connection between the vehicle application end and the vehicle data layer, the vehicle data layer sends a heartbeat data packet including initial vehicle data and initial data packet sequence data to the vehicle application end at a first preset time interval, and then compares the application-end data packet sequence data generated by the vehicle application end itself 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 end, and the vehicle data end determines whether there is a target code in the parsed vehicle data. If so, a vehicle fault prompt message is generated and a fault prompt is performed to detect vehicle faults. In this way, there is no need to manually pull vehicle data, and vehicle data reporting and vehicle fault detection can be automatically performed, which is time-saving and more convenient, and can detect vehicle faults in a timely manner to avoid or further reduce 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. Figure 4 , Figure 4 A schematic diagram of the structure of a vehicle fault detection device provided in an embodiment of the present application is shown in FIG. Figure 4As shown, the vehicle fault detection device 400 includes a vehicle data layer 401, a vehicle application end 402 and a vehicle data end 403, wherein: the vehicle data layer 401 is used to send a heartbeat data packet to the vehicle application end 402 at an interval of a first preset time, the heartbeat data packet includes initial vehicle data and initial data packet sequence data, the vehicle data layer 401 and the vehicle application end 402 have established a long connection in advance, and the initial data packet sequence data is generated according to a preset sequence data generation rule; the vehicle application end 402 is used to receive the heartbeat data packet, parse the heartbeat data packet, obtain the parsed vehicle data and the parsed data packet sequence data, and the vehicle application end 402 generates the 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 parsed vehicle data to the vehicle data end 403; the vehicle data end 403 is used to receive the parsed vehicle data, and determine whether there is a target code in the parsed vehicle data, if there is a target code, generate a vehicle fault prompt message and perform a fault prompt to detect the vehicle fault.

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

[0087] In one embodiment, the vehicle application end is configured to: obtain the current memory occupancy size of the preset vehicle data storage space in response to a pulse signal; if the current memory occupancy size is greater than the previous memory occupancy size, determine the new data generation state as generated, wherein the previous memory occupancy size is the memory occupancy size 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 end is configured to: obtain the current number of files in the preset vehicle data storage space in response to a pulse signal; 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 end is further configured to: sort the parsed data packet sequence data of all received heartbeat data packets to determine the missing sequence information; the vehicle application end determines the missing data time based on the missing sequence information and a preset sequence data generation rule, and the preset sequence data generation rule includes a data time sub-rule; the vehicle application end generates a missing data request message based on the missing data time, and sends the missing data request message to the vehicle data layer to trigger the vehicle data layer to generate a reissued data packet based on the missing data request message, and resend the reissued data packet to the vehicle application end, and the reissued data packet includes 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 in transit time of the received parsed vehicle data; if the data in transit time is greater than 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 end is also used to compare the initial data packet sequence data with the application end data packet sequence data. If the comparison is successful, the vehicle application end sends an elimination 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 status from the converted parsed vehicle data based on preset data structure rules; match the sub-data with multiple preset target codes; if the match is successful, determine that the target code exists in the parsed vehicle data.

[0093] For the specific definition of the vehicle fault detection device, please refer to the definition of the vehicle fault detection method above, which will not be repeated here. Each module in the above-mentioned vehicle fault detection device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the electronic device in the form of hardware, or can be stored in the memory of the electronic device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0094] In this embodiment, the vehicle fault detection device is essentially provided with multiple modules for executing the steps executed by the client in the vehicle fault detection method in any of the above embodiments. 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, the vehicle comprising the vehicle fault detection device provided by any of the above embodiments. The specific functions and technical effects of the vehicle can refer to the above embodiments, and will not be described in detail here.

[0096] See also Figure 5 An embodiment of the present invention further 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 the computer program stored in the memory 802 to implement any method provided in the above embodiments.

[0097] As an example, the electronic device may be a device such as a vehicle or a vehicle computer.

[0098] An embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. The computer program is used to enable a computer to execute a method provided in any one of the above embodiments.

[0099] The embodiment of the present application also provides a non-volatile readable storage medium, which stores one or more modules (programs). When the one or more modules are applied to a device, the device can execute instructions (instructions) of the steps included in the embodiment 1 of the embodiment of the present application.

[0100] The embodiment of the present application also provides a computer program product, including a computer program, which can implement the steps and corresponding contents of the aforementioned method embodiment when executed by a processor.

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

[0102] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0103] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate 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 a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0104] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of the code contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0105] It should be understood that the terms "first", "second", etc. mentioned in this application are used to distinguish similar objects, and do not necessarily represent that they refer to a specific order or sequence. The technical features in which these terms are located can be interchanged under appropriate circumstances, so that the embodiments of the application described here can be implemented in an order other than the illustrated or written description.

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

[0107] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Anyone familiar with the art may 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 a person of ordinary skill in the art without departing from the spirit and technical concept disclosed by the present invention shall still be covered by the claims of the present invention.

Claims

1. A vehicle fault detection method, characterized in that: 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, wherein the heartbeat data packet includes initial vehicle data and initial data packet sequence data, the vehicle data layer pre-establishes a long connection with the vehicle application end, and the initial data packet sequence data is generated according to a preset sequence data generation rule; The vehicle application end receives the heartbeat data packet, parses the heartbeat data packet to obtain parsed vehicle data and parsed data packet sequence data, and the vehicle application end 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 parsed vehicle data to the vehicle data end; 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, a vehicle fault prompt message is generated and a fault prompt is performed to detect a vehicle fault.

2. The vehicle fault detection method according to claim 1, characterized in that: Before the vehicle data layer sends a heartbeat data packet to the vehicle application end at a first preset time interval, the method includes: The vehicle application terminal sends a pulse signal to the vehicle data layer at an interval of a second preset time, so as to determine a new data generation state of new vehicle data of the vehicle data layer by sending the pulse signal through the vehicle data layer; If the new data generation status is generated, trigger the step of sending a heartbeat data packet to the vehicle application end at a first preset time interval by the vehicle data layer.

3. The vehicle fault detection method according to claim 2, characterized in that: Sending a pulse signal through the vehicle data layer to determine a new data generation state of new vehicle data of the vehicle data layer includes: The vehicle data layer obtains 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, determines the new data generation state as generation, wherein the previous memory occupation size is the memory occupation size 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 obtains the current number of files in the preset vehicle data storage space in response to the pulse signal. If the current number of files is greater than the previous number of files, the new data generation status is determined to be 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.

4. The vehicle fault detection method according to any one of claims 1 to 3, characterized in that: The method further comprises: The vehicle application end sorts the parsed data packet sequence data of all received heartbeat data packets to determine missing sequence information; The vehicle application terminal determines the missing data time based on the missing sequence information and the preset sequence data generation rule, wherein the preset sequence data generation rule includes a data time sub-rule; The vehicle application end generates a missing data request message based on the missing data time, and sends the missing data request message to the vehicle data layer to trigger the vehicle data layer to generate a reissue data packet based on the missing data request message, and resend the reissue data packet to the vehicle application end, wherein the reissue data packet includes the initial vehicle data corresponding to the missing data time.

5. The vehicle fault detection method according to any one of claims 1 to 3, characterized in that: After the vehicle data terminal receives the parsed vehicle data, the method further includes: The vehicle data terminal determines the data in transit time of the received parsed vehicle data. If the data in transit time is greater than a preset time threshold, the received parsed vehicle data is determined as timed-out data, and the vehicle application terminal is requested to resend the parsed vehicle data.

6. The vehicle fault detection method according to any one of claims 1 to 3, characterized in that: 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.

7. The vehicle fault detection method according to any one of claims 1 to 3, characterized in that: Determining whether the 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 match is successful, it is determined that the target code exists in the parsed vehicle data.

8. The vehicle fault detection method according to any one of claims 1 to 3, characterized in that: If the target code exists, the method further includes: persistently storing the parsed vehicle data having the target code.

9. A vehicle fault detection device, characterized in that: The vehicle fault detection device comprises a vehicle data layer, a vehicle application end and a vehicle data end, wherein: The vehicle data layer is used to send a heartbeat data packet to the vehicle application end at an interval of a first preset time, the heartbeat data packet includes initial vehicle data and initial data packet sequence data, the vehicle data layer and the vehicle application end have established a long connection in advance, and the initial data packet sequence data is generated according to a preset sequence data generation rule; The vehicle application end is used to receive the heartbeat data packet, parse the heartbeat data packet to obtain parsed vehicle data and parsed data packet sequence data, and the vehicle application end 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 parsed vehicle data to the vehicle data end; The vehicle data terminal is used to receive the parsed vehicle data and determine whether a target code exists in the parsed vehicle data. If a target code exists, a vehicle fault prompt message is generated and a fault prompt is performed to detect a vehicle fault.

10. A vehicle, characterized in that: Includes the vehicle fault detection device as described in claim 9.

Citation Information

Patent Citations

  • Vehicle fault diagnosis method

    CN102393732A

  • Smart phone-based automobile fault diagnosis device

    CN103499968A

  • Vehicle remote diagnostic system and diagnostic method

    CN103604612A

  • Vehicle fault prompting method, apparatus and system

    CN105607629A

  • HIL simulation test system and method for 5G parallel driving system

    CN111856966A