Vehicle diagnostic method and apparatus based on communication path switching

CN123029913APending Publication Date: 2026-11-03深圳鼎匠科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611531271.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-30
Publication Date
2026-11-03

AI Technical Summary

Technical Problem

In existing vehicle diagnostic solutions, the switching flexibility of diagnostic communication connections is poor, making it difficult to flexibly configure them according to the communication needs of different diagnostic services, which affects diagnostic efficiency.

Method used

The target connection mode and remote configuration information are obtained through the vehicle diagnostic terminal. The communication bus conversion unit is controlled to perform a path switching operation, switching the USB connection to a bus conversion communication connection, establishing a data transmission channel, and driving the target unit to perform diagnostic operations.

Benefits of technology

It improves the flexibility of switching diagnostic communication connections and the efficiency of establishing data transmission channels, reduces the need for rewiring or establishing wireless connections, and enhances vehicle diagnostic efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123029913A_ABST
    Figure CN123029913A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of vehicle communication and discloses a vehicle diagnosis method and device based on communication channel switching, which comprises the following steps: obtaining a target connection mode between a vehicle diagnosis terminal and a vehicle communication interface device and remote configuration information corresponding to an electronic control unit; in the case that the target connection mode is a USB connection mode and there is DoIP configuration information in the remote configuration information, sending a first switching command to the controller unit through the vehicle diagnosis terminal; controlling the communication bus conversion unit to perform a channel switching operation according to the first switching command through the controller unit, so as to switch to a bus conversion communication connection relationship; and establishing a data transmission channel between the vehicle diagnosis terminal and the vehicle communication interface device based on the bus conversion communication connection relationship through the vehicle diagnosis terminal, so as to perform a target diagnosis operation on the electronic control unit. It can be seen that the application can improve the switching flexibility of diagnosis communication connection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of vehicle communication technology, and in particular to a vehicle diagnostic method and apparatus based on communication path switching. Background Technology

[0002] With the increasing electrification and networking of vehicles, multiple Electronic Control Units (ECUs) are typically installed in vehicles. In applications such as vehicle maintenance, fault detection, software upgrades, and operational status analysis, vehicle diagnostic terminals can communicate with ECUs through Vehicle Communication Interface (VCI) devices to read fault codes, obtain vehicle operating data, or send diagnostic commands to the ECUs.

[0003] Existing vehicle diagnostic solutions, such as vehicle diagnostic terminals connected to VCI devices via USB (Universal Serial Bus), typically rely on a fixed connection between the vehicle diagnostic terminal, the microcontroller unit (MCU) in the VCI device, the network communication interface, and the ECU to transmit pass-through diagnostic data. This makes it difficult to flexibly configure the communication connection according to the communication requirements of different diagnostic services, resulting in poor flexibility in switching diagnostic communication connections and hindering the improvement of vehicle diagnostic efficiency. Therefore, proposing a technical solution to improve the switching flexibility of diagnostic communication connections when the vehicle diagnostic terminal is connected to the VCI device via USB is particularly important. Summary of the Invention

[0004] This invention provides a vehicle diagnostic method and apparatus based on communication path switching, which can improve the flexibility of diagnostic communication connection switching.

[0005] To address the aforementioned technical problems, the first aspect of this invention discloses a vehicle diagnostic method based on communication path switching. The method is applied to a vehicle diagnostic system, which includes a vehicle diagnostic terminal and a vehicle communication interface device. The vehicle communication interface device includes a controller unit, a communication interface unit, and a communication bus conversion unit. The communication interface unit is used to connect to the vehicle's electronic control unit, and each of the controller unit, the communication interface unit, and the communication bus conversion unit is communicatively connected to other units of the vehicle communication interface device. The method includes: The target connection mode between the vehicle diagnostic terminal and the vehicle communication interface device, as well as the remote configuration information corresponding to the electronic control unit, are obtained through the vehicle diagnostic terminal. When the target connection mode is USB connection mode and DoIP configuration information exists in the remote configuration information, a first switching command is sent to the controller unit through the vehicle diagnostic terminal; The controller unit controls the communication bus conversion unit to perform a path switching operation according to the first switching command, so as to switch the USB communication connection between the vehicle diagnostic terminal and the controller unit to the bus conversion communication connection between the vehicle diagnostic terminal and the communication interface unit. When the vehicle diagnostic terminal has diagnostic services to be performed, a data transmission channel is established between the vehicle diagnostic terminal and the vehicle communication interface device based on the bus conversion communication connection relationship. The vehicle diagnostic terminal drives the target unit corresponding to the diagnostic service to be performed to perform the corresponding target diagnostic operation on the electronic control unit via the data transmission channel. When the diagnostic service to be performed is a remote diagnostic service, the communication port corresponding to the remote diagnostic service includes the remote switching communication port and the DoIP communication port of the communication interface unit, the target unit corresponding to the diagnostic service to be performed includes the communication interface unit, and the target diagnostic operation includes a remote switching operation and a remote diagnostic operation. The remote switching operation includes: canceling the mapping relationship between the network interface and the virtual network card of the communication interface unit, configuring a network card independent of the virtual network card for the network interface, and setting the network card independent of the virtual network card to listening mode; The remote diagnostic operation includes: sending remote DoIP diagnostic data to the communication interface unit through the vehicle diagnostic terminal, processing the remote DoIP diagnostic data through the communication interface unit, and sending the processed diagnostic data to the electronic control unit through the network card in the monitoring mode.

[0006] As an optional implementation, in the first aspect of the present invention, the communication bus conversion unit includes a switch switching subunit and a USB network port subunit; And, the step of controlling the communication bus conversion unit to perform a path switching operation according to the first switching command by the controller unit to switch the USB communication connection between the vehicle diagnostic terminal and the controller unit to a bus-converted communication connection between the vehicle diagnostic terminal and the communication interface unit includes: The controller unit generates a switch control signal according to the first switching command and sends the switch control signal to the switch switching subunit; Under the control of the switch control signal, the switch switching subunit disconnects the USB communication connection between the vehicle diagnostic terminal and the controller unit, and establishes a first communication connection between the vehicle diagnostic terminal and the USB network port subunit. The first communication connection relationship is adapted to the pre-set second communication connection relationship through the USB network port sub-unit to form a bus conversion communication connection relationship between the vehicle diagnostic terminal and the communication interface unit. The second communication connection relationship is the communication connection relationship between the USB network port sub-unit and the communication interface unit.

[0007] As an optional implementation, in the first aspect of the present invention, establishing a data transmission channel between the vehicle diagnostic terminal and the vehicle communication interface device based on the bus conversion communication connection relationship via the vehicle diagnostic terminal includes: Obtain the target communication port that matches the diagnostic service to be performed; Based on the bus conversion communication connection relationship, the vehicle diagnostic terminal establishes a data transmission channel between the vehicle diagnostic terminal and the vehicle communication interface device at the target communication port.

[0008] As an optional implementation, in the first aspect of the present invention, when the diagnostic service to be performed is a local diagnostic service, the target communication port includes the local diagnostic communication port of the communication interface unit, and the data transmission channel includes a local diagnostic data transmission channel; and, the step of driving the target unit corresponding to the diagnostic service to be performed to execute a corresponding target diagnostic operation on the electronic control unit via the data transmission channel through the vehicle diagnostic terminal includes: The vehicle diagnostic terminal sends Pass-Thru diagnostic data to the communication interface unit via the local diagnostic data transmission channel. The communication interface unit receives the Pass-Thru diagnostic data and transmits the Pass-Thru diagnostic data to the controller unit based on the communication connection between the communication interface unit and the controller unit. The controller unit performs local diagnostic operations corresponding to the local diagnostic service on the electronic control unit based on the Pass-Thru diagnostic data. The target unit corresponding to the local diagnostic service includes the controller unit, and the target diagnostic operation includes the local diagnostic operation.

[0009] As an optional implementation, in the first aspect of the present invention, when the diagnostic service to be performed is a remote diagnostic service, the target communication port includes a remote switching communication port of the communication interface unit and a DoIP communication port of the communication interface unit, and the data transmission channel includes a remote switching communication channel; and the step of driving the target unit corresponding to the diagnostic service to be performed to perform a corresponding target diagnostic operation on the electronic control unit via the data transmission channel through the vehicle diagnostic terminal includes: The vehicle diagnostic terminal sends a second switching command to the communication interface unit via the remote switching communication channel, thereby driving the communication interface unit to execute the remote switching operation according to the second switching command; After performing the remote switching operation, the vehicle diagnostic terminal establishes a DoIP data transmission channel between the vehicle diagnostic terminal and the communication interface unit on the DoIP communication port based on the bus conversion communication connection relationship; the vehicle diagnostic terminal drives the communication interface unit to perform the remote diagnostic operation on the electronic control unit based on the DoIP data transmission channel.

[0010] As an optional implementation, in a first aspect of the invention, the step of driving the communication interface unit to perform the remote diagnostic operation on the electronic control unit via the vehicle diagnostic terminal based on the DoIP data transmission channel includes: The target Ethernet frame to be sent is obtained through the vehicle diagnostic terminal. The vehicle diagnostic terminal encapsulates the target Ethernet frame to obtain remote DoIP diagnostic data carrying the target Ethernet frame, and sends the remote DoIP diagnostic data to the communication interface unit via the DoIP data transmission channel. The remote DoIP diagnostic data is decapsulated through the communication interface unit to obtain the target Ethernet frame, and the target Ethernet frame is sent to the electronic control unit via the communication interface unit.

[0011] As an optional implementation, in the first aspect of the invention, before establishing the remote switching communication channel, the method further includes: The vehicle diagnostic terminal sends a preset UDP broadcast discovery message via the bus conversion communication connection relationship. The communication interface unit responds to the UDP broadcast discovery message and sends a response message to the vehicle diagnostic terminal. The vehicle diagnostic terminal obtains the network address of the communication interface unit based on the response message. And, the step of establishing a data transmission channel between the vehicle diagnostic terminal and the vehicle communication interface device at the target communication port based on the bus conversion communication connection relationship via the vehicle diagnostic terminal includes: Based on the bus conversion communication connection relationship, the vehicle diagnostic terminal sends a connection request to the communication interface unit according to the network address of the communication interface unit and the remote switching communication port to establish a remote switching communication channel between the vehicle diagnostic terminal and the communication interface unit.

