Vehicle diagnosis method, device and equipment and computer readable medium
By establishing a bus or Ethernet connection and configuring diagnostic parameters and protocols, the high cost and complex operation of traditional vehicle diagnostic equipment are solved, enabling flexible ECU adaptation and an efficient diagnostic process, reducing equipment procurement costs and operational complexity.
Patent Information
- Application Number
- CN202511616943.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-06
- Publication Date
- 2026-02-13
AI Technical Summary
Traditional vehicle diagnostic equipment has high procurement costs and long development cycles. It cannot quickly respond to differences in diagnostic addresses and protocol versions of ECUs. Its communication connection method is limited and cannot adapt to Ethernet diagnostic requirements. Diagnostic parameter configuration depends on modifying program code, resulting in poor flexibility and complex operation.
By establishing a bus or Ethernet connection, configuring diagnostic parameters, including addressing information and protocol parameters, sending and receiving diagnostic commands using preset diagnostic protocols, parsing and outputting response data, supporting multiple protocols and interface types, updating parameters in the configuration file does not require modification of program code, and providing a visual interface and log file recording.
It achieves flexible communication connectivity, adapts to different ECU interface types, reduces equipment procurement costs, improves operational convenience and diagnostic efficiency, ensures communication accuracy and data parsing correctness, and simplifies the operation process.
Smart Images

