Vehicle diagnostic method, device, diagnostic equipment and storage medium

By creating multiple task threads and logical channels in the diagnostic equipment, parallel communication and scanning diagnosis of the vehicle system are realized, and the problem of low diagnostic efficiency in the prior art is solved and the efficiency of vehicle diagnosis is improved.

CN113960984BActive Publication Date: 2025-04-01LAUNCH TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111251766.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-25
Publication Date
2025-04-01
Estimated Expiration
2041-10-25

AI Technical Summary

Technical Problem

Existing diagnostic equipment establishes a single communication channel with the vehicle through the on-board diagnostic terminal for scanning and diagnosis, resulting in low diagnostic efficiency.

Method used

By creating a specified number of task threads, logical channels are established with the vehicle system to be scanned in the target vehicle, and running these logical channels in parallel through multi-threading processing to achieve parallel communication and scanning diagnosis of multiple vehicle systems.

Benefits of technology

The efficiency of the scanning and diagnosis operation of the diagnostic equipment through the on-board diagnostic end is improved, and efficient scanning and diagnosis of the vehicle system is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113960984B_ABST
    Figure CN113960984B_ABST
Patent Text Reader

Abstract

The present application discloses a vehicle diagnostic method, a vehicle diagnostic device, a diagnostic equipment and a computer-readable storage medium. The method is applied to a diagnostic equipment, the diagnostic equipment is communicatively connected to an on-board diagnostic terminal, and the on-board diagnostic terminal is communicatively connected to a target vehicle; the method comprises: creating a specified number of task threads, wherein the specified number is not greater than the maximum number of logical channels supported by the on-board diagnostic terminal; in each task thread, establishing a logical channel for communicating with a vehicle system to be scanned in the target vehicle; scanning and diagnosing a specified number of vehicle systems to be scanned in the target vehicle through the specified number of logical channels respectively, and then detecting whether the target vehicle still has vehicle systems to be scanned; if so, returning to the step of creating a specified number of task threads and subsequent steps. The present application scheme improves the scanning diagnostic efficiency of the vehicle scanning diagnostic operation performed by the diagnostic equipment on the vehicle through the on-board diagnostic terminal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of vehicle diagnosis technology, and in particular, relates to a vehicle diagnosis method, a vehicle diagnosis device, a diagnosis equipment and a computer-readable storage medium. Background Art

[0002] As vehicles are equipped with more and more vehicle systems, in order to achieve orderly diagnosis of vehicles, diagnostic equipment is often required to scan the vehicle systems through the on-board diagnostic terminal to obtain the vehicle systems and corresponding fault codes. Currently, diagnostic equipment can usually only establish a single communication channel with the vehicle through the on-board diagnostic terminal to perform scanning diagnosis of the vehicle system, which leads to relatively low scanning diagnosis efficiency. Summary of the invention

[0003] The present application provides a vehicle diagnostic method, a vehicle diagnostic device, a diagnostic equipment and a computer-readable storage medium, which improve the scanning diagnostic efficiency of the scanning diagnostic operation performed by the diagnostic equipment through the on-board diagnostic terminal.

[0004] In a first aspect, the present application provides a vehicle diagnostic method, which is applied to a diagnostic device, the diagnostic device is communicatively connected to an on-board diagnostic terminal, and the on-board diagnostic terminal is communicatively connected to a target vehicle; the vehicle diagnostic method comprises:

[0005] Creating a specified number of task threads, wherein the specified number is not greater than the maximum number of logical channels supported by the on-board diagnostic terminal;

[0006] In each of the task threads, a logical channel is established for communicating with a vehicle system to be scanned in the target vehicle;

[0007] Scanning and diagnosing a specified number of vehicle systems to be scanned in the target vehicle through a specified number of the above-mentioned logical channels, respectively, wherein different logical channels correspond to different vehicle systems to be scanned;

[0008] After the scanning and diagnosis of the designated number of vehicle systems to be scanned through the designated number of logic channels is completed, detecting whether the target vehicle still has vehicle systems to be scanned;

[0009] If the target vehicle still has vehicle systems to be scanned, the process returns to the step of creating a specified number of task threads and subsequent steps.

[0010] Optionally, before creating the specified number of task threads, the vehicle diagnosis method further includes:

[0011] Get the maximum number of logical channels supported by the above on-board diagnostic terminal;

[0012] Obtaining the number of systems to be scanned of the target vehicle, wherein an initial value of the number of systems to be scanned is determined based on the target vehicle;

[0013] The specified number is determined according to the maximum number of logical channels and the number of systems to be scanned.

[0014] Optionally, determining the specified number according to the maximum number of logical channels and the number of systems to be scanned includes:

[0015] If the maximum number of logical channels is greater than or equal to the number of systems to be scanned, the number of systems to be scanned is determined to be the specified number;

[0016] If the maximum number of logical channels is less than the number of systems to be scanned, the maximum number of logical channels is determined to be the specified number.

[0017] Optionally, the obtaining of the maximum number of logical channels supported by the on-board diagnostic terminal includes:

[0018] Sending a first acquisition instruction to the on-board diagnostic terminal, wherein the first acquisition instruction is used to instruct the on-board diagnostic terminal to feedback the on-board diagnostic terminal model;