[0012] A second aspect of this invention discloses a vehicle diagnostic device based on communication path switching. The device is applied to a vehicle diagnostic system, which includes a vehicle diagnostic terminal and a vehicle communication interface device. The vehicle communication interface device includes a controller unit, a communication interface unit, and a communication bus conversion unit. The communication interface unit is used to connect to the vehicle's electronic control unit, and each of the controller unit, the communication interface unit, and the communication bus conversion unit is communicatively connected to the other units. The device includes: The acquisition control module is used to acquire the target connection mode between the vehicle diagnostic terminal and the vehicle communication interface device, as well as the remote configuration information corresponding to the electronic control unit, through the vehicle diagnostic terminal. The sending control module is used to send a first switching command to the controller unit through the vehicle diagnostic terminal when the target connection mode is USB connection mode and DoIP configuration information exists in the remote configuration information; The switching control module is used to control the communication bus conversion unit to perform a path switching operation according to the first switching command through the controller unit, so as to switch the USB communication connection between the vehicle diagnostic terminal and the controller unit to the bus conversion communication connection between the vehicle diagnostic terminal and the communication interface unit. A control module is established to establish a data transmission channel between the vehicle diagnostic terminal and the vehicle communication interface device when the vehicle diagnostic terminal has diagnostic services to be performed, based on the bus conversion communication connection relationship of the vehicle diagnostic terminal. The diagnostic control module is used to drive the target unit corresponding to the diagnostic service to be executed to perform a corresponding target diagnostic operation on the electronic control unit via the data transmission channel through the vehicle diagnostic terminal; When the diagnostic service to be performed is a remote diagnostic service, the communication port corresponding to the remote diagnostic service includes the remote switching communication port and the DoIP communication port of the communication interface unit, the target unit corresponding to the diagnostic service to be performed includes the communication interface unit, and the target diagnostic operation includes a remote switching operation and a remote diagnostic operation. The remote switching operation includes: canceling the mapping relationship between the network interface and the virtual network card of the communication interface unit, configuring a network card independent of the virtual network card for the network interface, and setting the network card independent of the virtual network card to listening mode; The remote diagnostic operation includes: sending remote DoIP diagnostic data to the communication interface unit through the vehicle diagnostic terminal, processing the remote DoIP diagnostic data through the communication interface unit, and sending the processed diagnostic data to the electronic control unit through the network card in the monitoring mode.

[0013] As an optional implementation, in a second aspect of the present invention, the communication bus conversion unit includes a switch switching subunit and a USB network port subunit; Furthermore, the specific method by which the switching control module controls the communication bus conversion unit to perform a path switching operation according to the first switching command through the controller unit, so as to switch the USB communication connection between the vehicle diagnostic terminal and the controller unit to the bus conversion communication connection between the vehicle diagnostic terminal and the communication interface unit, includes: The controller unit generates a switch control signal according to the first switching command and sends the switch control signal to the switch switching subunit; Under the control of the switch control signal, the switch switching subunit disconnects the USB communication connection between the vehicle diagnostic terminal and the controller unit, and establishes a first communication connection between the vehicle diagnostic terminal and the USB network port subunit. The first communication connection relationship is adapted to the pre-set second communication connection relationship through the USB network port sub-unit to form a bus conversion communication connection relationship between the vehicle diagnostic terminal and the communication interface unit. The second communication connection relationship is the communication connection relationship between the USB network port sub-unit and the communication interface unit.

[0014] As an optional implementation, in the second aspect of the present invention, the specific method by which the establishment control module establishes a data transmission channel between the vehicle diagnostic terminal and the vehicle communication interface device based on the bus conversion communication connection relationship includes: Obtain the target communication port that matches the diagnostic service to be performed; Based on the bus conversion communication connection relationship, the vehicle diagnostic terminal establishes a data transmission channel between the vehicle diagnostic terminal and the vehicle communication interface device at the target communication port.

[0015] As an optional implementation, in the second aspect of the present invention, when the diagnostic service to be performed is a local diagnostic service, the target communication port includes the local diagnostic communication port of the communication interface unit, and the data transmission channel includes a local diagnostic data transmission channel; and the specific manner in which the diagnostic control module drives the target unit corresponding to the diagnostic service to be performed to perform a corresponding target diagnostic operation on the electronic control unit via the data transmission channel through the vehicle diagnostic terminal includes: The vehicle diagnostic terminal sends Pass-Thru diagnostic data to the communication interface unit via the local diagnostic data transmission channel. The communication interface unit receives the Pass-Thru diagnostic data and transmits the Pass-Thru diagnostic data to the controller unit based on the communication connection between the communication interface unit and the controller unit. The controller unit performs local diagnostic operations corresponding to the local diagnostic service on the electronic control unit based on the Pass-Thru diagnostic data. The target unit corresponding to the local diagnostic service includes the controller unit, and the target diagnostic operation includes the local diagnostic operation.

[0016] As an optional implementation, in the second aspect of the present invention, when the diagnostic service to be performed is a remote diagnostic service, the target communication port includes a remote switching communication port of the communication interface unit and a DoIP communication port of the communication interface unit, and the data transmission channel includes a remote switching communication channel; and the specific manner in which the diagnostic control module drives the target unit corresponding to the diagnostic service to be performed to perform a corresponding target diagnostic operation on the electronic control unit via the data transmission channel through the vehicle diagnostic terminal includes: The vehicle diagnostic terminal sends a second switching command to the communication interface unit via the remote switching communication channel, thereby driving the communication interface unit to execute the remote switching operation according to the second switching command; After performing the remote switching operation, the vehicle diagnostic terminal establishes a DoIP data transmission channel between the vehicle diagnostic terminal and the communication interface unit on the DoIP communication port based on the bus conversion communication connection relationship; the vehicle diagnostic terminal drives the communication interface unit to perform the remote diagnostic operation on the electronic control unit based on the DoIP data transmission channel.

[0017] As an optional implementation, in a second aspect of the invention, the step of driving the communication interface unit to perform the remote diagnostic operation on the electronic control unit via the vehicle diagnostic terminal based on the DoIP data transmission channel includes: The target Ethernet frame to be sent is obtained through the vehicle diagnostic terminal. The vehicle diagnostic terminal encapsulates the target Ethernet frame to obtain remote DoIP diagnostic data carrying the target Ethernet frame, and sends the remote DoIP diagnostic data to the communication interface unit via the DoIP data transmission channel. The remote DoIP diagnostic data is decapsulated through the communication interface unit to obtain the target Ethernet frame, and the target Ethernet frame is sent to the electronic control unit via the communication interface unit.

[0018] As an optional implementation, in a second aspect of the present invention, the sending control module is further configured to, before the establishment control module establishes the remote switching communication channel, send a preset UDP broadcast discovery message via the bus conversion communication connection relationship through the vehicle diagnostic terminal; and respond to the UDP broadcast discovery message through the communication interface unit by sending a response message to the vehicle diagnostic terminal. The acquisition control module is further configured to acquire the network address of the communication interface unit through the vehicle diagnostic terminal based on the response message; Furthermore, the specific method by which the establishment control module establishes a data transmission channel between the vehicle diagnostic terminal and the vehicle communication interface device at the target communication port based on the bus conversion communication connection relationship includes: Based on the bus conversion communication connection relationship, the vehicle diagnostic terminal sends a connection request to the communication interface unit according to the network address of the communication interface unit and the remote switching communication port to establish a remote switching communication channel between the vehicle diagnostic terminal and the communication interface unit.

[0019] A third aspect of the present invention discloses another vehicle diagnostic device based on communication path switching, the device comprising: Memory containing executable program code; A processor coupled to the memory; The processor calls the executable program code stored in the memory to execute the vehicle diagnostic method based on communication path switching disclosed in the first aspect of the present invention.

[0020] The fourth aspect of the present invention discloses a computer storage medium storing computer instructions, which, when invoked, are used to execute the vehicle diagnostic method based on communication path switching disclosed in the first aspect of the present invention.

[0021] Compared with the prior art, the embodiments of the present invention have the following beneficial effects: In this invention, when the target connection mode is USB connection mode and DoIP configuration information exists in the remote configuration information, the communication bus conversion unit performs a path switching operation. This allows the USB communication connection between the vehicle diagnostic terminal and the controller unit to be switched to a bus-converted communication connection between the vehicle diagnostic terminal and the communication interface unit without changing the physical USB connection between the vehicle diagnostic terminal and the vehicle communication interface device. When there is a diagnostic service to be performed, a corresponding data transmission channel is established based on this bus-converted communication connection to drive the target unit to perform the target diagnostic operation on the ECU. Therefore, the existing USB interface of the vehicle diagnostic terminal can be reused to meet the communication needs of different diagnostic services, reducing the need for rewiring or establishing a separate wireless connection, improving the flexibility of switching vehicle diagnostic communication connections and the efficiency of establishing data transmission channels, thereby improving vehicle diagnostic efficiency. Attached Figure Description

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

[0023] Figure 1 This is a schematic flowchart of a vehicle diagnostic method based on communication path switching disclosed in an embodiment of the present invention; Figure 2 This is a flowchart illustrating another vehicle diagnostic method based on communication path switching disclosed in an embodiment of the present invention. Figure 3 This is a schematic diagram of the data flow of a remote switching command disclosed in an embodiment of the present invention; Figure 4 This is a schematic diagram of the vehicle diagnostic system connection in a default local diagnostic state as disclosed in an embodiment of the present invention; Figure 5 This is a schematic diagram of a vehicle diagnostic system connection in a remote diagnostic state, as disclosed in an embodiment of the present invention; Figure 6 This is a schematic diagram of the structure of a vehicle diagnostic device based on communication path switching disclosed in an embodiment of the present invention; Figure 7 This is a schematic diagram of another vehicle diagnostic device based on communication path switching disclosed in an embodiment of the present invention. Detailed Implementation

[0024] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0025] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this invention are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, apparatus, product, or end that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or ends.

[0026] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0027] This invention discloses a vehicle diagnostic method and apparatus based on communication path switching. When the target connection mode is USB and DoIP configuration information exists in the remote configuration information, the communication bus conversion unit performs a path switching operation. This allows switching the USB communication connection between the vehicle diagnostic terminal and the controller unit to a bus-converted communication connection between the vehicle diagnostic terminal and the communication interface unit without changing the physical USB connection between the vehicle diagnostic terminal and the vehicle communication interface device. When there is a diagnostic task to be performed, a corresponding data transmission channel is established based on this bus-converted communication connection to drive the target unit to perform the target diagnostic operation on the ECU. Therefore, the existing USB interface of the vehicle diagnostic terminal can be reused to meet the communication requirements of different diagnostic tasks, reducing the need for rewiring or establishing a new wireless connection, improving the flexibility of vehicle diagnostic communication connection switching and the efficiency of data transmission channel establishment, thereby improving vehicle diagnostic efficiency. Detailed descriptions follow.

[0028] Example 1 Please see Figure 1 , Figure 1This is a flowchart illustrating a vehicle diagnostic method based on communication path switching disclosed in an embodiment of the present invention. Wherein, Figure 1 The described vehicle diagnostic method based on communication path switching can be applied to a vehicle diagnostic system. The vehicle diagnostic system includes a vehicle diagnostic terminal and a vehicle communication interface device. The vehicle diagnostic terminal can be a tablet computer, portable diagnostic terminal, or other electronic device with vehicle diagnostic functions that has a vehicle diagnostic application installed. The vehicle communication interface device can be a VCI device located between the vehicle diagnostic terminal and the vehicle ECU. The vehicle communication interface device includes a controller unit, a communication interface unit, and a communication bus conversion unit. The controller unit can include an MCU for processing Pass-Thru diagnostic data, controlling the communication bus conversion unit to perform path switching operations, and communicating with the ECU via the vehicle bus. The communication interface unit can include a communication processor, a network interface, a wireless network card, and other components running on the communication... The processor includes a communication program; the communication interface unit connects to the vehicle's electronic control unit (ECU) and establishes a network communication connection with the vehicle diagnostic terminal, communicating with the ECU via an Ethernet interface; the communication bus conversion unit adapts communication between the USB interface of the vehicle diagnostic terminal and the network interface of the communication interface unit. Each of the controller unit, communication interface unit, and communication bus conversion unit communicates with other units of the vehicle communication interface device. This can be understood as follows: the controller unit and communication interface unit can be connected via USB, serial port, or other internal communication interfaces; the controller unit and communication bus conversion unit can be connected via USB and switch control lines; and the communication bus conversion unit and communication interface unit can be connected via a network interface. This embodiment of the invention does not impose limitations. Figure 1 As shown, this vehicle diagnostic method based on communication path switching may include the following operations: 101. Obtain the target connection mode between the vehicle diagnostic terminal and the vehicle communication interface device, as well as the remote configuration information of the electronic control unit, through the vehicle diagnostic terminal.

