Vehicle diagnostic protocol dynamic matching method, device, equipment and medium
By obtaining vehicle model information and diagnostic functions, and dynamically selecting suitable diagnostic protocols, the problems of low diagnostic efficiency and excessive resource utilization caused by fixed diagnostic protocols in the prior art are solved, and more efficient vehicle diagnosis is achieved.
Patent Information
- Application Number
- CN202510020605.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-06
- Publication Date
- 2025-04-08
AI Technical Summary
The existing vehicle diagnostic protocol is fixed and cannot be flexibly selected based on the specific diagnostic functions and data volume, resulting in low diagnostic efficiency and excessive resource utilization.
The vehicle model information, the electronic control unit information to be diagnosed and the target diagnosis function are obtained through the preset communication channel, the diagnostic function type and diagnostic command are determined, and the most suitable diagnostic protocol is selected from the configuration strategy based on this information, and the corresponding diagnostic process is executed.
It realizes a suitable diagnostic protocol for dynamic matching of each diagnostic function of the ECU in different situations, improves the overall diagnostic efficiency of the vehicle and reduces resource usage during diagnosis.
Smart Images

Figure CN119781444A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of vehicle communication technology, and in particular to a vehicle diagnostic protocol dynamic matching method, device, equipment and medium. Background Art
[0002] At present, vehicle diagnostic protocols are all hard-coded in diagnostic equipment, such as the CAN (Controller Area Network) protocol for engines and the DOIP (Diagnostic communication over Internet Protocol, an automotive diagnostic protocol based on IP networks, IP (Internet Protocol Address)) protocol for vehicle computer systems. The hard-coded protocol means that each diagnostic function is pre-bound to a specific diagnostic protocol and will not change according to changes in the actual diagnostic situation. This fixed mode means that diagnostic equipment can only operate according to the preset protocol when facing different diagnostic needs, which lacks flexibility.
[0003] Since the diagnostic protocol is fixed, it cannot be flexibly selected according to the specific diagnostic function and data volume. Many ECUs (Electronic Control Units) support multiple diagnostic functions. Different diagnostic functions have different requirements for the time required to send data, and each protocol has its own advantages and disadvantages. For example, the CAN protocol sends less data per frame, but the initialization is simple and has fewer steps, which is suitable for simple diagnostic functions. However, for complex diagnostic functions with large data volumes (such as ECU firmware flashing), if the CAN protocol is still used, the diagnostic time will be too long due to its data transmission volume limitation.
[0004] On the contrary, the DOIP protocol has a large data volume and fast transmission speed, but it occupies a lot of resources and has many complex steps when initializing communication. If the DOIP protocol is also used for simple small data volume diagnostic functions such as reading fault codes, it will waste time due to its complex initialization process, and its advantages cannot be fully utilized, thereby reducing the overall diagnostic efficiency.
[0005] In summary, how to dynamically match appropriate diagnostic protocols to various diagnostic functions of the ECU in different situations, improve the overall diagnostic efficiency of the vehicle, and reduce resource usage during diagnosis is a technical problem to be solved in this field. Summary of the invention
[0006] In view of this, the purpose of the present invention is to provide a vehicle diagnostic protocol dynamic matching method, device, equipment and medium, which can dynamically match the appropriate diagnostic protocol for each diagnostic function of the ECU under different circumstances, improve the overall diagnostic efficiency of the vehicle, and reduce the resource usage during diagnosis. The specific scheme is as follows:
[0007] In a first aspect, the present application discloses a vehicle diagnostic protocol dynamic matching method, which is applied to a preset diagnostic device, comprising:
[0008] Obtain the target vehicle's model information, the electronic control unit information to be diagnosed, and the target diagnostic function through a preset communication channel;
[0009] Determine the diagnostic function type and diagnostic command of the electronic control unit to be diagnosed according to the vehicle model information, the electronic control unit to be diagnosed information, and the target diagnostic function;
[0010] Based on the diagnostic function type and the diagnostic command, a corresponding target diagnostic protocol is selected from the configuration strategy located in the preset diagnostic device to execute the corresponding diagnostic process according to the target diagnostic protocol; wherein the configuration strategy is a strategy constructed according to the correspondence between the functional complexity of the diagnostic function type, the data volume of the diagnostic command and different diagnostic protocols.
[0011] Optionally, obtaining the model information of the target vehicle, the information of the electronic control unit to be diagnosed, and the target diagnostic function through a preset communication channel includes:
[0012] Establishing a preset communication channel between the preset diagnostic device and the target vehicle, wherein the preset communication channel includes: any one or more of Bluetooth, wireless local area network or on-board diagnostic system interface;
[0013] Reading the VIN code of the target vehicle through the preset communication channel to match the corresponding vehicle model information according to the VIN code;
[0014] Determine all electronic control units equipped with the target vehicle according to the vehicle model information, and display all electronic control unit information and all diagnostic functions on a visualization page;
[0015] Based on the diagnostic requirements, corresponding electronic control unit information to be diagnosed and target diagnostic functions are selected from the visualization page.
[0016] Optionally, the step of determining the diagnostic function type and the diagnostic command of the electronic control unit to be diagnosed according to the vehicle model information, the information of the electronic control unit to be diagnosed, and the target diagnostic function includes:
[0017] Determine a diagnostic function type range according to the vehicle model information, and use a function type within the diagnostic function type range as a diagnostic function type of the electronic control unit to be diagnosed;
[0018] determining an initial diagnosis command of the electronic control unit to be diagnosed according to the electronic control unit to be diagnosed information;
[0019] The initial diagnostic command is processed by the target diagnostic function to obtain a corresponding diagnostic command.
[0020] Optionally, before selecting a corresponding target diagnostic protocol from a configuration policy located in the preset diagnostic device based on the diagnostic function type and the diagnostic command, the method further includes:
[0021] Constructing a first diagnostic protocol in which a basic diagnostic function type corresponds to the CAN protocol and a low data volume of a diagnostic command corresponds to the CAN protocol;
[0022] Constructing a second diagnostic protocol corresponding to the DOIP protocol for complex diagnostic function types and the DOIP protocol for high data volume of diagnostic commands;
[0023] Among them, the data volume of the diagnostic command less than the preset data volume threshold represents a low data volume of the diagnostic command; the data volume of the diagnostic command greater than or equal to the preset data volume threshold represents a high data volume of the diagnostic command.
[0024] Optionally, the selecting a corresponding target diagnostic protocol from a configuration strategy located in the preset diagnostic device based on the diagnostic function type and the diagnostic command to execute a corresponding diagnostic process according to the target diagnostic protocol includes:
[0025] The first diagnostic protocol or the second diagnostic protocol is selected from a configuration strategy located in the preset diagnostic device based on the diagnostic function type and the diagnostic command to execute a first diagnostic process according to the first diagnostic protocol or to execute a second diagnostic process according to the second diagnostic protocol.
[0026] Optionally, executing the first diagnostic process according to the first diagnostic protocol, or executing the second diagnostic process according to the second diagnostic protocol, includes:
[0027] Setting a diagnostic communication parameter corresponding to the electronic control unit to be diagnosed according to the first diagnostic protocol, and sending a corresponding fault diagnosis instruction to the target vehicle according to the diagnostic communication parameter to receive diagnostic information replied by the electronic control unit to be diagnosed;
[0028] or, establishing an Ethernet communication channel with the target vehicle according to the second diagnostic protocol;
[0029] When the Ethernet communication channel is established, a fault diagnosis communication operation is performed with the target vehicle through the Ethernet communication channel to receive the diagnostic information replied by the electronic control unit to be diagnosed, and the Ethernet communication channel is destroyed.
[0030] Optionally, the preset diagnostic device is a mobile device.
[0031] In a second aspect, the present application discloses a vehicle diagnostic protocol dynamic matching device, which is applied to a preset diagnostic device, comprising:
[0032] An information acquisition module, used to acquire the model information of the target vehicle, the electronic control unit information to be diagnosed, and the target diagnostic function through a preset communication channel;
[0033] A type instruction determination module, used to determine the diagnostic function type and diagnostic command of the electronic control unit to be diagnosed according to the vehicle model information, the electronic control unit to be diagnosed information, and the target diagnostic function;
[0034] A protocol selection module is used to select a corresponding target diagnostic protocol from the configuration strategy located in the preset diagnostic device based on the diagnostic function type and the diagnostic command, so as to execute the corresponding diagnostic process according to the target diagnostic protocol; wherein the configuration strategy is a strategy constructed according to the correspondence between the functional complexity of the diagnostic function type, the data volume of the diagnostic command and different diagnostic protocols.
[0035] In a third aspect, the present application discloses an electronic device, comprising:
[0036] Memory, used to store computer programs;
[0037] The processor is used to execute the computer program to implement the steps of the vehicle diagnostic protocol dynamic matching method disclosed above.
[0038] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the steps of the aforementioned vehicle diagnostic protocol dynamic matching method disclosed above are implemented.
[0039] It can be seen that the present application discloses a vehicle diagnostic protocol dynamic matching method, which is applied to a preset diagnostic device, including: obtaining the vehicle model information, the electronic control unit information to be diagnosed, and the target diagnostic function of the target vehicle through a preset communication channel; determining the diagnostic function type and diagnostic command of the electronic control unit to be diagnosed according to the vehicle model information, the electronic control unit information to be diagnosed, and the target diagnostic function; selecting the corresponding target diagnostic protocol from the configuration strategy located in the preset diagnostic device based on the diagnostic function type and the diagnostic command, so as to execute the corresponding diagnostic process according to the target diagnostic protocol; wherein the configuration strategy is a strategy constructed according to the functional complexity of the diagnostic function type, the data volume of the diagnostic command and the corresponding relationship between different diagnostic protocols. It can be seen that by comprehensively considering the vehicle model information, the electronic control unit information to be diagnosed and the target diagnostic function, the most suitable diagnostic protocol can be accurately matched, so that the extra communication steps generated by diagnosis under an unsuitable protocol are avoided. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0041] Figure 1 A flow chart of a vehicle diagnostic protocol dynamic matching method disclosed in this application;
[0042] Figure 2 A flow chart of a vehicle diagnostic protocol configuration method disclosed in this application;
[0043] Figure 3 This is a schematic diagram of the structure of a vehicle diagnostic protocol dynamic matching device disclosed in this application;
[0044] Figure 4 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION
[0045] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0046] Since the diagnostic protocol is fixed, it cannot be flexibly selected according to the specific diagnostic function and data volume. Many ECUs support multiple diagnostic functions. Different diagnostic functions have different requirements for the time required to send data, and each protocol has its own advantages and disadvantages. For example, the CAN protocol sends less data per frame, but the initialization is simple and has fewer steps, which is suitable for simple diagnostic functions. However, for complex diagnostic functions with large data volumes (such as ECU firmware flashing), if the CAN protocol is still used, the diagnostic time will be too long due to its data transmission volume limitation.
[0047] On the contrary, the DOIP protocol has a large data volume and fast transmission speed, but it occupies a lot of resources and has many complex steps when initializing communication. If the DOIP protocol is also used for simple small data volume diagnostic functions such as reading fault codes, it will waste time due to its complex initialization process, and its advantages cannot be fully utilized, thereby reducing the overall diagnostic efficiency.
[0048] To this end, the present invention provides a vehicle diagnostic protocol dynamic matching solution, which can dynamically match the appropriate diagnostic protocol for each diagnostic function of the ECU under different circumstances, improve the overall diagnostic efficiency of the vehicle, and reduce resource usage during diagnosis.
[0049] Reference Figure 1 As shown, an embodiment of the present invention discloses a vehicle diagnostic protocol dynamic matching method, which is applied to a preset diagnostic device, including:
[0050] Step S11: obtaining the model information, the electronic control unit information to be diagnosed, and the target diagnostic function of the target vehicle through a preset communication channel.
[0051] In this embodiment, the preset diagnostic device is a mobile device. The mobile device may specifically include but is not limited to: tablet computers, notebooks and other mobile devices. In this way, in the vehicle diagnosis scenario, the diagnostic device can be carried to the vehicle site for diagnosis without relying on a fixed desktop diagnostic device. This is in line with the current trend of automobile maintenance and diagnostic services to develop in a flexible and efficient direction. For example, in the road rescue scenario, it is more convenient for maintenance personnel to use mobile devices such as mobile phones and tablets for quick diagnosis.
[0052] In this embodiment, a preset communication channel is established between the preset diagnostic device and the target vehicle, wherein the preset communication channel includes: any one or more of Bluetooth, wireless local area network or on-board diagnostic system interface; the VIN code of the target vehicle is read through the preset communication channel to match the corresponding vehicle model information according to the VIN code; all electronic control units equipped with the target vehicle are determined according to the vehicle model information, and all electronic control unit information and all diagnostic functions are displayed on the visualization page; the corresponding electronic control unit information to be diagnosed and the target diagnostic function are selected from the visualization page based on the diagnostic requirements. It can be understood that the diagnostic device obtains vehicle information in some ways, such as reading the vehicle identification code to determine the vehicle model and other information. This data acquisition method is relatively easy to implement on a mobile device, for example, the vehicle and the mobile device are connected through a communication channel such as Bluetooth, wireless local area network or on-board diagnostic system interface (On-Board Diagnostic, OBD) interface adapter to read the VIN code (Vehicle Identification Number, vehicle identification code), and then the vehicle model information corresponding to the VIN code is matched according to the VIN code and the vehicle database pre-stored in the diagnostic device. Once the vehicle model is determined, the type of ECU system equipped with the vehicle model can be further obtained. Because different vehicle models have their own specific ECU configurations, the diagnostic equipment can provide corresponding diagnostic function options based on the vehicle model information and ECU system, where the ECU system may include but is not limited to: engine ECU, transmission ECU, body control module (BCM, also a type of ECU), etc. Different ECUs have different diagnostic function requirements. After selecting a specific ECU, the diagnostic equipment can match the corresponding diagnostic function. For example, for the engine ECU, common diagnostic functions include reading fault codes, reading data streams (such as parameters such as engine speed and intake volume), etc.; for the body control module ECU, there may be diagnostic functions such as controlling door locks and window lifts. Only when the diagnostic equipment clearly knows which ECU is being operated on can it accurately perform the corresponding diagnostic function and avoid performing diagnostic operations on the wrong system or sending wrong diagnostic commands. For example, if you want to check whether the engine has a fault code, but the engine ECU is not selected, the diagnostic equipment may send a command to read the fault code to the wrong system, resulting in the inability to obtain the correct engine fault information. These diagnostic function options are also pre-programmed and stored in the diagnostic equipment, and are set based on the possible fault types and diagnostic operations that can be performed for different vehicle models and ECUs.
[0053] Step S12: determining the diagnostic function type and diagnostic command of the electronic control unit to be diagnosed according to the vehicle model information, the information of the electronic control unit to be diagnosed, and the target diagnostic function.
[0054] In this embodiment, the diagnostic device determines the diagnostic function type and diagnostic command of the ECU to be diagnosed through the vehicle model information, ECU system, and target diagnostic function options. Specifically, the diagnostic function type range is determined through the vehicle model information, and the function type within the diagnostic function type range is used as the diagnostic function type of the electronic control unit to be diagnosed; the initial diagnostic command of the electronic control unit to be diagnosed is determined according to the electronic control unit to be diagnosed information; the initial diagnostic command is processed by the target diagnostic function to obtain the corresponding diagnostic command. It can be understood that after determining the vehicle model information, the diagnostic device understands the various systems and functions of the vehicle model according to the vehicle model database stored internally. This limits the possible diagnostic function types. For example, for a vehicle model with an automatic parking system, the diagnostic function type may include fault diagnosis of the automatic parking system ECU, sensor calibration, etc.; while for a vehicle model without this system, these diagnostic functions will not appear in the options. In addition, since each ECU system has its specific functions and communication protocol requirements. Different ECU systems are responsible for controlling and monitoring different aspects of the vehicle. For example, the engine ECU mainly controls fuel injection, ignition timing, etc.; the transmission ECU manages shift timing and transmission ratio, etc. Therefore, when the ECU system is determined, the diagnostic equipment knows what diagnostic commands are available for this system. Because each ECU system has a specific response to diagnostic commands, these diagnostic commands are designed according to the functions and control logic of the ECU system. Taking the engine ECU as an example, the diagnostic commands include reading the data of sensors such as engine speed, intake temperature, throttle opening, etc., which are very important for judging the working state of the engine. For the body control module ECU, the diagnostic commands involve aspects such as door lock status, window position, and interior lighting control. Since the diagnostic function is a comprehensive target description, it will further refine the diagnostic commands according to the vehicle model and ECU system. For example, the diagnostic function is "comprehensively check the engine performance". Combined with the engine ECU system, the diagnostic command will include reading the data of multiple parameters such as engine speed, torque output, intake temperature, intake pressure, fuel pressure, spark plug ignition time, etc. These diagnostic commands are designed to evaluate the performance status of the engine from multiple angles to determine whether the engine has reached the best working state or whether there are potential faults. For example, if the diagnostic function is "check the stability of the body electronic system", for the body control module ECU system, the diagnostic command will involve the status signal reading and functional testing of all body electrical equipment (such as door locks, windows, interior lights, wipers, etc.). Through these specific diagnostic commands, it can be determined whether the body electronic system can work stably under different working conditions. These diagnostic commands are optimized for the selected vehicle model, ECU system and diagnostic function to ensure that diagnostic information can be accurately obtained.
[0055] Step S13: Based on the diagnostic function type and the diagnostic command, a corresponding target diagnostic protocol is selected from the configuration strategy located in the preset diagnostic device to execute the corresponding diagnostic process according to the target diagnostic protocol; wherein the configuration strategy is a strategy constructed according to the correspondence between the functional complexity of the diagnostic function type, the data volume of the diagnostic command and different diagnostic protocols.
[0056] In this embodiment, a target diagnostic protocol corresponding to the current situation is selected from the configuration policy of the diagnostic device according to the diagnostic function type and the diagnostic command, and the diagnostic process of the target diagnostic protocol is executed.
[0057] Reference Figure 2 As shown, before selecting the corresponding target diagnostic protocol from the configuration strategy located in the preset diagnostic device based on the diagnostic function type and the diagnostic command, it also includes: constructing a first diagnostic protocol corresponding to the basic diagnostic function type and the CAN protocol, and the low data volume of the diagnostic command and the CAN protocol; constructing a second diagnostic protocol corresponding to the complex diagnostic function type and the DOIP protocol, and the high data volume of the diagnostic command and the DOIP protocol; wherein the data volume of the diagnostic command is less than the preset data volume threshold, which represents the low data volume of the diagnostic command; and the data volume of the diagnostic command is greater than or equal to the preset data volume threshold, which represents the high data volume of the diagnostic command. It can be understood that the corresponding diagnostic protocol is pre-configured in the diagnostic device, wherein the setting of the diagnostic protocol is set according to the complexity of the diagnosis of brain function and the data volume of the diagnostic command.
[0058] In a specific implementation, the diagnostic protocol is set according to the diagnostic function type. Specifically, the diagnostic function type is for some basic and simple diagnostic function types, such as reading ECU version information, reading fault codes, clearing fault codes, reading data streams, etc. These basic diagnostic functions usually do not require the transmission of a large amount of data and have high real-time requirements. Since the CAN protocol sends less data per frame but has simple initialization, fewer steps, and strong real-time performance, these basic diagnostic function types are configured with the CAN protocol to obtain the first diagnostic protocol. For more complex diagnostic functions such as OBD authentication and ECU firmware flashing, the DOIP protocol is configured to obtain the second diagnostic protocol.
[0059] In another specific implementation, the diagnostic protocol is set according to the data volume of the diagnostic command. Specifically, if the data volume of the diagnostic command is less than 1M (megabyte), the CAN protocol is configured for the low data volume less than 1M bytes to obtain the first diagnostic protocol, because although the CAN protocol has a limited single-frame data volume, it is sufficient for the diagnosis of small data volumes, and it occupies less resources and has fast initialization. If the data volume is greater than 1M bytes, the DOIP protocol is configured for the high data volume greater than 1M bytes to obtain the second diagnostic protocol. In this way, the advantages of the DOIP protocol in transmitting large data volumes and fast speed can be used to shorten the diagnostic time.
[0060] In another specific implementation, the diagnostic function type and the data volume of the diagnostic command can also be combined for judgment. Specifically, when the diagnostic function type is a complex diagnostic function type and the data volume of the diagnostic command is high, the DOIP protocol is configured to obtain the second diagnostic protocol; when the diagnostic function type is a simple diagnostic function type and the data volume of the diagnostic command is low, the CAN protocol is configured to obtain the first diagnostic protocol; and when the diagnostic function type is a simple diagnostic function type, but the data volume of the diagnostic command is high (greater than 1M bytes), the DOIP protocol or CAN protocol is configured; when the diagnostic function type is a complex diagnostic function type, but the data volume of the diagnostic command is low (less than 1M bytes), the DOIP protocol or CAN protocol is configured, and the settings need to be customized as needed according to the actual situation. In this way, the high accuracy and stability of the diagnosis can be guaranteed by the combination. For example, in some special diagnostic environments or vehicle models, users can manually modify the configuration strategy based on past experience or specific needs, so that certain functions give priority to specific protocols. For example, for the engine control system of a specific vehicle model, users found that although the data volume of firmware flashing using the CAN protocol slightly exceeded 1M bytes, due to the characteristics of the vehicle network architecture, the CAN protocol has better stability. It can be manually configured as the CAN protocol and recorded in the custom strategy for direct application in subsequent similar diagnoses.
[0061] In this embodiment, the first diagnostic protocol or the second diagnostic protocol is selected from the configuration strategy located in the preset diagnostic device based on the diagnostic function type and the diagnostic command, so as to execute the first diagnostic process according to the first diagnostic protocol. Specifically, the diagnostic communication parameters corresponding to the electronic control unit to be diagnosed are set according to the first diagnostic protocol, and the corresponding fault diagnosis instructions are sent to the target vehicle according to the diagnostic communication parameters to receive the diagnostic information replied by the electronic control unit to be diagnosed; it can be understood that the CAN protocol is determined to be used according to the first diagnostic protocol, and then the diagnostic device sets the corresponding communication baud rate, pin, system ID (Identity, identity number) and other diagnostic communication parameters according to the ECU system to be diagnosed, and after the setting is completed, the corresponding fault diagnosis instruction is sent to the target vehicle to receive the diagnostic information replied by the ECU to be diagnosed. For example: the function of reading the fault code of the engine system is to be executed, and the first diagnostic protocol is determined according to the configuration strategy, and the CAN protocol is used, then the diagnostic device will set the communication baud rate, pin, system ID and other communication parameters according to the engine ECU system. After the setting is completed, the command to read the fault code can be directly sent to the vehicle bus of the target vehicle, and the fault code information replied by the engine ECU can be received.
[0062] In this embodiment, the second diagnostic process is executed according to the second diagnostic protocol. Specifically, an Ethernet communication channel with the target vehicle is established according to the second diagnostic protocol; when the Ethernet communication channel is established, a fault diagnosis communication operation is performed with the target vehicle through the Ethernet communication channel to receive the diagnostic information replied by the electronic control unit to be diagnosed, and the Ethernet communication channel is destroyed. It can be understood that when the second diagnostic protocol is selected, the second diagnostic process is started. First, the diagnostic device will connect the Ethernet pin, and then obtain the IP address of the target vehicle through UDP (User Datagram Protocol) broadcast, establish a TCP (Transmission Control Protocol) communication channel through the IP address, and then send data through the communication channel and receive the reply message of the ECU. After the diagnostic function is executed, the TCP channel will be destroyed to release the resources. For example, if the firmware of the engine system is flashed, and the flash file of 100M must be written to the ECU, the configuration strategy will match the use of the DOIP protocol, the diagnostic device will connect to the Ethernet pin, and then obtain the vehicle's IP address through UDP broadcast, establish a TCP communication channel through the IP address, and then send the flash data through the channel and receive the ECU's reply. After the diagnostic function is executed, the TCP channel will be destroyed to release the resources.
[0063] In this way, for short diagnostic functions with small data volume that do not require a long time, CAN protocol communication can be used, which takes up less resources and has fast initialization. For diagnostic functions with large amounts of data, DOIP protocol communication can be used to shorten the diagnostic time. According to the requirements of different diagnostic functions, appropriate diagnostic protocols can be selected to improve the overall diagnostic efficiency and reduce the resource usage during diagnosis. The diagnostic equipment can automatically adapt the diagnostic protocol by modifying the strategy. Using the dynamic adaptive diagnostic protocol, the appropriate diagnostic protocol can be used for communication according to different diagnostic requirements, avoiding the waste of resources and diagnostic time, and improving the overall vehicle diagnostic efficiency.
[0064] It can be seen that the present application discloses a vehicle diagnostic protocol dynamic matching method, which is applied to a preset diagnostic device, including: obtaining the vehicle model information, the electronic control unit information to be diagnosed, and the target diagnostic function of the target vehicle through a preset communication channel; determining the diagnostic function type and diagnostic command of the electronic control unit to be diagnosed according to the vehicle model information, the electronic control unit information to be diagnosed, and the target diagnostic function; selecting the corresponding target diagnostic protocol from the configuration strategy located in the preset diagnostic device based on the diagnostic function type and the diagnostic command, so as to execute the corresponding diagnostic process according to the target diagnostic protocol; wherein the configuration strategy is a strategy constructed according to the functional complexity of the diagnostic function type, the data volume of the diagnostic command and the corresponding relationship between different diagnostic protocols. It can be seen that by comprehensively considering the vehicle model information, the electronic control unit information to be diagnosed and the target diagnostic function, the most suitable diagnostic protocol can be accurately matched, so that the extra communication steps generated by diagnosis under an unsuitable protocol are avoided.
[0065] Reference Figure 3 As shown, the present invention also discloses a vehicle diagnostic protocol dynamic matching device, which is applied to a preset diagnostic device, including:
[0066] The information acquisition module 11 is used to acquire the model information of the target vehicle, the electronic control unit information to be diagnosed, and the target diagnostic function through a preset communication channel;
[0067] A type instruction determination module 12 is used to determine the diagnostic function type and diagnostic command of the electronic control unit to be diagnosed according to the vehicle model information, the electronic control unit to be diagnosed information, and the target diagnostic function;
[0068] The protocol selection module 13 is used to select a corresponding target diagnostic protocol from the configuration strategy located in the preset diagnostic device based on the diagnostic function type and the diagnostic command, so as to execute the corresponding diagnostic process according to the target diagnostic protocol; wherein the configuration strategy is a strategy constructed according to the correspondence between the functional complexity of the diagnostic function type, the data volume of the diagnostic command and different diagnostic protocols.
[0069] It can be seen that the present application discloses obtaining the vehicle model information, the electronic control unit information to be diagnosed, and the target diagnostic function of the target vehicle through a preset communication channel; determining the diagnostic function type and diagnostic command of the electronic control unit to be diagnosed based on the vehicle model information, the electronic control unit information to be diagnosed, and the target diagnostic function; selecting the corresponding target diagnostic protocol from the configuration strategy located in the preset diagnostic device based on the diagnostic function type and the diagnostic command, so as to execute the corresponding diagnostic process according to the target diagnostic protocol; wherein the configuration strategy is a strategy constructed according to the functional complexity of the diagnostic function type, the data volume of the diagnostic command, and the corresponding relationship between different diagnostic protocols. It can be seen that by comprehensively considering the vehicle model information, the electronic control unit information to be diagnosed, and the target diagnostic function, the most suitable diagnostic protocol can be accurately matched, thereby avoiding the extra communication steps generated by diagnosis under an unsuitable protocol.
[0070] Furthermore, the present application also discloses an electronic device. Figure 4 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram cannot be considered as any limitation on the scope of use of the present application.
[0071] Figure 4 A schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the vehicle diagnostic protocol dynamic matching method disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0072] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0073] Among them, the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 can be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 21 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 21 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0074] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0075] Among them, the operating system 221 is used to manage and control the hardware devices and computer programs 222 on the electronic device 20, so as to realize the operation and processing of the processor 21 on the massive data 223 in the memory 22, which can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to complete the vehicle diagnostic protocol dynamic matching method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks. In addition to data received by the electronic device and transmitted from an external device, the data 223 can also include data collected by its own input and output interface 25, etc.
[0076] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the vehicle diagnostic protocol dynamic matching method disclosed above. The specific steps of the method can refer to the corresponding contents disclosed in the above embodiments, and will not be repeated here.
[0077] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the 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 method part.
[0078] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application. The steps of the method or algorithm described in conjunction with the embodiments disclosed herein can be implemented directly with hardware, a software module executed by a processor, or a combination of the two. The software module can be placed in a random access memory RAM (Random Access Memory), memory, read-only memory ROM (Read Only Memory), electrically programmable EPROM (Electrically Programmable Read Only Memory), electrically erasable programmable EEPROM (ElectricErasable Programmable Read Only Memory), register, hard disk, removable disk, CD-ROM (CompactDisc-Read Only Memory), or any other form of storage medium known in the technical field.
[0079] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0080] The scheme provided by the present invention is introduced in detail above. Specific examples are used in this article to illustrate the principle and implementation mode of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation mode and application scope. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A vehicle diagnostic protocol dynamic matching method, characterized in that: For use in pre-diagnostic equipment, including: Obtain the target vehicle's model information, the electronic control unit information to be diagnosed, and the target diagnostic function through a preset communication channel; Determine the diagnostic function type and diagnostic command of the electronic control unit to be diagnosed according to the vehicle model information, the electronic control unit to be diagnosed information, and the target diagnostic function; Based on the diagnostic function type and the diagnostic command, a corresponding target diagnostic protocol is selected from the configuration strategy located in the preset diagnostic device to execute the corresponding diagnostic process according to the target diagnostic protocol; wherein the configuration strategy is a strategy constructed according to the correspondence between the functional complexity of the diagnostic function type, the data volume of the diagnostic command and different diagnostic protocols.
2. The vehicle diagnostic protocol dynamic matching method according to claim 1, characterized in that: The method of obtaining the target vehicle model information, the electronic control unit information to be diagnosed, and the target diagnosis function through the preset communication channel includes: Establishing a preset communication channel between the preset diagnostic device and the target vehicle, wherein the preset communication channel includes: any one or more of Bluetooth, wireless local area network or on-board diagnostic system interface; Reading the VIN code of the target vehicle through the preset communication channel to match the corresponding vehicle model information according to the VIN code; Determine all electronic control units equipped on the target vehicle according to the vehicle model information, and display all electronic control unit information and all diagnostic functions on a visualization page; Based on the diagnostic requirements, corresponding electronic control unit information to be diagnosed and target diagnostic functions are selected from the visualization page.
3. The vehicle diagnostic protocol dynamic matching method according to claim 1, characterized in that: The step of determining the diagnostic function type and the diagnostic command of the electronic control unit to be diagnosed according to the vehicle model information, the information of the electronic control unit to be diagnosed, and the target diagnostic function includes: Determine a diagnostic function type range according to the vehicle model information, and use the function type within the diagnostic function type range as the diagnostic function type of the electronic control unit to be diagnosed; determining an initial diagnosis command of the electronic control unit to be diagnosed according to the electronic control unit to be diagnosed information; The initial diagnostic command is processed by the target diagnostic function to obtain a corresponding diagnostic command.
4. The vehicle diagnostic protocol dynamic matching method according to claim 1, characterized in that: Before selecting a corresponding target diagnostic protocol from a configuration strategy located in the preset diagnostic device based on the diagnostic function type and the diagnostic command, the method further includes: Constructing a first diagnostic protocol in which a basic diagnostic function type corresponds to the CAN protocol and a low data volume of a diagnostic command corresponds to the CAN protocol; Constructing a second diagnostic protocol corresponding to the DOIP protocol for complex diagnostic function types and the DOIP protocol for high data volume of diagnostic commands; Among them, the data volume of the diagnostic command less than the preset data volume threshold represents a low data volume of the diagnostic command; the data volume of the diagnostic command greater than or equal to the preset data volume threshold represents a high data volume of the diagnostic command.
5. The vehicle diagnostic protocol dynamic matching method according to claim 4, characterized in that: The step of selecting a corresponding target diagnostic protocol from a configuration strategy located at the preset diagnostic device based on the diagnostic function type and the diagnostic command, so as to execute a corresponding diagnostic process according to the target diagnostic protocol, includes: The first diagnostic protocol or the second diagnostic protocol is selected from a configuration strategy located in the preset diagnostic device based on the diagnostic function type and the diagnostic command to execute a first diagnostic process according to the first diagnostic protocol or to execute a second diagnostic process according to the second diagnostic protocol.
6. The vehicle diagnostic protocol dynamic matching method according to claim 5, characterized in that: The performing of the first diagnostic process according to the first diagnostic protocol, or the performing of the second diagnostic process according to the second diagnostic protocol, includes: Setting diagnostic communication parameters corresponding to the electronic control unit to be diagnosed according to the first diagnostic protocol, and sending corresponding fault diagnosis instructions to the target vehicle according to the diagnostic communication parameters to receive diagnostic information replied by the electronic control unit to be diagnosed; or, establishing an Ethernet communication channel with the target vehicle according to the second diagnostic protocol; When the Ethernet communication channel is established, a fault diagnosis communication operation is performed with the target vehicle through the Ethernet communication channel to receive the diagnostic information replied by the electronic control unit to be diagnosed, and the Ethernet communication channel is destroyed.
7. The vehicle diagnostic protocol dynamic matching method according to any one of claims 1 to 6, characterized in that: The preset diagnostic device is a mobile device.
8. A vehicle diagnostic protocol dynamic matching device, characterized in that: For use in pre-diagnostic equipment, including: An information acquisition module, used to acquire the model information of the target vehicle, the electronic control unit information to be diagnosed, and the target diagnostic function through a preset communication channel; A type instruction determination module, used to determine the diagnostic function type and diagnostic command of the electronic control unit to be diagnosed according to the vehicle model information, the electronic control unit to be diagnosed information, and the target diagnostic function; A protocol selection module is used to select a corresponding target diagnostic protocol from the configuration strategy located in the preset diagnostic device based on the diagnostic function type and the diagnostic command, so as to execute the corresponding diagnostic process according to the target diagnostic protocol; wherein the configuration strategy is a strategy constructed according to the correspondence between the functional complexity of the diagnostic function type, the data volume of the diagnostic command and different diagnostic protocols.
9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor is used to execute the computer program to implement the steps of the vehicle diagnostic protocol dynamic matching method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: Used to store computer programs; wherein, when the computer program is executed by a processor, the steps of the vehicle diagnostic protocol dynamic matching method as described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Vehicle diagnosis protocol obtaining method and device and related equipment thereof
CN114859870A
Vehicle fault diagnosis method, device and equipment and readable storage medium
CN114879630A
Vehicle diagnosis method and system, electronic equipment, storage medium and vehicle
CN117289677A
Vehicle diagnosis method, vehicle diagnosis device, storage medium and computer equipment
CN117348591A
Vehicle diagnosis method and system based on automatic switching of communication protocols, and diagnosis device
WO2021223521A1
Cited By
Automobile motion state evaluation method and system based on automobile CAN signal
CN120122629A