Diagnostic protocol execution method, apparatus and device, and readable storage medium

By optimizing the diagnostic protocol to determine the optimal target protocol and utilizing knowledge graph matching features, the problem of slow diagnostic protocol scanning is solved, thereby improving the execution efficiency of the diagnostic protocol and the user experience.

CN121864892APending Publication Date: 2026-04-14LAUNCH TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
LAUNCH TECH CO LTD
Filing Date
2026-02-28
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

In existing technologies, diagnostic protocol scanning is slow, resulting in low efficiency of diagnostic protocol execution. In particular, when the target protocol is ranked low, it requires a long scanning time, increasing the risk of timeout failure.

Method used

After determining the initial diagnostic protocol, we search among all diagnostic protocols to find the target optimal diagnostic protocol. We then use a knowledge graph to perform fast matching based on diagnostic features and optimize the scanning strategy of the diagnostic protocol.

Benefits of technology

It improves the efficiency of diagnostic protocol determination, shortens scan time, reduces the risk of timeout failure, and enhances user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121864892A_ABST
    Figure CN121864892A_ABST
Patent Text Reader

Abstract

The invention discloses a diagnostic protocol execution method, device and equipment and a readable storage medium, which are applied to the technical field of vehicle diagnosis, and comprise the following steps: determining a first initial diagnostic protocol communicating with a vehicle electronic control unit; when it is determined that the initial diagnosis protocol cannot be matched with the set diagnosis function, optimization is carried out in all diagnosis protocols according to the initial diagnosis protocol, and a target optimal diagnosis protocol is determined; determining whether the target optimal diagnosis protocol is a protocol for realizing a set diagnosis function; and when the target optimal diagnosis protocol is the protocol for realizing the set diagnosis function, determining to execute the set diagnosis function based on the target optimal diagnosis protocol. Compared with the prior art that all diagnosis protocols need to be traversed, optimization can be carried out based on the initial diagnosis protocol, the target optimal diagnosis protocol can be rapidly determined, and the execution efficiency of the diagnosis protocol is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of vehicle diagnostic technology, and in particular to a diagnostic protocol execution method, apparatus, device, and readable storage medium. Background Technology

[0002] When a car's tire pressure sensor is damaged or its battery is depleted, the sensor needs to be replaced. Replacing the sensor requires diagnostic equipment to perform matching, which necessitates traversing the correct diagnostic protocol. Currently, the scanning strategy of the protocol configuration menu is to sort by diagnostic entry point, traversing from the first protocol to the last, attempting to communicate with the car's ECU (Electronic Control Unit) sequentially until the correct protocol is found and correctly matched, or until the last protocol is reached. Therefore, if a particular vehicle's corresponding diagnostic protocol is relatively late in the sorting or is the last one, the scanning time will be longer, reducing the user experience. Blindly traversing and matching also consumes time and carries the risk of timeout failure.

[0003] It is evident that improving the efficiency of diagnostic protocol scanning, thereby improving the efficiency of diagnostic protocol execution, is a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0004] In view of this, the purpose of the present invention is to provide a diagnostic protocol execution method, apparatus, device and readable storage medium, which solves the problem of slow diagnostic protocol scanning and low diagnostic protocol execution efficiency in the prior art.

[0005] To address the aforementioned technical problems, this invention provides a diagnostic protocol execution method, comprising: Determine the initial diagnostic protocol for the first communication with the vehicle's electronic control unit; When it is determined that the initial diagnostic protocol cannot match the set diagnostic function, the target optimal diagnostic protocol is determined by searching among all diagnostic protocols based on the initial diagnostic protocol. Determine whether the target optimal diagnostic protocol is the protocol that implements the set diagnostic function; When the target optimal diagnostic protocol is the protocol that implements the set diagnostic function, it is determined that the set diagnostic function is executed based on the target optimal diagnostic protocol.

[0006] Optionally, determine the initial diagnostic protocol for the first communication with the vehicle's electronic control unit, including: The diagnostic protocols corresponding to the diagnostic functions are sorted according to the diagnostic function entry points to obtain the sorted diagnostic protocols. The initial diagnostic protocol for communicating with the vehicle's electronic control unit is determined based on the sorted diagnostic protocols.