[0029] In this embodiment of the invention, the vehicle diagnostic terminal can respond to a diagnostic request triggered by a user and obtain the target connection mode between the vehicle diagnostic terminal and the vehicle communication interface device. The target connection mode represents the communication method used by the vehicle diagnostic terminal to establish a connection with the vehicle communication interface device. The vehicle diagnostic terminal can determine the target connection mode based on the currently enabled communication interface, the connection status information fed back by the vehicle communication interface device, or the device connection information recorded by the vehicle diagnostic application. Optionally, the target connection mode may include at least one of a USB connection mode, a Bluetooth connection mode, or a WiFi (Wireless Fidelity) connection mode; this embodiment of the invention does not impose a limitation.

[0030] In this embodiment of the invention, the vehicle diagnostic terminal can also obtain remote configuration information corresponding to the electronic control unit (ECU). This remote configuration information may include at least one of the following: vehicle model, ECU type, whether the vehicle supports DoIP (Diagnostic Communication over Internet Protocol) communication, DoIP communication parameters, and the types of diagnostic services supported by the target vehicle. This embodiment of the invention does not limit the scope of this information. Optionally, the remote configuration information may be pre-stored in the vehicle diagnostic terminal, or it may be obtained by the vehicle diagnostic terminal from a server based on vehicle identification information. By parsing the remote configuration information, the vehicle diagnostic terminal can determine whether DoIP configuration information exists within it.

[0031] 102. When the target connection mode is USB connection mode and DoIP configuration information exists in the remote configuration information, send the first switching command to the controller unit through the vehicle diagnostic terminal.

[0032] In this embodiment of the invention, under the default connection state of the vehicle communication interface device, the vehicle diagnostic terminal can connect to the controller unit via USB to transmit Pass-Thru diagnostic data through the USB communication connection between the vehicle diagnostic terminal and the controller unit.

[0033] When the target connection mode is USB connection mode and DoIP configuration information exists in the remote configuration information, the vehicle diagnostic terminal needs to further access the network communication services provided by the communication interface unit. Therefore, the vehicle diagnostic terminal can send a first switching command to the controller unit through the currently established USB communication connection.

[0034] The first switching command is used to instruct the controller unit to control the communication bus conversion unit to perform a path switching operation. Optionally, the first switching command may include at least one of the following: command identifier, target connection status, vehicle communication interface device identifier, and verification information; however, this embodiment of the invention is not limited thereto.

[0035] The first switching command can be a Pass-Thru switching command encapsulated according to a preset Pass-Thru command format. After receiving the first switching command, the controller unit can parse and verify the first switching command to determine whether the USB connection object of the vehicle diagnostic terminal needs to be switched from the controller unit to the communication bus conversion unit.

[0036] 103. The controller unit controls the communication bus conversion unit to perform a path switching operation according to the first switching command, so as to switch the USB communication connection between the vehicle diagnostic terminal and the controller unit to the bus conversion communication connection between the vehicle diagnostic terminal and the communication interface unit.

[0037] In this embodiment of the invention, the controller unit controls the communication bus conversion unit to perform a path switching operation according to the first switching command, so as to disconnect the original USB communication connection between the vehicle diagnostic terminal and the controller unit, and establish a bus conversion communication connection between the vehicle diagnostic terminal and the communication interface unit through the communication bus conversion unit.

[0038] The bus conversion communication connection can include the USB-side communication connection between the vehicle diagnostic terminal and the communication bus conversion unit, and the network-side communication connection between the communication bus conversion unit and the communication interface unit. The communication bus conversion unit performs communication adaptation for USB-side data and network-side data, enabling the vehicle diagnostic terminal to access the network communication services provided by the communication interface unit through the original USB physical interface.

[0039] Therefore, the bus conversion communication connection does not simply mean that the vehicle diagnostic terminal and the communication interface unit only use the USB protocol for end-to-end communication, but rather that the vehicle diagnostic terminal forms an end-to-end usable network communication connection with the communication interface unit through the communication bus conversion unit.

[0040] 104. When there are diagnostic services to be performed on the vehicle diagnostic terminal, a data transmission channel is established between the vehicle diagnostic terminal and the vehicle communication interface device by converting the communication connection relationship based on the bus.

[0041] In this embodiment of the invention, the diagnostic service to be performed may include local diagnostic services and / or remote diagnostic services. Local diagnostic services may include the transmission of Pass-Thru diagnostic data to the ECU via the controller unit. Remote diagnostic services may include the control communication interface unit performing remote switching operations, and the performance of remote diagnostic operations on the ECU via DoIP.

[0042] The vehicle diagnostic terminal can establish a corresponding data transmission channel with the vehicle communication interface device based on the bus conversion communication connection relationship, according to the service type of the diagnostic service to be performed. Optionally, the data transmission channel can be a service communication channel established between the vehicle diagnostic terminal and the vehicle communication interface device based on TCP (Transmission Control Protocol), UDP (User Datagram Protocol), or other network transmission protocols. This embodiment of the invention does not limit the specific implementation.

[0043] Different diagnostic services to be performed can correspond to different data transmission channels, so that the vehicle communication interface device can receive and process the corresponding service data according to the data transmission channel.

[0044] 105. The vehicle diagnostic terminal drives the target unit corresponding to the diagnostic service to be performed to perform the corresponding target diagnostic operation on the electronic control unit via the data transmission channel.

[0045] In this embodiment of the invention, the target unit and target diagnostic operation may differ depending on the diagnostic service to be performed. Specifically, when the diagnostic service to be performed is a local diagnostic service, the target unit may include a controller unit, and the target diagnostic operation may include a local diagnostic operation performed by the controller unit on the ECU based on Pass-Thru diagnostic data. When the diagnostic service to be performed is a remote diagnostic service, the target unit may include a communication interface unit, and the target diagnostic operation may include a remote switching operation performed by the communication interface unit and a remote diagnostic operation performed on the ECU through the communication interface unit. The vehicle diagnostic terminal can send the service data or control command corresponding to the diagnostic service to be performed to the corresponding target unit through the data transmission channel established in step 104, so as to drive the target unit to perform the corresponding target diagnostic operation on the ECU. In this way, without changing the physical USB connection between the vehicle diagnostic terminal and the vehicle communication interface device, the USB connection object of the vehicle diagnostic terminal can be switched from the controller unit to the communication bus conversion unit, so that the vehicle diagnostic terminal can access the communication port opened by the communication interface unit through the bus conversion communication connection relationship, thereby establishing a data transmission channel corresponding to different diagnostic services.

[0046] In one optional implementation, when the diagnostic service to be performed is a remote diagnostic service, the communication port corresponding to the remote diagnostic service includes the remote switching communication port and the DoIP communication port of the communication interface unit, the target unit corresponding to the diagnostic service to be performed includes the communication interface unit, and the target diagnostic operation includes the remote switching operation and the remote diagnostic operation.

[0047] The remote switching operation includes: canceling the mapping relationship between the network interface of the communication interface unit and the virtual network card, configuring a network card independent of the virtual network card for the network interface, and setting the network card independent of the virtual network card to listening mode.

[0048] Remote diagnostic operations include: sending remote DoIP diagnostic data to the communication interface unit via the vehicle diagnostic terminal; processing the remote DoIP diagnostic data via the communication interface unit; and sending the processed diagnostic data to the electronic control unit via a network interface card (NIC) in listening mode. By eliminating the mapping relationship between the network interface and the virtual NIC and configuring an independent NIC in listening mode for the network interface, remote diagnostic data can bypass the bridging network and corresponding application layer processing path used for local diagnostics. Based on this, the communication interface unit can process the remote DoIP diagnostic data sent by the vehicle diagnostic terminal and send the processed diagnostic data to the electronic control unit via an independent NIC. This adapts the network interface configuration to the remote diagnostic data transmission method, reducing the mutual interference between local and remote diagnostic communication and improving the accuracy and reliability of remote diagnostic communication.

[0049] It is evident that implementation Figure 1 The described vehicle diagnostic method based on communication path switching can control the communication bus conversion unit to perform path switching operations when the target connection mode is USB connection mode and DoIP configuration information exists in the remote configuration information. This allows switching the USB communication connection between the vehicle diagnostic terminal and the controller unit to a bus-converted communication connection between the vehicle diagnostic terminal and the communication interface unit without changing the physical USB connection between the vehicle diagnostic terminal and the vehicle communication interface device. When there are diagnostic tasks to be performed, a corresponding data transmission channel is established based on this bus-converted communication connection to drive the target unit to perform target diagnostic operations on the ECU. This method can meet the communication needs of different diagnostic tasks by reusing the existing USB interface of the vehicle diagnostic terminal, reducing the need for rewiring or establishing separate wireless connections, improving the flexibility of vehicle diagnostic communication connection switching and the efficiency of data transmission channel establishment, thereby improving vehicle diagnostic efficiency.

[0050] In an optional embodiment, the communication bus conversion unit includes a switch switching subunit and a USB network port subunit; and, in step 103 above, the controller unit controls the communication bus conversion unit to perform a path switching operation according to the first switching command, so as to switch the USB communication connection between the vehicle diagnostic terminal and the controller unit to a bus-converted communication connection between the vehicle diagnostic terminal and the communication interface unit, including: The controller unit generates a switch control signal according to the first switching command and sends the switch control signal to the switch switching subunit. Under the control of the switch control signal, the switch switching subunit disconnects the USB communication connection between the vehicle diagnostic terminal and the controller unit, and establishes the first communication connection between the vehicle diagnostic terminal and the USB network port subunit. The first communication connection relationship is adapted to the pre-set second communication connection relationship through the USB network port sub-unit to form a bus conversion communication connection relationship between the vehicle diagnostic terminal and the communication interface unit. The second communication connection relationship is the communication connection relationship between the USB network port sub-unit and the communication interface unit.

[0051] Disconnecting the USB communication connection between the vehicle diagnostic terminal and the controller unit, and establishing the first communication connection between the vehicle diagnostic terminal and the USB network port subunit, indicates that the USB connection object of the vehicle diagnostic terminal is switched from the controller unit to the USB network port subunit in the communication bus conversion unit.

[0052] In this optional embodiment, as an alternative implementation, the switch switching subunit adopts a physical path switching structure, used to change the connection object corresponding to the USB interface of the vehicle diagnostic terminal under the control of the controller unit; the USB network port subunit is used to perform data conversion between USB communication and network communication. The switch switching subunit may be provided with a common connection terminal, a first switching terminal, and a second switching terminal. The common connection terminal is connected to the USB interface of the vehicle diagnostic terminal, the first switching terminal is connected to the USB interface of the controller unit, and the second switching terminal is connected to the USB interface of the USB network port subunit.