[0019] If it is determined based on the on-board diagnostic terminal model that the on-board diagnostic terminal belongs to a preset type, a second acquisition instruction is sent to the on-board diagnostic terminal, where the second acquisition instruction is used to indicate the maximum number of logical channels supported by the on-board diagnostic terminal feedback.

[0020] Optionally, the initial value of the number of systems to be scanned is determined by:

[0021] Obtain the model of the above target vehicle;

[0022] According to the above vehicle models, obtain the number of vehicle systems equipped on the corresponding highest-equipped vehicle;

[0023] The number of vehicle systems equipped in the highest-equipped vehicle is determined as the initial value of the number of systems to be scanned.

[0024] Optionally, the initial value of the number of systems to be scanned is determined by:

[0025] Obtaining identification information of the target vehicle;

[0026] The initial value of the number of systems to be scanned is obtained by querying the identification information.

[0027] Optionally, after scanning and diagnosing the specified number of vehicle systems to be scanned through the specified number of logic channels, the vehicle diagnosis method further includes:

[0028] Destroys the specified number of logical channels.

[0029] In a second aspect, the present application provides a vehicle diagnostic device, the vehicle diagnostic device is integrated in a diagnostic device, the diagnostic device is communicatively connected to an on-board diagnostic terminal, and the on-board diagnostic terminal is communicatively connected to a target vehicle; the vehicle diagnostic device comprises:

[0030] A creation module, used to create a specified number of task threads, wherein the specified number is not greater than the maximum number of logical channels supported by the on-board diagnostic terminal;

[0031] An establishing module, used for establishing, in each of the task threads, a logical channel for communicating with a vehicle system to be scanned in the target vehicle;

[0032] A scanning module, used for scanning and diagnosing a specified number of vehicle systems to be scanned in the target vehicle through a specified number of the above-mentioned logical channels, wherein different logical channels correspond to different vehicle systems to be scanned;

[0033] A detection module, used for detecting whether there are still vehicle systems to be scanned in the target vehicle after the scanning module has finished scanning and diagnosing the specified number of vehicle systems to be scanned through the specified number of logic channels;

[0034] The creation module is triggered to execute again when the detection module detects that the target vehicle still has a vehicle system to be scanned.

[0035] Optionally, the vehicle diagnostic device further includes:

[0036] A first acquisition module is used to acquire the maximum number of logical channels supported by the on-board diagnostic terminal;

[0037] A second acquisition module is used to acquire the number of systems to be scanned of the target vehicle, wherein an initial value of the number of systems to be scanned is determined based on the target vehicle;

[0038] The determination module is used to determine the specified number according to the maximum number of logical channels and the number of systems to be scanned.

[0039] Optionally, the determination module is specifically used to determine the number of systems to be scanned as the specified number if the maximum number of logical channels is greater than or equal to the number of systems to be scanned, and to determine the maximum number of logical channels as the specified number if the maximum number of logical channels is less than the number of systems to be scanned.

[0040] Optionally, the detection module includes:

[0041] An updating unit, configured to update the number of systems to be scanned based on the specified number;

[0042] The determination unit is used to determine that the target vehicle still has vehicle systems to be scanned if the updated number of systems to be scanned is greater than 0, and to determine that the target vehicle does not have vehicle systems to be scanned if the updated number of systems to be scanned is equal to 0.

[0043] Optionally, the first acquisition module includes:

[0044] A first instruction sending unit, used for sending a first acquisition instruction to the on-board diagnostic terminal, wherein the first acquisition instruction is used for instructing the on-board diagnostic terminal to feedback the on-board diagnostic terminal model;

[0045] The second instruction sending unit is used to send a second acquisition instruction to the above-mentioned on-board diagnostic terminal if it is determined that the above-mentioned on-board diagnostic terminal belongs to a preset type based on the above-mentioned on-board diagnostic terminal model, and the above-mentioned second acquisition instruction is used to indicate the maximum number of logical channels supported by the above-mentioned on-board diagnostic terminal feedback.

[0046] Optionally, the second acquisition module is also used to obtain the model of the target vehicle, obtain the number of vehicle systems equipped by the corresponding highest-equipped vehicle according to the model, and determine the number of vehicle systems equipped by the highest-equipped vehicle as the initial value of the number of systems to be scanned.

[0047] Optionally, the second acquisition module is further used to acquire identification information of the target vehicle, and obtain an initial value of the number of systems to be scanned based on the identification information.

[0048] Optionally, the vehicle diagnostic device further includes:

[0049] The destruction module is used to destroy the specified number of logical channels after the scanning module completes the scanning and diagnosis of the specified number of vehicle systems to be scanned through the specified number of logical channels.

[0050] In a third aspect, the present application provides a diagnostic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method of the first aspect when executing the computer program.

[0051] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method of the first aspect are implemented.

[0052] In a fifth aspect, the present application provides a computer program product, which includes a computer program. When the computer program is executed by one or more processors, it implements the steps of the method of the first aspect.

