Vehicle diagnosis method, device and equipment and storage medium
By acquiring and saving the vehicle identification code and CAN ID, triggering the handshake operation and constructing the message, the problem of VIN code failure in remote diagnosis is solved, and reliable diagnosis process and efficient data acquisition are achieved.
Patent Information
- Application Number
- CN202510571071.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-29
- Publication Date
- 2025-07-29
AI Technical Summary
In remote vehicle diagnosis, the vehicle identification code VIN code fails to read due to network delay and instability, resulting in the diagnosis failure, affecting the user experience and adding operation steps.
By sending an information acquisition request to the target vehicle, obtaining the vehicle identification code and the CAN ID of the ECU response, and saving it to the local storage space, triggering a handshake operation to obtain the communication address of the diagnostic device interface device, constructing and sending the target message to the diagnostic device interface device, generating and forwarding the diagnostic request to collect diagnostic data.
It avoids VIN code reading failure, ensures the reliability and user experience of the diagnosis process, reduces user operation steps, and improves the efficiency and accuracy of remote diagnosis.
Smart Images

Figure CN120386330A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of vehicle diagnosis, and particularly to a vehicle diagnosis method, device, equipment and storage medium. Background Art
[0002] When performing vehicle diagnosis, the diagnostic software usually reads the vehicle VIN code (Vehicle Identification Number) first. If the VIN code reading fails, the subsequent diagnostic process cannot be entered. In local diagnosis, the VIN code reading usually does not fail. However, in remote diagnosis, due to large network latency or unstable network, communication timeouts occur, resulting in the failure to read the VIN code. Although the diagnostic software can usually manually input the VIN code or manually select the vehicle model for diagnosis after the VIN code reading fails. However, due to the long distance between the two parties in remote diagnosis, input errors are inevitably caused due to communication problems, resulting in diagnostic failures. In addition, even if the input is correct, it will increase the user's operation, affect the user experience, and lead to user complaints.
[0003] In summary, how to avoid remote diagnostic failures caused by incorrect VIN code reading is an urgent problem to be solved at present. Summary of the Invention
[0004] In view of this, the purpose of the present invention is to provide a vehicle diagnosis method, device, equipment and storage medium, which can avoid remote diagnostic failures caused by incorrect VIN code reading. The specific solutions are as follows:
[0005] In a first aspect, the present application provides a vehicle diagnosis method, which is applied to a vehicle data acquisition device and includes:
[0006] Sending an information acquisition request to a target vehicle to obtain the target vehicle identification code returned by the target vehicle and the target CAN ID replied by the target ECU in the target vehicle, and saving the obtained target vehicle identification code and the target CAN ID to a locally preset storage space;
[0007] Triggering a handshake operation with a target diagnostic instrument interface device to obtain the communication address information returned by the target diagnostic instrument interface device, and based on the communication address information, sending a target message constructed by using the target vehicle identification code and the target CAN ID saved in the locally preset storage space to the target diagnostic instrument interface device; the communication address information includes the IP address and port number of the target diagnostic instrument interface device;
[0008] Obtaining a target diagnostic request generated by the target diagnostic instrument based on the target vehicle identification code and the target CAN ID obtained by the target diagnostic instrument interface device;
[0009] Forward the target diagnosis request to the target vehicle to collect the corresponding diagnosis data of each vehicle device to be diagnosed corresponding to each of the target CAN IDs in the target vehicle.
[0010] Optionally, the sending an information acquisition request to the target vehicle to obtain the target vehicle identification code returned by the target vehicle and the target CAN ID replied by the target ECU in the target vehicle includes:
[0011] Send an information acquisition request to the target vehicle to obtain the vehicle identification code to be verified returned by the target vehicle and the target CAN ID replied by the target ECU in the target vehicle;
[0012] Verify whether the format of the vehicle identification code to be verified meets the preset format conditions;
[0013] If the format of the vehicle identification code to be verified meets the preset format conditions, determine the vehicle identification code to be verified that meets the preset format conditions as the target vehicle identification code;
[0014] If the format of the vehicle identification code to be verified does not meet the preset format conditions, re-execute the step of sending an information acquisition request to the target vehicle to obtain the target vehicle identification code returned by the target vehicle and the target CAN ID replied by the target ECU in the target vehicle.
[0015] Optionally, the triggering a handshake operation with the target diagnostic instrument interface device to obtain the communication address information returned by the target diagnostic instrument interface device includes:
[0016] Trigger a handshake operation with the target diagnostic instrument interface device, and send a first IP address and a first port number to the target diagnostic instrument interface device to obtain a second IP address and a second port number returned by the target diagnostic instrument interface device;
[0017] Wherein, the first IP address and the first port number are the IP address and port number of the vehicle data acquisition device, and the second IP address and the second port number are the IP address and port number of the target diagnostic instrument interface device.
[0018] Optionally, the sending the target message constructed by using the target vehicle identification code and the target CAN ID saved in the local preset storage space to the target diagnostic instrument interface device includes:
[0019] Send the target message constructed by using the target vehicle identification code and the target CAN ID saved in the local preset storage space to the target diagnostic instrument interface device, so that the target diagnostic instrument interface device can obtain the target message, and then parse the target message to obtain a target read command, the target vehicle identification code, and the target CAN ID, and generate a target diagnostic request based on the target read command, the target vehicle identification code, and the target CAN ID.
[0020] Optionally, parsing the target message to obtain a target read command, the target vehicle identification code, and the target CAN ID includes:
[0021] Parse the target message to obtain a target read command, a vehicle identification code to be audited, and a CAN ID to be audited;
[0022] According to the target read command, determine whether the vehicle identification code to be audited and the CAN ID to be audited meet the preset conditions. If they meet the preset conditions, determine the vehicle identification code to be audited and the CAN ID to be audited as the target vehicle identification code and the target CAN ID respectively;
[0023] Generate a target diagnostic request based on the target read command, the target vehicle identification code, and the target CAN ID.
[0024] In a second aspect, the present application provides a vehicle diagnosis method applied to a target diagnostic instrument interface device, including:
[0025] Trigger a handshake operation with the vehicle data collection device to send corresponding communication address information to the vehicle data collection device during the handshake, so that the vehicle data collection device constructs a target message by using the target vehicle identification code and the target CAN ID saved in the local preset storage space of the vehicle data collection device;
[0026] Receive the target message sent by the vehicle data collection device, obtain the target vehicle identification code and the target CAN ID in the target message, and generate a corresponding target diagnostic request based on the target vehicle identification code and the target CAN ID;
[0027] Send the target diagnostic request to the vehicle data collection device, so that the vehicle data collection device can collect corresponding diagnostic data of each to-be-diagnosed vehicle device corresponding to each target CAN ID in the target vehicle according to the target diagnostic request.
[0028] In a third aspect, the present application provides a vehicle diagnosis device applied to a vehicle data collection device, including:
[0029] An information storage module, configured to send an information acquisition request to a target vehicle to obtain a target vehicle identification code returned by the target vehicle and a target CAN ID replied by a target ECU in the target vehicle, and save the obtained target vehicle identification code and the target CAN ID to a local preset storage space;
[0030] A message sending module, configured to trigger a handshake operation with a target diagnostic instrument interface device to obtain communication address information returned by the target diagnostic instrument interface device, and based on the communication address information, send a target message constructed by using the target vehicle identification code and the target CAN ID saved in the local preset storage space to the target diagnostic instrument interface device; the communication address information includes an IP address and a port number of the target diagnostic instrument interface device;
[0031] A request acquisition module, configured to acquire a target diagnostic request generated by a target diagnostic instrument based on the target vehicle identification code and the target CAN ID obtained by the target diagnostic instrument interface device;
[0032] A data acquisition module, configured to forward the target diagnostic request to the target vehicle to acquire corresponding diagnostic data of each to-be-diagnosed vehicle device corresponding to each of the target CAN IDs in the target vehicle.
[0033] In a fourth aspect, the present application provides a vehicle diagnostic device, which is applied to a target diagnostic instrument interface device and includes:
[0034] An information sending module, configured to trigger a handshake operation with a vehicle data acquisition device to send corresponding communication address information to the vehicle data acquisition device during the handshake, so that the vehicle data acquisition device constructs a target message based on the communication address information by using a target vehicle identification code and a target CAN ID saved in a local preset storage space of the vehicle data acquisition device;
[0035] A request generation module, configured to receive the target message sent by the vehicle data acquisition device, obtain the target vehicle identification code and the target CAN ID in the target message, and generate a corresponding target diagnostic request based on the target vehicle identification code and the target CAN ID;
[0036] A request sending module, configured to send the target diagnostic request to the vehicle data acquisition device, so that the vehicle data acquisition device acquires corresponding diagnostic data of each to-be-diagnosed vehicle device corresponding to each of the target CAN IDs in the target vehicle according to the target diagnostic request.
[0037] Fifth aspect, the present application provides an electronic device, comprising:
[0038] a memory for storing a computer program;
[0039] a processor for executing the computer program to implement the vehicle diagnosis method as described above.
[0040] Sixth aspect, the present application provides a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the vehicle diagnosis method as described above is implemented.
[0041] In summary, the present application first sends an information acquisition request to a target vehicle to obtain a target vehicle identification code returned by the target vehicle and a target CAN ID (Controller Area Network Identifier) replied by a target ECU (Electronic Control Unit) in the target vehicle, and saves the obtained target vehicle identification code and target CAN ID to a local preset storage space; triggers a handshake operation with a target diagnostic instrument interface device to obtain communication address information returned by the target diagnostic instrument interface device, and based on the communication address information, sends a target message constructed by using the target vehicle identification code and target CAN ID saved in the local preset storage space to the target diagnostic instrument interface device; the communication address information includes an IP address and a port number of the target diagnostic instrument interface device; obtains a target diagnostic request generated by the target diagnostic instrument based on the target vehicle identification code and target CAN ID obtained by the target diagnostic instrument interface device; forwards the target diagnostic request to the target vehicle to collect corresponding diagnostic data of each vehicle device to be diagnosed corresponding to each target CAN ID in the target vehicle. As can be seen from the above, the present application first sends an information acquisition request to the target vehicle to obtain the target vehicle identification code returned by it and the target CAN ID replied by the target ECU, and saves them to the local preset storage space; triggers a handshake operation with the target diagnostic instrument interface device to obtain the communication address information returned by it, and based on this information, sends the target message constructed by using the target vehicle identification code and target CAN ID saved locally to the target diagnostic instrument interface device; obtains the target diagnostic request generated by the target diagnostic instrument based on the target vehicle identification code and target CAN ID obtained by the target diagnostic instrument interface device; forwards the target diagnostic request to the target vehicle to collect the corresponding diagnostic data of each vehicle device to be diagnosed corresponding to each target CAN ID in the target vehicle. In this way, when the two parties shake hands, the read VIN code and the CAN ID replied by the ECU are sent to the target diagnostic instrument interface device. When the target diagnostic instrument interface device receives a command to read the VIN code sent by the diagnostic instrument, it directly uses the VIN code and CAN ID read by the vehicle data acquisition device in the target diagnostic instrument interface device to reply to the diagnostic instrument, and then directly discards this request without sending it to the vehicle data acquisition device. Because the VIN code is directly replied by the target diagnostic instrument interface device without being forwarded through the network, the reading of the VIN code is made more reliable. Description of the Drawings
[0042] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the accompanying drawings required in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only the embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can also be obtained based on the provided drawings.
[0043] Figure 1 Flowchart of a vehicle diagnosis method applied to a vehicle data acquisition device disclosed in this application;
[0044] Figure 2 Flowchart of a specific vehicle diagnosis method disclosed in this application;
[0045] Figure 3 Flowchart of a vehicle diagnosis method applied to a target diagnostic instrument interface device disclosed in this application;
[0046] Figure 4 Schematic structural diagram of a vehicle diagnosis device applied to a vehicle data acquisition device disclosed in this application;
[0047] Figure 5 Schematic structural diagram of a vehicle diagnosis device applied to a target diagnostic instrument interface device disclosed in this application;
[0048] Figure 6 Structural diagram of an electronic device disclosed in this application. Specific embodiments
[0049] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.
[0050] Currently, when performing vehicle diagnosis, the diagnostic software usually reads the vehicle VIN code first. If the VIN code reading fails, the subsequent diagnostic process cannot be entered. During local diagnosis, the VIN code reading usually does not fail. However, during remote diagnosis, due to large network latency or unstable network, communication timeouts occur, resulting in failed VIN code reading. Although the diagnostic software usually allows manual entry of the VIN code or manual selection of the vehicle model for diagnosis after the VIN code reading fails. However, due to the long distance between the two parties in remote diagnosis, input errors are inevitably caused due to communication problems, resulting in diagnostic failures. In addition, even if the input is correct, it will increase the user's operations, affect the user experience, and lead to user complaints. To solve the above technical problems, the present application discloses a vehicle diagnosis method, device, equipment, and storage medium, which can avoid remote diagnostic failures caused by incorrect VIN code reading.
[0051] See Figure 1 As shown, an embodiment of the present invention discloses a vehicle diagnosis method applied to a vehicle data acquisition device, including:
[0052] Step S11: Send an information acquisition request to the target vehicle to obtain the target vehicle identification code returned by the target vehicle and the target CAN ID replied by the target ECU in the target vehicle, and save the obtained target vehicle identification code and the target CAN ID to a local preset storage space.
[0053] In this embodiment, if remote diagnosis of the target vehicle is required, first, the vehicle data acquisition device needs to send an information acquisition request to the target vehicle to obtain the vehicle identification code to be verified returned by the target vehicle and the target CAN ID replied by the target ECU in the target vehicle; verify whether the format of the vehicle identification code to be verified meets the preset format conditions; if the format of the vehicle identification code to be verified meets the preset format conditions, determine the vehicle identification code that meets the preset format conditions as the target vehicle identification code; if the format of the vehicle identification code to be verified does not meet the preset format conditions, re-execute sending an information acquisition request to the target vehicle to obtain the target vehicle identification code returned by the target vehicle and the target CAN ID replied by the target ECU in the target vehicle. Specifically, the vehicle data acquisition device first sends an information acquisition request to the target vehicle to obtain the VIN code to be verified returned by the target vehicle and the target CAN ID replied by the target ECU, then verifies whether the format of the vehicle identification code to be verified meets the preset format conditions. If it meets, it is determined as the target vehicle identification code. If it does not meet, an information acquisition request is sent to the target vehicle again to obtain the target vehicle identification code and the target CAN ID. Then, the obtained target vehicle identification code and target CAN ID are saved to the local preset storage space of the vehicle data acquisition device, so that if the target diagnostic instrument interface device fails to read the VIN code, the corresponding VIN code can be directly re-obtained from the local storage space of the vehicle data acquisition device.
[0054] Step S12: Trigger a handshake operation with the target diagnostic instrument interface device to obtain the communication address information returned by the target diagnostic instrument interface device, and based on the communication address information, send a target message constructed by using the target vehicle identification code and the target CAN ID saved in the local preset storage space to the target diagnostic instrument interface device; the communication address information includes the IP address and port number of the target diagnostic instrument interface device.
[0055] In this embodiment, after saving the target vehicle identification code and the target CAN ID to the local preset storage space of the vehicle data acquisition device, trigger a handshake operation with the target diagnostic instrument interface device, and send the first IP address and the first port number to the target diagnostic instrument interface device to obtain the second IP address and the second port number returned by the target diagnostic instrument interface device; wherein, the first IP address and the first port number are the IP address and port number of the vehicle data acquisition device, and the second IP address and the second port number are the IP address and port number of the target diagnostic instrument interface device. Specifically, as Figure 2As shown, trigger the handshake operation with the target diagnostic instrument interface device. The vehicle data acquisition device sends its own IP address and port number, i.e., the first IP address and the first port number, to the target diagnostic instrument interface device through the server of the cloud platform, and obtains the IP address and port number of the target diagnostic instrument interface device returned, i.e., the second IP address and the second port number.
[0056] In this embodiment, construct a target message according to the target vehicle identification code and the target CAN ID saved in the local preset storage space, and then send the target message to the target diagnostic instrument interface device, so that the target diagnostic instrument interface device can obtain the target message, and then parse the target message to obtain the target read command, the target vehicle identification code and the target CAN ID, and generate a target diagnostic request based on the target read command, the target vehicle identification code and the target CAN ID. Specifically, first construct a target message according to the target vehicle identification code and the target CAN ID saved in the local preset storage space, and then send the target message to the target diagnostic instrument interface device, so that the target diagnostic instrument interface device can obtain the target message, and then parse the target message to obtain the target read command, the target vehicle identification code and the target CAN ID, and finally generate a target diagnostic request based on these.
[0057] Furthermore, if parsing the target message to obtain the target read command, the target vehicle identification code and the target CAN ID, it is also necessary to parse the target message to obtain the target read command, the vehicle identification code to be reviewed and the CAN ID to be reviewed; determine whether the vehicle identification code to be reviewed and the CAN ID to be reviewed meet the preset conditions according to the target read command. If the preset conditions are met, determine the vehicle identification code to be reviewed and the CAN ID to be reviewed as the target vehicle identification code and the target CAN ID respectively; generate a target diagnostic request based on the target read command, the target vehicle identification code and the target CAN ID. Specifically, parse the target message to obtain the target read command, the vehicle identification code to be reviewed and the CAN ID to be reviewed. If the target read command is a command to read the VIN code, and the CAN ID to be reviewed is function addressing, and the address type of the CAN ID to be reviewed is the same as the preset address type, for example, both are 11-bit standard frames, then determine that the vehicle identification code to be reviewed and the CAN ID to be reviewed are the target vehicle identification code and the target CAN ID. In addition, if the target VIN code has been determined, discard this target read command for reading the VIN code.
[0058] Step S13: Obtain the target diagnostic request generated by the target diagnostic instrument based on the target vehicle identification code and the target CAN ID obtained by the target diagnostic instrument interface device.
[0059] In this embodiment, after the target diagnostic instrument generates a target diagnostic request based on the target vehicle identification code and the target CAN ID, the target diagnostic request is sent from the target diagnostic instrument interface device to the vehicle data acquisition device, and then the vehicle data acquisition device obtains the target diagnostic request sent by the target diagnostic instrument interface device.
[0060] Step S14: Forward the target diagnostic request to the target vehicle to collect the corresponding diagnostic data of each to-be-diagnosed vehicle device in the target vehicle corresponding to each of the target CAN IDs.
[0061] In this embodiment, to implement the collection of diagnostic data of each to-be-diagnosed vehicle device in the target vehicle, it is necessary to forward the target diagnostic request obtained by the vehicle data acquisition device to the target vehicle. The target vehicle diagnoses the operating states of each to-be-diagnosed vehicle device in the target vehicle corresponding to each of the target CAN IDs according to the target diagnostic request to obtain the corresponding diagnostic data of each to-be-diagnosed vehicle device. Then, the target vehicle sends the corresponding diagnostic data of each to-be-diagnosed vehicle device to the vehicle data acquisition device, and then the vehicle data acquisition device and the target diagnostic instrument interface device transmit the corresponding diagnostic data to the target diagnostic instrument.
[0062] As can be seen from the above, in the embodiment of the present application, first, an information acquisition request is sent to the target vehicle to obtain the returned target vehicle identification code and the target CAN ID replied by the target ECU, and they are saved to the local preset storage space; a handshake operation with the target diagnostic instrument interface device is triggered to obtain the returned communication address information, and based on this information, the target message constructed by using the locally saved target vehicle identification code and target CAN ID is sent to the target diagnostic instrument interface device; the target diagnostic request generated by the target diagnostic instrument based on the target vehicle identification code and target CAN ID obtained by the target diagnostic instrument interface device is obtained; the target diagnostic request is forwarded to the target vehicle to collect the corresponding diagnostic data of each to-be-diagnosed vehicle device in the target vehicle corresponding to each of the target CAN IDs. In this way, when the two parties shake hands, the read VIN code and the CAN ID replied by the ECU are sent to the target diagnostic instrument interface device. When the target diagnostic instrument interface device receives the command to read the VIN code sent by the diagnostic instrument, the VIN code and CAN ID directly read by the vehicle data acquisition device are directly returned to the diagnostic instrument at the target diagnostic instrument interface device, and then this request is directly discarded without being sent to the vehicle data acquisition device. Because the VIN code is directly replied by the target diagnostic instrument interface device without being forwarded through the network, the reading of the VIN code is made more reliable.
[0063] See Figure 3 As shown in the figure, an embodiment of the present invention discloses a vehicle diagnosis method, which is applied to a target diagnostic instrument interface device and includes:
[0064] Step S21: triggering a handshake operation with the vehicle data acquisition device to send corresponding communication address information to the vehicle data acquisition device during the handshake, so that the vehicle data acquisition device can construct a target message based on the communication address information using the target vehicle identification code and target CAN ID stored in the local preset storage space of the vehicle data acquisition device.
[0065] In this embodiment, when vehicle diagnostics are required, a handshake is triggered with the vehicle data acquisition device, during which the corresponding communication address information is transmitted to the device. This interactive mechanism enables the device to retrieve the target vehicle identification code and target CAN ID stored in the device's local preset storage space based on the received communication address information, and construct a target message based on the target vehicle identification code and target CAN ID. This ensures the accuracy and efficiency of data transmission during the subsequent vehicle diagnostic process, laying a solid foundation for comprehensive and accurate vehicle status diagnosis.
[0066] Step S22: Receive the target message sent by the vehicle data acquisition device, obtain the target vehicle identification code and the target CAN ID in the target message, and generate a corresponding target diagnosis request based on the target vehicle identification code and the target CAN ID.
[0067] In this embodiment, a target message sent by a vehicle data acquisition device is received. The target vehicle identification code and target CAN ID are then extracted from the received target message. Based on the target vehicle identification code and target CAN ID, a targeted target diagnostic request can be generated. By effectively processing and analyzing the target message, a diagnostic request tailored to the actual situation can be quickly responded to and generated, helping to improve the efficiency and quality of vehicle diagnostics and ensure safe and stable vehicle operation.
[0068] Step S23: sending the target diagnosis request to the vehicle data acquisition device, so that the vehicle data acquisition device acquires corresponding diagnostic data of each vehicle device to be diagnosed corresponding to each target CAN ID in the target vehicle according to the target diagnosis request.
[0069] In this embodiment, a target diagnostic request generated based on the target vehicle identification code and target CAN ID is accurately sent to a vehicle data acquisition device. Upon receiving the request, the vehicle data acquisition device can locate the corresponding vehicle device to be diagnosed for each target CAN ID in the target vehicle according to the request instructions, and then conduct data collection to obtain the corresponding diagnostic data for each vehicle device to be diagnosed in the target vehicle. This data is then transmitted to the diagnostic instrument, which then diagnoses the target vehicle based on the corresponding diagnostic data.
[0070] As can be seen from the above, in the embodiment of the present application, by triggering a handshake operation with the vehicle data acquisition device and sending communication address information thereto, the vehicle data acquisition device constructs a target message based on the target vehicle identification code and the target CAN ID in the locally preset storage space. The target message sent by the vehicle data acquisition device is received, the target vehicle identification code and the target CAN ID therein are extracted, a corresponding target diagnostic request is generated, and the request is sent back to the vehicle data acquisition device to enable it to collect the diagnostic data of the vehicle devices to be diagnosed corresponding to each target CAN ID in the target vehicle according to the request, thus forming an orderly vehicle diagnostic data interaction and acquisition process. In this way, the orderly interaction of vehicle diagnostic information is realized, a reliable connection is established with the vehicle data acquisition device by means of the handshake mechanism, the accurate transmission of communication address information is ensured, and the efficiency of vehicle diagnosis is improved.
[0071] See Figure 4 As shown, an embodiment of the present invention discloses a vehicle diagnostic device applied to a vehicle data acquisition device, including:
[0072] An information storage module 11, configured to send an information acquisition request to a target vehicle to acquire the target vehicle identification code returned by the target vehicle and the target CAN ID replied by a target ECU in the target vehicle, and save the acquired target vehicle identification code and the target CAN ID to a locally preset storage space;
[0073] A message sending module 12, configured to trigger a handshake operation with a target diagnostic instrument interface device to acquire the communication address information returned by the target diagnostic instrument interface device, and based on the communication address information, send a target message constructed by using the target vehicle identification code and the target CAN ID saved in the locally preset storage space to the target diagnostic instrument interface device; the communication address information includes the IP address and port number of the target diagnostic instrument interface device;
[0074] A request acquisition module 13, configured to acquire a target diagnostic request generated by a target diagnostic instrument based on the target vehicle identification code and the target CAN ID acquired by the target diagnostic instrument interface device;
[0075] A data acquisition module 14, configured to forward the target diagnostic request to the target vehicle to collect the corresponding diagnostic data of each vehicle device to be diagnosed corresponding to each target CAN ID in the target vehicle.
[0076] As described above, the present application first sends an information acquisition request to the target vehicle to obtain the target vehicle identification code returned by the target vehicle and the target CAN ID replied by the target ECU in the target vehicle, and saves them to the local preset storage space; triggers a handshake operation with the target diagnostic instrument interface device to obtain the returned communication address information, and based on this information, sends the target message constructed by using the target vehicle identification code and the target CAN ID saved locally to the target diagnostic instrument interface device; obtains the target diagnostic request generated by the target diagnostic instrument based on the target vehicle identification code and the target CAN ID obtained by the target diagnostic instrument interface device; forwards the target diagnostic request to the target vehicle, and collects the corresponding diagnostic data of each vehicle device to be diagnosed corresponding to each target CAN ID in the target vehicle. In this way, when the two parties shake hands, the read VIN code and the CAN ID replied by the ECU are sent to the target diagnostic instrument interface device. When the target diagnostic instrument interface device receives the command to read the VIN code sent by the diagnostic instrument, it directly uses the VIN code and CAN ID read by the vehicle data acquisition device in the target diagnostic instrument interface device to reply to the diagnostic instrument, and then directly discards this request without sending it to the vehicle data acquisition device. Because the vin code is directly replied by the target diagnostic instrument interface device and is not forwarded through the network, the reading of the VIN code is more reliable.
[0077] In some specific implementation methods, the data storage module 11 may specifically include:
[0078] An information acquisition unit, configured to send an information acquisition request to the target vehicle to obtain the vehicle identification code to be verified returned by the target vehicle and the target CAN ID replied by the target ECU in the target vehicle;
[0079] A format verification unit, configured to verify whether the format of the vehicle identification code to be verified meets the preset format conditions;
[0080] A first format determination unit, configured to, if the format of the vehicle identification code to be verified meets the preset format conditions, determine the vehicle identification code to be verified that meets the preset format conditions as the target vehicle identification code;
[0081] A second format determination unit, configured to, if the format of the vehicle identification code to be verified does not meet the preset format conditions, re-execute the step of sending an information acquisition request to the target vehicle to obtain the target vehicle identification code returned by the target vehicle and the target CAN ID replied by the target ECU in the target vehicle.
[0082] In some specific implementation methods, the message sending module 12 may specifically include:
[0083] An operation execution unit is configured to trigger a handshake operation with a target diagnostic instrument interface device, and send a first IP address and a first port number to the target diagnostic instrument interface device to obtain a second IP address and a second port number returned by the target diagnostic instrument interface device; wherein, the first IP address and the first port number are the IP address and port number of the vehicle data acquisition device, and the second IP address and the second port number are the IP address and port number of the target diagnostic instrument interface device.
[0084] In some specific implementation methods, the message sending module 12 may specifically include:
[0085] A target diagnostic request generation unit is configured to send a target message constructed by using the target vehicle identification code and the target CAN ID saved in the local preset storage space to the target diagnostic instrument interface device, so that the target diagnostic instrument interface device can obtain the target message, and then parse the target message to obtain a target read command, the target vehicle identification code and the target CAN ID, and generate a target diagnostic request based on the target read command, the target vehicle identification code and the target CAN ID.
[0086] In some specific implementation methods, the target diagnostic request generation unit may specifically include:
[0087] A message parsing subunit is configured to parse the target message to obtain a target read command, a vehicle identification code to be reviewed, and a CAN ID to be reviewed;
[0088] An information determination subunit is configured to determine whether the vehicle identification code to be reviewed and the CAN ID to be reviewed meet preset conditions according to the target read command. If the preset conditions are met, the vehicle identification code to be reviewed and the CAN ID to be reviewed are respectively determined as the target vehicle identification code and the target CAN ID;
[0089] A target diagnostic request subunit is configured to generate a target diagnostic request based on the target read command, the target vehicle identification code, and the target CAN ID.
[0090] See Figure 5 As shown, an embodiment of the present invention discloses a vehicle diagnostic device applied to a target diagnostic instrument interface device, including:
[0091] An information sending module 21 is configured to trigger a handshake operation with a vehicle data acquisition device, and send corresponding communication address information to the vehicle data acquisition device during the handshake, so that the vehicle data acquisition device constructs a target message by using a target vehicle identification code and a target CAN ID saved in the local preset storage space of the vehicle data acquisition device;
[0092] A request generation module 22, configured to receive the target message sent by the vehicle data collection device, obtain the target vehicle identification code and the target CAN ID in the target message, and generate a corresponding target diagnostic request based on the target vehicle identification code and the target CAN ID;
[0093] A request sending module 23, configured to send the target diagnostic request to the vehicle data collection device, so that the vehicle data collection device can collect corresponding diagnostic data of each vehicle device to be diagnosed corresponding to each target CAN ID in the target vehicle according to the target diagnostic request.
[0094] As can be seen from the above, in the embodiment of the present application, by triggering a handshake operation with the vehicle data collection device and sending communication address information thereto, the vehicle data collection device constructs a target message by using the target vehicle identification code and the target CAN ID in the local preset storage space. Receive the target message sent by the vehicle data collection device, extract the target vehicle identification code and the target CAN ID therein, generate a corresponding target diagnostic request, and send the request back to the vehicle data collection device, so that it can collect the diagnostic data of the vehicle devices to be diagnosed corresponding to each target CAN ID in the target vehicle according to the request, forming an orderly vehicle diagnostic data interaction and collection process. In this way, the orderly interaction of vehicle diagnostic information is realized, a reliable connection is established with the vehicle data collection device by means of the handshake mechanism, the accurate transmission of communication address information is ensured, and the efficiency of vehicle diagnosis is improved.
[0095] Furthermore, the embodiment of the present application also discloses an electronic device, Figure 6 It is a structural diagram of an electronic device 30 shown according to an exemplary embodiment, and the content in the figure should not be considered as any limitation to the scope of use of the present application.
[0096] Figure 6 It is a schematic structural diagram of an electronic device 30 provided by the embodiment of the present application. The electronic device 30 may specifically include: at least one processor 31, at least one memory 32, a power supply 33, a communication interface 34, an input / output interface 35, and a communication bus 36. Wherein, the memory 32 is used to store a computer program, and the computer program is loaded and executed by the processor 31 to implement the relevant steps in the vehicle diagnosis method disclosed in any of the foregoing embodiments. In addition, the electronic device 30 in this embodiment may specifically be an electronic computer.
[0097] In this embodiment, the power supply 33 is used to provide operating voltages for the various hardware devices on the electronic device 30; the communication interface 34 can create a data transmission channel between the electronic device 30 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and specific limitations thereof are not provided herein; the input / output interface 35 is used to obtain external input data or output data to the outside, and the specific interface type thereof can be selected according to specific application requirements, and specific limitations are not provided herein.
[0098] In addition, the memory 32, as a carrier for resource storage, can be a read-only memory, a random access memory, a magnetic disk, an optical disc, etc., and the resources stored thereon can include an operating system 321, a computer program 322, etc., and the storage method can be transient storage or permanent storage.
[0099] Among them, the operating system 321 is used to manage and control the various hardware devices and the computer program 322 on the electronic device 30, and it can be Windows Server, Netware, Unix, Linux, etc. In addition to the computer program that can be used to complete the vehicle diagnosis method executed by the electronic device 30 disclosed in any of the foregoing embodiments, the computer program 322 can further include computer programs that can be used to complete other specific tasks.
[0100] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the vehicle diagnosis method disclosed above is implemented. For the specific steps of this method, reference can be made to the corresponding content disclosed in the foregoing embodiments, and details are not repeated herein.
[0101] In this specification, the various embodiments are described in a progressive manner. Each embodiment focuses on the differences from other embodiments, and the same or similar parts among the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method part.
[0102] Those skilled in the art can further realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the components and steps of the examples have been generally described according to their functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.
[0103] The steps of the methods or algorithms described in connection with the embodiments disclosed herein may be implemented directly in hardware, in software modules executed by a processor, or in a combination thereof. The software modules may be located in a random access memory (RAM), memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium well known in the art.
[0104] Finally, it should also be noted that in this document, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variation thereof is intended to cover a non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the element.
[0105] The technical solutions provided in this application have been introduced in detail above. Specific examples are used in this document to elaborate on the principles and implementation manners of this application. The description of the above embodiments is only used to help understand the method and its core idea of this application; at the same time, for those of ordinary skill in the art, according to the idea of this application, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation on this application.
Claims
1. A vehicle diagnosis method, characterized in that, Applied to a vehicle data acquisition device, including: Sending an information acquisition request to a target vehicle to obtain a target vehicle identification code returned by the target vehicle and a target CAN ID replied by a target ECU in the target vehicle, and saving the obtained target vehicle identification code and target CAN ID to a local preset storage space; Triggering a handshake operation with a target diagnostic instrument interface device to obtain communication address information returned by the target diagnostic instrument interface device, and based on the communication address information, sending a target message constructed by using the target vehicle identification code and target CAN ID saved in the local preset storage space to the target diagnostic instrument interface device; the communication address information includes the IP address and port number of the target diagnostic instrument interface device; Obtaining a target diagnostic request generated by the target diagnostic instrument based on the target vehicle identification code and target CAN ID obtained by the target diagnostic instrument interface device; Forwarding the target diagnostic request to the target vehicle to collect corresponding diagnostic data of each to-be-diagnosed vehicle device corresponding to each target CAN ID in the target vehicle.
2. The vehicle diagnosis method according to claim 1, characterized in that, The sending an information acquisition request to a target vehicle to obtain a target vehicle identification code returned by the target vehicle and a target CAN ID replied by a target ECU in the target vehicle includes: Sending an information acquisition request to a target vehicle to obtain a to-be-verified vehicle identification code returned by the target vehicle and a target CAN ID replied by a target ECU in the target vehicle; Verifying whether the format of the to-be-verified vehicle identification code meets a preset format condition; If the format of the to-be-verified vehicle identification code meets the preset format condition, determining the to-be-verified vehicle identification code that meets the preset format condition as the target vehicle identification code; If the format of the to-be-verified vehicle identification code does not meet the preset format condition, re-executing the step of sending an information acquisition request to the target vehicle to obtain a target vehicle identification code returned by the target vehicle and a target CAN ID replied by a target ECU in the target vehicle.
3. The vehicle diagnosis method according to claim 1, wherein, The triggering a handshake operation with a target diagnostic instrument interface device to obtain communication address information returned by the target diagnostic instrument interface device includes: Triggering a handshake operation with a target diagnostic instrument interface device and sending a first IP address and a first port number to the target diagnostic instrument interface device to obtain a second IP address and a second port number returned by the target diagnostic instrument interface device; Wherein, the first IP address and the first port number are the IP address and port number of the vehicle data acquisition device, and the second IP address and the second port number are the IP address and port number of the target diagnostic instrument interface device.
4. The vehicle diagnosis method according to any one of claims 1 to 3, characterized in that, The sending a target message constructed by using the target vehicle identification code and target CAN ID saved in the local preset storage space to the target diagnostic instrument interface device includes: Send the target message constructed by using the target vehicle identification code and the target CAN ID stored in the local preset storage space to the target diagnostic instrument interface device, so that the target diagnostic instrument interface device can obtain the target message, and then parse the target message to obtain a target read command, the target vehicle identification code, and the target CAN ID, and generate a target diagnostic request based on the target read command, the target vehicle identification code, and the target CAN ID.
5. The vehicle diagnosis method according to claim 4, characterized in that, The parsing of the target message to obtain a target read command, the target vehicle identification code, and the target CAN ID includes: Parse the target message to obtain a target read command, a vehicle identification code to be reviewed, and a CAN ID to be reviewed; According to the target read command, determine whether the vehicle identification code to be reviewed and the CAN ID to be reviewed meet the preset conditions. If the preset conditions are met, determine the vehicle identification code to be reviewed and the CAN ID to be reviewed as the target vehicle identification code and the target CAN ID respectively; Generate a target diagnostic request based on the target read command, the target vehicle identification code, and the target CAN ID.
6. A vehicle diagnosis method, characterized in that, Applied to the target diagnostic instrument interface device, it includes: Trigger a handshake operation with the vehicle data collection device to send corresponding communication address information to the vehicle data collection device during the handshake, so that the vehicle data collection device constructs a target message by using the target vehicle identification code and the target CAN ID stored in the local preset storage space of the vehicle data collection device; Receive the target message sent by the vehicle data collection device, obtain the target vehicle identification code and the target CAN ID in the target message, and generate a corresponding target diagnostic request based on the target vehicle identification code and the target CAN ID; Send the target diagnostic request to the vehicle data collection device, so that the vehicle data collection device can collect the corresponding diagnostic data of each to-be-diagnosed vehicle device corresponding to each target CAN ID in the target vehicle according to the target diagnostic request.
7. A vehicle diagnostic device, characterized in that, Applied to the vehicle data collection device, it includes: An information storage module, which is used to send an information acquisition request to the target vehicle to obtain the target vehicle identification code returned by the target vehicle and the target CAN ID replied by the target ECU in the target vehicle, and save the obtained target vehicle identification code and the target CAN ID to the local preset storage space; A message sending module, which is used to trigger a handshake operation with the target diagnostic instrument interface device to obtain the communication address information returned by the target diagnostic instrument interface device, and based on the communication address information, send the target message constructed by using the target vehicle identification code and the target CAN ID stored in the local preset storage space to the target diagnostic instrument interface device; the communication address information includes the IP address and port number of the target diagnostic instrument interface device; A request acquisition module, configured to acquire a target diagnostic request generated by a target diagnostic instrument based on the target vehicle identification number and the target CAN ID acquired by the target diagnostic instrument interface device; A data acquisition module, configured to forward the target diagnostic request to the target vehicle to acquire corresponding diagnostic data of each vehicle device to be diagnosed corresponding to each target CAN ID in the target vehicle.
8. A vehicle diagnostic device, characterized in that, Applied to a target diagnostic instrument interface device, including: An information sending module, configured to trigger a handshake operation with a vehicle data acquisition device, and send corresponding communication address information to the vehicle data acquisition device during the handshake, so that the vehicle data acquisition device constructs a target message based on the communication address information and the target vehicle identification number and the target CAN ID stored in the local preset storage space of the vehicle data acquisition device; A request generation module, configured to receive the target message sent by the vehicle data acquisition device, acquire the target vehicle identification number and the target CAN ID in the target message, and generate a corresponding target diagnostic request based on the target vehicle identification number and the target CAN ID; A request sending module, configured to send the target diagnostic request to the vehicle data acquisition device, so that the vehicle data acquisition device acquires corresponding diagnostic data of each vehicle device to be diagnosed corresponding to each target CAN ID in the target vehicle according to the target diagnostic request.
9. An electronic device, characterized in that, Including: A memory, configured to store a computer program; A processor, configured to execute the computer program to implement the vehicle diagnosis method according to any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that, For storing a computer program; wherein, when the computer program is executed by a processor, the vehicle diagnosis method according to any one of claims 1 to 6 is implemented.