[0053] In the default connection state, the switch switching subunit connects the common connection terminal to the first switching terminal, thereby establishing a USB communication connection between the vehicle diagnostic terminal and the controller unit.

[0054] Upon receiving the first switching command, the controller unit generates a switch control signal and sends it to the switch switching subunit. The switch switching subunit disconnects the physical path between the common connection terminal and the first switching terminal based on the switch control signal, and connects the common connection terminal to the second switching terminal, thereby establishing the first communication connection between the vehicle diagnostic terminal and the USB network port subunit. Specifically, the controller unit may be equipped with a general-purpose input / output (GPIO) interface, which communicates with the control terminal of the switch switching subunit. The GPIO is used to output corresponding switch control signals under the control of the MCU to control the switch switching subunit to perform path switching operations.

[0055] The USB side of the USB network port subunit is connected to the second switching terminal of the switch switching subunit, and the network side of the USB network port subunit is connected to the communication interface unit. The USB network port subunit can perform network communication adaptation on the USB data received through the first communication connection, and send the adapted network data to the communication interface unit through the second communication connection between the USB network port subunit and the communication interface unit, thereby forming a bus conversion communication connection between the vehicle diagnostic terminal and the communication interface unit.

[0056] Optionally, the USB network port subunit can employ a USB-to-Ethernet chip, a USB network card, or other communication modules with USB and Ethernet communication adaptation functions; this embodiment of the invention is not limited to any particular type. The USB network port subunit can integrate a USB bus controller, an Ethernet media access controller, and a physical layer transceiver module to achieve the conversion between USB communication data and Ethernet communication data. This physical path switching structure, employing a switch switching subunit and a USB network port subunit working together, can directly change the connection object of the USB data line on the vehicle diagnostic terminal side through switch control signals, and utilize the USB network port subunit to complete the adaptation between USB communication and network communication, thereby improving the determinism of the path switching result.

[0057] In this optional embodiment, as another optional implementation, a solid-state electronic switch can be used to replace the switch switching subunit with the physical path switching structure described above, while the USB network port subunit and its second communication connection relationship with the communication interface unit remain unchanged.

[0058] The solid-state electronic switch may include a first solid-state switching path and a second solid-state switching path. The first solid-state switching path is located between the USB interface of the vehicle diagnostic terminal and the USB interface of the controller unit, and the second solid-state switching path is located between the USB interface of the vehicle diagnostic terminal and the USB network port subunit.

[0059] In the default connection state, the first solid-state switching path is turned on and the second solid-state switching path is turned off to establish a USB communication connection between the vehicle diagnostic terminal and the controller unit.

[0060] After receiving the first switching command, the controller unit sends a corresponding switching control signal to the solid-state electronic switch. The solid-state electronic switch disconnects the first solid-state switching path and connects the second solid-state switching path according to the switching control signal, thereby establishing the first communication connection between the vehicle diagnostic terminal and the USB network port subunit.

[0061] The USB network port subunit adapts the USB data received via the first communication connection to network communication and sends the adapted network data to the communication interface unit, thereby establishing a bus conversion communication connection between the vehicle diagnostic terminal and the communication interface unit. This use of solid-state electronic switches allows for switching of the USB data path using semiconductor switching devices, eliminating the need for mechanical contacts, and enabling the switching of the USB data line's conduction state based on the electrical signals output by the controller unit.

[0062] In this optional embodiment, as another optional implementation, an MUX (Multiplexer) switching chip can be used to replace the above-mentioned switch switching subunit, while the USB network port subunit and its second communication connection relationship with the communication interface unit remain unchanged.

[0063] The MUX switching chip may include a common USB port, a first candidate USB port, a second candidate USB port, and a selection control terminal. The common USB port is connected to the USB interface of the vehicle diagnostic terminal, the first candidate USB port is connected to the USB interface of the controller unit, the second candidate USB port is connected to the USB interface of the USB network subunit, and the selection control terminal is connected to the control signal output interface of the controller unit.

[0064] In the default connection state, the controller unit controls the MUX switching chip through the selection control terminal to connect the public USB port and the first candidate USB port, thereby establishing a USB communication connection between the vehicle diagnostic terminal and the controller unit.

[0065] After receiving the first switching command, the controller unit changes the port selection signal output by the control terminal according to the first switching command. The MUX switching chip switches the public USB port from the first candidate USB port to the second candidate USB port according to the port selection signal, thereby establishing the first communication connection between the vehicle diagnostic terminal and the USB network port subunit.

[0066] The USB network port subunit adapts the USB data sent by the vehicle diagnostic terminal to network communication, and sends the adapted network data to the communication interface unit through the second communication connection, thereby establishing a bus conversion communication connection between the vehicle diagnostic terminal and the communication interface unit.

[0067] The MUX switching chip can be a USB multiplexer chip, an analog multiplexer chip, a bus switching chip, a crossbar switch chip, or other integrated circuits that can change the USB data transmission path according to the port selection signal.

[0068] In this optional embodiment, as another optional implementation, the communication bus conversion unit can be an integrated chip or integrated communication module that integrates both path selection function and USB to network function, in order to replace the independently set switch subunit and USB network port subunit as a whole.

[0069] The controller unit can configure the registers, interface working mode, or internal data routing of the integrated chip or integrated communication module according to the first switching command, so that the integrated chip or integrated communication module can choose to connect the USB interface of the vehicle diagnostic terminal to the controller unit, or choose to transmit the USB data sent by the vehicle diagnostic terminal to the communication interface unit after network communication adaptation.

[0070] Therefore, the switch switching subunit and the USB network port subunit can be configured separately or integrated. Solid-state electronic switches and MUX switching chips can serve as equivalent replacements for the switch switching subunit; chips or modules that integrate path selection and USB-to-network functions can serve as equivalent replacements for the combined structure of the switch switching subunit and the USB network port subunit.

[0071] As can be seen, this optional embodiment can generate a switch control signal according to the first switching command through the controller unit, control the switch switching subunit to disconnect the USB communication connection between the vehicle diagnostic terminal and the controller unit and establish a first communication connection between the vehicle diagnostic terminal and the USB network port subunit, and then use the USB network port subunit to splice the first communication connection with the pre-set second communication connection between it and the communication interface unit, thus forming an end-to-end usable bus conversion communication connection between the vehicle diagnostic terminal and the communication interface unit. Therefore, by combining hardware switch switching with communication adaptation, the USB connection object of the vehicle diagnostic terminal can be accurately changed, and the existing USB physical interface can be used to access the network services of the communication interface unit, improving the reliability of USB connection reuse and the adaptability between USB communication and network communication.

[0072] Example 2 Please see Figure 2 , Figure 2 This is a flowchart illustrating another vehicle diagnostic method based on communication path switching disclosed in an embodiment of the present invention. Figure 2The described vehicle diagnostic method based on communication path switching can be applied to a vehicle diagnostic system. The vehicle diagnostic system includes a vehicle diagnostic terminal and a vehicle communication interface device. The vehicle diagnostic terminal can be a tablet computer, portable diagnostic terminal, or other electronic device with vehicle diagnostic functions that has a vehicle diagnostic application installed. The vehicle communication interface device can be a VCI device located between the vehicle diagnostic terminal and the vehicle ECU. The vehicle communication interface device includes a controller unit, a communication interface unit, and a communication bus conversion unit. The controller unit can include an MCU for processing Pass-Thru diagnostic data, controlling the communication bus conversion unit to perform path switching operations, and communicating with the ECU via the vehicle bus. The communication interface unit can include a communication processor, a network interface, a wireless network card, and other components running on the communication... The processor includes a communication program; the communication interface unit connects to the vehicle's electronic control unit (ECU) and establishes a network communication connection with the vehicle diagnostic terminal, communicating with the ECU via an Ethernet interface; the communication bus conversion unit adapts communication between the USB interface of the vehicle diagnostic terminal and the network interface of the communication interface unit. Each of the controller unit, communication interface unit, and communication bus conversion unit communicates with other units of the vehicle communication interface device. This can be understood as follows: the controller unit and communication interface unit can be connected via USB, serial port, or other internal communication interfaces; the controller unit and communication bus conversion unit can be connected via USB and switch control lines; and the communication bus conversion unit and communication interface unit can be connected via a network interface. This embodiment of the invention does not impose limitations. Figure 2 As shown, this vehicle diagnostic method based on communication path switching may include the following operations: 201. Obtain the target connection mode between the vehicle diagnostic terminal and the vehicle communication interface device, as well as the remote configuration information of the electronic control unit, through the vehicle diagnostic terminal.

[0073] 202. When the target connection mode is USB connection mode and DoIP configuration information exists in the remote configuration information, send the first switching command to the controller unit through the vehicle diagnostic terminal.

[0074] 203. The controller unit controls the communication bus conversion unit to perform a path switching operation according to the first switching command, so as to switch the USB communication connection between the vehicle diagnostic terminal and the controller unit to the bus conversion communication connection between the vehicle diagnostic terminal and the communication interface unit.

[0075] 204. Obtain the target communication port that matches the diagnostic service to be performed.

[0076] In this embodiment of the invention, the target communication port can be a network service port that the communication interface unit opens or listens to. The communication interface unit can run multiple service programs for handling different diagnostic services, and different service programs can listen to their respective network service ports.

[0077] The vehicle diagnostic terminal can query the target communication port from a pre-stored mapping between service types and communication ports based on the service type of the diagnostic service to be performed. This mapping can be stored locally on the vehicle diagnostic terminal or included in remote configuration information or device information returned by the vehicle communication interface device. For example, a local diagnostic service can correspond to a local diagnostic communication port, and a remote diagnostic service can correspond to a remote switching communication port and a DoIP communication port. It should be noted that the DoIP communication port described in this embodiment refers to the communication port used to establish a DoIP data transmission channel between the vehicle diagnostic terminal and the vehicle communication interface device, and not to the standard communication port specified by the DoIP protocol. In one specific implementation, the local diagnostic communication port can be port 25348, the remote switching communication port can be port 22488, and the DoIP communication port can be port 22499. These port numbers are merely examples and are not intended to limit the scope of protection of this invention.

[0078] As the connection initiator, the vehicle diagnostic terminal can use the source port dynamically allocated by the operating system to initiate a connection to the target communication port based on the network address of the communication interface unit.

[0079] 205. By using the vehicle diagnostic terminal to convert the communication connection relationship based on the bus, a data transmission channel is established between the vehicle diagnostic terminal and the vehicle communication interface device at the target communication port.

[0080] In this embodiment of the invention, the vehicle diagnostic terminal sends a connection request to the communication interface unit at the target communication port based on the bus-converted communication connection relationship. The service program in the communication interface unit that listens to the target communication port receives the connection request and completes the connection establishment process with the vehicle diagnostic terminal, thereby establishing a data transmission channel between the vehicle diagnostic terminal and the vehicle communication interface device.

[0081] 206. The vehicle diagnostic terminal drives the target unit corresponding to the diagnostic service to be performed to perform the corresponding target diagnostic operation on the electronic control unit via the data transmission channel.