[0053] Compared with the prior art, the present application has the following beneficial effects: when the diagnostic device is connected to the target vehicle through the on-board diagnostic terminal, the diagnostic device can create a specified number of task threads, wherein the specified number is not greater than the maximum number of logical channels supported by the on-board diagnostic terminal, and then in each task thread, a logical channel for communicating with a vehicle system to be scanned in the target vehicle is established, and the specified number of vehicle systems to be scanned in the target vehicle are scanned and diagnosed respectively through the specified number of logical channels, and after the scanning and diagnosis is completed, it is detected whether there are still vehicle systems to be scanned in the target vehicle, and if there are still vehicle systems to be scanned in the target vehicle, the step of creating the specified number of task threads and subsequent steps are returned. In the above process, the diagnostic device can create a specified number of task threads according to the maximum number of logical channels supported by the on-board diagnostic terminal, and respectively establish logical channels in the acquired task threads, and based on the multi-threaded processing method, the logical channels in each task thread can be run in parallel, that is, the diagnostic device can communicate in parallel with the specified number of vehicle systems to be scanned in the target vehicle through the specified number of logical channels, thereby realizing efficient scanning and diagnosis of the vehicle system.

[0054] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0056] Figure 1 It is a schematic diagram of the implementation flow of the vehicle diagnostic method provided in the embodiment of the present application;

[0057] Figure 2 is a structural block diagram of a vehicle diagnostic device provided in an embodiment of the present application;

[0058] Figure 3 It is a schematic diagram of the structure of the diagnostic device provided in the embodiment of the present application. DETAILED DESCRIPTION

[0059] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0060] As vehicle manufacturers' R&D capabilities increase, more and more vehicle systems are equipped in vehicles. On the one hand, this provides car owners with a better car experience, but on the other hand, it also brings trouble to the diagnosis of the vehicle. This is because in order to achieve orderly diagnosis of the vehicle, the diagnostic equipment is often required to scan the vehicle system through the on-board diagnostic terminal to obtain the vehicle system and the corresponding fault code equipped by the vehicle. At present, the diagnostic equipment can usually only establish a single communication channel with the vehicle through the on-board diagnostic terminal to perform scanning diagnosis of the vehicle system, that is, the diagnostic equipment can only try to establish a connection with one vehicle system in the vehicle at the same time, which leads to a relatively low scanning diagnosis efficiency. Based on this, the present application proposes a vehicle diagnostic method, a vehicle diagnostic device, a diagnostic device and a computer-readable storage medium, which can improve the scanning diagnosis efficiency of the scanning diagnosis operation performed by the diagnostic equipment through the on-board diagnostic terminal. In order to illustrate the technical solution proposed in the present application, it is described below through specific embodiments.

[0061] The vehicle diagnostic method proposed in the embodiment of the present application is explained below. The vehicle diagnostic method is applied to a diagnostic device, and the diagnostic device is connected to the target vehicle through an on-board diagnostic terminal; that is, the above-mentioned diagnostic device is communicatively connected to the on-board diagnostic terminal, and the above-mentioned on-board diagnostic terminal is communicatively connected to the target vehicle. It can be understood that the on-board diagnostic terminal is the diagnostic box mentioned in daily life. Specifically, the diagnostic device can establish a communication connection with the on-board diagnostic terminal through wireless communication methods such as Bluetooth or wireless local area network (Wi-Fi); alternatively, the diagnostic device can also establish a communication connection with the on-board diagnostic terminal through wired communication methods such as data cables, which are not limited here. The on-board diagnostic terminal can establish a communication connection with the target vehicle through the on-board automatic diagnostic system (OnBoard Diagnostics, OBD) interface of the target vehicle.

[0062] See also Figure 1 , Figure 1 The implementation process of the vehicle diagnosis method is shown in detail as follows:

[0063] Step 101: Create a specified number of task threads.

[0064] In the embodiment of the present application, the diagnostic device can create a specified number of task threads. Considering that the diagnostic device establishes an indirect communication connection with the target vehicle through the on-board diagnostic terminal, the communication performance of the diagnostic device is affected to a certain extent by the on-board diagnostic terminal, and the influence is reflected in that the specified number should not be greater than the maximum number of logical channels supported by the on-board diagnostic terminal.

[0065] Step 102: In each of the task threads, a logical channel is established for communicating with a vehicle system to be scanned in the target vehicle.

[0066] In the embodiment of the present application, since the task threads are independent of each other, a logical channel can be established in each created task thread. It can be understood that each logical channel is obtained by the diagnostic device logically distinguishing a single communication channel. Since the target vehicle usually has multiple vehicle systems to be scanned, in order to achieve an orderly scan of the vehicle system of the target vehicle, each logical channel can only be used to communicate with one vehicle system to be scanned in the target vehicle. Thus, the diagnostic device can communicate with different vehicle systems of the target vehicle through different logical channels.

[0067] It is understandable that since different vehicle systems use different communication protocols, the corresponding communication parameters are also different. Therefore, each logical channel should set the communication parameters based on the communication protocol used by the corresponding vehicle system to be scanned (i.e., the corresponding vehicle system to be communicated). The communication parameters include hardware parameters and software parameters. As an example only, the hardware parameters refer to parameters such as pins and baud rates, and the software parameters refer to parameters such as filters (i.e., filter IDs).

[0068] Step 103 : Scan and diagnose a specified number of vehicle systems to be scanned in the target vehicle through a specified number of the above logic channels.