[0007] Optionally, when it is determined that the initial diagnostic protocol cannot match the set diagnostic function, an optimization search is performed among all diagnostic protocols based on the initial diagnostic protocol to determine the target optimal diagnostic protocol, including: Determine the diagnostic features of the initial diagnostic protocol; Based on the diagnostic features, the optimal diagnostic protocol is determined by searching among all diagnostic protocols.

[0008] Optionally, based on the diagnostic features, an optimization is performed among all diagnostic protocols to determine the target optimal diagnostic protocol, including: Obtain a knowledge graph constructed based on all diagnostic protocols; wherein the nodes of the knowledge graph are composed of diagnostic protocols, and the attributes of each diagnostic protocol include the diagnostic features and diagnostic functions corresponding to each diagnostic protocol; the edges of the knowledge graph are relational edges representing the similarity between different diagnostic protocols; Based on the set diagnostic function of the current diagnostic task, query the knowledge graph for diagnostic protocol nodes with the set diagnostic function attribute to form an initial protocol set; In the knowledge graph, the target optimal diagnostic protocol is determined based on the similarity between the initial diagnostic protocol and the diagnostic protocols in the initial protocol set.

[0009] Optionally, the diagnostic features include diagnostic protocol type, diagnostic protocol identifier, and electronic control unit identifier.

[0010] Optionally, determine the initial diagnostic protocol for the first communication with the vehicle's electronic control unit, including: Determine the initial diagnostic protocol for the first vehicle electronic control unit that communicates with the tire pressure sensor; Accordingly, determining whether the target optimal diagnostic protocol is the protocol that implements the set diagnostic function includes: Determine whether the target optimal diagnostic protocol is a protocol for achieving tire pressure sensor matching; wherein, the set diagnostic function is the tire pressure sensor matching.

[0011] Optionally, the above diagnostic protocol execution method further includes: When the target optimal diagnostic protocol is not a protocol that implements the set diagnostic function, determine the next initial diagnostic protocol and perform optimization based on the next initial diagnostic protocol; The present invention also provides a diagnostic protocol execution device, comprising: An initial diagnostic protocol determination module is used to determine the first initial diagnostic protocol for communication with the vehicle's electronic control unit; The target optimal diagnostic protocol determination module is used to determine the target optimal diagnostic protocol by searching among all diagnostic protocols based on the initial diagnostic protocol when the initial diagnostic protocol cannot match the set diagnostic function. The judgment module is used to determine whether the target optimal diagnostic protocol is a protocol that implements the set diagnostic function; The diagnostic protocol execution module is used to determine, when the target optimal diagnostic protocol is a protocol that implements the set diagnostic function, to execute the set diagnostic function based on the target optimal diagnostic protocol.

[0012] The present invention also provides a diagnostic protocol execution device, comprising: Memory, used to store computer programs; A processor for executing the computer program to implement the steps of the diagnostic protocol execution method described above.

[0013] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the diagnostic protocol execution method described above.

[0014] The present invention also provides a computer program product, including a computer program / instructions, which, when executed by a processor, implement the steps of the above-described diagnostic protocol execution method.

[0015] As can be seen, this invention determines the initial diagnostic protocol for communication with the vehicle's electronic control unit; based on the initial diagnostic protocol, it optimizes all diagnostic protocols to determine the target optimal diagnostic protocol; it determines whether the target optimal diagnostic protocol is the protocol that implements the set diagnostic function; and when the target optimal diagnostic protocol is the protocol that implements the set diagnostic function, it determines to execute the set diagnostic function based on the target optimal diagnostic protocol. Compared with the current method that requires traversing all diagnostic protocols, this invention can perform optimization and quickly determine the target optimal diagnostic protocol from multiple diagnostic protocols, improving the efficiency of diagnostic protocol determination and thus improving the efficiency of diagnostic protocol execution.

[0016] In addition, the present invention also provides a diagnostic protocol execution apparatus, device, and readable storage medium, which also have the above-mentioned beneficial effects. Attached Figure Description

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

[0018] Figure 1 A flowchart of a diagnostic protocol execution method provided in an embodiment of the present invention; Figure 2 A flowchart illustrating a diagnostic protocol scan provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of a diagnostic protocol execution device provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of a diagnostic protocol execution device provided in an embodiment of the present invention. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. 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.