[0082] In this embodiment of the invention, for other descriptions of steps 201-206, please refer to the detailed description of steps 101-105 in Embodiment 1. These descriptions will not be repeated in this embodiment of the invention.

[0083] It is evident that implementation Figure 2The described vehicle diagnostic method based on communication path switching can control the communication bus conversion unit to perform a path switching operation when the target connection mode is USB connection mode and DoIP configuration information exists in the remote configuration information. This allows switching the USB communication connection between the vehicle diagnostic terminal and the controller unit to a bus-converted communication connection between the vehicle diagnostic terminal and the communication interface unit without changing the physical USB connection between the vehicle diagnostic terminal and the vehicle communication interface device. When there is a diagnostic service to be performed, a corresponding data transmission channel is established based on this bus-converted communication connection to drive the target unit to perform the target diagnostic operation on the ECU. This allows the existing USB interface of the vehicle diagnostic terminal to meet the communication requirements of different diagnostic services, reducing the need for rewiring or establishing a separate wireless connection, improving the flexibility of vehicle diagnostic communication connection switching and the efficiency of data transmission channel establishment, thereby improving vehicle diagnostic efficiency. Furthermore, by obtaining a target communication port matching the diagnostic service to be performed and establishing a data transmission channel on that target communication port based on the bus-converted communication connection, the vehicle diagnostic terminal can access the communication service corresponding to the diagnostic service in the communication interface unit. Therefore, different types of diagnostic services can be distinguished by different communication ports, so that the corresponding service data can be transmitted to the corresponding processing service, reducing the possibility of port access errors or service data confusion between different diagnostic services, and improving the accuracy of data transmission channel establishment.

[0084] In an optional embodiment, when the diagnostic service to be performed is a local diagnostic service, the target communication port includes the local diagnostic communication port of the communication interface unit, and the data transmission channel includes the local diagnostic data transmission channel; and the step 206 above, in which the vehicle diagnostic terminal drives the target unit corresponding to the diagnostic service to be performed to perform the corresponding target diagnostic operation on the electronic control unit via the data transmission channel, includes: Pass-Thru diagnostic data is sent to the communication interface unit via the local diagnostic data transmission channel through the vehicle diagnostic terminal. The communication interface unit receives Pass-Thru diagnostic data and transmits the Pass-Thru diagnostic data to the controller unit based on the communication connection between the communication interface unit and the controller unit. The controller unit performs local diagnostic operations corresponding to the local diagnostic service on the electronic control unit based on the Pass-Thru diagnostic data. The target unit for the local diagnostic service includes the controller unit, and the target diagnostic operation includes the local diagnostic operation.

[0085] In this embodiment of the invention, the vehicle diagnostic terminal can initiate a connection to the communication interface unit via the local diagnostic communication port based on the bus-converted communication connection relationship. The service program in the communication interface unit corresponding to the local diagnostic service listens to the local diagnostic communication port and responds to the connection request sent by the vehicle diagnostic terminal, thereby establishing a local diagnostic data transmission channel.

[0086] The vehicle diagnostic terminal can generate Pass-Thru diagnostic data based on local diagnostic requests and send the Pass-Thru diagnostic data to the communication interface unit via the local diagnostic data transmission channel.

[0087] After receiving the Pass-Thru diagnostic data, the communication interface unit can identify, verify, or process the format of the Pass-Thru diagnostic data, and send the Pass-Thru diagnostic data to the controller unit based on the communication connection between the communication interface unit and the controller unit.

[0088] After receiving the Pass-Thru diagnostic data, the controller unit can process the Pass-Thru diagnostic data according to the corresponding vehicle diagnostic protocol, and send corresponding diagnostic commands to the ECU through the CAN interface, K-line interface or other vehicle diagnostic interfaces to perform local diagnostic operations on the ECU.

[0089] The controller unit can also receive diagnostic response data returned by the ECU and return the diagnostic response data to the vehicle diagnostic terminal via the communication interface unit and the local diagnostic data transmission channel in the opposite direction to the Pass-Thru diagnostic data transmission.

[0090] In this way, even if the USB connection of the vehicle diagnostic terminal has been switched from the controller unit to the communication bus conversion unit, the vehicle diagnostic terminal can still forward the Pass-Thru diagnostic data to the controller unit through the communication interface unit, so it can perform local diagnostic services without having to switch the USB connection back to the controller unit.

[0091] As can be seen, this optional embodiment enables the vehicle diagnostic terminal to send Pass-Thru diagnostic data to the communication interface unit via the local diagnostic data transmission channel. The communication interface unit then transmits the Pass-Thru diagnostic data to the controller unit, allowing the controller unit to perform local diagnostic operations on the ECU based on the Pass-Thru diagnostic data. This allows for continued execution of local diagnostic services even after the vehicle diagnostic terminal's USB connection has been switched to the USB network port subunit, utilizing bus-based communication connection switching. Therefore, the forwarding of Pass-Thru diagnostic data to the controller unit can be achieved without switching the vehicle diagnostic terminal's USB connection back to the controller unit, thereby reducing the operational overhead caused by repeatedly switching hardware connections between local and network diagnostic services, and improving the connection stability and ease of execution of local diagnostic services.

[0092] In another optional embodiment, when the diagnostic service to be performed is a remote diagnostic service, the target communication port includes a remote switching communication port of the communication interface unit and a DoIP communication port of the communication interface unit, and the data transmission channel includes a remote switching communication channel; and, in step 206 above, driving the target unit corresponding to the diagnostic service to be performed to execute the corresponding target diagnostic operation on the electronic control unit via the data transmission channel through the vehicle diagnostic terminal includes: The vehicle diagnostic terminal sends a second switching command to the communication interface unit via a remote switching communication channel, thereby driving the communication interface unit to perform a remote switching operation according to the second switching command. After performing a remote switching operation, the vehicle diagnostic terminal establishes a DoIP data transmission channel between the vehicle diagnostic terminal and the communication interface unit on the DoIP communication port based on the bus-based communication connection relationship conversion. Based on the DoIP data transmission channel, the vehicle diagnostic terminal drives the communication interface unit to perform remote diagnostic operations on the electronic control unit.

[0093] In this embodiment of the invention, the vehicle diagnostic terminal can initiate a connection to the communication interface unit via the remote switching communication port based on the bus conversion communication connection relationship. The service program in the communication interface unit corresponding to the remote switching service listens to the remote switching communication port and responds to the connection request sent by the vehicle diagnostic terminal, thereby establishing a remote switching communication channel.

[0094] Please see Figure 3 , Figure 3 This is a schematic diagram illustrating the data flow of a remote switching command disclosed in an embodiment of the present invention. For example... Figure 3 As shown, Figure 33-1 in the text indicates the first data flow direction when the DoIP configuration information is not present in the remote configuration information. This first data flow direction indicates that Pass-Thru diagnostic data is transmitted through the USB communication connection between the vehicle diagnostic terminal and the controller unit. Figure 3 3-2 in the text indicates the second data flow when DoIP configuration information exists in the remote configuration information. Figure 3 The described data flow direction corresponding to switching between USB and Ethernet ports indicates the data flow direction for establishing a bus conversion communication connection between the vehicle diagnostic terminal and the USB Ethernet subunit. Figure 3 The described Pass-Thru data flow indicates the direction of Pass-Thru diagnostic data flow in local diagnostic operations. Figure 3 The described DoIP flow refers to the flow of remote DoIP diagnostic data in remote diagnostic services. For example... Figure 3 As shown, after establishing a remote switching communication channel between the vehicle diagnostic terminal and the communication interface unit, the vehicle diagnostic terminal sends a second switching command to the communication interface unit via the remote switching communication channel.

[0095] It should be noted that the first and second switching commands have different recipients and control functions. The first switching command is sent to the controller unit to control the communication bus conversion unit to perform a path switching operation; the second switching command is sent to the communication interface unit to drive the communication interface unit to perform a remote switching operation corresponding to the remote diagnostic service.

[0096] After receiving the second handover command, the communication interface unit can parse the service identifier, device identifier, or handover parameters in the second handover command and perform a remote handover operation based on the parsing result.

[0097] Please see Figure 4 and Figure 5 , Figure 4 This is a schematic diagram of a vehicle diagnostic system connection in a default local diagnostic state, as disclosed in an embodiment of the present invention. Figure 5 This is a schematic diagram of a vehicle diagnostic system connection in a remote diagnostic state, as disclosed in an embodiment of the present invention. Figure 4 As shown, in the default local diagnostic state, the network interface in the communication interface unit used to connect to the ECU can establish a mapping relationship with the virtual network card. For example... Figure 5 As shown, when the communication interface unit performs a remote switching operation, it can cancel the mapping relationship between the network interface and the virtual network card, configure the network interface as a network card independent of the virtual network card, and set the network card independent of the virtual network card to a listening mode or other working mode suitable for remote diagnostic services.

[0098] In other implementations, the communication interface unit may also perform remote switching operations by starting a remote communication service, stopping a local communication service that conflicts with the remote diagnostic service, adjusting the working parameters of the network interface, or reconfiguring the diagnostic data forwarding rules.

[0099] After completing the remote switching operation, the communication interface unit can return a switching completion response to the vehicle diagnostic terminal. Upon receiving the switching completion response, the vehicle diagnostic terminal, based on the bus conversion communication connection relationship, initiates a connection to the communication interface unit on the DoIP communication port to establish a DoIP data transmission channel between the vehicle diagnostic terminal and the communication interface unit.

[0100] The DoIP data transmission channel is used to transmit remote DoIP diagnostic data between the vehicle diagnostic terminal and the communication interface unit. The remote DoIP diagnostic data carries the target Ethernet frame to be sent to the ECU. After receiving the remote DoIP diagnostic data, the communication interface unit extracts the target Ethernet frame from the remote DoIP diagnostic data and sends the target Ethernet frame to the ECU via the Ethernet interface connected to the ECU, thereby performing remote diagnostic operations on the ECU.

[0101] By first establishing a remote switching communication channel and performing a remote switching operation, and then establishing a DoIP data transmission channel, the communication interface unit can complete the configuration of the network interface, communication services, and Ethernet frame forwarding status before receiving remote DoIP diagnostic data. This reduces the possibility that the target Ethernet frame transmission may fail because the communication interface unit receives remote DoIP diagnostic data before entering the remote diagnostic state.

[0102] As can be seen, this optional embodiment can send a second switching command to the communication interface unit via a remote switching communication channel through the vehicle diagnostic terminal. This causes the communication interface unit to first perform the remote switching operation corresponding to the remote diagnostic service, and then establish a DoIP data transmission channel on the DoIP communication port and perform the remote diagnostic operation. This allows the communication interface unit to complete the configuration of the network interface, communication service, or data forwarding status before receiving remote DoIP diagnostic data. Therefore, the execution order between remote communication status switching and DoIP data transmission channel establishment can be coordinated, reducing the possibility of communication failure or data forwarding anomalies caused by receiving remote DoIP diagnostic data before the communication interface unit has entered the remote diagnostic state, thus improving the reliability of remote diagnostic service execution.