[0069] In the embodiment of the present application, it can be seen from step 102 that one logical channel is established corresponding to one vehicle system to be scanned. The diagnostic device can thus scan and diagnose a specified number of vehicle systems to be scanned in the target vehicle through a specified number of logical channels. For a vehicle system to be scanned, the scanning and diagnostic process can be:

[0070] The diagnostic device sends a data frame (recorded as a first data frame) requesting diagnosis to the vehicle system through a corresponding logical channel; if the data frame (recorded as a second data frame) used to indicate the diagnostic result and fed back by the vehicle system based on the first data frame can be received, it can be determined that the target vehicle is equipped with the vehicle system, and a diagnosis and analysis of possible problems with the vehicle system can be performed based on the second data frame; conversely, if the second data frame fed back by the vehicle system is not received after a preset timeout period, it can be determined that the target vehicle is not equipped with the vehicle system.

[0071] It should be noted that for different vehicle systems, the corresponding first data frames may be different due to the different communication protocols and communication addresses of the vehicle systems. In addition, the preset timeout periods may also be different for different vehicle systems, but the timeout periods corresponding to different vehicle systems should be within the same timeout setting range.

[0072] Step 104, after completing the scanning and diagnosis of the specified number of vehicle systems to be scanned through the specified number of logical channels, detect whether there are still vehicle systems to be scanned in the target vehicle. If so, return to step 101, if not, end the scanning and diagnosis of the vehicle systems of the target vehicle.

[0073] In the embodiment of the present application, since step 101 only creates a specified number of task threads, only a specified number of logical channels can be established in step 102; and since one logical channel corresponds to one vehicle system to be scanned, through steps 101-103, the diagnostic device can only perform synchronous scanning diagnosis on a specified number of vehicle systems to be scanned in the target vehicle at one time. In the case where there are many vehicle systems to be scanned in the target vehicle, it is possible that after this synchronous scanning diagnosis of the vehicle system, there are still vehicle systems to be scanned in the target vehicle. In this case, the execution of step 101 and subsequent steps should be returned to perform a new synchronous scanning diagnosis of the vehicle system. On the contrary, if after this synchronous scanning of the vehicle system, there are no vehicle systems to be scanned in the target vehicle, it can be determined that the scanning diagnosis operation of the vehicle system of the target vehicle has been completed, and the subsequent process can be started, such as the analysis process of each second data frame obtained.

[0074] In an embodiment of the present application, when the diagnostic device is connected to the target vehicle through the on-board diagnostic terminal, the diagnostic device can create a specified number of task threads, wherein the specified number is not greater than the maximum number of logical channels supported by the on-board diagnostic terminal, and then in each task thread, a logical channel for communicating with a vehicle system to be scanned in the target vehicle is established, and the specified number of vehicle systems to be scanned in the target vehicle are scanned and diagnosed respectively through the specified number of logical channels, and after the scanning and diagnosis is completed, it is detected whether there are still vehicle systems to be scanned in the target vehicle, and if there are still vehicle systems to be scanned in the target vehicle, the step of creating a specified number of task threads and subsequent steps are returned. In the above process, the diagnostic device can create a specified number of task threads according to the maximum number of logical channels supported by the on-board diagnostic terminal, and respectively establish logical channels in the acquired task threads, and based on the multi-threaded processing method, the logical channels in each task thread can be run in parallel, that is, the diagnostic device can communicate in parallel with the specified number of vehicle systems to be scanned in the target vehicle through the specified number of logical channels, thereby realizing efficient scanning and diagnosis of vehicle systems.

[0075] In some embodiments, the specified amount may be determined as follows:

[0076] A1. Obtain the maximum number of logical channels supported by the above-mentioned on-board diagnostic terminal.

[0077] After establishing a connection with the on-board diagnostic terminal, the diagnostic device may send a first acquisition instruction to the on-board diagnostic terminal, wherein the first acquisition instruction is used to instruct the on-board diagnostic terminal to feedback the on-board diagnostic terminal model. The diagnostic device may determine whether the on-board diagnostic terminal belongs to a preset type based on the on-board diagnostic terminal model, where the preset type refers to: an on-board diagnostic terminal type that supports multiple logical channels. When the on-board diagnostic terminal is determined to belong to the preset type based on the on-board diagnostic terminal model, a second acquisition instruction may be sent to the on-board diagnostic terminal, wherein the second acquisition instruction is used to instruct the on-board diagnostic terminal to feedback the maximum number of logical channels it supports.

[0078] As an example only, the diagnostic device may pre-store an on-board diagnostic terminal model information table, which records the support of different on-board diagnostic terminal models for the function of multiple logical channels; that is, the on-board diagnostic terminal model information table divides the on-board diagnostic terminal into two categories, one of which is supported; the other is not supported. After the diagnostic device obtains the on-board diagnostic terminal model of the on-board diagnostic terminal, it can determine whether the on-board diagnostic terminal supports the function of multiple logical channels based on the on-board diagnostic terminal model information table and the on-board diagnostic terminal model. If supported, it can be determined that the on-board diagnostic terminal belongs to the preset type.

[0079] A2. Obtain the number of systems to be scanned of the target vehicle.

[0080] In the embodiment of the present application, the number of systems to be scanned is used to indicate the number of vehicle systems to be scanned that are currently remaining in the target vehicle. Specifically, the initial value of the number of systems to be scanned can be determined based on the target vehicle.

