Arbitration method and apparatus for vehicle fault diagnosis conflict, and vehicle and storage medium

WO2026166201A1PCT designated stage Publication Date: 2026-08-13CHERY AUTOMOBILE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-12-22
Publication Date
2026-08-13

Smart Images

  • Figure CN2025144353_13082026_PF_FP_ABST
    Figure CN2025144353_13082026_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to an arbitration method and apparatus for a vehicle fault diagnosis conflict, and a vehicle and a storage medium. The method comprises: on the basis of a preset priority setting policy, performing priority setting on a plurality of diagnostic upper computers of a current vehicle; when there are a plurality of diagnostic upper computers that are simultaneously connected and the plurality of diagnostic upper computers simultaneously request an operation on the same electronic control unit, performing diagnostic arbitration on the basis of a preset arbitration policy and the priority of each diagnostic upper computer to obtain a diagnosis conflict arbitration result of the current vehicle, so as to perform a diagnostic operation on the basis of the diagnosis conflict arbitration result.
Need to check novelty before this filing date? Find Prior Art

Description

Arbitration methods, devices, vehicles, and storage media for vehicle fault diagnosis conflicts

[0001] This application is based on and claims priority to Chinese Patent Application No. 202510130041.0, filed on February 5, 2025, entitled "Arbitration Method, Apparatus, Vehicle and Storage Medium for Vehicle Fault Diagnosis Conflicts", the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of vehicle electronic communication control technology, and in particular to an arbitration method, device, vehicle, and storage medium for vehicle fault diagnosis conflict. Background Technology

[0003] With the development of vehicle electrification and intelligence, the number of automotive electronic control units has increased significantly. Correspondingly, the demand for vehicle diagnostic functions has also grown substantially. This trend has not only led to a sharp increase in the amount of diagnostic data but also placed higher demands on the design and management of diagnostic data. Furthermore, the compatibility issues of diagnostic data between different controllers are becoming increasingly prominent, posing new challenges to the overall design of automotive diagnostic systems.

[0004] In related technologies, traditional automotive communication networks primarily rely on the CAN (Controller Area Network) protocol for communication and diagnostics. However, with the introduction and application of Ethernet communication technology in the automotive industry, modern vehicles simultaneously employ both CAN-based and Ethernet-based diagnostic methods. This coexistence, coupled with the application of new technologies such as remote vehicle diagnostics and OTA (Over-The-Air) updates, further complicates the structure of automotive diagnostic networks. In particular, in certain scenarios, remote diagnostics and OTA can conflict with traditional local OBD (On-Board Diagnostics) diagnostics, causing interference and preventing these functions from functioning properly, necessitating a solution. Summary of the Invention

[0005] This application provides an arbitration method, device, vehicle, and storage medium for vehicle fault diagnosis conflicts, in order to solve the mutual interference and conflict problems caused by the coexistence of multiple vehicle diagnostic methods. By setting up a diagnostic request management mechanism with different priorities, the communication quality and efficiency of the diagnostic network are improved.

[0006] One embodiment of this application provides an arbitration method for vehicle fault diagnosis conflicts, including:

[0007] Based on a preset priority setting strategy, priority settings are applied to multiple diagnostic host computers for the current vehicle.

[0008] Determine whether multiple diagnostic host computers are simultaneously connected, and whether multiple diagnostic host computers simultaneously request to operate the same electronic control unit of the current vehicle;

[0009] If multiple diagnostic host computers are connected simultaneously, and the multiple diagnostic host computers simultaneously request to operate on the same electronic control unit of the current vehicle, diagnostic arbitration is performed based on a preset arbitration strategy and the priority of each diagnostic host computer to obtain the diagnostic conflict arbitration result of the current vehicle, so as to perform diagnostic operation on the electronic control unit based on the diagnostic conflict arbitration result.

[0010] According to one embodiment of this application, the diagnostic arbitration based on a preset arbitration strategy and the priority of each diagnostic host computer to obtain the diagnostic conflict arbitration result of the current vehicle includes:

[0011] Determine whether the first diagnostic host computer has occupied resources and whether a route activation request has been received from the second diagnostic host computer;

[0012] If the first diagnostic host computer is already occupying resources and receives a route activation request from the second diagnostic host computer, then if the priority of the first diagnostic host computer is the same as that of the second diagnostic host computer, a negative response code is sent to the second diagnostic host computer to reject the route activation request sent by the second diagnostic host computer.

[0013] According to one embodiment of this application, after determining that the first diagnostic host computer has occupied resources and receiving the route activation request sent by the second diagnostic host computer, the method further includes:

[0014] Determine whether the priority of the second diagnostic host computer is higher than the priority of the first diagnostic host computer;