[0103] In this optional embodiment, as an optional implementation, the vehicle diagnostic terminal drives the communication interface unit to perform remote diagnostic operations on the electronic control unit based on the DoIP data transmission channel, including: The target Ethernet frame to be sent is obtained through the vehicle diagnostic terminal. The target Ethernet frame is encapsulated by the vehicle diagnostic terminal to obtain remote DoIP diagnostic data carrying the target Ethernet frame, and then sent to the communication interface unit via the DoIP data transmission channel. The remote DoIP diagnostic data is decapsulated by the communication interface unit to obtain the target Ethernet frame, and then the target Ethernet frame is sent to the electronic control unit via the communication interface unit.

[0104] In this embodiment of the invention, the target Ethernet frame is an Ethernet data link layer frame to be sent to the ECU via the Ethernet interface of the communication interface unit. The target Ethernet frame may include information such as the destination MAC (Media Access Control) address, the source MAC address, a type field or a length field, and a frame payload. The frame payload may carry diagnostic data used to perform remote diagnostic operations on the ECU.

[0105] The vehicle diagnostic terminal can acquire the target Ethernet frame to be sent from a remote diagnostic application, a remote diagnostic data source, or a pre-established diagnostic session. The acquired target Ethernet frame has already been formed according to the frame format required for Ethernet communication on the ECU side, so there is no need for the communication interface unit to regenerate the Ethernet frame according to the application layer diagnostic instructions.

[0106] After acquiring the target Ethernet frame, the vehicle diagnostic terminal encapsulates the target Ethernet frame to obtain remote DoIP diagnostic data. The remote DoIP diagnostic data may include remote diagnostic encapsulation information and the Ethernet frame payload. The Ethernet frame payload includes the encapsulated target Ethernet frame. Optionally, the remote diagnostic encapsulation information may include at least one of data type, frame length, sequence identifier, device identifier, and checksum information, used to enable the communication interface unit to identify the boundaries, length, or transmission order of the target Ethernet frame; this embodiment of the invention does not impose limitations on this.

[0107] The encapsulation operation described above adds remote diagnostic encapsulation information suitable for the DoIP data transmission channel to the outside of the target Ethernet frame, and carries the target Ethernet frame as a data object to be transmitted. This encapsulation operation does not change the original frame content of the target Ethernet frame, such as the MAC address, frame type, and frame payload.

[0108] After the vehicle diagnostic terminal is packaged, it sends remote DoIP diagnostic data to the communication interface unit via the DoIP data transmission channel. In this embodiment, the DoIP data transmission channel is used to transmit remote DoIP diagnostic data carrying the target Ethernet frame.

[0109] After receiving remote DoIP diagnostic data, the communication interface unit can identify the target Ethernet frame carried in the remote DoIP diagnostic data based on the remote diagnostic encapsulation information, and decapsulate the remote DoIP diagnostic data by removing the remote diagnostic encapsulation information to obtain the target Ethernet frame.

[0110] After receiving the target Ethernet frame, the communication interface unit can send the target Ethernet frame to the ECU via the Ethernet interface used to connect to the ECU, according to the network interface working status and Ethernet frame forwarding rules configured for the remote switching operation. Upon receiving the target Ethernet frame, the ECU performs the corresponding remote diagnostic operation based on the diagnostic data carried in the target Ethernet frame.

[0111] Optionally, after performing a remote diagnostic operation, the ECU can return a diagnostic response Ethernet frame to the communication interface unit. Upon receiving the diagnostic response Ethernet frame, the communication interface unit can encapsulate it to obtain remote DoIP response data carrying the diagnostic response Ethernet frame, and then send the remote DoIP response data to the vehicle diagnostic terminal via the DoIP data transmission channel. The vehicle diagnostic terminal decapsulates the remote DoIP response data to obtain the diagnostic response Ethernet frame, thereby completing the bidirectional interaction of remote diagnostic data.

[0112] As can be seen, this optional implementation can transmit remote DoIP diagnostic data carrying the target Ethernet frame by utilizing the DoIP data transmission channel, and after the communication interface unit obtains the target Ethernet frame by decapsulation, it sends the target Ethernet frame to the ECU, thereby maintaining the transmission integrity of the target Ethernet frame between the vehicle diagnostic terminal and the ECU, and avoiding changes in frame content caused by the communication interface unit re-parses the application layer diagnostic instructions and generates Ethernet frames.

[0113] In this optional embodiment, as another optional implementation, the method may further include the following before establishing a remote switching communication channel: The vehicle diagnostic terminal sends a preset UDP broadcast discovery message via bus conversion communication connection relationship. The communication interface unit responds to the UDP broadcast discovery message and sends a response message to the vehicle diagnostic terminal. The network address of the communication interface unit is obtained from the response message through the vehicle diagnostic terminal; Furthermore, step 205 above, which establishes a data transmission channel between the vehicle diagnostic terminal and the vehicle communication interface device at the target communication port based on the bus-based communication connection relationship conversion, includes: The vehicle diagnostic terminal uses a bus-based communication connection conversion mechanism to send a connection request to the communication interface unit based on the network address of the communication interface unit and the remote switching communication port, thereby establishing a remote switching communication channel between the vehicle diagnostic terminal and the communication interface unit.

[0114] In this embodiment of the invention, after the vehicle diagnostic terminal completes the USB-to-network switch, it can send a preset UDP broadcast discovery message via a bus-to-communication connection conversion. The UDP broadcast discovery message may include at least one of the following: a preset discovery identifier, a vehicle diagnostic terminal identifier, a target device type, and a protocol version, used to request the vehicle communication interface device in the corresponding network to return device discovery information.

[0115] The communication interface unit can listen to a preset UDP discovery port. After receiving a UDP broadcast discovery message, the communication interface unit can verify the preset discovery identifier, target device type, or protocol version in the UDP broadcast discovery message. If the verification is successful, the communication interface unit generates a response message and sends the response message to the vehicle diagnostic terminal.

[0116] The response message may include at least one of the following: the network address of the communication interface unit, the vehicle communication interface device identifier, the device type, the device status, the supported diagnostic service types, and port configuration information. The network address of the communication interface unit may be the IP address currently used by the communication interface unit.

[0117] After receiving the response message, the vehicle diagnostic terminal parses it to obtain the network address of the communication interface unit. The vehicle diagnostic terminal can then associate the network address of the communication interface unit with the currently connected vehicle communication interface device and store this network address in the current diagnostic session.

[0118] The vehicle diagnostic terminal generates and sends a connection request based on the network address of the communication interface unit and the remote switching communication port. The service program in the communication interface unit that listens for the remote switching communication port receives the connection request and completes the connection establishment process with the vehicle diagnostic terminal, thereby forming a remote switching communication channel.

[0119] Optionally, if the vehicle diagnostic terminal does not receive a response message within a preset time, it can resend the UDP broadcast discovery message. When the vehicle diagnostic terminal receives multiple response messages, it can determine the target response message corresponding to the currently connected vehicle communication interface device from among the multiple response messages based on the vehicle communication interface device identifier, device type, or current USB connection information. In this way, even if the network address of the communication interface unit is not pre-fixed or changes, the vehicle diagnostic terminal can still obtain the network address currently used by the communication interface unit and accurately access the remote switching communication port opened by the communication interface unit based on that network address, thereby improving the success rate of establishing the remote switching communication channel.

[0120] As can be seen, this optional implementation allows the vehicle diagnostic terminal to send a UDP broadcast discovery message via bus-based communication connection conversion. The communication interface unit then returns a response message containing its network address. The vehicle diagnostic terminal then sends a connection request to the communication interface unit based on this network address and the remote switching communication port. This allows for dynamic acquisition of the communication interface unit's currently used network address, even when the network address is not pre-fixed or has changed. Therefore, it eliminates the need to pre-configure the communication interface unit's network address in the vehicle diagnostic terminal, enabling accurate access to the remote switching communication port opened by the communication interface unit. This reduces the possibility of connection failure due to network address changes and improves the success rate of establishing the remote switching communication channel.

[0121] Example 3 Please see Figure 6 , Figure 6 This is a schematic diagram of a vehicle diagnostic device based on communication path switching, as disclosed in an embodiment of the present invention. Figure 6The described vehicle diagnostic device based on communication path switching can be applied to a vehicle diagnostic system. The vehicle diagnostic system includes a vehicle diagnostic terminal and a vehicle communication interface device. The vehicle diagnostic terminal can be a tablet computer, portable diagnostic terminal, or other electronic device with vehicle diagnostic functions that has a vehicle diagnostic application installed. The vehicle communication interface device can be a VCI device located between the vehicle diagnostic terminal and the vehicle ECU. The vehicle communication interface device includes a controller unit, a communication interface unit, and a communication bus conversion unit. The controller unit can include an MCU for processing Pass-Thru diagnostic data, controlling the communication bus conversion unit to perform path switching operations, and communicating with the ECU via the vehicle bus. The communication interface unit can include a communication processor, a network interface, a wireless network card, and other components running on the communication... The processor includes a communication program; the communication interface unit connects to the vehicle's electronic control unit (ECU) and establishes a network communication connection with the vehicle diagnostic terminal, communicating with the ECU via an Ethernet interface; the communication bus conversion unit adapts communication between the USB interface of the vehicle diagnostic terminal and the network interface of the communication interface unit. Each of the controller unit, communication interface unit, and communication bus conversion unit communicates with other units of the vehicle communication interface device. This can be understood as follows: the controller unit and communication interface unit can be connected via USB, serial port, or other internal communication interfaces; the controller unit and communication bus conversion unit can be connected via USB and switch control lines; and the communication bus conversion unit and communication interface unit can be connected via a network interface. This embodiment of the invention does not impose limitations. Figure 6 As shown, the vehicle diagnostic device based on communication path switching may include: The acquisition control module 301 is used to acquire the target connection mode between the vehicle diagnostic terminal and the vehicle communication interface device, as well as the remote configuration information corresponding to the electronic control unit, through the vehicle diagnostic terminal.

[0122] The sending control module 302 is used to send a first switching command to the controller unit through the vehicle diagnostic terminal when the target connection mode is USB connection mode and DoIP configuration information exists in the remote configuration information.

[0123] The switching control module 303 is used to control the communication bus conversion unit to perform a path switching operation according to the first switching command through the controller unit, so as to switch the USB communication connection between the vehicle diagnostic terminal and the controller unit to the bus conversion communication connection between the vehicle diagnostic terminal and the communication interface unit.

[0124] A control module 304 is established to establish a data transmission channel between the vehicle diagnostic terminal and the vehicle communication interface device by converting the communication connection relationship based on the bus when there is a diagnostic service to be performed on the vehicle diagnostic terminal.

[0125] The diagnostic control module 305 is used to drive the target unit corresponding to the diagnostic business to be executed to perform the corresponding target diagnostic operation on the electronic control unit through the vehicle diagnostic terminal via the data transmission channel.

[0126] In one optional implementation, when the diagnostic service to be performed is a remote diagnostic service, the communication port corresponding to the remote diagnostic service includes the remote switching communication port and the DoIP communication port of the communication interface unit, the target unit corresponding to the diagnostic service to be performed includes the communication interface unit, and the target diagnostic operation includes the remote switching operation and the remote diagnostic operation.