[0081] In one application scenario, the initial value can be determined based on the model of the target vehicle. The process can be: obtain the model of the target vehicle, and then obtain the number of vehicle systems equipped with the corresponding highest-end vehicle based on the model, and determine the number as the initial value of the number of systems to be scanned. It can be understood that a vehicle system information table can be pre-configured, and the vehicle system information table records the vehicle systems equipped by the highest-end vehicles under all models currently circulating on the market. The vehicle system information table can be shown in Table 1 below:

[0082]

[0083] Table 1

[0084] For example, assuming that the model of the target vehicle 1 is A; by querying the vehicle system information table, it can be known that the vehicle systems equipped with the highest configuration vehicle under the A model are system a, system b, system c, system f, system g and system h, a total of 6; then for the target vehicle 1, the initial value of the number of systems to be scanned can be 6. In addition to determining the initial value of the number of systems to be scanned, in order to facilitate the task thread to perform scanning diagnosis operations, the communication protocols used by each vehicle system and their corresponding communication parameters can also be recorded in the vehicle system information table, which will not be repeated here.

[0085] In another application scenario, the initial value can also be determined based on the identification information of the target vehicle, and the process can be: obtaining the identification information of the target vehicle, and then querying and obtaining the initial value of the number of systems to be scanned based on the identification information. As an example only, the identification information can be a vehicle identification number (VIN). It can be understood that the vehicle identification number of the target vehicle is given when it leaves the factory. Therefore, the vehicle identification number can be used to query and obtain the exact number of vehicle systems equipped on the target vehicle, which can be used as the initial value of the number of systems to be scanned.

[0086] A3. Determine the specified number based on the maximum number of logical channels and the number of systems to be scanned.

[0087] The number of systems to be scanned can be understood as the demand for logical channels, and the maximum number of logical channels can be understood as the supply of logical channels. Then: when the maximum number of logical channels is greater than or equal to the number of systems to be scanned, it actually corresponds to a situation where supply is greater than or equal to demand, that is, the supply is sufficient at this time. At this time, the number of systems to be scanned can be determined as a specified number based on actual demand; conversely, when the maximum number of logical channels is less than the number of systems to be scanned, it actually corresponds to a situation where supply is less than demand, that is, the supply is insufficient at this time. At this time, the maximum supply can be used as the basis, and the maximum number of logical channels can be determined as a specified number.

[0088] For ease of understanding, the maximum number of logical channels may be recorded as max_logic_channel, the number of systems to be scanned may be recorded as max_system_num, and the specified number may be recorded as current_num.

[0089] When max_logic_channel≥max_system_num, the value of max_system_num may be assigned to current_num, that is, current_num=max_system_num.

[0090] When max_logic_channel<max_system_num, the value of max_logic_channel can be assigned to current_num, that is, current_num=max_logic_channel.

[0091] In some embodiments, for step 101, the diagnostic device may first create a thread pool. It is understandable that since the communication performance of the diagnostic device is limited by the on-board diagnostic terminal, the size of the thread pool may be set based on the maximum number of logics; that is, the diagnostic device may create a thread pool with a maximum number of threads of max_logic_channel. The diagnostic device may then directly obtain a specified number of task threads from the thread pool.

[0092] In some embodiments, each task thread has completed the scanning diagnosis task after completing the scanning diagnosis, that is, after obtaining the second data frame fed back by the corresponding vehicle system, or after determining that the target vehicle is not equipped with the corresponding vehicle system. In this regard, in order to save resources, after the scanning diagnosis of a specified number of vehicle systems to be scanned is completed through a specified number of logical channels, the logical channels may be destroyed and the task threads may be recycled. As an example only, the diagnostic device may uniformly destroy the logical channels of all task channels and uniformly recycle all task threads to the thread pool; or, after a task thread completes its task, the logical channel of the task thread may be immediately destroyed and the task thread may be recycled to the thread pool, which is not limited here.

[0093] In some embodiments, the number of systems to be scanned may be updated to detect whether the target vehicle still has vehicle systems to be scanned, specifically:

[0094] B1. Based on the specified number, the number of systems to be scanned is updated.

[0095] It can be understood that after step 103 is completed, the specified number is the number of vehicle systems scanned this time, that is, a specified number of vehicle systems have completed the scan. In this regard, the number of systems to be scanned needs to be updated, specifically:

[0096] max_system_num=max_system_num-current_num

[0097] That is, the number of systems to be scanned after the update can be obtained by subtracting the specified number from the number of systems to be scanned before the update.

[0098] B2. If the updated number of systems to be scanned is greater than 0, it is determined that the target vehicle still has vehicle systems to be scanned.

[0099] B3. If the updated number of systems to be scanned is equal to 0, it is determined that there is no vehicle system to be scanned for the target vehicle.

[0100] It should be noted that when the updated number of systems to be scanned is greater than 0, it can be determined that there are still vehicle systems to be scanned in the target vehicle, and the process will return to step 101. When returning to step 101, since the number of systems to be scanned has been updated, the designated number should also be updated. That is, when returning to step 101, the designated number required for a new scan diagnosis operation needs to be re-determined based on the maximum number of logical channels and the updated number of systems to be scanned.