[0020] Please refer to Figure 1 , Figure 1 A flowchart illustrating a diagnostic protocol execution method provided in an embodiment of the present invention. The method may include: S101, determine the initial diagnostic protocol for the first communication with the vehicle's electronic control unit.

[0021] Each step in this embodiment can be executed by a designated electronic device, which can specifically be a server, a portable terminal, or other forms. The vehicle control unit in this embodiment is the control unit that needs to perform the set diagnostic function. This embodiment can traverse diagnostic protocols, sequentially attempting to communicate with the vehicle electronic control unit until a protocol successfully communicates with it; this protocol is then used as the initial diagnostic protocol. This embodiment does not limit the specific method for determining the first initial diagnostic protocol to communicate with the vehicle electronic control unit. This embodiment can determine whether each diagnostic protocol can communicate with the vehicle electronic control unit in a predetermined order, which can be determined according to the order determined by the diagnostic entry point or a manually preset order. In this embodiment, the initial diagnostic protocol is a protocol that can communicate with the vehicle electronic control unit but cannot perform the set diagnostic function.

[0022] It should be further noted that, based on any of the above embodiments, the aforementioned determination of the initial diagnostic protocol for communicating with the vehicle's electronic control unit may include: S1011, Sort the diagnostic protocols corresponding to the diagnostic functions according to the diagnostic function entry points to obtain the sorted diagnostic protocols; This embodiment prioritizes diagnostic protocols that are most relevant to and most likely to succeed for the diagnostic function selected by the user (such as tire pressure sensor matching).

[0023] S1012, determine the first initial diagnostic protocol for communicating with the vehicle's electronic control unit based on the sorted diagnostic protocols.

[0024] This embodiment begins with the first diagnostic protocol, attempting to establish a basic diagnostic session (i.e., a "handshake") with the vehicle ECU. The first protocol that successfully establishes a session is recorded as "Initial Diagnostic Protocol A". The goal of this step is to quickly verify a usable basic communication link to the target ECU with minimal cost. It verifies: physical layer / link layer connectivity, and that the currently used diagnostic tool identifier (TOOLID) and target ECU address (ECUID) are accepted by the other party. This embodiment's steps involve obtaining a reliable "communication fingerprint" (protocol A type, TOOLID, ECUID). This embodiment can be sorted according to diagnostic function entry points, which can improve the efficiency of determining the initial diagnostic protocol.

[0025] It should be further explained that, based on any of the above embodiments, determining the first initial diagnostic protocol for communication with the vehicle electronic control unit may include: determining the first initial diagnostic protocol for communication with the vehicle electronic control unit corresponding to the tire pressure sensor; correspondingly, determining whether the target optimal diagnostic protocol is a protocol for implementing the set diagnostic function may include: determining whether the target optimal diagnostic protocol is a protocol for implementing tire pressure sensor matching; wherein, the set diagnostic function is tire pressure sensor matching. The application scenario of this embodiment is tire pressure sensor.

[0026] S102, when it is determined that the initial diagnostic protocol cannot match the set diagnostic function, the optimal diagnostic protocol is determined by searching among all diagnostic protocols based on the initial diagnostic protocol.

[0027] This embodiment does not limit the specific optimization method. Optimization can be based on information from the initial diagnostic protocol. For example, the initial diagnostic protocol information may include the type of the diagnostic protocol, TOOLID (Diagnostic Instrument Identifier), and ECUID (Electronic Control Unit Identifier). Alternatively, during optimization, this embodiment can directly filter all protocols in the protocol library that are "of the same type, same TOOLID, and same ECUID" as the initial protocol A. This embodiment does not limit the number of target optimal diagnostic protocols. When there are multiple target optimal diagnostic protocols, it is necessary to iterate through each target optimal diagnostic protocol to determine if it implements the set diagnostic function. When there is only one target optimal diagnostic protocol, it can be directly determined whether the current target optimal diagnostic protocol implements the set diagnostic function.

[0028] It should be further explained that, based on any of the above embodiments, when it is determined that the initial diagnostic protocol cannot match the set diagnostic function, the process of optimizing all diagnostic protocols according to the initial diagnostic protocol to determine the target optimal diagnostic protocol may include: S1021, Determine the diagnostic features of the initial diagnostic protocol.