[0127] The remote switching operation includes: canceling the mapping relationship between the network interface of the communication interface unit and the virtual network card, configuring a network card independent of the virtual network card for the network interface, and setting the network card independent of the virtual network card to listening mode.

[0128] Remote diagnostic operations include: sending remote DoIP diagnostic data to the communication interface unit via the vehicle diagnostic terminal; processing the remote DoIP diagnostic data via the communication interface unit; and sending the processed diagnostic data to the electronic control unit via a network interface card (NIC) in listening mode. By eliminating the mapping relationship between the network interface and the virtual NIC and configuring an independent NIC in listening mode for the network interface, remote diagnostic data can bypass the bridging network and corresponding application layer processing path used for local diagnostics. Based on this, the communication interface unit can process the remote DoIP diagnostic data sent by the vehicle diagnostic terminal and send the processed diagnostic data to the electronic control unit via an independent NIC. This adapts the network interface configuration to the remote diagnostic data transmission method, reducing the mutual interference between local and remote diagnostic communication and improving the accuracy and reliability of remote diagnostic communication.

[0129] It is evident that implementation Figure 6The described vehicle diagnostic device based on communication path switching can control the communication bus conversion unit to perform a path switching operation when the target connection mode is USB connection mode and DoIP configuration information exists in the remote configuration information. This allows switching the USB communication connection between the vehicle diagnostic terminal and the controller unit to a bus-converted communication connection between the vehicle diagnostic terminal and the communication interface unit without changing the physical USB connection between the vehicle diagnostic terminal and the vehicle communication interface device. When there is a diagnostic task to be performed, a corresponding data transmission channel is established based on this bus-converted communication connection to drive the target unit to perform the target diagnostic operation on the ECU. Therefore, the existing USB interface of the vehicle diagnostic terminal can be reused to meet the communication requirements of different diagnostic tasks, reducing the need for rewiring or establishing a separate wireless connection, improving the flexibility of vehicle diagnostic communication connection switching and the efficiency of data transmission channel establishment, thereby improving vehicle diagnostic efficiency.

[0130] In an optional embodiment, the communication bus conversion unit includes a switch switching subunit and a USB network port subunit. Furthermore, the switching control module 303, through the controller unit, controls the communication bus conversion unit to perform a path switching operation according to a first switching command. The specific method for switching the USB communication connection between the vehicle diagnostic terminal and the controller unit to a bus-converted communication connection between the vehicle diagnostic terminal and the communication interface unit includes: The controller unit generates a switch control signal according to the first switching command and sends the switch control signal to the switch switching subunit. Under the control of the switch control signal, the switch switching subunit disconnects the USB communication connection between the vehicle diagnostic terminal and the controller unit, and establishes the first communication connection between the vehicle diagnostic terminal and the USB network port subunit. The first communication connection relationship is adapted to the pre-set second communication connection relationship through the USB network port sub-unit to form a bus conversion communication connection relationship between the vehicle diagnostic terminal and the communication interface unit. The second communication connection relationship is the communication connection relationship between the USB network port sub-unit and the communication interface unit.

[0131] As can be seen, this optional embodiment can generate a switch control signal according to the first switching command through the controller unit, control the switch switching subunit to disconnect the USB communication connection between the vehicle diagnostic terminal and the controller unit and establish a first communication connection between the vehicle diagnostic terminal and the USB network port subunit, and then use the USB network port subunit to splice the first communication connection with the pre-set second communication connection between it and the communication interface unit, thus forming an end-to-end usable bus conversion communication connection between the vehicle diagnostic terminal and the communication interface unit. Therefore, by combining hardware switch switching with communication adaptation, the USB connection object of the vehicle diagnostic terminal can be accurately changed, and the existing USB physical interface can be used to access the network services of the communication interface unit, improving the reliability of USB connection reuse and the adaptability between USB communication and network communication.

[0132] In another optional embodiment, the specific method by which the control module 304 establishes a data transmission channel between the vehicle diagnostic terminal and the vehicle communication interface device based on bus conversion communication connection through the vehicle diagnostic terminal includes: Obtain the target communication port that matches the diagnostic service to be performed; By using the vehicle diagnostic terminal to convert the communication connection relationship based on the bus, a data transmission channel is established between the vehicle diagnostic terminal and the vehicle communication interface device at the target communication port.

[0133] As can be seen, this optional embodiment can obtain a target communication port matching the diagnostic service to be performed, and establish a data transmission channel on that target communication port based on the bus conversion communication connection relationship. This allows the vehicle diagnostic terminal to access the communication service corresponding to the diagnostic service in the communication interface unit. Therefore, different communication ports can be used to distinguish different types of diagnostic services, ensuring that the corresponding service data is transmitted to the corresponding processing service. This reduces the possibility of port access errors or data confusion between different diagnostic services and improves the accuracy of data transmission channel establishment.

[0134] In this optional embodiment, as an optional implementation, when the diagnostic service to be performed is a local diagnostic service, the target communication port includes the local diagnostic communication port of the communication interface unit, and the data transmission channel includes the local diagnostic data transmission channel; and the specific method by which the diagnostic control module 305 drives the target unit corresponding to the diagnostic service to be performed to perform the corresponding target diagnostic operation on the electronic control unit via the data transmission channel through the vehicle diagnostic terminal includes: Pass-Thru diagnostic data is sent to the communication interface unit via the local diagnostic data transmission channel through the vehicle diagnostic terminal. The communication interface unit receives Pass-Thru diagnostic data and transmits the Pass-Thru diagnostic data to the controller unit based on the communication connection between the communication interface unit and the controller unit. The controller unit performs local diagnostic operations corresponding to the local diagnostic service on the electronic control unit based on the Pass-Thru diagnostic data. The target unit for the local diagnostic service includes the controller unit, and the target diagnostic operation includes the local diagnostic operation.

[0135] As can be seen, this optional implementation allows the vehicle diagnostic terminal to send Pass-Thru diagnostic data to the communication interface unit via a local diagnostic data transmission channel. The communication interface unit then transmits the Pass-Thru diagnostic data to the controller unit, enabling the controller unit to perform local diagnostic operations on the ECU based on the Pass-Thru diagnostic data. This allows for continued execution of local diagnostic services even after the vehicle diagnostic terminal's USB connection has been switched to the USB network port subunit, utilizing bus-based communication connection switching. Therefore, the forwarding of Pass-Thru diagnostic data to the controller unit can be achieved without switching the vehicle diagnostic terminal's USB connection back to the controller unit, thereby reducing the operational overhead caused by repeatedly switching hardware connections between local and network diagnostic services, and improving the connection stability and ease of execution of local diagnostic services.

[0136] In this optional embodiment, as another optional implementation, when the diagnostic service to be performed is a remote diagnostic service, the target communication port includes a remote switching communication port of the communication interface unit and a DoIP communication port of the communication interface unit, and the data transmission channel includes a remote switching communication channel; and the specific method by which the diagnostic control module 305 drives the target unit corresponding to the diagnostic service to be performed to perform the corresponding target diagnostic operation on the electronic control unit via the data transmission channel through the vehicle diagnostic terminal includes: The vehicle diagnostic terminal sends a second switching command to the communication interface unit via a remote switching communication channel, thereby driving the communication interface unit to perform a remote switching operation according to the second switching command. After performing a remote switching operation, the vehicle diagnostic terminal establishes a DoIP data transmission channel between the vehicle diagnostic terminal and the communication interface unit on the DoIP communication port based on the bus-based communication connection relationship conversion. Based on the DoIP data transmission channel, the vehicle diagnostic terminal drives the communication interface unit to perform remote diagnostic operations on the electronic control unit.

[0137] As can be seen, this optional implementation can send a second switching command to the communication interface unit via a remote switching communication channel through the vehicle diagnostic terminal. This causes the communication interface unit to first perform the remote switching operation corresponding to the remote diagnostic service, and then establish a DoIP data transmission channel on the DoIP communication port and perform the remote diagnostic operation. This allows the communication interface unit to complete the configuration of the network interface, communication service, or data forwarding status before receiving DoIP diagnostic data. Therefore, it can coordinate the execution order between remote communication status switching and DoIP data transmission channel establishment, reducing the possibility of communication failure or data forwarding anomalies caused by receiving DoIP diagnostic data before the communication interface unit has entered the remote diagnostic state, thus improving the reliability of remote diagnostic service execution.

[0138] In this optional implementation, the diagnostic control module 305 may, via the vehicle diagnostic terminal and the DoIP data transmission channel, drive the communication interface unit to perform remote diagnostic operations on the electronic control unit in the following ways: The target Ethernet frame to be sent is obtained through the vehicle diagnostic terminal. The target Ethernet frame is encapsulated by the vehicle diagnostic terminal to obtain remote DoIP diagnostic data carrying the target Ethernet frame, and then sent to the communication interface unit via the DoIP data transmission channel. The remote DoIP diagnostic data is decapsulated by the communication interface unit to obtain the target Ethernet frame, and then the target Ethernet frame is sent to the electronic control unit via the communication interface unit.

[0139] As can be seen, this optional implementation can also transmit remote DoIP diagnostic data carrying the target Ethernet frame by utilizing the DoIP data transmission channel, and after the communication interface unit obtains the target Ethernet frame by decapsulation, it sends the target Ethernet frame to the ECU, thereby maintaining the transmission integrity of the target Ethernet frame between the vehicle diagnostic terminal and the ECU, and avoiding changes in frame content caused by the communication interface unit re-parses the application layer diagnostic instructions and generates Ethernet frames.

[0140] In this optional embodiment, as another optional implementation, the sending control module 302 is further configured to send a preset UDP broadcast discovery message via the bus to the vehicle diagnostic terminal before the establishment control module 304 establishes the remote switching communication channel; and to send a response message to the vehicle diagnostic terminal in response to the UDP broadcast discovery message through the communication interface unit. The acquisition control module 301 is also used to acquire the network address of the communication interface unit based on the response message through the vehicle diagnostic terminal; Furthermore, the specific methods by which the control module 304 establishes a data transmission channel between the vehicle diagnostic terminal and the vehicle communication interface device at the target communication port through the vehicle diagnostic terminal based on bus conversion communication connection include: The vehicle diagnostic terminal uses a bus-based communication connection conversion mechanism to send a connection request to the communication interface unit based on the network address of the communication interface unit and the remote switching communication port, thereby establishing a remote switching communication channel between the vehicle diagnostic terminal and the communication interface unit.

[0141] As can be seen, this optional implementation allows the vehicle diagnostic terminal to send a UDP broadcast discovery message via bus-based communication connection conversion. The communication interface unit then returns a response message containing its network address. The vehicle diagnostic terminal then sends a connection request to the communication interface unit based on this network address and the remote switching communication port. This allows for dynamic acquisition of the communication interface unit's currently used network address, even when the network address is not pre-fixed or has changed. Therefore, it eliminates the need to pre-configure the communication interface unit's network address in the vehicle diagnostic terminal, enabling accurate access to the remote switching communication port opened by the communication interface unit. This reduces the possibility of connection failure due to network address changes and improves the success rate of establishing the remote switching communication channel.