[0015] If the priority of the second diagnostic host computer is higher than that of the first diagnostic host computer, then the transmission control protocol TCP connection of the first diagnostic host computer is terminated to release the resources, and a route success activation response code is sent to the second diagnostic host computer to activate the route.

[0016] If the priority of the second diagnostic host computer is lower than that of the first diagnostic host computer, a negative response code is sent to the second diagnostic host computer to reject the route activation request sent by the second diagnostic host computer.

[0017] According to one embodiment of this application, the arbitration method for vehicle fault diagnosis conflicts further includes:

[0018] If the first diagnostic host computer is an Ethernet diagnostic host computer, then if the TCP_DATA socket of the current transmission control protocol is not closed, it is determined that the first diagnostic host computer has occupied resources; otherwise, it is determined that the first diagnostic host computer has released resources.

[0019] According to one embodiment of this application, the arbitration method for vehicle fault diagnosis conflicts further includes:

[0020] If the first diagnostic host computer is a CAN diagnostic host computer of the Controller Area Network, then determine whether a diagnostic request has been received within a preset time period;

[0021] If the diagnostic request is received within a preset time period, it is determined that the first diagnostic host computer has occupied resources; otherwise, it is determined that the first diagnostic host computer has released resources.

[0022] According to the vehicle fault diagnosis conflict arbitration method provided in this application embodiment, multiple diagnostic host computers of the current vehicle are prioritized based on a preset priority setting strategy. When multiple diagnostic host computers access the system simultaneously and request to operate the same electronic control unit at the same time, diagnostic arbitration is performed based on the preset arbitration strategy and the priority of each diagnostic host computer to obtain the diagnostic conflict arbitration result of the current vehicle. Diagnostic operations are then performed based on the diagnostic conflict arbitration result. Therefore, by setting a diagnostic request management mechanism with different priorities, the mutual interference and conflict problems caused by the coexistence of multiple diagnostic methods in a vehicle are solved, improving the communication quality and efficiency of the diagnostic network.

[0023] Another embodiment of this application provides an arbitration device for vehicle fault diagnosis conflicts, including:

[0024] The settings module is used to set priorities for multiple diagnostic host computers of the current vehicle based on a preset priority setting strategy.

[0025] The judgment module is used to determine whether multiple diagnostic host computers are simultaneously connected and whether the multiple diagnostic host computers simultaneously request to operate the same electronic control unit of the current vehicle.

[0026] The arbitration module is used to perform diagnostic arbitration based on a preset arbitration strategy and the priority of each diagnostic host computer if multiple diagnostic host computers are connected at the same time and the multiple diagnostic host computers simultaneously request to operate the same electronic control unit of the current vehicle, so as to obtain the diagnostic conflict arbitration result of the current vehicle, and perform diagnostic operation on the electronic control unit based on the diagnostic conflict arbitration result.

[0027] According to one embodiment of this application, the arbitration module is used for:

[0028] Determine whether the first diagnostic host computer has occupied resources and whether a route activation request has been received from the second diagnostic host computer;

[0029] If the first diagnostic host computer is already occupying resources and receives a route activation request from the second diagnostic host computer, then if the priority of the first diagnostic host computer is the same as that of the second diagnostic host computer, a negative response code is sent to the second diagnostic host computer to reject the route activation request sent by the second diagnostic host computer.

[0030] According to one embodiment of this application, after determining that the first diagnostic host computer has occupied resources and receiving a route activation request sent by the second diagnostic host computer, the determining module is further configured to:

[0031] Determine whether the priority of the second diagnostic host computer is higher than the priority of the first diagnostic host computer;

[0032] If the priority of the second diagnostic host computer is higher than that of the first diagnostic host computer, then the transmission control protocol TCP connection of the first diagnostic host computer is terminated to release the resources, and a route success activation response code is sent to the second diagnostic host computer to activate the route.

[0033] If the priority of the second diagnostic host computer is lower than that of the first diagnostic host computer, a negative response code is sent to the second diagnostic host computer to reject the route activation request sent by the second diagnostic host computer.

[0034] According to one embodiment of this application, the vehicle fault diagnosis conflict arbitration device is further used for:

[0035] If the first diagnostic host computer is an Ethernet diagnostic host computer, then when the TCP_DATA socket of the current transmission control protocol is not closed, it is determined that the first diagnostic host computer has occupied resources.

[0036] According to one embodiment of this application, the vehicle fault diagnosis conflict arbitration device is further used for:

[0037] If the first diagnostic host computer is a CAN diagnostic host computer of the Controller Area Network, then determine whether a diagnostic request has been received within a preset time period;

[0038] If the diagnostic request is received within a preset time period, it is determined that the first diagnostic host computer has occupied resources.