[0029] This embodiment does not limit specific diagnostic features. The diagnostic features in this embodiment may include protocol type, diagnostic tool identifier, electronic control unit identifier, and security access parameters. It should be noted that the core communication parameters are protocol type, diagnostic tool identifier, and electronic control unit identifier. Protocol type: This is the "language system" of communication. The diagnostic tool identifier is the source address used by the diagnostic tool in the diagnostic network, and the electronic control unit identifier is the logical or physical address of the target ECU in the network. These three core features—protocol type, TOOLID, and ECUID—together define "a verified and usable communication channel." All subsequent optimization operations will be preferentially limited to the set of protocols using the same channel, which drastically narrows the search scope from "all protocols" to "similar protocols," representing an order-of-magnitude leap in efficiency.

[0030] S1022, based on diagnostic features, optimize among all diagnostic protocols to determine the target optimal diagnostic protocol.

[0031] This embodiment can directly optimize based on diagnostic features. For example, it can determine the diagnostic protocol most similar to a given diagnostic feature and identify the target optimal diagnostic protocol, thus improving optimization efficiency. This embodiment can directly determine the similarity between the diagnostic features of each diagnostic protocol and the diagnostic features corresponding to the initial diagnostic protocol, thereby determining the most similar diagnostic protocol. This embodiment does not limit the method for determining the similarity of diagnostic protocols; similarity calculation can incorporate functional relevance. For example, a protocol similar to protocol A in features and explicitly labeled "supports tire pressure matching" will score significantly higher than a protocol that only supports basic read / write operations. This ensures that the most functionally relevant and most likely to succeed protocol is tried first, greatly reducing the average number of attempts required for success.

[0032] It should be further explained that, based on any of the above embodiments, the above-mentioned optimization among all diagnostic protocols based on diagnostic features to determine the target optimal diagnostic protocol may include: obtaining a knowledge graph constructed based on all diagnostic protocols; wherein, the nodes of the knowledge graph are composed of diagnostic protocols, and the attributes of the diagnostic protocols include the diagnostic features and diagnostic functions corresponding to each diagnostic protocol; the edges of the knowledge graph are relationship edges representing the similarity between different diagnostic protocols; based on the set diagnostic function of the current diagnostic task, querying the knowledge graph for diagnostic protocol nodes with the set diagnostic function attribute to form an initial protocol set; in the knowledge graph, determining the target optimal diagnostic protocol based on the similarity between the initial diagnostic protocol and the diagnostic protocols in the initial protocol set. This embodiment requires a pre-constructed "diagnostic protocol knowledge graph". This graph is the knowledge foundation of the method and can be constructed through historical data mining and expert experience. In this embodiment, each diagnostic protocol is a node, and each protocol node contains two types of key attributes: diagnostic features: describing the technical parameters of the protocol itself, such as protocol type, default / common TOOLID, common ECUID range, supported diagnostic services (0x22, 0x2E, etc.), timing parameters, etc. Diagnostic Functions: Describes the specific vehicle functions that the protocol can achieve, such as "tire pressure sensor matching," "throttle matching," and "ECU programming." A protocol node can be associated with multiple functions. Edges (Relationships): Edges connecting two protocol nodes represent their similarity. This similarity is calculated comprehensively and may be based on: Feature Similarity: For example, the degree of overlap between the two protocols in terms of protocol type, TOOLID, ECUID, support services, etc. Co-occurrence / Cooperation Relationship: In historical diagnostic records, the two protocols are frequently used successfully in the same vehicle model or the same repair scenario. Functional Overlap: How much overlap there is between the sets of functions supported by the two protocols. In this embodiment, for each protocol node (denoted as P_i), its graph similarity with the initial diagnostic protocol node (protocol A) is calculated. This calculation not only considers the similarity of the two nodes' own attributes (such as feature overlap) but also utilizes the structural information of the graph: Direct Edge Weights: If there is a direct "similar edge" between protocol A and P_i in the graph, then the weight of that edge is an important basis for similarity. Multi-hop association: Even without direct edges, the system calculates the path strength connected through other nodes (such as common vehicle model nodes or common function nodes). For example, if protocol A and P_i are both frequently used on the "Volkswagen MQB platform," their similarity will be high. Based on the calculated similarity scores, all diagnostic protocols are sorted in descending order. The protocol with the highest score is the one most similar to the current vehicle's established communication environment (protocol A) and can achieve the target function; it is the most strong candidate for the "target optimal diagnostic protocol." These candidate protocols can be tried sequentially according to this sorted list. The first protocol that successfully performs tire pressure matching is ultimately determined as the target optimal diagnostic protocol.