[0101] In some embodiments, the diagnostic device can establish corresponding logical channels based on the order of vehicle systems equipped in the highest configuration vehicle under the model corresponding to the target vehicle shown in the vehicle system information table, so as to realize the orderly scanning of the vehicle systems to be scanned. In addition, after the scanning of a certain vehicle system is completed, the vehicle system can be marked to complete the transition from the vehicle system to be scanned to the vehicle system that has been scanned, so as to avoid repeated scanning.

[0102] As can be seen from the above, through the embodiments of the present application, the diagnostic device can obtain a specified number of task threads according to the maximum number of logical channels supported by the on-board diagnostic terminal, and respectively establish logical channels in the acquired task threads. Based on the multi-threaded processing method, the logical channels in each task thread can run in parallel, that is, the diagnostic device can communicate in parallel with a specified number of vehicle systems to be scanned in the target vehicle through a specified number of logical channels, thereby realizing efficient scanning diagnosis of the vehicle system.

[0103] Corresponding to the vehicle diagnostic method provided above, the embodiment of the present application further provides a vehicle diagnostic device. The vehicle diagnostic device is integrated into a diagnostic device, the diagnostic device is connected to the on-board diagnostic terminal, and the on-board diagnostic terminal is connected to the target vehicle; see Figure 2 , Figure 2 The structural block diagram of the vehicle diagnostic device is given. Figure 2 As shown, the vehicle diagnostic device 200 includes:

[0104] A creation module 201 is used to create a specified number of task threads, wherein the specified number is not greater than the maximum number of logical channels supported by the on-board diagnostic terminal;

[0105] An establishing module 202, used for establishing, in each of the task threads, a logical channel for communicating with a vehicle system to be scanned in the target vehicle;

[0106] The scanning module 203 is used to scan and diagnose a specified number of vehicle systems to be scanned in the target vehicle through a specified number of the above-mentioned logical channels, wherein different logical channels correspond to different vehicle systems to be scanned;

[0107] A detection module 204, configured to detect whether the target vehicle still has a vehicle system to be scanned after the scanning module has finished scanning and diagnosing the specified number of vehicle systems to be scanned through the specified number of logical channels;

[0108] The creation module 201 is triggered to execute again when the detection module 204 detects that the target vehicle still has a vehicle system to be scanned.

[0109] Optionally, the vehicle diagnostic device 200 further includes:

[0110] A first acquisition module is used to acquire the maximum number of logical channels supported by the on-board diagnostic terminal;

[0111] A second acquisition module is used to acquire the number of systems to be scanned of the target vehicle, wherein an initial value of the number of systems to be scanned is determined based on the target vehicle;

[0112] The determination module is used to determine the specified number according to the maximum number of logical channels and the number of systems to be scanned.

[0113] Optionally, the determination module is specifically used to determine the number of systems to be scanned as the specified number if the maximum number of logical channels is greater than or equal to the number of systems to be scanned, and to determine the maximum number of logical channels as the specified number if the maximum number of logical channels is less than the number of systems to be scanned.

[0114] Optionally, the first acquisition module includes:

[0115] A first instruction sending unit, used for sending a first acquisition instruction to the on-board diagnostic terminal, wherein the first acquisition instruction is used for instructing the on-board diagnostic terminal to feedback the on-board diagnostic terminal model;

[0116] The second instruction sending unit is used to send a second acquisition instruction to the above-mentioned on-board diagnostic terminal if it is determined that the above-mentioned on-board diagnostic terminal belongs to a preset type based on the above-mentioned on-board diagnostic terminal model, and the above-mentioned second acquisition instruction is used to indicate the maximum number of logical channels supported by the above-mentioned on-board diagnostic terminal feedback.

[0117] Optionally, the second acquisition module is also used to obtain the model of the target vehicle, obtain the number of vehicle systems equipped by the corresponding highest-equipped vehicle according to the model, and determine the number of vehicle systems equipped by the highest-equipped vehicle as the initial value of the number of systems to be scanned.

[0118] Optionally, the second acquisition module is further used to acquire identification information of the target vehicle, and obtain an initial value of the number of systems to be scanned based on the identification information.

[0119] Optionally, the vehicle diagnostic device 200 further includes:

[0120] The destruction module is used to destroy the specified number of logical channels after the scanning module completes the scanning and diagnosis of the specified number of vehicle systems to be scanned through the specified number of logical channels.

[0121] As can be seen from the above, through the embodiments of the present application, the vehicle diagnostic device can obtain a specified number of task threads according to the maximum number of logical channels supported by the on-board diagnostic terminal, and respectively establish logical channels in the acquired task threads. Based on the multi-threaded processing method, the logical channels in each task thread can run in parallel, that is, the diagnostic equipment can communicate in parallel with a specified number of vehicle systems to be scanned in the target vehicle through a specified number of logical channels, thereby realizing efficient scanning diagnosis of the vehicle system.