[0039] According to the vehicle fault diagnosis conflict arbitration device provided in this application embodiment, multiple diagnostic host computers of the current vehicle are prioritized based on a preset priority setting strategy. When multiple diagnostic host computers access the system simultaneously and request to operate the same electronic control unit at the same time, diagnostic arbitration is performed based on the preset arbitration strategy and the priority of each diagnostic host computer to obtain the diagnostic conflict arbitration result of the current vehicle, and diagnostic operations are performed based on the diagnostic conflict arbitration result. Therefore, by setting a diagnostic request management mechanism with different priorities, the mutual interference and conflict problems caused by the coexistence of multiple diagnostic methods in a vehicle are solved, improving the communication quality and efficiency of the diagnostic network.

[0040] Another embodiment of this application provides a vehicle, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the vehicle fault diagnosis conflict arbitration method as described in the above embodiments.

[0041] Another embodiment of this application provides a computer-readable storage medium storing computer instructions for causing the computer to perform the arbitration method for vehicle fault diagnosis conflicts as described in the above embodiments.

[0042] Another embodiment of this application provides a computer program product, including a computer program that is executed to implement the vehicle fault diagnosis conflict arbitration method described in the above embodiments.

[0043] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description

[0044] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:

[0045] Figure 1 is a flowchart of an arbitration method for vehicle fault diagnosis conflict provided according to an embodiment of this application;

[0046] Figure 2 is a schematic diagram of a vehicle computing center and a downstream CAN / FD controller according to an embodiment of this application;

[0047] Figure 3 is a schematic diagram of an Ethernet controller attached to a vehicle computing center according to an embodiment of this application;

[0048] Figure 4 is a block diagram of an arbitration device for vehicle fault diagnosis conflict according to an embodiment of this application;

[0049] Figure 5 is a structural schematic diagram of the vehicle provided in an embodiment of this application. Detailed Implementation

[0050] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.

[0051] The following description, with reference to the accompanying drawings, outlines an arbitration method, apparatus, vehicle, and storage medium for vehicle fault diagnosis conflicts according to embodiments of this application. Addressing the mutual interference and conflict issues arising from the coexistence of multiple diagnostic methods mentioned in the background art, this application provides an arbitration method for vehicle fault diagnosis conflicts. In this method, multiple diagnostic host computers for the current vehicle are prioritized based on a preset priority setting strategy. When multiple diagnostic host computers simultaneously access the system and simultaneously request operation on the same electronic control unit, diagnostic arbitration is performed based on the preset arbitration strategy and the priority of each diagnostic host computer to obtain the diagnostic conflict arbitration result for the current vehicle. Diagnostic operations are then performed based on the diagnostic conflict arbitration result. Therefore, by setting a diagnostic request management mechanism with different priorities, the mutual interference and conflict issues arising from the coexistence of multiple vehicle diagnostic methods are resolved, improving the communication quality and efficiency of the diagnostic network.

[0052] Understandably, the widespread application of automotive networking technology in automobiles has elevated vehicle performance, operational stability, and safety to new heights. The development of automotive communication networks not only provides the hardware foundation for automotive diagnostic networks but also brings new impetus to their architecture. Since automotive communication and diagnostic networks influence each other, designing a diagnostic system can improve the quality of diagnostic network communication, reduce diagnostic development time and costs, and ensure the consistency of automotive products.

[0053] Specifically, Figure 1 is a flowchart illustrating an arbitration method for vehicle fault diagnosis conflict provided in an embodiment of this application.

[0054] As shown in Figure 1, the arbitration method for vehicle fault diagnosis conflicts includes the following steps:

[0055] In step S101, based on a preset priority setting strategy, priority settings are performed on multiple diagnostic host computers of the current vehicle.

[0056] The current vehicle fault diagnosis conflict arbitration strategy can be one or more, and different arbitration strategies correspond to different priority setting strategies. For example, when the current vehicle fault diagnosis conflict arbitration strategy is the vehicle computing center and the lower-level controller's diagnostic arbitration strategy, the preset priority setting strategy in this application embodiment can be:

[0057] First priority: Ethernet diagnostic host computer (logical address 0x0E80), CAN diagnostic host computer, OTA master (master node) (logical address 0x0F00);

[0058] Second priority: Remote diagnostic host computer (logical address 0x0E81) used to provide remote diagnostic functions;

[0059] Third priority: The host computer for device management (logical address 0x0F01) used to provide device management functions;

[0060] For services of the same priority, an equal and mutually exclusive, first-come, first-served principle applies. Higher-priority services can interrupt ongoing lower-priority services; however, lower-priority services cannot interrupt ongoing higher-priority services. Higher-priority services refer to those executed by the higher-priority diagnostic host computer, while lower-priority services refer to those executed by the lower-priority diagnostic host computer.