Figure CN121523291A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of vehicle control, in particular to a vehicle diagnosis method, device, equipment and computer readable medium. BACKGROUND
[0002] With the rapid improvement of the electronic and intelligent level of automobiles, the core control functions of electric vehicles and fuel vehicles are realized by electronic control unit (ECU) on the vehicle, and the software debugging, fault troubleshooting and state monitoring of the ECU need to be completed through professional diagnostic tools.
[0003] The traditional vehicle diagnostic instrument needs to be developed and tested by the manufacturer according to the vehicle manufacturer's customization rules, which not only has high equipment procurement cost, but also has long development cycle and lagging update, and cannot meet the needs of software developers to frequently adjust functions and quickly iterate software. In addition, the communication connection mode of the existing diagnosis scheme is single, and only CAN bus connection is supported, which is difficult to adapt to the diagnosis needs of some vehicles based on Ethernet; and the diagnosis parameter configuration depends on modifying program code, which has poor flexibility and cannot quickly respond to the differences in diagnosis address and protocol version of different ECUs.
[0004] Therefore, it is urgent to invent a vehicle diagnosis method that can solve the problems of poor compatibility and single function of traditional conversion equipment, that is, suitable for ECU (Electronic Control Unit) diagnosis operation in the software development and debugging stage of automobiles, and also can be used for vehicle fault troubleshooting and data acquisition in the after-sales link. SUMMARY
[0005] The present application aims to solve at least one of the technical problems existing in the prior art, and provides a vehicle diagnosis method, device, equipment and computer readable medium.
[0006] In a first aspect, an embodiment of the present application provides a vehicle diagnosis method, which comprises:
[0007] Establishing a communication connection between the host computer and the target ECU, the communication connection comprising a bus connection based on a conversion device or an Ethernet connection based on a network protocol;
[0008] Configuring diagnosis parameters, the diagnosis parameters at least including addressing information for identifying the target ECU and protocol parameters for analyzing communication data;
[0009] Based on a preset diagnosis protocol, sending a diagnosis instruction to the target ECU through the communication connection, and receiving response data returned by the target ECU;
[0010] Analyzing and processing the response data, generating a diagnosis result and outputting.
[0011] In some embodiments, the bus connection based on the conversion device specifically comprises:
[0012] The CAN bus of the target ECU is connected with the host computer through a USB-to-CAN device, the USB-to-CAN device is compatible with at least one device type in a preset brand list, and the USB-to-CAN device supports selection of a CAN hardware channel and configuration of a CANFD message type.
[0013] In some embodiments, the Ethernet connection based on the network protocol specifically comprises:
[0014] The Ethernet connection between the host computer and the target ECU is established through an RJ45 network port of the host computer, the IP address and the DoIP protocol version parameter of the target ECU are configured, and the network communication between the host computer and the target ECU is realized.
[0015] In some embodiments, the preset diagnosis protocol comprises a UDS protocol and / or an OBD protocol.
[0016] The diagnosis instruction comprises at least one of a session control instruction, a security access instruction, a data reading instruction, and a data writing instruction based on the UDS protocol, or at least one of a fault code reading instruction and a data parameter reading instruction based on the OBD protocol.
[0017] In some embodiments, the configuration of the diagnosis parameter further comprises:
[0018] The physical addressing ID, the functional addressing ID, and the response ID are stored through a configuration file, and the configuration file supports updating of the parameter without modifying a program code of the host computer.
[0019] In some embodiments, the generation of the diagnosis result and the outputting comprise:
[0020] The original message and the analysis description of the response data are displayed through a visual interface, and the communication data in the diagnosis process is stored as a log file in a preset format.
[0021] In some embodiments, when the diagnosis instruction is a security access instruction based on the UDS protocol, the method further comprises:
[0022] A key required for security access is calculated by calling an external dynamic link library, the key is embedded in the diagnosis instruction and sent to the target ECU.
[0023] In a second aspect, an embodiment of the present application provides a vehicle diagnosis device, the device comprising:
[0024] A communication module is configured to establish a communication connection between the host computer and the target ECU, the communication connection comprising a bus connection based on a conversion device or an Ethernet connection based on a network protocol.
[0025] The configuration module is configured to configure diagnostic parameters, wherein the diagnostic parameters at least include addressing information for identifying the target ECU and protocol parameters for analyzing communication data;
[0026] The processing module is configured to send diagnostic instructions to the target ECU through the communication connection based on a preset diagnostic protocol, and receive response data returned by the target ECU;
[0027] The analysis module is configured to analyze the response data, generate a diagnostic result, and output the diagnostic result.
[0028] In a third aspect, an electronic device is provided, and the electronic device comprises:
[0029] one or more processors;
[0030] a memory configured to store one or more programs;
[0031] When the one or more programs are executed by the one or more processors, the one or more processors implement the vehicle diagnostic method provided in the first aspect.
[0032] In a fourth aspect, a computer readable medium is provided, and the computer readable medium stores a computer program, and the computer program is executed by a processor to implement the vehicle diagnostic method provided in the first aspect.
[0033] The vehicle diagnostic method provided by the embodiments of the present disclosure first establishes a communication connection between the host computer and the target ECU, then configures diagnostic parameters, at least including addressing information for accurately positioning the target ECU and protocol parameters for correctly analyzing communication data, then sends diagnostic instructions to the host computer through the established communication connection based on a preset diagnostic protocol, receives response data fed back by the target ECU, finally analyzes the response data, converts the original data into readable diagnostic results, and outputs the diagnostic results for an operator to view. Compared with the traditional diagnostic scheme in the prior art, the flexibility of the communication connection can be realized, and the target ECU of different interface types can be adapted without the need to purchase special diagnostic equipment for different ECUs. The targeted configuration of the diagnostic parameters ensures the accuracy of the communication and the correctness of the data analysis, avoiding diagnostic failure caused by connection errors or data format mismatches. The complete diagnostic process improves the operation convenience, and the operator does not need to manually process data conversion, directly obtains readable results, and reduces the operation complexity. BRIEF DESCRIPTION OF DRAWINGS
[0034] Figure 1 A flowchart of a vehicle diagnostic method provided by the embodiments of the present disclosure;
[0035] Figure 2 A structural schematic diagram of a vehicle diagnostic device provided by the embodiments of the present disclosure;
[0036] Figure 3 A structural block diagram of an electronic device is provided for embodiments of the present application. DETAILED DESCRIPTION
[0037] For a better understanding of the technical solutions of the present application, the exemplary embodiments of the present application are described below in conjunction with the drawings, including various details of the embodiments of the present application to help understanding, which should be considered only as exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Also, for the sake of clarity and conciseness, the description below omits the description of well-known functions and structures.
[0038] In the case of no conflict, each embodiment of the present application and each feature in the embodiments can be combined with each other.
[0039] As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.
[0040] The terms used herein are only used to describe specific embodiments, and are not intended to limit the present application. As used herein, the singular forms "a" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that the terms "comprise" and / or "consist of, when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. The terms "connected" or "coupled" and / or similar terms are not limited to a physical or mechanical connection or linkage to either include electrical connection or linkage, whether direct or indirect.
[0041] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the relevant art and the present application, and will not be interpreted in an overly literal or overly formal sense unless expressly so defined herein.
[0042] The collection, storage, use, processing, transmission, provision and disclosure of the user personal information in the technical solution of the present application comply with relevant laws and regulations and do not violate public order and good customs. The use of user data in the technical solution complies with relevant national laws and regulations (for example, the Information Security Technology Personal Information Security Specification). For example, appropriate measures are taken for personal information access control; the display of personal information is limited; the use purpose of personal information does not exceed the direct or reasonably related range; and the use of personal information eliminates explicit identity orientation and avoids precise positioning to a specific individual.
[0043] With the rapid improvement of the electronic and intelligent level of automobiles, the core control functions of electric vehicles and fuel vehicles are realized by ECU, and the software debugging, fault troubleshooting and state monitoring of ECU need to be completed through professional diagnostic tools. At present, the mainstream vehicle diagnosis scheme in the industry has the following key problems:
[0044] The traditional vehicle diagnostic instrument needs to be developed and tested by the manufacturer according to the vehicle manufacturer's customization rules, which not only has high equipment procurement cost, but also has long development cycle and lagging update, and cannot meet the needs of software developers to frequently adjust functions and quickly iterate software. At the same time, the mainstream professional diagnostic software on the market (such as CANoe and INCA) is large in size and complex in operation, needs to learn special development syntax, has high threshold, and is forced to bind to specific hardware devices of manufacturers. If the user needs to realize multi-module diagnosis, he often needs to repeatedly purchase hardware with overlapping functions, which further increases the use cost; some teams use software sharing mode to reduce cost, which seriously hinders the development progress.
[0045] In addition, the communication connection mode of the existing diagnosis scheme is single, and only CAN bus connection is supported, which is difficult to adapt to the diagnosis needs of some vehicles based on Ethernet; and the diagnosis parameter configuration depends on modifying program code, which has poor flexibility and cannot quickly respond to the differences in diagnosis addresses and protocol versions of different ECUs.
[0046] In order to solve at least one or more of the above technical problems, the present disclosure provides a vehicle diagnosis method, which solves the problems of single connection and inflexible configuration in the traditional scheme through the design of double communication connection and optional key parameter configuration; and through the complete process of protocol sending, data receiving and analysis output, the closed loop of diagnosis operation is ensured, and the full needs from instruction issuing to result checking are met.
[0047] Figure 1 The flowchart of the vehicle diagnosis method provided by the present disclosure is shown in Figure 1 As shown in the figure, the vehicle diagnosis method includes steps S1-S4, which are as follows:
[0048] Step S1, a communication connection between the host computer and the target ECU is established, which includes a bus connection based on a conversion device or an Ethernet connection based on a network protocol.
[0049] Step S2, diagnostic parameters are configured, which at least include addressing information for identifying the target ECU and protocol parameters for analyzing communication data.
[0050] Step S3, based on a preset diagnostic protocol, a diagnostic instruction is sent to the target ECU through the communication connection, and response data returned by the target ECU is received.
[0051] Step S4, the response data is analyzed and processed to generate and output a diagnostic result.
[0052] The vehicle diagnostic method provided by the embodiments of the present disclosure first establishes a communication connection between the host computer and the target ECU, then configures diagnostic parameters, at least including addressing information for accurately positioning the target ECU and protocol parameters for correctly analyzing communication data, then based on a preset diagnostic protocol, a diagnostic instruction is sent to the host computer through the established communication connection, and response data fed back by the target ECU is received, and finally the response data is analyzed and processed to convert the original data into a readable diagnostic result and output it for the operator to view. Compared with the traditional diagnostic scheme in the prior art, the flexibility of the communication connection can be realized, and the target ECU of different interface types can be adapted without the need to purchase special diagnostic equipment for different ECUs; the targeted configuration of the diagnostic parameters ensures the accuracy of the communication and the correctness of the data analysis, avoiding diagnostic failure caused by connection errors or data format mismatches; the complete diagnostic process improves the operation convenience, and the operator does not need to manually process data conversion, but directly obtains a readable result, reducing the operation complexity.
[0053] From the above analysis, it can be seen that the traditional USB-to-CAN device in the prior art is mostly single-brand dedicated, has poor compatibility, and cannot flexibly select channels or configure message types. If the ECU supports the CANFD protocol, the ordinary device cannot meet the data transmission requirements; if the device has multiple channels, it is easy to cause communication conflicts due to inaccurate selection of channels.
[0054] Based on this, in some embodiments, the bus connection based on the conversion device specifically includes connecting the host computer and the CAN bus of the target ECU through a USB-to-CAN device, the USB-to-CAN device is compatible with at least one device type in a preset brand list, and supports selection of a CAN hardware channel and configuration of a CANFD message type.
[0055] The bus connection method provided in the embodiments of the present disclosure adopts a USB-to-CAN device to realize the CAN bus connection between the host computer and the target ECU. The USB-to-CAN device needs to be compatible with at least one device type (such as ZLG, Kvaser, etc.) in a preset brand list, and support manual selection of a CAN hardware channel. When there are multiple channels in the device, the channel connected with the target ECU can be accurately selected, and the CANFD message type can be configured to adapt to the ECU supporting the CANFD protocol. Thus, the high-speed and large-data diagnostic requirements are met, the device compatibility is improved, the operator can use the existing common USB-to-CAN device without the need to purchase a special device, and the hardware cost is reduced. The selection of the CAN hardware channel avoids communication conflicts of the multi-channel device and ensures the connection stability. The support of the CANFD message type adapts to the high-speed diagnostic requirements of the new generation of ECUs and expands the application range of the scheme.
[0056] Further, in the prior art, some ECUs use Ethernet interfaces to replace the traditional CAN bus, and the traditional scheme only supports the CAN connection scheme and cannot adapt to such ECUs. In addition, the Ethernet connection needs IP address positioning and protocol version matching. If the parameter configuration is missing, it is easy to cause connection failure or communication abnormalities.
[0057] Based on this, in some embodiments, the Ethernet connection based on the network protocol specifically includes: establishing an Ethernet connection between the host computer and the target ECU through the RJ45 network port of the host computer, configuring the IP address and DoIP protocol version parameters of the target ECU, and realizing the network communication between the host computer and the target ECU.
[0058] Specifically, the IP address of the target ECU is configured to ensure that the host computer can accurately locate the target ECU and the DoIP protocol version parameters. The location of the target ECU can avoid misconnection with other devices in the network, the DoIP is a standard protocol for automotive Ethernet diagnosis, and the version matching can ensure the compatibility of the communication protocol, avoid data transmission errors, and realize stable network communication between the host computer and the target ECU after configuration. The present scheme solves the problems of inaccurate positioning and protocol incompatibility in Ethernet connection by combining the configuration methods of IP address and DoIP version, expands the application scenarios of the scheme, and does not need to develop a special diagnostic module for Ethernet ECUs. At the same time, the configuration of the IP address ensures the accuracy of the connection and avoids the interference of multiple devices in the network; the matching of the DoIP protocol version ensures the stability of the communication and reduces the data packet loss or parsing errors caused by incompatible protocol versions.
[0059] Further, the UDS protocol is a general standard for automotive diagnosis, supporting complex ECU operations such as permission control, data reading and writing, and is suitable for the software development and debugging stage; the OBD protocol focuses on vehicle faults and real-time parameters, and is suitable for post-sales fault troubleshooting. The traditional scheme only supports a single protocol and cannot meet the needs of multiple scenarios.
[0060] Based on this, in some embodiments, the preset diagnostic protocol includes a UDS protocol and / or an OBD protocol; the diagnostic instruction includes at least one of a session control instruction, a security access instruction, a data reading instruction, and a data writing instruction based on the UDS protocol, or at least one of a fault code reading instruction and a data parameter reading instruction based on the OBD protocol.
[0061] Among them, the diagnostic instruction based on the UDS protocol at least contains a session control instruction, such as switching the diagnostic session mode, meeting the permission requirements of different diagnostic functions, a security access instruction to obtain the operation permission of the ECU, avoiding unauthorized operation, a data reading instruction, such as reading the hardware number, software version and other data of the ECU, and a data writing instruction, such as modifying the configuration parameters of the ECU; the diagnostic instruction based on the OBD protocol at least contains a fault code reading instruction, such as obtaining the fault information stored in the ECU for fault troubleshooting, and a data parameter reading instruction, such as reading the engine speed, coolant temperature and other real-time parameters for state monitoring. The above diagnostic instructions can realize full coverage of the diagnostic scene, meeting the deep operation of the ECU in the development stage, such as security access and data writing, and meeting the fault troubleshooting and state monitoring in the post-sales stage, such as fault code reading; the support of multiple types of instructions reduces the operation steps of the operator, and multiple operations can be completed without switching different diagnostic tools, improving the diagnostic efficiency and solving the problem of single protocol and incomplete functions in the traditional scheme.
[0062] Further, the diagnostic parameters (such as addressing ID) of the traditional scheme need to be defined in the program code, and if a new ECU needs to be diagnosed, the code needs to be modified and recompiled, which is cumbersome and easy to introduce code errors.
[0063] Based on this, in some embodiments, configuring the diagnostic parameters further includes: storing the physical addressing ID, the functional addressing ID and the response ID through a configuration file, and the configuration file supports updating the parameters without modifying the program code of the host computer.
[0064] The configuration file supports direct updating of parameters without modifying the host computer program code, that is, when a new ECU needs to be diagnosed, only the addressing ID and response ID in the configuration file need to be modified, without recompiling the program, thereby greatly improving the convenience of parameter updating, and the operator does not need to have programming ability, and only needs to edit the configuration file to complete the parameter adaptation of the new ECU, thereby reducing the technical threshold; avoiding the risk of program stability caused by modifying the code, and without waiting for program compilation, reducing the time cost of parameter updating, and improving the diagnosis efficiency.
[0065] Further, the traditional scheme only outputs the analysis result, without storing the original data or log. If the analysis result is abnormal, the professional personnel cannot trace back the original data to troubleshoot the problem; and without the log file, the diagnosis process cannot be reproduced, and the subsequent fault analysis lacks basis.
[0066] Based on this, in some embodiments, generating a diagnosis result and outputting include: displaying the original message and analysis description of the response data through a visual interface, and storing the communication data in the diagnosis process as a log file in a preset format (blf format or pcap format).
[0067] The above output method has two kinds, one is to synchronously display the original message and analysis description of the response data through a visual interface, and the double information display of the visual interface takes into account the needs of different personnel, and the other is to store all the communication data in the diagnosis process as a log file in a preset format (blf format or pcap format), which is convenient for subsequent tracing or secondary analysis, troubleshooting the diagnosis failure reason or analyzing the historical state of the ECU.
[0068] Further, the security access instruction of the UDS protocol needs to be verified by a key, and the key calculation of the traditional scheme is integrated in the program. If the key algorithm of the ECU is updated, the program code needs to be modified and recompiled, which has poor flexibility; and the internally integrated algorithm makes it difficult to update the key calculation logic, and it cannot adapt to the algorithm differences of different ECUs.
[0069] Based on this, in some embodiments, when the diagnosis instruction is a security access instruction based on the UDS protocol, the method further includes: calling an external dynamic link library (DLL) to calculate the key required for security access, embedding the key into the diagnosis instruction and sending it to the target ECU. Thus, the key algorithm can be flexibly updated, when the ECU key algorithm changes, only the external DLL file needs to be replaced, without modifying the host computer program, thereby reducing the update cost; the compatibility of the external DLL supports the adaptation of the algorithm requirements of different ECUs, without developing a special key calculation module for different ECUs, thereby improving the universality of the scheme.
[0070] Figure 2A structural schematic diagram of a vehicle diagnosis device provided by an embodiment of the present disclosure is shown in FIG. 1. Figure 2 As shown in FIG. 1, the device comprises:
[0071] A communication module 10 is configured to establish a communication connection between the host computer and the target ECU, which includes a bus connection based on a conversion device or an Ethernet connection based on a network protocol.
[0072] A configuration module 20 is configured to configure diagnosis parameters, which at least include addressing information for identifying the target ECU and protocol parameters for analyzing communication data.
[0073] A processing module 30 is configured to send diagnosis instructions to the target ECU through the communication connection based on a preset diagnosis protocol, and receive response data returned by the target ECU.
[0074] An analysis module 40 is configured to analyze the response data, generate diagnosis results and output.
[0075] The vehicle diagnosis device described above can be a host computer software, which is compatible with various USB-to-CAN device interfaces to realize UDS and OBD automobile diagnosis, facilitates debugging in automobile software development, has an efficient and simple software interface design, is low in difficulty and cost, and can be realized only by using an office computer and a protocol conversion device.
[0076] Further, the vehicle diagnosis device provided by the embodiment of the present disclosure first establishes a communication connection between the host computer and the target ECU, then configures diagnosis parameters, at least including addressing information for accurately positioning the target ECU and protocol parameters for correctly analyzing communication data, subsequently sends diagnosis instructions to the host computer through the established communication connection based on a preset diagnosis protocol, receives response data returned by the target ECU, finally analyzes the response data, converts the original data into readable diagnosis results and outputs, for an operator to check. Compared with the traditional diagnosis scheme in the prior art, the flexibility of the communication connection can be realized, and the target ECUs of different interface types can be adapted without the need to purchase special diagnosis devices for different ECUs. The targeted configuration of the diagnosis parameters ensures the accuracy of the communication and the correctness of the data analysis, avoiding diagnosis failure caused by connection errors or data format mismatches. The complete diagnosis process improves the operation convenience, and the operator does not need to manually process data conversion, directly obtains readable results, and reduces the operation complexity.
[0077] Based on the same inventive concept, the embodiment of the present disclosure further provides an electronic device. Figure 3 A structural block diagram of an electronic device provided by an embodiment of the present disclosure is shown in FIG. 2. Figure 3As shown, the electronic device provided by the embodiment of the present application includes one or more processors 101, a memory 102, and one or more I / O interfaces 103. The memory 102 stores one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the vehicle diagnostic method in any of the above embodiments. The one or more I / O interfaces 103 are connected between the processor and the memory and are configured to implement information interaction between the processor and the memory.
[0078] The processor 101 is a device with data processing capability, including but not limited to a central processing unit (CPU) and the like. The memory 102 is a device with data storage capability, including but not limited to a random access memory (RAM, more specifically, SDRAM, DDR, etc.), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), and a flash memory (FLASH). The I / O interface (read-write interface) 103 is connected between the processor 101 and the memory 102 and can implement information interaction between the processor 101 and the memory 102, including but not limited to a data bus (Bus) and the like.
[0079] In some embodiments, the processor 101, the memory 102, and the I / O interface 103 are connected to each other through a bus 104 and further connected to other components of the computing device.
[0080] In some embodiments, the one or more processors 101 include a field programmable gate array.
[0081] The embodiment of the present application also provides a computer readable medium. The computer readable medium stores a computer program, and when the program is executed by a processor, the steps in the vehicle diagnostic method in any of the above embodiments are implemented. The computer readable storage medium can be a volatile or non-volatile computer readable storage medium.
[0082] The embodiment of the present application also provides a computer program product including computer readable code or a non-volatile computer readable storage medium carrying computer readable code, and when the computer readable code is run in a processor of an electronic device, the processor in the electronic device executes the vehicle diagnostic method.
[0083] Those of ordinary skill in the art will realize and understand that all or some of the steps in the methods disclosed above and the functional modules / units in the systems and devices can be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementation, the division between the functional modules / units referred to in the above description does not necessarily correspond to the division of physical components; for example, one physical component can have multiple functions, or one function or step can be performed by several physical components in cooperation. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software can be distributed on computer readable storage media, which can include computer storage media (or non-transitory media) and communication media (or transitory media).
[0084] As is well known to those of ordinary skill in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable program instructions, data structures, program modules or other data. Computer storage media includes, but is not limited to, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM), static random access memory (SRAM), flash memory or other memory technology, portable compact disc read only memory (CD-ROM), digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and that can be accessed by a computer. Further, it is well known to those of ordinary skill in the art that communication media typically embodies computer readable program instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. As used herein, the term "modulated data signal" means a signal that has one or more of its characteristics changed or set in a manner so as to encode information in the signal. By way of example, and not limitation, communication media includes wired media such as a wired network or direct-wired connection, and wireless media such as wireless networks, cellular telephone networks, code division multiple access (CDMA) networks, and other terrestrial and satellite radio frequency communication networks or frequency (RF) media. The computer software can be downloaded to the respective computing / processing device from a computer software distribution medium or to an external computer or external storage device from a network, for example, the Internet, a local area network, a wide area network, and / or a wireless network. The network can comprise copper transmission cables, optical transmission fibers, wireless transmission, routers, firewalls, switches, gateway computers and / or edge servers. A network adapter card or network interface in each computing / processing device receives computer software from the network and forwards the computer software for storage in a computer readable storage medium within the respective computing / processing device.
[0085] The computer software described herein can be downloaded to the respective computing / processing device from a computer software distribution medium or to an external computer or external storage device from a network, for example, the Internet, a local area network, a wide area network, and / or a wireless network. The network can comprise copper transmission cables, optical transmission fibers, wireless transmission, routers, firewalls, switches, gateway computers and / or edge servers. A network adapter card or network interface in each computing / processing device receives computer software from the network and forwards the computer software for storage in a computer readable storage medium within the respective computing / processing device.
[0086] The computer program instructions used to perform the operations of this invention may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing state information from the computer-readable program instructions. This electronic circuitry can execute the computer-readable program instructions to implement various aspects of the invention.
[0087] The computer program product described herein can be implemented specifically through hardware, software, or a combination thereof. In one alternative embodiment, the computer program product is specifically embodied in a computer storage medium; in another alternative embodiment, the computer program product is specifically embodied in a software product, such as a software development kit (SDK), etc.
[0088] Various aspects of the present invention are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0089] These computer readable program instructions can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks. These computer readable program instructions can also be stored in a computer readable storage medium that can include a non-transitory computer readable storage medium that can be a computer- readable storage medium having no data storage cycles that change state. The instructions can be executed by one or more processors of a computer, other programmable data processing apparatus, or other devices to produce a computer-implemented process such that the instructions which execute via the one or more processors of the computer or other programmable data processing devices create means for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks. The computer program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks.
[0090] The computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable apparatus or other device to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks.
[0091] The flow and block diagrams in the drawings show the architectural, functional, and operational views of possible implementations of systems, methods, and computer program products according to the present application. In this regard, each block in the flow and block diagrams can represent a module, a segment, or a portion of instructions which contain one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or the blocks may
[0092] Example embodiments have been disclosed and, although specific terms are employed, they are used in a generic and descriptive sense only and not for purposes of limitation. In some instances, it will be apparent to those skilled in the art that features, characteristics or elements described with reference to one embodiment can be used in combination with features, characteristics or elements described with reference to other embodiments unless otherwise explicitly stated. Accordingly, it will be understood that various changes in form and details can be made without departing from the scope of the present application as set forth in the appended claims.
Claims
1. A vehicle diagnostic method, characterized in that, The method includes: Establish a communication connection between the host computer and the target ECU, the communication connection including a bus connection based on a conversion device or an Ethernet connection based on a network protocol; Configure diagnostic parameters, which include at least addressing information for identifying the target ECU and protocol parameters for parsing communication data; Based on a preset diagnostic protocol, diagnostic commands are sent to the target ECU via the communication connection, and response data returned by the target ECU is received. The response data is parsed and processed to generate diagnostic results, which are then output.
2. The diagnostic method according to claim 1, characterized in that, The bus connection based on the conversion device specifically includes: The host computer is connected to the CAN bus of the target ECU via a USB-to-CAN device. The USB-to-CAN device is compatible with at least one device type from a preset brand list and supports the selection of CAN hardware channels and configuration of CANFD message types.
3. The diagnostic method according to claim 1, characterized in that, The Ethernet connection based on network protocols specifically includes: An Ethernet connection is established between the host computer and the target ECU via the RJ45 network port. The IP address and DoIP protocol version parameters of the target ECU are configured to enable network communication between the host computer and the target ECU.
4. The diagnostic method according to claim 1, characterized in that, The preset diagnostic protocol includes the UDS protocol and / or the OBD protocol; The diagnostic commands include at least one of the following: session control commands, secure access commands, data read commands, and data write commands based on the UDS protocol; or at least one of the following: fault code read commands and data parameter read commands based on the OBD protocol.
5. The diagnostic method according to claim 1, characterized in that, The configuration diagnostic parameters also include: The physical addressing ID, function addressing ID, and response ID are stored in a configuration file, which supports updating parameters without modifying the host computer program code.
6. The diagnostic method according to claim 1, characterized in that, The generation and output of diagnostic results include: The system displays the original message and parsing description of the response data through a visual interface, and stores the communication data during the diagnostic process as a log file in a preset format.
7. The diagnostic method according to claim 4, characterized in that, When the diagnostic command is a secure access command based on the UDS protocol, the method further includes: The external dynamic link library is called to calculate the key required for secure access, the key is embedded in the diagnostic instructions and sent to the target ECU.
8. A vehicle diagnostic device, characterized in that, The device includes: A communication module is used to establish a communication connection between the host computer and the target ECU. The communication connection includes a bus connection based on a conversion device or an Ethernet connection based on a network protocol. A configuration module is used to configure diagnostic parameters, which include at least addressing information for identifying the target ECU and protocol parameters for parsing communication data; The processing module is used to send diagnostic commands to the target ECU through the communication connection based on a preset diagnostic protocol, and to receive response data returned by the target ECU. The analysis module is used to parse and process the response data, generate diagnostic results, and output them.
9. An electronic device, characterized in that, include: One or more processors; Memory, used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the vehicle diagnostic method as described in any one of claims 1 to 7.
10. A computer-readable medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps in the vehicle diagnostic method as described in any one of claims 1 to 7.