[0122] Corresponding to the vehicle diagnostic method provided above, the present application embodiment also provides a diagnostic device. Figure 3 The diagnostic device 3 in the embodiment of the present application includes: a memory 301, one or more processors 302 ( Figure 3 Only one is shown) and a computer program stored in the memory 301 and executable on the processor. Among them: the memory 301 is used to store software programs and units, and the processor 302 executes various functional applications and diagnoses by running the software programs and units stored in the memory 301 to obtain the resources corresponding to the above-mentioned preset events. Specifically, after the diagnostic device 3 is connected to the on-board diagnostic terminal in communication, and the on-board diagnostic terminal is connected to the target vehicle in communication, the processor 302 implements the following steps by running the above-mentioned computer program stored in the memory 301:

[0123] Creating a specified number of task threads, wherein the specified number is not greater than the maximum number of logical channels supported by the on-board diagnostic terminal;

[0124] In each of the task threads, a logical channel is established for communicating with a vehicle system to be scanned in the target vehicle;

[0125] Scanning and diagnosing a specified number of vehicle systems to be scanned in the target vehicle through a specified number of the above-mentioned logical channels, respectively, wherein different logical channels correspond to different vehicle systems to be scanned;

[0126] After the scanning and diagnosis of the designated number of vehicle systems to be scanned through the designated number of logic channels is completed, detecting whether the target vehicle still has vehicle systems to be scanned;

[0127] If the target vehicle still has vehicle systems to be scanned, the process returns to the step of creating a specified number of task threads and subsequent steps.

[0128] Assuming that the above is the first possible implementation, in a second possible implementation provided based on the first possible implementation, before creating the specified number of task threads, the processor 302 further implements the following steps when running the computer program stored in the memory 301:

[0129] Get the maximum number of logical channels supported by the above on-board diagnostic terminal;

[0130] Obtaining the number of systems to be scanned of the target vehicle, wherein an initial value of the number of systems to be scanned is determined based on the target vehicle;

[0131] The specified number is determined according to the maximum number of logical channels and the number of systems to be scanned.

[0132] In a third possible implementation manner provided on the basis of the second possible implementation manner, determining the specified number according to the maximum number of logical channels and the number of systems to be scanned includes:

[0133] If the maximum number of logical channels is greater than or equal to the number of systems to be scanned, the number of systems to be scanned is determined to be the specified number;

[0134] If the maximum number of logical channels is less than the number of systems to be scanned, the maximum number of logical channels is determined to be the specified number.

[0135] In a fourth possible implementation manner provided on the basis of the second possible implementation manner, the obtaining of the maximum number of logical channels supported by the on-board diagnostic terminal includes:

[0136] Sending a first acquisition instruction to the on-board diagnostic terminal, wherein the first acquisition instruction is used to instruct the on-board diagnostic terminal to feedback the on-board diagnostic terminal model;

[0137] If it is determined based on the on-board diagnostic terminal model that the on-board diagnostic terminal belongs to a preset type, a second acquisition instruction is sent to the on-board diagnostic terminal, where the second acquisition instruction is used to indicate the maximum number of logical channels supported by the on-board diagnostic terminal feedback.

[0138] In a fifth possible implementation provided on the basis of the second possible implementation, the processor 302 further implements the following steps when running the computer program stored in the memory 301:

[0139] Obtain the model of the above target vehicle;

[0140] According to the above vehicle models, obtain the number of vehicle systems equipped on the corresponding highest-equipped vehicle;

[0141] The number of vehicle systems equipped in the highest-equipped vehicle is determined as the initial value of the number of systems to be scanned.

[0142] In a sixth possible implementation provided on the basis of the second possible implementation, the processor 302 further implements the following steps when running the computer program stored in the memory 301:

[0143] Obtaining identification information of the target vehicle;

[0144] The initial value of the number of systems to be scanned is obtained by querying the identification information.

[0145] In a seventh possible implementation provided based on the first possible implementation, after scanning and diagnosing the specified number of vehicle systems to be scanned through the specified number of logical channels, the processor 302 further implements the following steps when running the computer program stored in the memory 301:

[0146] Destroys the specified number of logical channels.

[0147] It should be understood that in the embodiment of the present application, the processor 302 may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0148] The memory 301 may include a read-only memory and a random access memory, and provide instructions and data to the processor 302. A part or all of the memory 301 may also include a non-volatile random access memory. For example, the memory 301 may also store information of a device category.

[0149] As can be seen from the above, through the embodiments of the present application, the diagnostic device can obtain a specified number of task threads according to the maximum number of logical channels supported by the on-board diagnostic terminal, and respectively establish logical channels in the acquired task threads. Based on the multi-threaded processing method, the logical channels in each task thread can run in parallel, that is, the diagnostic device can communicate in parallel with a specified number of vehicle systems to be scanned in the target vehicle through a specified number of logical channels, thereby realizing efficient scanning diagnosis of the vehicle system.

[0150] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the above-mentioned device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0151] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0152] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of external device software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0153] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the system embodiments described above are merely schematic. For example, the division of the above modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0154] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0155] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the associated hardware through a computer program. The above-mentioned computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the above-mentioned computer program includes computer program code, and the above-mentioned computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The above-mentioned computer-readable storage medium may include: any entity or device capable of carrying the above-mentioned computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer-readable memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the above-mentioned computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable storage media does not include electrical carrier signals and telecommunication signals.