[0033] It should be further noted that, based on any of the above embodiments, the diagnostic features include the diagnostic protocol type, the diagnostic protocol identifier, and the electronic control unit identifier. This embodiment quickly finds a usable communication protocol with minimal trial and error (verifying only three key features).

[0034] S103, determine whether the target optimal diagnostic protocol is the protocol that implements the set diagnostic function.

[0035] This embodiment does not limit the specific diagnostic function to be set. For example, the diagnostic function set in this embodiment could be the function of replacing the tire pressure sensor. After determining the target optimal diagnostic protocol, this embodiment determines that the target optimal diagnostic protocol is a protocol that can communicate with the vehicle's electronic control unit, but it is uncertain whether the diagnostic function can be set.

[0036] When the target optimal diagnostic protocol in this embodiment fails to achieve the set diagnostic function, it indicates that a diagnostic protocol similar to the initial diagnostic protocol determined above also fails to achieve the set diagnostic function. Therefore, a new initial diagnostic protocol needs to be obtained to determine whether the initial diagnostic protocol can communicate with the vehicle electronic control unit and whether it can achieve the set diagnostic function. If it is determined that it cannot achieve the set diagnostic function, it is necessary to search for optimization based on the latest initial diagnostic protocol.

[0037] S104, when the target optimal diagnostic protocol is the protocol that implements the set diagnostic function, determine to execute the set diagnostic function based on the target optimal diagnostic protocol.

[0038] This embodiment can reduce diagnostic protocol scanning time and improve user experience when performing diagnosis based on the target optimal diagnostic protocol, since it does not need to traverse all diagnostic protocols.

[0039] It should be further noted that, based on any of the above embodiments, the diagnostic protocol execution method may further include: when the target optimal diagnostic protocol is not a protocol that implements the set diagnostic function, determining the next initial diagnostic protocol and performing optimization based on the next initial diagnostic protocol. In this embodiment, if a target protocol is not found in the first two stages, then the unscanned protocols are scanned again, and steps S101 to S103 are repeated until a target protocol is found or all protocols are scanned. This invention can effectively optimize the problem of long scanning times during diagnosis leading to learning failures or a decline in user experience.

[0040] This invention provides a diagnostic protocol execution method, which may include: S101, determining an initial diagnostic protocol that communicates with a vehicle electronic control unit; S102, when the initial diagnostic protocol cannot match a set diagnostic function, optimizing all diagnostic protocols based on the initial diagnostic protocol to determine a target optimal diagnostic protocol; S103, determining whether the target optimal diagnostic protocol is a protocol that implements the set diagnostic function; S104, when the target optimal diagnostic protocol is a protocol that implements the set diagnostic function, determining to execute the set diagnostic function based on the target optimal diagnostic protocol. Compared with the current method that requires traversing all diagnostic protocols, this invention can first determine an initial diagnostic protocol of a vehicle electronic control unit that can communicate with the set diagnostic function, and then optimize based on the initial diagnostic protocol to quickly determine the target optimal diagnostic protocol that can implement the set diagnostic function, thus improving the efficiency of diagnostic protocol determination.

[0041] For a clearer understanding of this invention, please refer to the following details. Figure 2 , Figure 2 A flowchart illustrating a diagnostic protocol scan provided in this embodiment of the invention may specifically include: When a car's tire pressure sensor is damaged or its battery is depleted, the sensor needs to be replaced. Replacing the sensor requires diagnostic equipment to perform matching, which necessitates traversing the correct diagnostic protocols, such as menus A, B, and C. Currently, the scanning strategy for configuring the scanning protocol menu is to sort by diagnostic entry point, traversing from the first protocol onwards, attempting to communicate with the car's ECU (Electronic Control Unit) sequentially until the correct protocol is found and correctly matched, or until the last protocol is reached. Therefore, if a particular vehicle's corresponding diagnostic protocol is relatively late in the list or is the last one, the scanning time will be longer, reducing the user experience. Blindly traversing and matching also consumes time and carries the risk of timeout failure.