[0061] It should be noted that the downstream controller can be a downstream CAN controller or a downstream FD (Flexible Data-Rate) controller. As shown in Figure 2, the diagnostic arbitration of the vehicle computing center and the downstream CAN / FD controller is completed by the vehicle computing center.

[0062] Figure 2 is a schematic diagram of the vehicle's computing center and the attached CAN / FD controller. The components and their functions in Figure 2 are shown in Table 1.

[0063] Table 1

[0064] Furthermore, when the current arbitration strategy for vehicle fault diagnosis conflicts is the diagnostic arbitration strategy of the vehicle computing center and the downstream Ethernet controller, the preset priority setting strategy in this application embodiment can be:

[0065] First priority: Ethernet diagnostic host computer (logical address 0x0E80), OTA master (logical address 0x0F00);

[0066] Second priority: Remote diagnostic host computer (logical address 0x0E81) used to provide remote diagnostic functions;

[0067] Third priority: The host computer for device management (logical address 0x0F01) used to provide device management functions;

[0068] Specifically, for services of the same priority, the principle of equality and mutual exclusion, first-come, first-served, applies; for high-priority services, ongoing low-priority services can be interrupted; however, for low-priority services, ongoing high-priority services cannot be interrupted.

[0069] It should be noted that, as shown in Figure 3, the Ethernet controller can be a gateway connected to an Ethernet ECT, and the diagnostic arbitration of the gateway connected to an Ethernet ECU (Electronic Control Unit) is completed by the connected Ethernet ECU.

[0070] Figure 3 is a schematic diagram of the vehicle computing center and its downstream Ethernet controller. The components and their functions in Figure 3 are shown in Table 2.

[0071] Table 2

[0072] In step S102, it is determined whether multiple diagnostic host computers are connected at the same time, and whether multiple diagnostic host computers simultaneously request to operate the same electronic control unit of the current vehicle.

[0073] In other words, it determines whether multiple diagnostic host computers are connected to the current vehicle. These multiple diagnostic host computers can connect to the current vehicle simultaneously or at different times. Furthermore, multiple diagnostic host computers can simultaneously request to operate on the same electronic control unit (ECU) of the current vehicle, or they can request to operate on the same ECU at different times. For example, the first diagnostic host computer may request to operate on the ECU first, and while the first diagnostic host computer is operating on the ECU, a second diagnostic host computer may request to operate on the same ECU.

[0074] In other words, determine whether there are at least two diagnostic host computers connected at the same time, and whether at least two diagnostic host computers simultaneously request to operate the same electronic control unit of the current vehicle.

[0075] In step S103, if multiple diagnostic host computers are connected at the same time and multiple diagnostic host computers request to operate the same electronic control unit at the same time, diagnostic arbitration is performed based on the preset arbitration strategy and the priority of each diagnostic host computer to obtain the diagnostic conflict arbitration result of the current vehicle, and diagnostic operation is performed based on the diagnostic conflict arbitration result.

[0076] The current diagnostic conflict arbitration result for a vehicle refers to the arbitration results of multiple diagnostic host computers, and these results include the operations of each diagnostic host computer. For example, if the multiple diagnostic host computers include a first diagnostic host computer and a second diagnostic host computer, the diagnostic conflict arbitration result could be to allow the first diagnostic host computer to operate the electronic control unit (ECU) and deny the second diagnostic host computer's operation of the ECU.

[0077] It is understandable that diagnostic host computers, such as diagnostic tools and cockpit computing centers, can use standard vehicle diagnostic protocols to perform read and write operations on the current vehicle's components (e.g., ECUs). If multiple diagnostic host computers connect to operate on a certain ECU at the same time, it will cause the ECU to malfunction. Therefore, only one diagnostic host computer is allowed to connect at the same time, that is, only one diagnostic host computer is allowed to operate on the same electronic control unit at the same time.

[0078] To avoid the aforementioned problems, priority settings are configured for different diagnostic host computers. When a diagnostic host computer connects, diagnostic arbitration is performed. The preset arbitration strategy allows for a first-come, first-served principle for computers with the same priority, disallowing preemption; for computers with different priorities, higher-priority services can preempt lower-priority services, but lower-priority services cannot preempt higher-priority services.

[0079] Furthermore, in some embodiments, diagnostic arbitration is performed based on a preset arbitration strategy and the priority of each diagnostic host computer to obtain the diagnostic conflict arbitration result of the current vehicle, including: determining whether there is a first diagnostic host computer that has occupied resources and has received a route activation request sent by a second diagnostic host computer; if there is a first diagnostic host computer that has occupied resources and has received a route activation request sent by a second diagnostic host computer, then when the priority of the first diagnostic host computer is the same as the priority of the second diagnostic host computer, a negative response code is sent to the second diagnostic host computer to reject the route activation request sent by the second diagnostic host computer.

