Vehicle diagnostic method, device, electronic device and storage medium
By displaying the preset function menu and the system module list in the vehicle diagnostic program, and calling the matching interface function to perform the diagnostic function, the problems of poor applicability and high coupling of existing diagnostic programs are solved, and the flexible and convenient modification process is achieved. .
Patent Information
- Application Number
- CN202110416420.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-19
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2041-04-19
AI Technical Summary
The existing diagnostic programs have poor applicability and relatively high coupling between the program and menu items, so the modification of the program is complicated.
The preset function menu list is displayed by detecting the selection command of the target vehicle model, the preset system module list is displayed by detecting the selection command of the target function menu item, and the target interface function matching the target system module is called to perform the diagnostic function.
It realizes flexible adaptation to changes in external diagnostic logic, good applicability, reduces the coupling between menu items and programs, and simplifies the program modification process.
Smart Images

Figure CN113110994B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of vehicle technology, and in particular, relates to a vehicle diagnosis method, device, electronic equipment and storage medium. Background Art
[0002] With the continuous and rapid development of society, the number of cars is increasing, and the safety of cars is becoming more and more important. In order to improve the safety of cars, the vehicle status is usually monitored and faults are diagnosed based on diagnostic software.
[0003] At present, the diagnostic program for executing the corresponding function in the diagnostic software first selects the vehicle model and displays the system module list menu corresponding to the vehicle model. Each type of vehicle model may contain multiple system modules (such as EMS: Engine Management System (EMS), Body Control Module (BCM), Ignition Control Module (ICM), etc.); then select the system module menu item to enter the system module. After entering the system module, specific function menu items will be listed. The function menus corresponding to each system module will be repeated, and each function menu item is fixedly bound to an interface function. The diagnostic program has poor applicability and the coupling between the program and the menu items is relatively high, and the modification of the program is cumbersome. Summary of the invention
[0004] The embodiments of the present application provide a vehicle diagnostic method, device, electronic device and storage medium, which are intended to solve the problems that existing diagnostic programs have poor applicability, are highly coupled with menu items, and require cumbersome program modifications.
[0005] In a first aspect, an embodiment of the present application provides a vehicle diagnosis method, comprising:
[0006] When a selection instruction of a target vehicle type is detected, a preset function menu list corresponding to the target vehicle type is displayed;
[0007] When a selection instruction of a target function menu item is detected, a list of preset system modules corresponding to the target function menu item is displayed;
[0008] When a subscription instruction of a target system module is detected, a target interface function matching the target system module is called;
[0009] Executing a diagnostic function corresponding to the target function menu item on the target system module through the target interface function;
[0010] The target function menu item is selected from the preset function menu list, and the target system module is selected from the preset system module list.
[0011] In one embodiment, each diagnostic function is pre-compiled into a separate dynamic link library; each of the dynamic link libraries encapsulates a plurality of system modules for implementing interface functions of the corresponding diagnostic function; each function menu item in the preset function menu list is associated with the corresponding dynamic link library; after the selection instruction of the target function menu item is detected, the method includes:
[0012] Finding a target dynamic link library corresponding to the target function menu item;
[0013] Accordingly, the calling of the target interface function matching the target system module includes:
[0014] A target interface function matching the target system module is called from the target dynamic link library.
[0015] In one embodiment, when the subscription instruction of the target system module is detected, calling the target interface function matching the target system module includes:
[0016] When a subscription instruction of a target system module is detected, parsing the subscription instruction;
[0017] If it is parsed that the subscription instruction includes identification information of multiple target system modules, determining the execution order of the multiple target system modules;
[0018] According to the execution order, calling the target interface functions corresponding to the plurality of target system modules respectively in sequence;
[0019] Correspondingly, executing the diagnostic function corresponding to the target function menu item on the target system module through the target interface function includes:
[0020] According to the execution order, the diagnostic function corresponding to the target function menu item is executed on each target system module in turn through each target interface function.
[0021] In one embodiment, the subscription instruction includes a first subscription instruction and a second subscription instruction;
[0022] When the subscription instruction of the target system module is detected, the target interface function matching the target system module is called, including:
[0023] When a first subscription instruction of a target system module is detected, a preset logic module list corresponding to a target interface function matching the target system module is displayed; wherein the first subscription instruction includes identification information of the target system module;
[0024] When a second subscription instruction of a target logic module is detected, a logic function corresponding to the target logic module is called and written into the target interface function; wherein the target logic module is selected from the preset logic module list, and the second subscription instruction includes identification information of the target logic module;
[0025] Correspondingly, executing the diagnostic function corresponding to the target function menu item on the target system module through the target interface function includes:
[0026] The target interface function is executed according to the logic function corresponding to the target logic module, so as to implement the diagnostic function corresponding to the target function menu item on the target system module.
[0027] In one embodiment, the method further comprises: if a selection instruction of a target function menu item is detected, obtaining a default subscription instruction corresponding to the target function menu item; wherein the default subscription instruction is a historical subscription instruction or a pre-specified subscription instruction; the default subscription instruction includes identification information of a target system module;
[0028] A target interface function matching the target system module is called, and a diagnostic function corresponding to the target function menu item is executed on the target system module through the target interface function.
[0029] In one embodiment, the method further includes: when a modification instruction for the default subscription instruction is received, changing the identification information of the original target system module of the default subscription instruction to the identification information of the new target system module according to the modification instruction; wherein the modification instruction includes the identification information of the new target system module.
[0030] In one embodiment, determining the execution order of the plurality of target system modules includes: determining the execution order as the selection order of the plurality of target system modules selected by the user in the preset system module list.
[0031] In a second aspect, an embodiment of the present application provides a vehicle diagnostic device, including:
[0032] A first display module, for displaying a preset function menu list corresponding to a target vehicle type when a selection instruction of the target vehicle type is detected;
[0033] A second display module, configured to display a list of preset system modules corresponding to a target function menu item when a selection instruction of the target function menu item is detected;
[0034] A calling module, configured to call a target interface function matching the target system module when a subscription instruction of the target system module is detected;
[0035] An execution module, used for executing a diagnostic function corresponding to the target function menu item on the target system module through the target interface function;
[0036] The target function menu item is selected from the preset function menu list, and the target system module is selected from the preset system module list.
[0037] In one embodiment, each diagnostic function is pre-compiled into a separate dynamic link library; each of the dynamic link libraries encapsulates a plurality of system modules for implementing interface functions of the corresponding diagnostic function; each function menu item in the preset function menu list is associated with the corresponding dynamic link library;
[0038] The diagnostic device also includes:
[0039] A search module, configured to search for a target dynamic link library corresponding to the target function menu item after detecting a selection instruction of the target function menu item;
[0040] Correspondingly, the calling module is specifically used to: when a subscription instruction of a target system module is detected, call a target interface function matching the target system module from the target dynamic link library.
[0041] In one embodiment, the calling module includes:
[0042] A parsing unit, configured to parse a subscription instruction of a target system module when a subscription instruction is detected;
[0043] a determining unit, configured to determine the execution order of the plurality of target system modules if it is parsed that the subscription instruction includes identification information of the plurality of target system modules;
[0044] A first calling unit, configured to call target interface functions corresponding to the plurality of target system modules in sequence according to the execution order;
[0045] Correspondingly, the execution module is specifically used to: execute the diagnostic function corresponding to the target function menu item on each target system module in turn through each target interface function according to the execution order.
[0046] In one embodiment, the subscription instruction includes a first subscription instruction and a second subscription instruction; the calling module includes:
[0047] A display unit, configured to display a preset logic module list corresponding to a target interface function matching the target system module when a first subscription instruction of the target system module is detected; wherein the first subscription instruction includes identification information of the target system module;
[0048] A second calling unit is configured to, when detecting a second subscription instruction of a target logic module, call a logic function corresponding to the target logic module and write it into the target interface function; wherein the target logic module is selected from the preset logic module list, and the second subscription instruction includes identification information of the target logic module;
[0049] Correspondingly, the execution module is specifically used to: execute the target interface function according to the logic function corresponding to the target logic module, so as to implement the diagnostic function corresponding to the target function menu item on the target system module.
[0050] In one embodiment, the diagnostic device further comprises:
[0051] an acquisition module, configured to acquire a default subscription instruction corresponding to the target function menu item if a selection instruction of the target function menu item is detected; wherein the default subscription instruction is a historical subscription instruction or a pre-specified subscription instruction; and the default subscription instruction includes identification information of the target system module;
[0052] The execution module is used to call the target interface function matching the target system module, and execute the diagnostic function corresponding to the target function menu item on the target system module through the target interface function.
[0053] In one embodiment, the diagnostic device further comprises:
[0054] A modification module is used to change the identification information of the original target system module of the default subscription instruction to the identification information of the new target system module according to the modification instruction when a modification instruction for the default subscription instruction is received; wherein the modification instruction includes the identification information of the new target system module.
[0055] In one embodiment, the determining unit is specifically configured to: if it is parsed that the subscription instruction includes identification information of multiple target system modules, determine the selection order of the multiple target system modules selected by the user in the preset system module list as the execution order.
[0056] In a third aspect, an embodiment of the present application provides an electronic 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 above-mentioned vehicle diagnostic method when executing the computer program.
[0057] In a fourth aspect, an embodiment of 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 vehicle diagnostic method are implemented.
[0058] In a fifth aspect, an embodiment of the present application provides a computer program product, which, when executed on an electronic device, enables the electronic device to execute the steps of the above-mentioned vehicle diagnostic method.
[0059] The beneficial effects of the embodiments of the present application compared with the prior art are as follows: when the embodiments of the present application detects a selection instruction for a target vehicle model, a preset function menu list corresponding to the target vehicle model is displayed, and the target function menu item can be directly selected according to the displayed preset function menu list. According to the subscription instruction, the target interface function matching the target system module is called. The system modules selected by the subscription instruction are different, and the called interface function will also be different. Therefore, a function menu item will not be bound to a fixed interface function. It can flexibly adapt to changes in external diagnostic logic and has good applicability, so that the coupling between the menu item and the program is low, and the modification of the program or menu item is convenient. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] 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 merely 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.
[0061] Figure 1 is a flow chart of a vehicle diagnostic method provided in Example 1 of the present application;
[0062] Figure 2 is a flow chart of a vehicle diagnostic method provided in Embodiment 2 of the present application;
[0063] Figure 3 is a flow chart of a vehicle diagnostic method provided in Embodiment 3 of the present application;
[0064] Figure 4 is a flow chart of a vehicle diagnostic method provided in Embodiment 4 of the present application;
[0065] Figure 5 is a flow chart of a vehicle diagnostic method provided in Embodiment 5 of the present application;
[0066] Figure 6 is a schematic diagram of the structure of a vehicle diagnostic device provided in Example 6 of the present application;
[0067] Figure 7 It is a structural diagram of an electronic device provided in Example 7 of the present application. DETAILED DESCRIPTION
[0068] In the following description, specific details such as specific system module 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 system modules, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0069] The vehicle diagnostic method provided in the embodiment of the present application can be applied to an electronic device, wherein the electronic device is communicatively connected to a target vehicle, and the electronic device is connected to an on-board diagnostic system module in the target vehicle by wire or wireless connection, thereby achieving a communication connection between the electronic device and the vehicle. Specifically, the vehicle diagnostic method can be implemented by application software in the electronic device, and the electronic device can be a diagnostic instrument, diagnostic equipment, mobile phone, tablet computer, laptop computer, netbook, personal digital assistant (PDA) and other terminals. The embodiment of the present application does not impose any restrictions on the specific type of the electronic device.
[0070] In order to illustrate the technical solution described in this application, a specific embodiment is provided below.
[0071] Embodiment 1
[0072] See also Figure 1 , shows a schematic flow chart of a vehicle diagnostic method provided by an embodiment of the present application, the method comprising:
[0073] Step S101, when a selection instruction of a target vehicle type is detected, a preset function menu list corresponding to the target vehicle type is displayed.
[0074] Specifically, when it is detected that the user inputs the target vehicle model information, or the vehicle identification code of the target vehicle connected to the electronic device is automatically obtained, and the vehicle model information of the target vehicle (which may be referred to as the target vehicle model) is parsed according to the vehicle identification code, a preset function menu list corresponding to the target vehicle model is displayed. After selecting the vehicle model, the system module menu is no longer listed, but the function menu is directly listed, which can reduce the operation of displaying the system module for selection, avoid the appearance of repeated interfaces, and the user can perform corresponding operations on the function menu.
[0075] Step S102: when a selection instruction of a target function menu item is detected, a preset system module list corresponding to the target function menu item is displayed.
[0076] Specifically, the target function menu item is selected from the preset function menu list. When an operation of selecting a function menu item from the preset function menu list is detected, it is determined that a selection instruction of the target function menu item is detected, and the selected function menu item is referred to as the target function menu item. When the selection instruction of the target function menu item is detected, a preset system module list corresponding to the target function menu item is displayed, and the preset system module list includes identification information of all system modules associated with the target function menu item.
[0077] In one application scenario, for example, the selection instruction of a target function menu item can be obtained by selecting the target function menu item and displaying a preset system module list corresponding to the target function menu item. The list can be a pop-up box or a menu displaying all system modules pre-associated with the target function menu item, so that the user can select a specific system module.
[0078] Step S103: when a subscription instruction of a target system module is detected, a target interface function matching the target system module is called.
[0079] Specifically, the target system module is selected from the preset system module list. After the preset system module list corresponding to the target function menu item is displayed, when a selection operation on a specific system module selected from the preset system module list is detected, it is determined that a subscription instruction of the target system module is detected. Since the target function menu item may correspond to multiple system modules and multiple interface functions, when a subscription instruction of the target system module is detected, an interface function matching the target system module may be called in the interface function corresponding to the target function menu item, and the interface function matching the target system module is referred to as a target interface function.
[0080] Step S104: executing a diagnostic function corresponding to the target function menu item on the target system module through the target interface function.
[0081] Specifically, the diagnostic function corresponding to the target function menu item can be executed through the target interface function corresponding to the target system module. For example, the user can change the specific type of the selected target system module through the subscription instruction, and the target interface function will also change accordingly. Therefore, the target function menu item is not bound to a fixed interface function, and can flexibly adapt to changes in external diagnostic logic. It has good applicability, low coupling, and high convenience in modifying programs or menu items.
[0082] In an application scenario, when a selection instruction of a target vehicle model is detected, a preset function menu list corresponding to the target vehicle model is displayed. For example, in the preset function menu list, the user can right-click to select the target function menu item, and a pop-up box or menu will display all system modules pre-associated with the target function menu item. The user can select a specific system module. When the selected specific system module is detected, it is determined that the subscription instruction of the target function menu item is detected, and the system module selected by the user is called the target system module. In the interface function corresponding to the target function menu item, the interface function matching the target system module is called, so that the interface function matching the target system module and the target function menu item can be determined. For example, if the target management system is EMS, the target function menu item is to flash the ECU, and the target interface function is: an interface function for the diagnostic function of the ECU flash in the EMS.
[0083] When the embodiment of the present application detects a selection instruction for a target vehicle model, a preset function menu list corresponding to the target vehicle model is displayed. The target function menu item can be directly selected according to the displayed preset function menu list. According to the subscription instruction, the target interface function matching the target system module is called. The system modules selected by the subscription instruction are different, and the called interface function will also be different. Therefore, a function menu item will not be bound to a fixed interface function. The embodiment of the present application can flexibly adapt to changes in external diagnostic logic and has good applicability, so that the coupling between the menu item and the program is low, and the modification of the program or menu item is convenient.
[0084] Embodiment 2
[0085] This embodiment is a further explanation of the first embodiment. For details of the same or similar parts as the first embodiment, please refer to the relevant description of the first embodiment, which will not be repeated here. Each diagnostic function is pre-compiled into a separate dynamic link library; each of the dynamic link libraries encapsulates multiple system modules for implementing the interface functions of the corresponding diagnostic function; each function menu item in the preset function menu list is associated with the corresponding dynamic link library; the implementation of the function corresponding to the diagnostic function and the call of the function can be separated in advance, and the diagnostic function programs corresponding to the same function in different system modules are pre-encapsulated into the same dynamic link library, that is, one dynamic link library includes multiple diagnostic function programs with the same function but from different system modules, and each diagnostic function program has an interface function for external calls, and the corresponding diagnostic function can be executed through the interface function.
[0086] like Figure 2 As shown, after the selection instruction of the target function menu item is detected, step S203 is also included, and the corresponding step S103 includes step S204. The vehicle diagnosis method in this embodiment includes:
[0087] Step S201, when a selection instruction of a target vehicle type is detected, a preset function menu list corresponding to the target vehicle type is displayed.
[0088] Specifically, for the parts where step S201 is identical or similar to the above-mentioned step S101, please refer to the relevant description of step S101, which will not be repeated here.
[0089] Step S202: when a selection instruction of a target function menu item is detected, a preset system module list corresponding to the target function menu item is displayed.
[0090] Specifically, the parts where step S202 is identical or similar to the above-mentioned step S102 can be specifically referred to the relevant description of step S102, which will not be repeated here.
[0091] Step S203, searching for a target dynamic link library corresponding to the target function menu item.
[0092] Specifically, since each function menu item is associated with a dynamic link library in advance, after detecting the subscription instruction of the target function menu item, the target dynamic link library corresponding to the target function menu item is searched. For example, if function menu item A is for flashing the ECU, the corresponding dynamic link library includes the interface functions of multiple system modules (such as EMS, BCM, ICM, etc.) for flashing the ECU, and function menu item B is for clearing fault codes of the EUC, and the corresponding dynamic link library includes the interface functions of multiple system modules (such as EMS, BCM, ICM, etc.) for clearing fault codes of the ECU.
[0093] Step S204, when a subscription instruction of a target system module is detected, a target interface function matching the target system module is called from the target dynamic link library.
[0094] Specifically, the above-mentioned calling of the target interface function matching the target system module may be: calling the target interface function matching the target system module from the target dynamic link library. When the user inputs the subscription instruction of the target function menu item, the target system module is subscribed according to the subscription instruction, and the interface functions of multiple system modules are pre-packaged in the target dynamic link library. The target system module is subscribed according to the subscription instruction, and the target interface function matching the target system module is called from the target dynamic link library.
[0095] In one embodiment, the identification information of each interface function in each dynamic link library and the identification information of the corresponding system module can be first associated into a key-value pair for storage, the key value in the key-value pair represents the identification information of the interface function, and the key name in the key-value pair represents the identification information of the system module; the interface function in each dynamic link library and the identification information of the system module corresponding to the interface function are pre-associated into a key-value pair for storage, which can be specifically stored through a map data structure. The key-value pair includes a key value (also called a value or value) and a key name (also called a key or key), with the identification information of the interface function as the key value and the identification information of the system module as the key name. If the identification information of the interface function is the ECU flash of the engine management system, the identification information of the corresponding system module is the identification information of the engine management system. Calling the target interface function matching the target system module from the target dynamic link library may be as follows: in the key-value pairs stored in the target dynamic link library, using the identification information of the target system module as the target key name, searching for the target key value corresponding to the target key name; determining the identification information of the target interface function according to the target key value, and indexing the target interface from the target dynamic link library according to the identification information of the target interface function for calling, thereby realizing fast calling of the target interface function.
[0096] Step S205: executing a diagnostic function corresponding to the target function menu item on the target system module through the target interface function.
[0097] Specifically, the details of the same or similar parts of step S205 and the above-mentioned step S104 can be found in the relevant description of step S104, which will not be repeated here.
[0098] In this embodiment, each diagnostic function is pre-compiled into a separate dynamic link library; each of the dynamic link libraries encapsulates multiple system modules for implementing interface functions of corresponding diagnostic functions; each function menu item in the preset function menu list is associated with the corresponding dynamic link library, and the target dynamic link library corresponding to the target function menu item can be searched, the target dynamic link library includes interface functions from multiple system modules, and the target interface function matching the target system module selected by the subscription instruction is directly called from the target dynamic link library. Therefore, the corresponding interface function of the target function menu item can be dynamically executed, without binding the target function menu item and the separate interface function. The interface function corresponding to the target function menu item is modified, and the dynamic link library can be directly modified or re-packaged, which has good applicability, low coupling, and high convenience in modifying programs or function menu items.
[0099] Embodiment 3
[0100] This embodiment is a further description of the first or second embodiment. For details of the same or similar parts as the first or second embodiment, please refer to the relevant description of the first or second embodiment, which will not be repeated here. Figure 3 As shown, the above step S103 includes steps S303 to S305, and step S104 includes step S306. The vehicle diagnosis method in this embodiment includes:
[0101] Step S301, when a selection instruction of a target vehicle type is detected, a preset function menu list corresponding to the target vehicle type is displayed.
[0102] Specifically, for the parts where step S301 is identical or similar to the above-mentioned step S101, please refer to the relevant description of step S301, which will not be repeated here.
[0103] Step S302: when a selection instruction of a target function menu item is detected, a preset system module list corresponding to the target function menu item is displayed.
[0104] Specifically, the parts where step S302 is identical or similar to the above-mentioned step S102 can be specifically referred to the relevant description of step S102, which will not be repeated here.
[0105] Step S303: when a subscription instruction of the target system module is detected, the subscription instruction is parsed.
[0106] Specifically, when a subscription instruction of a target function menu item is detected, it is analyzed whether the identification information of the target system module included in the subscription instruction includes identification information of multiple target system modules.
[0107] Step S304: if it is parsed that the subscription instruction includes identification information of multiple target system modules, the execution order of the multiple target system modules is determined.
[0108] In one embodiment, determining the execution order of the plurality of target system modules includes: determining the execution order as the selection order of the plurality of target system modules selected by the user in the preset system module list.
[0109] Specifically, if it is parsed that the subscription instruction includes identification information of multiple target system modules, the user's selection order information of the multiple target system modules can be determined as the execution order of the multiple target system modules, or the execution order of the multiple target system modules can be determined according to a preset default execution order.
[0110] Step S305 , calling the target interface functions corresponding to the plurality of target system modules respectively in sequence according to the execution order.
[0111] Specifically, according to the determined execution order, target interface functions corresponding to the multiple system modules are called in sequence according to the execution order of the multiple target system modules, so as to execute the multiple target interface functions in sequence to perform the corresponding diagnostic functions.
[0112] Step S306: according to the execution order, the diagnostic function corresponding to the target function menu item is executed on each target system module in turn through each target interface function.
[0113] Specifically, the diagnostic function corresponding to the target function menu item can be executed according to the execution order of the multiple target system modules through each of the target interface functions corresponding to the multiple target system modules in sequence.
[0114] In a specific application scenario, for example, the subscription instruction includes two target system modules EMS and BCM selected in sequence, then the system module names corresponding to the two target system modules EMS and BCM will be stored in sequence in the queue specified by the target function menu item, and the target interface functions in the two target systems EMS and BCM will be called in sequence, and then the target interface function corresponding to EMS will be executed first, and then the target interface function corresponding to BCM will be executed, so that multiple related functions can be executed according to the target function menu item.
[0115] This embodiment can directly subscribe to the identification information of multiple target system modules included in the instruction, and call the target interface functions corresponding to the multiple target system modules in sequence, so as to execute the multiple target interface functions in sequence to perform the corresponding diagnostic functions. The corresponding diagnostic functions are executed by the multiple target interface functions, the operation is simple, and multiple functions of the vehicle can be diagnosed quickly, thereby improving the diagnostic efficiency of the vehicle.
[0116] Embodiment 4
[0117] This embodiment is a further description of the first embodiment. For details of the same or similar parts as the first embodiment, please refer to the relevant description of the first embodiment, which will not be repeated here. The above subscription instruction includes a first subscription instruction and a second subscription instruction. Figure 4 As shown, the above step S103 includes steps S403 to S404, and the above step S104 includes step S405. The vehicle diagnosis method in this embodiment includes:
[0118] Step S401, when a selection instruction of a target vehicle type is detected, a preset function menu list corresponding to the target vehicle type is displayed.
[0119] Specifically, the same or similar parts of step S401 and the above step S101 can be found in the relevant description of step S301, which will not be repeated here.
[0120] Step S402: when a selection instruction of a target function menu item is detected, a preset system module list corresponding to the target function menu item is displayed.
[0121] Specifically, the parts where step S402 is identical or similar to the above-mentioned step S102 can be specifically referred to the relevant description of step S102, which will not be repeated here.
[0122] Step S403, when a first subscription instruction of a target system module is detected, a preset logic module list corresponding to a target interface function matching the target system module is displayed; wherein the first subscription instruction includes identification information of the target system module.
[0123] Specifically, after displaying the preset function menu list corresponding to the target vehicle model, the target function menu item is selected based on the menu options in the preset function menu list, and a first subscription instruction for the target function menu item is input, the first subscription instruction includes identification information for selecting a specific system module, and when the subscription instruction for the target function menu item is detected, according to the identification information of the target system module, a target interface function matching the target system module is determined in the interface function associated with the target function menu item, and the target interface function contains a plurality of preset internal key logic modules, and then a list of identifications of the plurality of preset internal key logic modules in the target interface function is displayed (i.e. a list of preset logic modules corresponding to the target interface function matching the target system module), and the user can select the diagnostic function corresponding to the internal key logic of the target interface function that needs to be executed based on the list of multiple internal key logic module identifications.
[0124] In one embodiment, the identification information of each interface function and the identification information of all key logic modules in the corresponding interface function are pre-composed into a structure, and a structure corresponding to each interface function and the identification information of the corresponding system module are associated into a key-value pair for storage; when the first subscription instruction of the target system module is detected, a preset logic module list corresponding to the target interface function matching the target system module is displayed, including: when the first subscription instruction of the target function menu item is detected, the target dynamic link library corresponding to the target function menu item is searched; in the key-value pairs stored corresponding to the target dynamic link library, the identification information of the target system module is used as the target key value name, and the target structure corresponding to the target key value name is searched; according to the preset key logic module identification information included in the target structure, the corresponding preset key logic module identification list is displayed.
[0125] Specifically, the interface functions of the same functions in different system modules can be pre-encapsulated into the same dynamic link library, and each function menu item can be associated with the corresponding dynamic link library; there will be multiple interface functions in a dynamic link library, and each interface function in each dynamic link library and the identification information of the key logic module corresponding to the interface function will form a structure, that is, the identification information of the interface function and the identification information of the key logic module are used as member data in a structure, and each interface function will correspond to a structure, and then the structure is used as the key value, and the identification information of the system module associated with the corresponding interface function of the structure is used as the key value name to associate into a key-value pair for storage. When the first subscription instruction of the target function menu item is detected, the target dynamic link library corresponding to the target function menu item is searched; in the key-value pair corresponding to the target dynamic link library, the identification information of the target system module is used as the target key value name, and the target structure corresponding to the target key value name is searched, and the preset key logic module identification information included in the target structure is displayed as a corresponding preset key logic module identification list through a preset display method for user selection.
[0126] Step S404, when a second subscription instruction of a target logic module is detected, a logic function corresponding to the target logic module is called and written into the target interface function; wherein the target logic module is selected from the preset logic module list, and the second subscription instruction includes identification information of the target logic module.
[0127] Specifically, the identification information of the key logic module is selected from the preset key logic module identification list through the second subscription instruction, and the logic function in the target interface function that matches the second subscription instruction is called (the logic function can be a subroutine preset according to the corresponding diagnostic function) to execute the diagnostic function corresponding to the logic function. Among them, the second subscription instruction can be to select one or more key logic module identifications in the displayed preset key logic module identification list, and each key logic module identification corresponds to the corresponding subroutine in the corresponding interface function to implement the corresponding logic function. The above-mentioned writing it into the target interface function can be: the identification information of the logic function corresponding to the target logic function is passed back to the target interface function as a parameter, so that when the target interface function is called, the subroutine corresponding to the identification information of the logic function in the target interface function is executed, thereby realizing the execution of the logic function corresponding to the target logic module in the target interface function.
[0128] For example, the corresponding interface function of a certain system implements a flashing function, which has multiple flashing modes, and different flashing modes have different processing methods. When a user can subscribe to the flashing function of the system through the first subscription instruction, the identification information of different flashing modes can be exported (that is, when the first subscription instruction of the target system module is detected, the preset logic module list corresponding to the target interface function matching the target system module is displayed), and the user can select the flashing mode through the second subscription instruction, and this subscribed mode is passed back to the interface function as a parameter (that is, when the second subscription instruction of the target logic module is detected, the logic function corresponding to the target logic module is called and written into the target interface function).
[0129] Step S405, executing the target interface function according to the logic function corresponding to the target logic module, so as to implement the diagnostic function corresponding to the target function menu item on the target system module.
[0130] Specifically, the logic function corresponding to the target logic module is called and written into the target interface function. According to the target interface function in which the logic function identification information corresponding to the target logic module has been written, the logic function corresponding to the identification information of the target logic function in the target interface function is executed. The internal logic of the target interface function can be subscribed to, thereby realizing the subscription of the internal logic of the interface function.
[0131] Embodiment 5
[0132] This embodiment is a further description of the first embodiment, the second embodiment, the third embodiment or the fourth embodiment. For details of the same or similar parts as the above embodiments, please refer to the relevant description of the above embodiments, which will not be repeated here. Figure 5 As shown, the above step S101 further includes steps S502 to S503. The vehicle diagnosis method in this embodiment includes:
[0133] Step S501, when a selection instruction of a target vehicle type is detected, a preset function menu list corresponding to the target vehicle type is displayed.
[0134] Specifically, for the parts where step S501 is identical or similar to the above-mentioned step S101, please refer to the relevant description of step S101, which will not be repeated here.
[0135] Step S502, if a selection instruction of a target function menu item is detected, a default subscription instruction corresponding to the target function menu item is obtained; wherein the default subscription instruction is a historical subscription instruction or a pre-specified subscription instruction; the default subscription instruction includes identification information of a target system module.
[0136] Specifically, the user may not input the corresponding subscription instruction for the target function menu item. When the selection instruction of the target function menu item is detected, the default subscription instruction of the target function menu item is directly obtained. The default subscription instruction may be the most recently input subscription instruction, or the default subscription instruction may also be a pre-stored subscription instruction.
[0137] Step S503: calling a target interface function that matches the target system module, and executing a diagnostic function corresponding to the target function menu item on the target system module through the target interface function.
[0138] Specifically, a target interface function matching a target system module included in the default subscription instruction is called to execute a corresponding diagnostic function through the target interface function.
[0139] In one embodiment, when a modification instruction for the default subscription instruction is received, the identification information of the original target system module of the default subscription instruction is changed to the identification information of the new target system module according to the modification instruction; wherein the modification instruction includes the identification information of the new target system module.
[0140] Specifically, the identification information of the system module associated in the default subscription instruction can be modified or deleted. The user can input a modification instruction containing the identification information of the new target system module to be associated, and based on the identification information of the new target system module, the identification information of the target system module currently stored in the default subscription instruction can be changed to the identification information of the new target system module.
[0141] Since the embodiment of the present application can directly detect the selection instruction of the target function menu item, the default subscription instruction corresponding to the target function menu item is obtained, and the target interface function matching the target system module corresponding to the default subscription instruction is directly executed. The diagnostic function corresponding to the target function menu item is executed on the target system module through the target interface function. The operation is simple, the vehicle functions can be diagnosed quickly, and the diagnostic efficiency of the vehicle is improved.
[0142] Embodiment 6
[0143] Corresponding to the vehicle diagnosis method described in the above embodiment, Figure 6 The structural block diagram of the vehicle diagnostic device provided by the embodiment of the present application is shown. For the convenience of explanation, only the part related to the embodiment of the present application is shown. The vehicle diagnostic device is applied to an electronic device, and the electronic device is connected to the target vehicle for communication. The vehicle diagnostic device 600 includes:
[0144] The first display module 601 is used to display a preset function menu list corresponding to the target vehicle type when a selection instruction of the target vehicle type is detected;
[0145] The second display module 602 is used to display a preset system module list corresponding to the target function menu item when a selection instruction of the target function menu item is detected;
[0146] The calling module 603 is used to call the target interface function matching the target system module when a subscription instruction of the target system module is detected;
[0147] An execution module 604 is used to execute the diagnostic function corresponding to the target function menu item on the target system module through the target interface function;
[0148] The target function menu item is selected from the preset function menu list, and the target system module is selected from the preset system module list.
[0149] In one embodiment, each diagnostic function is pre-compiled into a separate dynamic link library; each of the dynamic link libraries encapsulates a plurality of system modules for implementing interface functions of the corresponding diagnostic function; each function menu item in the preset function menu list is associated with the corresponding dynamic link library;
[0150] The diagnostic device also includes:
[0151] A search module, configured to search for a target dynamic link library corresponding to the target function menu item after detecting a selection instruction of the target function menu item;
[0152] Correspondingly, the calling module is specifically used to: when a subscription instruction of a target system module is detected, call a target interface function matching the target system module from the target dynamic link library.
[0153] In one embodiment, the calling module includes:
[0154] A parsing unit, configured to parse a subscription instruction of a target system module when a subscription instruction is detected;
[0155] a determining unit, configured to determine the execution order of the plurality of target system modules if it is parsed that the subscription instruction includes identification information of the plurality of target system modules;
[0156] A first calling unit, configured to call target interface functions corresponding to the plurality of target system modules in sequence according to the execution order;
[0157] Correspondingly, the execution module is specifically used to: execute the diagnostic function corresponding to the target function menu item on each target system module in turn through each target interface function according to the execution order.
[0158] In one embodiment, the subscription instruction includes a first subscription instruction and a second subscription instruction; the calling module includes:
[0159] A display unit, configured to display a preset logic module list corresponding to a target interface function matching the target system module when a first subscription instruction of the target system module is detected; wherein the first subscription instruction includes identification information of the target system module;
[0160] A second calling unit is configured to, when detecting a second subscription instruction of a target logic module, call a logic function corresponding to the target logic module and write it into the target interface function; wherein the target logic module is selected from the preset logic module list, and the second subscription instruction includes identification information of the target logic module;
[0161] Correspondingly, the execution module is specifically used to: execute the target interface function according to the logic function corresponding to the target logic module, so as to implement the diagnostic function corresponding to the target function menu item on the target system module.
[0162] In one embodiment, the diagnostic device further comprises:
[0163] an acquisition module, configured to acquire a default subscription instruction corresponding to the target function menu item if a selection instruction of the target function menu item is detected; wherein the default subscription instruction is a historical subscription instruction or a pre-specified subscription instruction; and the default subscription instruction includes identification information of the target system module;
[0164] The execution module is used to call the target interface function matching the target system module, and execute the diagnostic function corresponding to the target function menu item on the target system module through the target interface function.
[0165] In one embodiment, the diagnostic device further comprises:
[0166] A modification module is used to change the identification information of the original target system module of the default subscription instruction to the identification information of the new target system module according to the modification instruction when a modification instruction for the default subscription instruction is received; wherein the modification instruction includes the identification information of the new target system module.
[0167] In one embodiment, the determining unit is specifically configured to: if it is parsed that the subscription instruction includes identification information of multiple target system modules, determine the selection order of the multiple target system modules selected by the user in the preset system module list as the execution order.
[0168] When the embodiment of the present application detects a selection instruction for a target vehicle model, a preset function menu list corresponding to the target vehicle model is displayed. The target function menu item can be directly selected according to the displayed preset function menu list. According to the subscription instruction, the target interface function matching the target system module is called. The system modules selected by the subscription instruction are different, and the called interface function will also be different. Therefore, a function menu item will not be bound to a fixed interface function. The embodiment of the present application can flexibly adapt to changes in external diagnostic logic and has good applicability, so that the coupling between the menu item and the program is low, and the modification of the program or menu item is convenient.
[0169] Example 7
[0170] like Figure 7 , which is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 700 includes: a processor 701, a memory 702, and a computer program 703 stored in the memory 702 and executable on the processor 701. When the processor 701 executes the computer program 703, the steps in the vehicle diagnostic method embodiment are implemented.
[0171] Exemplarily, the computer program 703 may be divided into one or more units / modules, which are stored in the memory 702 and executed by the processor 701 to complete the present application. The one or more units / modules may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program 703 in the electronic device 700. For example, the computer program 703 may be divided into a display module and a first calling module, etc. The specific functions of each module have been described in the above embodiments and will not be repeated here.
[0172] The electronic device 700 may include, but is not limited to, a processor 701 and a memory 702. Those skilled in the art will appreciate that Figure 7 It is only an example of the electronic device 700 and does not constitute a limitation of the electronic device 700. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device 700 may also include input and output devices, network access devices, buses, etc.
[0173] The processor 701 may be a central processing unit (CPU), or 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 any conventional processor, etc.
[0174] The memory 702 may be an internal storage unit of the electronic device 700, such as a hard disk or memory of the electronic device 700. The memory 702 may also include both an internal storage unit of the electronic device 700 and an external storage device. The memory 702 is used to store the computer program and other programs and data required by the electronic device 700. The memory 702 may also be used to temporarily store data that has been output or is to be output.
[0175] Those skilled in the art 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 actual applications, the above-mentioned functions can be assigned to 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 into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into 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 vehicle diagnostic equipment can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0176] 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.
[0177] 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 computer 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.
[0178] 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 device embodiments described above are only 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 module, 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 through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0179] 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 embodiments of the present application.
[0180] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0181] 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 relevant 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. The above-mentioned computer-readable 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 memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the above-mentioned computer-readable 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 media do not include electric carrier signals and telecommunication signals. The embodiments described above 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, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such 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, applied to diagnostic software, characterized in that: include: When a selection instruction of a target vehicle type is detected, a preset function menu list corresponding to the target vehicle type is displayed; When a selection instruction of a target function menu item is detected, a preset system module list corresponding to the target function menu item is displayed; When a subscription instruction of a target system module is detected, a target interface function matching the target system module is called; Executing a diagnostic function corresponding to the target function menu item on the target system module through the target interface function; Wherein, the target function menu item is selected from the preset function menu list, and the target system module is selected from the preset system module list; Precompile each diagnostic function into a separate dynamic link library; each of the dynamic link libraries encapsulates a plurality of system modules for implementing interface functions of the corresponding diagnostic function; associate each function menu item in the preset function menu list with the corresponding dynamic link library; After the selection instruction of the target function menu item is detected, the method includes: Finding a target dynamic link library corresponding to the target function menu item; Accordingly, the calling of the target interface function matching the target system module includes: Calling a target interface function matching the target system module from the target dynamic link library; The subscription instruction includes a first subscription instruction and a second subscription instruction; When the subscription instruction of the target system module is detected, the target interface function matching the target system module is called, including: When a first subscription instruction of a target system module is detected, a preset logic module list corresponding to a target interface function matching the target system module is displayed; wherein the first subscription instruction includes identification information of the target system module; When a second subscription instruction of a target logic module is detected, a logic function corresponding to the target logic module is called and written into the target interface function; wherein the target logic module is selected from the preset logic module list, and the second subscription instruction includes identification information of the target logic module; Correspondingly, executing the diagnostic function corresponding to the target function menu item on the target system module through the target interface function includes: The target interface function is executed according to the logic function corresponding to the target logic module, so as to implement the diagnostic function corresponding to the target function menu item on the target system module.
2. The vehicle diagnostic method according to claim 1, characterized in that: The target system is detected When receiving a subscription instruction from a target system module, a target interface function matching the target system module is called, including: When a subscription instruction of a target system module is detected, parsing the subscription instruction; If it is parsed that the subscription instruction includes identification information of multiple target system modules, determining the execution order of the multiple target system modules; According to the execution order, calling the target interface functions corresponding to the plurality of target system modules respectively in sequence; Correspondingly, executing the diagnostic function corresponding to the target function menu item on the target system module through the target interface function includes: According to the execution order, the diagnostic function corresponding to the target function menu item is executed on each target system module in turn through each target interface function.
3. The vehicle diagnostic method according to any one of claims 1 to 2, characterized in that: The method further comprises: If a selection instruction of a target function menu item is detected, a default subscription instruction corresponding to the target function menu item is obtained; wherein the default subscription instruction is a historical subscription instruction or a pre-specified subscription instruction; and the default subscription instruction includes identification information of a target system module; A target interface function matching the target system module is called, and a diagnostic function corresponding to the target function menu item is executed on the target system module through the target interface function.
4. The vehicle diagnostic method according to claim 3, characterized in that: The method further comprises: When a modification instruction for the default subscription instruction is received, the identification information of the original target system module of the default subscription instruction is changed to the identification information of the new target system module according to the modification instruction; wherein the modification instruction includes the identification information of the new target system module.
5. The vehicle diagnostic method according to claim 2, characterized in that: Determining the execution order of the plurality of target system modules comprises: The order in which the user selects the plurality of target system modules in the preset system module list is determined as the execution order.
6. A vehicle diagnostic device, characterized in that: include: A first display module, for displaying a preset function menu list corresponding to the target vehicle type when a selection instruction of the target vehicle type is detected; A second display module, configured to display a list of preset system modules corresponding to a target function menu item when a selection instruction of the target function menu item is detected; A calling module, configured to call a target interface function matching the target system module when a subscription instruction of the target system module is detected; An execution module, used for executing a diagnostic function corresponding to the target function menu item on the target system module through the target interface function; Wherein, the target function menu item is selected from the preset function menu list, and the target system module is selected from the preset system module list; Precompile each diagnostic function into a separate dynamic link library; each of the dynamic link libraries encapsulates a plurality of system modules for implementing interface functions of the corresponding diagnostic function; associate each function menu item in the preset function menu list with the corresponding dynamic link library; The vehicle diagnostic device further comprises: A search module, configured to search for a target dynamic link library corresponding to the target function menu item after detecting a selection instruction of the target function menu item; Accordingly, the calling module is specifically used for: When a subscription instruction of a target system module is detected, a target interface function matching the target system module is called from the target dynamic link library; The subscription instruction includes a first subscription instruction and a second subscription instruction; When the subscription instruction of the target system module is detected, the target interface function matching the target system module is called, including: When a first subscription instruction of a target system module is detected, a preset logic module list corresponding to a target interface function matching the target system module is displayed; wherein the first subscription instruction includes identification information of the target system module; When a second subscription instruction of a target logic module is detected, a logic function corresponding to the target logic module is called and written into the target interface function; wherein the target logic module is selected from the preset logic module list, and the second subscription instruction includes identification information of the target logic module; Correspondingly, executing the diagnostic function corresponding to the target function menu item on the target system module through the target interface function includes: The target interface function is executed according to the logic function corresponding to the target logic module, so as to implement the diagnostic function corresponding to the target function menu item on the target system module.
7. An electronic 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
Dynamic loading method, device and storage medium for diagnostic software
CN109086102A
Vehicle diagnosis method, server and diagnosis equipment
CN111758087A
Menu generation method, menu generation device and diagnosis equipment
CN112181411A
Failure diagnosis apparatus for vehicle
JP1997325091A