[0042] To address this situation, and considering that some protocols are very similar, differing only in read / write commands, this invention provides an optimized scanning strategy. This strategy consists of three phases: First, it iterates through the protocols listed after the first one, according to the diagnostic entry point, until a protocol A successfully enters the system. The type of diagnostic protocol A (e.g., CAN (Controller Area Network) protocol, KWP (Keyword Protocol) protocol, TOOLID (Diagnostic Identifier), and ECUID (Electronic Control Unit Identifier) ​​are recorded. Second, it scans protocols of the same type, TOOLID, and ECUID as protocol A, prioritizing the most likely successful protocol (those with the most similarities to protocol A) to communicate with the vehicle's ECU, until a successfully learned target protocol is found and a match is achieved. Third, if no target protocol is found in the first two phases, the unscanned protocols are scanned again, repeating phases one, two, and three until a target protocol is found or all protocols are scanned. This embodiment can determine the optimal diagnostic protocol through scanning, thereby replacing the tire pressure sensor based on this optimal diagnostic protocol.

[0043] This invention optimizes the problem of prolonged scanning time during diagnostics, which can lead to learning failures or a decreased customer experience. It achieves the goal of minimizing the impact of prolonged scanning time on diagnostics.

[0044] The diagnostic protocol execution device provided in the embodiments of the present invention will be described below. The diagnostic protocol execution device described below and the diagnostic protocol execution method described above can be referred to in correspondence.

[0045] Please refer to the details. Figure 3 , Figure 3 A schematic diagram of a diagnostic protocol execution device provided in an embodiment of the present invention may include: Initial diagnostic protocol determination module 100 is used to determine the first initial diagnostic protocol communicating with the vehicle's electronic control unit; The target optimal diagnostic protocol determination module 200 is used to determine the target optimal diagnostic protocol by searching among all diagnostic protocols based on the initial diagnostic protocol when the initial diagnostic protocol cannot match the set diagnostic function. The judgment module 300 is used to determine whether the target optimal diagnostic protocol is a protocol that implements the set diagnostic function; The diagnostic protocol execution module 400 is used to determine, when the target optimal diagnostic protocol is a protocol that implements the set diagnostic function, to execute the set diagnostic function based on the target optimal diagnostic protocol.

[0046] Furthermore, based on any of the above embodiments, the initial diagnostic protocol determination module 100 includes: The sorted diagnostic protocol determination unit is used to sort the diagnostic protocols corresponding to the diagnostic functions according to the diagnostic function entry points to obtain the sorted diagnostic protocols. An initial diagnostic protocol determination unit is used to determine the first initial diagnostic protocol that communicates with the vehicle electronic control unit based on the sorted diagnostic protocols.

[0047] Furthermore, based on any of the above embodiments, the target optimal diagnostic protocol determination module 200 may include: A diagnostic feature determination unit is used to determine the diagnostic features of the initial diagnostic protocol; The target optimal diagnostic protocol determination unit is used to optimize among all diagnostic protocols based on the diagnostic features and determine the target optimal diagnostic protocol.

[0048] Furthermore, based on any of the above embodiments, the target optimal diagnostic protocol determination unit may include: The knowledge graph acquisition subunit is used to acquire a knowledge graph constructed based on all diagnostic protocols; wherein, the nodes of the knowledge graph are composed of diagnostic protocols, and the attributes of each diagnostic protocol include the diagnostic features and diagnostic functions corresponding to each diagnostic protocol; the edges of the knowledge graph are relational edges representing the similarity between different diagnostic protocols; The initial protocol set determination subunit is used to query the knowledge graph for diagnostic protocol nodes with the set diagnostic function attribute based on the set diagnostic function of the current diagnostic task, thereby forming the initial protocol set; The target optimal diagnostic protocol determination subunit is used to determine the target optimal diagnostic protocol in the knowledge graph based on the similarity between the initial diagnostic protocol and the diagnostic protocols in the initial protocol set.

[0049] Furthermore, based on any of the above embodiments, the diagnostic features include diagnostic protocol type, diagnostic protocol identifier, and electronic control unit identifier.

[0050] Furthermore, based on any of the above embodiments, the initial diagnostic protocol determination module 100 may include: The initial diagnostic protocol determination unit based on the tire pressure sensor is used to determine the first initial diagnostic protocol that communicates with the vehicle electronic control unit corresponding to the tire pressure sensor. Accordingly, the judgment module 300 may include: The judgment unit is used to determine whether the target optimal diagnostic protocol is a protocol for achieving tire pressure sensor matching; wherein, the set diagnostic function is the tire pressure sensor matching.

[0051] Furthermore, based on any of the above embodiments, the initial diagnostic protocol determination module 100 may further include: The loop module is used to determine the next initial diagnostic protocol when the target optimal diagnostic protocol is not a protocol that implements the set diagnostic function, and to perform optimization based on the next initial diagnostic protocol.

[0052] It should be noted that the order of the modules and units in the aforementioned diagnostic protocol execution device can be changed without affecting the logic.

[0053] This invention provides a diagnostic protocol execution device, which may include: an initial diagnostic protocol determination module 100, used to determine the first initial diagnostic protocol communicating with the vehicle's electronic control unit; a target optimal diagnostic protocol determination module 200, used to determine a target optimal diagnostic protocol by searching among all diagnostic protocols based on the initial diagnostic protocol when the initial diagnostic protocol cannot match the set diagnostic function; a judgment module 300, used to determine whether the target optimal diagnostic protocol is a protocol that implements the set diagnostic function; and a diagnostic protocol execution module 400, used to determine to execute the set diagnostic function based on the target optimal diagnostic protocol when the target optimal diagnostic protocol is a protocol that implements the set diagnostic function. Compared with the current method of traversing all diagnostic protocols, this invention can perform optimization and quickly determine the target optimal diagnostic protocol, thus improving the efficiency of diagnostic protocol determination.

[0054] The following describes a diagnostic protocol execution device provided by an embodiment of the present invention. The diagnostic protocol execution device described below and the diagnostic protocol execution method described above can be referred to in correspondence.

[0055] Please refer to Figure 4 , Figure 4 A schematic diagram of a diagnostic protocol execution device provided in an embodiment of the present invention may include: Memory 10 is used to store computer programs; Processor 20 is used to execute computer programs to implement the diagnostic protocol execution method described above.

[0056] The memory 10, processor 20, and communication interface 30 all communicate with each other through the communication bus 40.

[0057] In this embodiment of the invention, the memory 10 is used to store one or more programs. The programs may include program code, which includes computer operation instructions. In this embodiment of the invention, the memory 10 may store programs for implementing the following functions: Determine the initial diagnostic protocol for the first communication with the vehicle's electronic control unit; When it is determined that the initial diagnostic protocol cannot match the set diagnostic functions, the optimal diagnostic protocol is determined by searching among all diagnostic protocols based on the initial diagnostic protocol. Determine whether the target optimal diagnostic protocol is the protocol that enables the set diagnostic functions; When the target optimal diagnostic protocol is the protocol that implements the set diagnostic function, the set diagnostic function is determined to be executed based on the target optimal diagnostic protocol.

[0058] In one possible implementation, the memory 10 may include a program storage area and a data storage area, wherein the program storage area may store the operating system and applications required for at least one function; and the data storage area may store data created during use.

[0059] Furthermore, memory 10 may include read-only memory and random access memory, providing instructions and data to the processor. A portion of the memory may also include NVRAM. The memory stores operating systems and operating instructions, executable modules, or data structures, or subsets thereof, or extended sets thereof, wherein the operating instructions may include various operating instructions for implementing various operations. The operating system may include various system programs for implementing various basic tasks and handling hardware-based tasks.

[0060] Processor 20 can be a central processing unit (CPU), an application-specific integrated circuit, a digital signal processor, a field-programmable gate array, or other programmable logic device. Processor 20 can be a microprocessor or any conventional processor. Processor 20 can call programs stored in memory 10.

[0061] The communication interface 30 can be an interface for the communication module, used to connect with other devices or systems.

[0062] Of course, it should be noted that, Figure 4 The structure shown does not constitute a limitation on the diagnostic protocol execution device in the embodiments of the present invention. In practical applications, the diagnostic protocol execution device may include devices such as... Figure 4 More or fewer components as shown, or combinations of certain components.

[0063] The computer-readable storage medium provided in the embodiments of the present invention is described below. The computer-readable storage medium described below and the diagnostic protocol execution method described above can be referred to in correspondence.

[0064] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the diagnostic protocol execution method described above.

[0065] The computer-readable storage medium may include various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0066] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.