[0080] The route activation request is used to request the activation of the route between the second diagnostic host computer and the electronic control unit.

[0081] Furthermore, in some embodiments, after determining that the first diagnostic host computer has occupied resources and receiving the route activation request sent by the second diagnostic host computer, the method further includes: determining whether the priority of the second diagnostic host computer is higher than the priority of the first diagnostic host computer; if the priority of the second diagnostic host computer is higher than the priority of the first diagnostic host computer, then terminating the TCP connection of the first diagnostic host computer to release the resources, and sending a route activation success response code to the second diagnostic host computer to activate the route; if the priority of the second diagnostic host computer is lower than the priority of the first diagnostic host computer, then sending a negative response code to the second diagnostic host computer to reject the route activation request sent by the second diagnostic host computer.

[0082] The TCP connection refers to the TCP connection between the first diagnostic host computer and the electronic control unit. If this TCP connection is established, it indicates that the first diagnostic host computer has connected to the electronic control unit; if this TCP connection is terminated, it indicates that the first diagnostic host computer has disconnected from the electronic control unit. Activating the route refers to activating the route between the second diagnostic host computer and the electronic control unit.

[0083] To help those skilled in the art to understand more clearly and intuitively the process by which diagnostic arbitration is performed based on a preset arbitration strategy and the priority of each diagnostic host computer to obtain the diagnostic conflict arbitration result of the current vehicle in the embodiments of this application, detailed examples are provided below.

[0084] As one embodiment of this application, when the DoIP module and OBD diagnostic CAN arbitration are performed:

[0085] (1) For services with the same priority, the principle of equality and mutual exclusion and first-come, first-served is implemented. When one Ethernet diagnostic host computer or CAN diagnostic host computer has occupied resources, after another Ethernet diagnostic host computer establishes a TCP connection with the ECU, it sends a route activation request to the DoIP module, as shown in Table 3. The DoIP module replies to the other Ethernet diagnostic host computer with a route activation response code 0x01 (a negative response that all currently available sockets have been registered or activated), and performs the action of not activating the route and closing the socket.

[0086] Table 3

[0087] (2) For services with the same priority, the principle of equality and mutual exclusion and first-come, first-served is implemented. When one Ethernet diagnostic host computer has occupied the resources, and another CAN diagnostic host computer sends a diagnostic request for the same resource, the gateway does not process or route the diagnostic request on the OBD CAN (that is, the diagnostic request sent by the CAN diagnostic host computer), thus avoiding the duplicate allocation of resources and data conflicts, thereby maintaining the stability and efficiency of the diagnostic network.

[0088] (3) For high-priority services, ongoing low-priority services can be interrupted. When a low-priority Ethernet diagnostic host computer is already in use, and another high-priority Ethernet diagnostic host computer establishes a TCP connection, it sends a route activation request. The DoIP module first terminates the TCP connection of the low-priority Ethernet diagnostic host computer (4-way handshake), and then replies with a route activation response code 0x10 (route successfully activated) to the high-priority Ethernet diagnostic host computer, as shown in Table 4:

[0089] Table 4

[0090] (4) For high-priority services, the ongoing low-priority services can be interrupted. When the low-priority Ethernet diagnostic host computer has occupied resources, another high-priority CAN diagnostic host computer sends a diagnostic request. The gateway processes or routes the diagnostic request sent by the CAN diagnostic host computer. At the same time, the DoIP module terminates the TCP connection of the low-priority Ethernet diagnostic host computer (4-way handshake).

[0091] (5) For low-priority services, ongoing high-priority services should not be interrupted. When a high-priority CAN diagnostic host computer or Ethernet diagnostic host computer has already occupied resources, and another low-priority Ethernet diagnostic host computer establishes a TCP connection, it sends a route activation request. The DoIP module replies to the other low-priority Ethernet diagnostic host computer with a route activation response code 0x01 (a negative response indicating that all currently available sockets have been registered or activated), as shown in Table 5.

[0092] Table 5

[0093] Furthermore, as another embodiment of this application, when the DoIP module of the connected Ethernet controller arbitrates:

[0094] (1) For services of the same priority, the principle of equality and mutual exclusion, first-come, first-served is implemented. When one Ethernet diagnostic host computer has occupied resources, after another Ethernet diagnostic host computer establishes a TCP connection, it sends a route activation request to the DoIP module. The DoIP module replies to the other Ethernet diagnostic host computer with a route activation response code 0x01 (a negative response indicating that all currently available sockets have been registered or activated), as shown in Table 6:

[0095] Table 6