[0156] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A vehicle diagnostic method, characterized in that: Applied to a diagnostic device, the diagnostic device is communicatively connected to an on-board diagnostic terminal, and the on-board diagnostic terminal is communicatively connected to a target vehicle; the vehicle diagnostic method comprises: Creating a specified number of task threads, wherein the specified number is not greater than the maximum number of logical channels supported by the on-board diagnostic terminal; wherein the method for determining the specified number comprises: obtaining the maximum number of logical channels supported by the on-board diagnostic terminal; Acquire the number of systems to be scanned of the target vehicle, wherein an initial value of the number of systems to be scanned is determined based on the target vehicle; Determine the designated number according to the maximum number of logical channels and the number of systems to be scanned; if the maximum number of logical channels is greater than or equal to the number of systems to be scanned, determine the number of systems to be scanned as the designated number; If the maximum number of logical channels is less than the number of systems to be scanned, determining the maximum number of logical channels to be the specified number; In each of the task threads, a logical channel for communicating with a vehicle system to be scanned in the target vehicle is established; wherein each logical channel is obtained by logically distinguishing a single communication channel by the diagnostic device; each logical channel can only be used to communicate with a vehicle system to be scanned in the target vehicle; each logical channel sets communication parameters based on the communication protocol adopted by the corresponding vehicle system to be scanned, and the communication parameters include hardware parameters and software parameters; Scanning and diagnosing a specified number of vehicle systems to be scanned in the target vehicle through a specified number of the logic channels, respectively, wherein different logic channels correspond to different vehicle systems to be scanned; After scanning and diagnosing the designated number of vehicle systems to be scanned through the designated number of logic channels, detecting whether the target vehicle still has vehicle systems to be scanned; If the target vehicle still has vehicle systems to be scanned, the process returns to executing the step of creating a specified number of task threads and subsequent steps.

2. The vehicle diagnostic method according to claim 1, characterized in that: The obtaining of the maximum number of logical channels supported by the on-board diagnostic terminal includes: Sending a first acquisition instruction to the on-board diagnostic terminal, wherein the first acquisition instruction is used to instruct the on-board diagnostic terminal to feedback the on-board diagnostic terminal model; If it is determined based on the on-board diagnostic terminal model that the on-board diagnostic terminal belongs to a preset type, a second acquisition instruction is sent to the on-board diagnostic terminal, where the second acquisition instruction is used to instruct the on-board diagnostic terminal to feedback a maximum number of logical channels supported.

3. The vehicle diagnostic method according to claim 1, characterized in that: The initial value of the number of systems to be scanned is determined by: Obtaining the model of the target vehicle; According to the vehicle model, the number of vehicle systems equipped by the corresponding highest-equipped vehicle is obtained; The number of vehicle systems equipped in the highest configuration vehicle is determined as an initial value of the number of systems to be scanned.

4. The vehicle diagnostic method according to claim 1, characterized in that: The initial value of the number of systems to be scanned is determined by: Obtaining identification information of the target vehicle; An initial value of the number of systems to be scanned is obtained by querying the identification information.

5. The vehicle diagnostic method according to claim 1, characterized in that: After scanning and diagnosing the specified number of vehicle systems to be scanned through the specified number of logic channels, the vehicle diagnosis method further includes: Destroys the specified number of logical channels.

6. A vehicle diagnostic device, characterized in that: The vehicle diagnostic device is integrated in a diagnostic device, the diagnostic device is communicatively connected to an on-board diagnostic terminal, and the on-board diagnostic terminal is communicatively connected to a target vehicle; the vehicle diagnostic device comprises: A creation module, used for creating a specified number of task threads, wherein the specified number is not greater than the maximum number of logical channels supported by the on-board diagnostic terminal; wherein the method for determining the specified number comprises: obtaining the maximum number of logical channels supported by the on-board diagnostic terminal; Acquire the number of systems to be scanned of the target vehicle, wherein an initial value of the number of systems to be scanned is determined based on the target vehicle; Determine the designated number according to the maximum number of logical channels and the number of systems to be scanned; if the maximum number of logical channels is greater than or equal to the number of systems to be scanned, determine the number of systems to be scanned as the designated number; If the maximum number of logical channels is less than the number of systems to be scanned, determining the maximum number of logical channels to be the specified number; An establishment module is used to establish, in each of the task threads, a logical channel for communicating with a vehicle system to be scanned in the target vehicle; wherein each logical channel is obtained by the diagnostic device logically distinguishing a single communication channel; each logical channel can only be used to communicate with a vehicle system to be scanned in the target vehicle; each logical channel sets communication parameters based on the communication protocol adopted by the corresponding vehicle system to be scanned, and the communication parameters include hardware parameters and software parameters; A scanning module, used for scanning and diagnosing a specified number of vehicle systems to be scanned in the target vehicle through a specified number of the logic channels, wherein different logic channels correspond to different vehicle systems to be scanned; A detection module, used for detecting whether the target vehicle still has a vehicle system to be scanned after the scanning module has finished scanning and diagnosing the specified number of vehicle systems to be scanned through the specified number of logic channels; The creation module is triggered to execute again when the detection module detects that the target vehicle still has a vehicle system to be scanned.

7. A diagnostic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 5 is implemented.

8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Scanning method for electronic control unit in vehicle and vehicle diagnostic device thereof

    CN109407656A