[0067] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0068] Finally, it should be noted that in this document, relationships such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.

[0069] The above provides a detailed description of a diagnostic protocol execution method, apparatus, device, and computer-readable storage medium provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A diagnostic protocol execution method, characterized in that, include: Determine the initial diagnostic protocol for the first communication with the vehicle's electronic control unit; When it is determined that the initial diagnostic protocol cannot match the set diagnostic function, the target optimal diagnostic protocol is determined by searching among all diagnostic protocols based on the initial diagnostic protocol. Determine whether the target optimal diagnostic protocol is the protocol that implements the set diagnostic function; When the target optimal diagnostic protocol is the protocol that implements the set diagnostic function, it is determined that the set diagnostic function is executed based on the target optimal diagnostic protocol.

2. The diagnostic protocol execution method according to claim 1, characterized in that, Determine the initial diagnostic protocol for the first communication with the vehicle's electronic control unit, including: The diagnostic protocols corresponding to the diagnostic functions are sorted according to the diagnostic function entry points to obtain the sorted diagnostic protocols. The initial diagnostic protocol for communicating with the vehicle's electronic control unit is determined based on the sorted diagnostic protocols.

3. The diagnostic protocol execution method according to claim 1, characterized in that, When it is determined that the initial diagnostic protocol cannot match the set diagnostic functions, the target optimal diagnostic protocol is determined by optimizing all diagnostic protocols based on the initial diagnostic protocol, including: Determine the diagnostic features of the initial diagnostic protocol; Based on the diagnostic features, the optimal diagnostic protocol is determined by searching among all diagnostic protocols.