[0096] (2) For high-priority services, ongoing low-priority services can be interrupted. When a low-priority Ethernet diagnostic host computer has already occupied resources, another high-priority Ethernet diagnostic host computer establishes a TCP connection and sends a route activation request to the DoIP module. The DoIP module first terminates the TCP connection of the low-priority Ethernet diagnostic host computer (4-way handshake), and then replies with a route activation response code 0x10 (route successfully activated) to the high-priority Ethernet diagnostic host computer, as shown in Table 7:

[0097] Table 7

[0098] (3) For low-priority services, ongoing high-priority services should not be interrupted. When a high-priority Ethernet diagnostic host computer has already occupied resources, and another low-priority Ethernet diagnostic host computer establishes a TCP connection, it sends a route activation request to the DoIP module. The DoIP module replies to the low-priority Ethernet diagnostic host computer with a route activation response code 0x01 (a negative response indicating that all currently available sockets have been registered or activated), as shown in Table 8:

[0099] Table 8

[0100] Furthermore, in some embodiments, the arbitration method for vehicle fault diagnosis conflicts further includes: if the first diagnostic host computer is an Ethernet diagnostic host computer, then if the current TCP_DATA socket is in an unclosed state, it is determined that the first diagnostic host computer has occupied resources; otherwise, it is determined that the first diagnostic host computer has released resources.

[0101] Specifically, if the current TCP_DATA socket is not closed, it is determined that the Ethernet diagnostic host computer is occupying resources; if the current TCP_DATA socket is closed, it is determined that the Ethernet diagnostic host computer is releasing resources.

[0102] Furthermore, in some embodiments, the arbitration method for vehicle fault diagnosis conflicts further includes: if the first diagnostic host computer is a CAN diagnostic host computer, then determining whether a diagnostic request has been received within a preset time period; if a diagnostic request has been received within the preset time period, then determining that the first diagnostic host computer has occupied resources; otherwise, determining that the first diagnostic host computer has released resources.

[0103] The preset duration can be a duration pre-set by those skilled in the art, such as 6 seconds, and is not specifically limited here.

[0104] Specifically, for the CAN diagnostic host computer, its occupancy status is determined based on the activity on the OBD diagnostic CAN bus. If there are any diagnostic request or response messages on the OBD diagnostic CAN bus within 6 seconds, the CAN diagnostic host computer is determined to be in an occupied state, meaning it has already occupied the resources. Conversely, if there are no diagnostic request or response messages on the OBD diagnostic CAN bus within 6 seconds, the CAN diagnostic host computer is determined to have released the resources.

[0105] According to the vehicle fault diagnosis conflict arbitration method proposed in this application, multiple diagnostic host computers for the current vehicle are prioritized based on a preset priority setting strategy. When multiple diagnostic host computers access the system simultaneously and request to operate the same electronic control unit, diagnostic arbitration is performed based on the preset arbitration strategy and the priority of each diagnostic host computer to obtain the diagnostic conflict arbitration result for the current vehicle. Diagnostic operations are then performed based on the diagnostic conflict arbitration result. Therefore, by setting a diagnostic request management mechanism with different priorities, the mutual interference and conflict problems arising when multiple diagnostic methods coexist in a vehicle are resolved, improving the communication quality and efficiency of the diagnostic network.

[0106] Next, referring to the accompanying drawings, an arbitration device for diagnosing vehicle faults according to an embodiment of this application is described.

[0107] Figure 4 is a block diagram of an arbitration device for vehicle fault diagnosis conflict according to an embodiment of this application.

[0108] As shown in Figure 4, the vehicle fault diagnosis conflict arbitration device 10 includes: a setting module 100, a judgment module 200, and an arbitration module 300.

[0109] The system includes a setting module 100, which sets priorities for multiple diagnostic host computers of the current vehicle based on a preset priority setting strategy; a judgment module 200, which determines whether multiple diagnostic host computers are simultaneously connected and simultaneously requesting to operate on the same electronic control unit of the current vehicle; and an arbitration module 300, which, if multiple diagnostic host computers are simultaneously connected and simultaneously requesting to operate on the same electronic control unit of the current vehicle, performs diagnostic arbitration based on a preset arbitration strategy and the priority of each diagnostic host computer to obtain the diagnostic conflict arbitration result of the current vehicle, and performs diagnostic operations on the electronic control unit based on the diagnostic conflict arbitration result.

[0110] Furthermore, in some embodiments, the arbitration module 300 is used to: determine whether there is a first diagnostic host computer that has occupied resources and has received a route activation request sent by a second diagnostic host computer; if there is a first diagnostic host computer that has occupied resources and has received a route activation request sent by a second diagnostic host computer, then when the priority of the first diagnostic host computer is the same as the priority of the second diagnostic host computer, a negative response code is sent to the second diagnostic host computer to reject the route activation request sent by the second diagnostic host computer.