[0142] Example 4 Please see Figure 7 , Figure 7 This is a schematic diagram of another vehicle diagnostic device based on communication path switching disclosed in an embodiment of the present invention. Figure 7 As shown, the vehicle diagnostic device based on communication path switching may include: Memory 401 storing executable program code; Processor 402 coupled to memory 401; The processor 402 calls the executable program code stored in the memory 401 to execute the steps in the vehicle diagnostic method based on communication path switching described in Embodiment 1 or Embodiment 2 of the present invention.

[0143] Example 5 This invention discloses a computer storage medium storing computer instructions. When these computer instructions are invoked, they are used to execute the steps in the vehicle diagnostic method based on communication path switching described in Embodiment 1 or Embodiment 2 of this invention.

[0144] Example 6 This invention discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to perform the steps in the vehicle diagnostic method based on communication path switching described in Embodiment 1 or Embodiment 2.

[0145] The device embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0146] Through the detailed description of the above embodiments, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, including read-only memory (ROM), random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), one-time programmable read-only memory (OTPROM), electrically-Erasable Programmable Read-Only Memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.

[0147] Finally, it should be noted that the vehicle diagnostic method and apparatus based on communication path switching disclosed in the embodiments of the present invention are merely preferred embodiments of the present invention and are only used to illustrate the technical solutions of the present invention, not to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A vehicle diagnostic method based on communication path switching, characterized in that, The method is applied to a vehicle diagnostic system, which includes a vehicle diagnostic terminal and a vehicle communication interface device. The vehicle communication interface device includes a controller unit, a communication interface unit, and a communication bus conversion unit. The communication interface unit is used to connect to the vehicle's electronic control unit, and each of the controller unit, the communication interface unit, and the communication bus conversion unit is communicatively connected to other units of the vehicle communication interface device. The method includes: The target connection mode between the vehicle diagnostic terminal and the vehicle communication interface device, as well as the remote configuration information corresponding to the electronic control unit, are obtained through the vehicle diagnostic terminal. When the target connection mode is USB connection mode and DoIP configuration information exists in the remote configuration information, a first switching command is sent to the controller unit through the vehicle diagnostic terminal; The controller unit controls the communication bus conversion unit to perform a path switching operation according to the first switching command, so as to switch the USB communication connection between the vehicle diagnostic terminal and the controller unit to the bus conversion communication connection between the vehicle diagnostic terminal and the communication interface unit. When the vehicle diagnostic terminal has diagnostic services to be performed, a data transmission channel is established between the vehicle diagnostic terminal and the vehicle communication interface device based on the bus conversion communication connection relationship. The vehicle diagnostic terminal drives the target unit corresponding to the diagnostic service to be performed to perform the corresponding target diagnostic operation on the electronic control unit via the data transmission channel. When the diagnostic service to be performed is a remote diagnostic service, the communication port corresponding to the remote diagnostic service includes the remote switching communication port and the DoIP communication port of the communication interface unit, the target unit corresponding to the diagnostic service to be performed includes the communication interface unit, and the target diagnostic operation includes a remote switching operation and a remote diagnostic operation. The remote switching operation includes: canceling the mapping relationship between the network interface and the virtual network card of the communication interface unit, configuring a network card independent of the virtual network card for the network interface, and setting the network card independent of the virtual network card to listening mode; The remote diagnostic operation includes: sending remote DoIP diagnostic data to the communication interface unit through the vehicle diagnostic terminal, processing the remote DoIP diagnostic data through the communication interface unit, and sending the processed diagnostic data to the electronic control unit through the network card in the monitoring mode.

2. The vehicle diagnostic method based on communication path switching according to claim 1, characterized in that, The communication bus conversion unit includes a switch switching subunit and a USB network port subunit; And, the step of controlling the communication bus conversion unit to perform a path switching operation according to the first switching command by the controller unit to switch the USB communication connection between the vehicle diagnostic terminal and the controller unit to a bus-converted communication connection between the vehicle diagnostic terminal and the communication interface unit includes: The controller unit generates a switch control signal according to the first switching command and sends the switch control signal to the switch switching subunit; Under the control of the switch control signal, the switch switching subunit disconnects the USB communication connection between the vehicle diagnostic terminal and the controller unit, and establishes a first communication connection between the vehicle diagnostic terminal and the USB network port subunit. The first communication connection relationship is adapted to the pre-set second communication connection relationship through the USB network port sub-unit to form a bus conversion communication connection relationship between the vehicle diagnostic terminal and the communication interface unit. The second communication connection relationship is the communication connection relationship between the USB network port sub-unit and the communication interface unit.

3. The vehicle diagnostic method based on communication path switching according to claim 1 or 2, characterized in that, The step of establishing a data transmission channel between the vehicle diagnostic terminal and the vehicle communication interface device based on the bus conversion communication connection relationship includes: Obtain the target communication port that matches the diagnostic service to be performed; Based on the bus conversion communication connection relationship, the vehicle diagnostic terminal establishes a data transmission channel between the vehicle diagnostic terminal and the vehicle communication interface device at the target communication port.

4. The vehicle diagnostic method based on communication path switching according to claim 3, characterized in that, When the diagnostic service to be performed is a local diagnostic service, the target communication port includes the local diagnostic communication port of the communication interface unit, and the data transmission channel includes a local diagnostic data transmission channel; and, the step of driving the target unit corresponding to the diagnostic service to be performed to execute the corresponding target diagnostic operation on the electronic control unit via the data transmission channel through the vehicle diagnostic terminal includes: The vehicle diagnostic terminal sends Pass-Thru diagnostic data to the communication interface unit via the local diagnostic data transmission channel. The communication interface unit receives the Pass-Thru diagnostic data and transmits the Pass-Thru diagnostic data to the controller unit based on the communication connection between the communication interface unit and the controller unit. The controller unit performs local diagnostic operations corresponding to the local diagnostic service on the electronic control unit based on the Pass-Thru diagnostic data. The target unit corresponding to the local diagnostic service includes the controller unit, and the target diagnostic operation includes the local diagnostic operation.

5. The vehicle diagnostic method based on communication path switching according to claim 3, characterized in that, When the diagnostic service to be performed is a remote diagnostic service, the target communication port includes a remote switching communication port of the communication interface unit and a DoIP communication port of the communication interface unit, and the data transmission channel includes a remote switching communication channel; and, the step of driving the target unit corresponding to the diagnostic service to be performed to execute the corresponding target diagnostic operation on the electronic control unit via the data transmission channel through the vehicle diagnostic terminal includes: The vehicle diagnostic terminal sends a second switching command to the communication interface unit via the remote switching communication channel, thereby driving the communication interface unit to execute the remote switching operation according to the second switching command; After performing the remote switching operation, the vehicle diagnostic terminal establishes a DoIP data transmission channel between the vehicle diagnostic terminal and the communication interface unit on the DoIP communication port based on the bus conversion communication connection relationship; the vehicle diagnostic terminal drives the communication interface unit to perform the remote diagnostic operation on the electronic control unit based on the DoIP data transmission channel.

6. The vehicle diagnostic method based on communication path switching according to claim 5, characterized in that, The step of driving the communication interface unit to perform the remote diagnostic operation on the electronic control unit via the vehicle diagnostic terminal based on the DoIP data transmission channel includes: The target Ethernet frame to be sent is obtained through the vehicle diagnostic terminal. The vehicle diagnostic terminal encapsulates the target Ethernet frame to obtain remote DoIP diagnostic data carrying the target Ethernet frame, and sends the remote DoIP diagnostic data to the communication interface unit via the DoIP data transmission channel. The remote DoIP diagnostic data is decapsulated through the communication interface unit to obtain the target Ethernet frame, and the target Ethernet frame is sent to the electronic control unit via the communication interface unit.

7. The vehicle diagnostic method based on communication path switching according to claim 5 or 6, characterized in that, Before establishing the remote switching communication channel, the method further includes: The vehicle diagnostic terminal sends a preset UDP broadcast discovery message via the bus conversion communication connection relationship. The communication interface unit responds to the UDP broadcast discovery message and sends a response message to the vehicle diagnostic terminal. The vehicle diagnostic terminal obtains the network address of the communication interface unit based on the response message. And, the step of establishing a data transmission channel between the vehicle diagnostic terminal and the vehicle communication interface device at the target communication port based on the bus conversion communication connection relationship via the vehicle diagnostic terminal includes: Based on the bus conversion communication connection relationship, the vehicle diagnostic terminal sends a connection request to the communication interface unit according to the network address of the communication interface unit and the remote switching communication port to establish a remote switching communication channel between the vehicle diagnostic terminal and the communication interface unit.

8. A vehicle diagnostic device based on communication path switching, characterized in that, The device is applied to a vehicle diagnostic system, which includes a vehicle diagnostic terminal and a vehicle communication interface device. The vehicle communication interface device includes a controller unit, a communication interface unit, and a communication bus conversion unit. The communication interface unit is used to connect to the vehicle's electronic control unit, and each of the controller unit, the communication interface unit, and the communication bus conversion unit is communicatively connected to the other units. The device includes: The acquisition control module is used to acquire the target connection mode between the vehicle diagnostic terminal and the vehicle communication interface device, as well as the remote configuration information corresponding to the electronic control unit, through the vehicle diagnostic terminal. The sending control module is used to send a first switching command to the controller unit through the vehicle diagnostic terminal when the target connection mode is USB connection mode and DoIP configuration information exists in the remote configuration information; The switching control module is used to control the communication bus conversion unit to perform a path switching operation according to the first switching command through the controller unit, so as to switch the USB communication connection between the vehicle diagnostic terminal and the controller unit to the bus conversion communication connection between the vehicle diagnostic terminal and the communication interface unit. A control module is established to establish a data transmission channel between the vehicle diagnostic terminal and the vehicle communication interface device when the vehicle diagnostic terminal has diagnostic services to be performed, based on the bus conversion communication connection relationship of the vehicle diagnostic terminal. The diagnostic control module is used to drive the target unit corresponding to the diagnostic service to be executed to perform a corresponding target diagnostic operation on the electronic control unit via the data transmission channel through the vehicle diagnostic terminal; When the diagnostic service to be performed is a remote diagnostic service, the communication port corresponding to the remote diagnostic service includes the remote switching communication port and the DoIP communication port of the communication interface unit, the target unit corresponding to the diagnostic service to be performed includes the communication interface unit, and the target diagnostic operation includes a remote switching operation and a remote diagnostic operation. The remote switching operation includes: canceling the mapping relationship between the network interface and the virtual network card of the communication interface unit, configuring a network card independent of the virtual network card for the network interface, and setting the network card independent of the virtual network card to listening mode; The remote diagnostic operation includes: sending remote DoIP diagnostic data to the communication interface unit through the vehicle diagnostic terminal, processing the remote DoIP diagnostic data through the communication interface unit, and sending the processed diagnostic data to the electronic control unit through the network card in the monitoring mode.

9. A vehicle diagnostic device based on communication path switching, characterized in that, The device includes: Memory containing executable program code; A processor coupled to the memory; The processor calls the executable program code stored in the memory to execute the vehicle diagnostic method based on communication path switching as described in any one of claims 1-7.

10. A computer storage medium, characterized in that, The computer storage medium stores computer instructions, which, when invoked, are used to execute the vehicle diagnostic method based on communication path switching as described in any one of claims 1-7.