4. The diagnostic protocol execution method according to claim 3, characterized in that, Based on the diagnostic features, the optimal diagnostic protocol is determined by optimizing all diagnostic protocols, including: Obtain a knowledge graph constructed based on all diagnostic protocols; wherein the nodes of the knowledge graph are composed of diagnostic protocols, and the attributes of each diagnostic protocol include the diagnostic features and diagnostic functions corresponding to each diagnostic protocol; the edges of the knowledge graph are relational edges representing the similarity between different diagnostic protocols; Based on the set diagnostic function of the current diagnostic task, query the knowledge graph for diagnostic protocol nodes with the set diagnostic function to form an initial protocol set; In the knowledge graph, the target optimal diagnostic protocol is determined based on the similarity between the initial diagnostic protocol and the diagnostic protocols in the initial protocol set.

5. The diagnostic protocol execution method according to claim 3, characterized in that, The diagnostic features include diagnostic protocol type, diagnostic protocol identifier, and electronic control unit identifier.

6. The diagnostic protocol execution method according to any one of claims 1 to 5, characterized in that, Determine the initial diagnostic protocol for the first communication with the vehicle's electronic control unit, including: Determine the initial diagnostic protocol for the first vehicle electronic control unit corresponding to the tire pressure sensor; Accordingly, determining whether the target optimal diagnostic protocol is the protocol that implements the set diagnostic function includes: Determine whether the target optimal diagnostic protocol is a protocol for achieving tire pressure sensor matching; wherein, the set diagnostic function is the tire pressure sensor matching.

7. The diagnostic protocol execution method according to claim 1, characterized in that, Also includes: When the target optimal diagnostic protocol is not the protocol that implements the set diagnostic function, the next initial diagnostic protocol is determined, and optimization is performed based on the next initial diagnostic protocol.

8. A diagnostic protocol execution device, characterized in that, include: An initial diagnostic protocol determination module is used to determine the first initial diagnostic protocol for communication with the vehicle's electronic control unit; The target optimal diagnostic protocol determination module is used to determine the target optimal diagnostic protocol by searching among all diagnostic protocols based on the initial diagnostic protocol when the initial diagnostic protocol cannot match the set diagnostic function. The judgment module is used to determine whether the target optimal diagnostic protocol is a protocol that implements the set diagnostic function; The diagnostic protocol execution module is used to determine, when the target optimal diagnostic protocol is a protocol that implements the set diagnostic function, to execute the set diagnostic function based on the target optimal diagnostic protocol.

9. A diagnostic protocol execution device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the steps of the diagnostic protocol execution method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the diagnostic protocol execution method as described in any one of claims 1 to 7.