[0111] Furthermore, in some embodiments, after determining that the first diagnostic host computer has occupied resources and receiving a route activation request sent by the second diagnostic host computer, the determination module 200 is further configured to: determine whether the priority of the second diagnostic host computer is higher than the priority of the first diagnostic host computer; if the priority of the second diagnostic host computer is higher than the priority of the first diagnostic host computer, then terminate the Transmission Control Protocol (TCP) connection of the first diagnostic host computer to release the resources, and send a route activation success response code to the second diagnostic host computer to activate the route; if the priority of the second diagnostic host computer is lower than the priority of the first diagnostic host computer, then send a negative response code to the second diagnostic host computer to reject the route activation request sent by the second diagnostic host computer.

[0112] Furthermore, in some embodiments, the vehicle fault diagnosis conflict arbitration device 10 is also used to: if the first diagnostic host computer is an Ethernet diagnostic host computer, then when the data transmission socket TCP_DATA socket of the current transmission control protocol is in an unclosed state, determine that the first diagnostic host computer has occupied resources.

[0113] Furthermore, in some embodiments, the vehicle fault diagnosis conflict arbitration device 10 is also used to: if the first diagnostic host computer is a CAN diagnostic host computer, determine whether a diagnostic request has been received within a preset time period; if a diagnostic request has been received within a preset time period, determine that the first diagnostic host computer has occupied resources.

[0114] It should be noted that the explanation of the above-mentioned arbitration method embodiment for vehicle fault diagnosis conflict also applies to the arbitration device for vehicle fault diagnosis conflict in this embodiment, and will not be repeated here.

[0115] According to the vehicle fault diagnosis conflict arbitration device proposed in this application embodiment, multiple diagnostic host computers of the current vehicle are prioritized based on a preset priority setting strategy. When multiple diagnostic host computers access the system simultaneously and request to operate the same electronic control unit at the same time, diagnostic arbitration is performed based on the preset arbitration strategy and the priority of each diagnostic host computer to obtain the diagnostic conflict arbitration result of the current vehicle, and diagnostic operations are performed based on the diagnostic conflict arbitration result. Therefore, by setting a diagnostic request management mechanism with different priorities, the mutual interference and conflict problems caused by the coexistence of multiple diagnostic methods in a vehicle are solved, improving the communication quality and efficiency of the diagnostic network.

[0116] Figure 5 is a structural schematic diagram of a vehicle provided in an embodiment of this application. The vehicle may include:

[0117] The memory 501, the processor 502, and the computer program stored on the memory 501 and capable of running on the processor 502.

[0118] When the processor 502 executes the program, it implements the arbitration method for vehicle fault diagnosis conflict provided in the above embodiments.

[0119] Furthermore, the vehicle also includes:

[0120] Communication interface 503 is used for communication between memory 501 and processor 502.

[0121] The memory 501 is used to store computer programs that can run on the processor 502.

[0122] The memory 501 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.

[0123] If the memory 501, processor 502, and communication interface 503 are implemented independently, they can be interconnected via a bus to communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, only one thick line is used in Figure 5, but this does not indicate that there is only one bus or one type of bus.

[0124] Optionally, in a specific implementation, if the memory 501, processor 502, and communication interface 503 are integrated on a single chip, then the memory 501, processor 502, and communication interface 503 can communicate with each other through an internal interface.

[0125] Processor 502 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application.

[0126] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described arbitration method for vehicle fault diagnosis conflicts.

[0127] This application also provides a computer program product, including a computer program that is executed to implement the above-described arbitration method for vehicle fault diagnosis conflicts.

[0128] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0129] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0130] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more N executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.

[0131] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.

[0132] It should be understood that the various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, the N steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0133] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.

[0134] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.

[0135] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of this application.

Claims

1. An arbitration method for vehicle fault diagnosis conflicts, wherein, include: Based on a preset priority setting strategy, priority settings are applied to multiple diagnostic host computers for the current vehicle. Determine whether multiple diagnostic host computers are simultaneously connected, and whether multiple diagnostic host computers simultaneously request to operate the same electronic control unit of the current vehicle; If multiple diagnostic host computers are connected simultaneously, and the multiple diagnostic host computers simultaneously request to operate on the same electronic control unit of the current vehicle, diagnostic arbitration is performed based on a preset arbitration strategy and the priority of each diagnostic host computer to obtain the diagnostic conflict arbitration result of the current vehicle, so as to perform diagnostic operation on the electronic control unit based on the diagnostic conflict arbitration result.

2. The method according to claim 1, wherein, The diagnostic arbitration based on a preset arbitration strategy and the priority of each diagnostic host computer, to obtain the diagnostic conflict arbitration result for the current vehicle, includes: Determine whether the first diagnostic host computer has occupied resources and whether a route activation request has been received from the second diagnostic host computer; If the first diagnostic host computer is already occupying resources and receives a route activation request from the second diagnostic host computer, then if the priority of the first diagnostic host computer is the same as that of the second diagnostic host computer, a negative response code is sent to the second diagnostic host computer to reject the route activation request sent by the second diagnostic host computer.

3. The method according to claim 2, wherein, After determining that the first diagnostic host computer has occupied resources and receiving the route activation request sent by the second diagnostic host computer, the method further includes: Determine whether the priority of the second diagnostic host computer is higher than the priority of the first diagnostic host computer; If the priority of the second diagnostic host computer is higher than that of the first diagnostic host computer, then the transmission control protocol TCP connection of the first diagnostic host computer is terminated to release the resources, and a route success activation response code is sent to the second diagnostic host computer to activate the route. If the priority of the second diagnostic host computer is lower than that of the first diagnostic host computer, then the negative response code is sent to the second diagnostic host computer to reject the route activation request sent by the second diagnostic host computer.

4. The method according to claim 2, wherein, Also includes: If the first diagnostic host computer is an Ethernet diagnostic host computer, then when the TCP_DATA socket of the current transmission control protocol is not closed, it is determined that the first diagnostic host computer has occupied resources.

5. The method according to claim 2, wherein, Also includes: If the first diagnostic host computer is a CAN diagnostic host computer of the Controller Area Network, then determine whether a diagnostic request has been received within a preset time period; If the diagnostic request is received within a preset time period, it is determined that the first diagnostic host computer has occupied resources.

6. An arbitration device for vehicle fault diagnosis conflicts, wherein, include: The settings module is used to set priorities for multiple diagnostic host computers of the current vehicle based on a preset priority setting strategy. The judgment module is used to determine whether multiple diagnostic host computers are simultaneously connected and whether the multiple diagnostic host computers simultaneously request to operate the same electronic control unit of the current vehicle. The arbitration module is used to perform diagnostic arbitration based on a preset arbitration strategy and the priority of each diagnostic host computer if multiple diagnostic host computers are connected at the same time and the multiple diagnostic host computers simultaneously request to operate the same electronic control unit of the current vehicle, so as to obtain the diagnostic conflict arbitration result of the current vehicle, and perform diagnostic operation on the electronic control unit based on the diagnostic conflict arbitration result.

7. The apparatus according to claim 6, wherein, The arbitration module is used for: Determine whether the first diagnostic host computer has occupied resources and whether a route activation request has been received from the second diagnostic host computer; If the first diagnostic host computer is already occupying resources and receives a route activation request from the second diagnostic host computer, then if the priority of the first diagnostic host computer is the same as that of the second diagnostic host computer, a negative response code is sent to the second diagnostic host computer to reject the route activation request sent by the second diagnostic host computer.

8. The apparatus according to claim 7, wherein, After determining that the first diagnostic host computer has occupied resources and receiving a route activation request sent by the second diagnostic host computer, the determination module is further configured to: Determine whether the priority of the second diagnostic host computer is higher than the priority of the first diagnostic host computer; If the priority of the second diagnostic host computer is higher than that of the first diagnostic host computer, then the transmission control protocol TCP connection of the first diagnostic host computer is terminated to release the resources, and a route success activation response code is sent to the second diagnostic host computer to activate the route. If the priority of the second diagnostic host computer is lower than that of the first diagnostic host computer, then the negative response code is sent to the second diagnostic host computer to reject the route activation request sent by the second diagnostic host computer.

9. The apparatus according to claim 7, wherein, The vehicle fault diagnosis conflict arbitration device is also used for: If the first diagnostic host computer is an Ethernet diagnostic host computer, then when the TCP_DATA socket of the current transmission control protocol is not closed, it is determined that the first diagnostic host computer has occupied resources.

10. The apparatus according to claim 7, wherein, The vehicle fault diagnosis conflict arbitration device is also used for: If the first diagnostic host computer is a CAN diagnostic host computer of the Controller Area Network, then determine whether a diagnostic request has been received within a preset time period; If the diagnostic request is received within a preset time period, it is determined that the first diagnostic host computer has occupied resources.

11. A vehicle, wherein, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, the processor executing the program to implement the arbitration method for vehicle fault diagnosis conflicts as claimed in any one of claims 1-5.

12. A computer-readable storage medium having a computer program stored thereon, wherein, The program is executed by the processor to implement the arbitration method for vehicle fault diagnosis conflicts as described in any one of claims 1-5.

13. A computer program product, wherein, Includes a computer program, which is executed to implement the arbitration method for vehicle fault diagnosis conflicts as described in any one of claims 1-5.