Diagnostic rights management method, apparatus, device, and storage medium
By setting menu configuration codes in the vehicle's electronic control unit to generate target menus, the problem of inaccurate control of diagnostic functions is solved, improving the efficiency of diagnostic operations and reducing costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- LAUNCH TECH CO LTD
- Filing Date
- 2024-07-23
- Publication Date
- 2026-05-05
AI Technical Summary
Existing technologies cannot effectively distinguish between diagnostic function scenarios and vehicle configurations, resulting in inaccurate control of the diagnostic menu and a large workload and high cost in code modification.
By setting menu configuration codes in the vehicle's electronic control unit, a target menu is generated based on the menu configuration codes, and diagnostic operations are performed based on the target menu, thereby achieving access management for diagnostic functions.
It enables precise diagnostic permission management based on diagnostic scenarios and vehicle configurations, improving the efficiency of diagnostic operations and reducing the workload and cost of code modification.
Smart Images

Figure CN118938859B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of vehicle diagnostic technology, and in particular to a diagnostic access management method, apparatus, device, and storage medium. Background Technology
[0002] With the continuous development of the automotive industry, the role of automotive diagnostics is becoming increasingly prominent. Whether in R&D, production, or after-sales service, automotive diagnostics is an indispensable function. However, the support for some diagnostic functions varies across different scenarios and vehicle models. For example: 1. The function of writing certain configuration words is only required on the production line and is not needed in after-sales scenarios. Allowing this function to be enabled in after-sales service could potentially cause vehicle safety issues; 2. The diagnostic functions supported by some vehicle electronic control units (ECUs) differ depending on the vehicle model configuration, with some functions not available on lower-spec models. Therefore, for diagnostic functions, corresponding access controls should be implemented for different vehicle models or scenarios to ensure better management and security.
[0003] Currently, there are two common types of diagnostic function access control: 1. The diagnostic software maximizes the development of the ECU's diagnostic functions, that is, regardless of the scenario or vehicle configuration, the diagnostic software displays all diagnostic menus for this type of ECU, and the user selects to execute according to diagnostic needs; 2. For this type of ECU, the diagnostic menu is changed in the code for different vehicle configurations, that is, for vehicle models A and B with the same type of ECU, the diagnostic menus are made inconsistent by modifying their code.
[0004] However, both methods have their drawbacks: 1. Lack of access control: The ECU's diagnostic menu cannot differentiate between diagnostic scenarios and vehicle configurations, making it impossible to control diagnostic functions. 2. Modifying the code: Creating different diagnostic menus for different vehicle configurations is labor-intensive, especially when adding or deleting diagnostic functions from the ECU. This requires significant modifications to the diagnostic software, necessitating changes for different configurations, resulting in excessive costs.
[0005] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention
[0006] The main purpose of this application is to provide a diagnostic access management method, device, equipment and storage medium, which aims to solve the technical problem of needing to manage diagnostic access due to different diagnostic function requirements of vehicles in different scenarios or different vehicle models.
[0007] To achieve the above objectives, this application proposes a diagnostic permission management method, which is applied to the diagnostic end and includes the following steps:
[0008] Read the menu configuration code from the electronic control unit of the target vehicle;
[0009] Generate the target menu based on the menu configuration code;
[0010] Based on the target menu, the target vehicle is subjected to a target diagnostic operation, and the vehicle diagnostic result is obtained.
[0011] In one embodiment, the step of generating the target menu based on the menu configuration code includes:
[0012] Read menu configuration code;
[0013] Initialize according to the menu configuration code to generate the target menu.
[0014] In one embodiment, the step of initializing according to the menu configuration code to obtain the target menu includes:
[0015] If the status in the menu configuration code is negative, then the diagnostic function will be disabled.
[0016] If the status in the menu configuration code is yes, then the diagnostic function is added to the target menu.
[0017] In one embodiment, the step of performing a target diagnostic operation on the target vehicle based on the target menu and obtaining the vehicle diagnostic result includes:
[0018] Receive vehicle diagnostic commands;
[0019] According to the vehicle diagnostic instruction, based on the target menu, a diagnostic request message is sent to the vehicle terminal, which then sends the diagnostic request message to the corresponding electronic control unit for diagnostic execution and generates a diagnostic response message.
[0020] The system receives a diagnostic response message sent by the vehicle and obtains the vehicle diagnostic result based on the diagnostic response message.
[0021] In one embodiment, the diagnostic permission management method is applied to the vehicle side, and the method includes:
[0022] Set the menu configuration code in the electronic control unit of the target vehicle;
[0023] In response to the read command from the diagnostic terminal, the menu configuration code is provided to the diagnostic terminal, which then generates a target menu based on the menu configuration code. Based on the target menu, the target diagnostic operation is performed on the target vehicle to obtain the vehicle diagnostic result.
[0024] In one embodiment, the steps of providing the menu configuration code to the diagnostic terminal in response to a read command, generating a target menu based on the menu configuration code, and performing a target diagnostic operation on the target vehicle based on the target menu to obtain a vehicle diagnostic result include:
[0025] In response to a read request command from the diagnostic terminal, the read request command is sent to the corresponding electronic control unit for execution, and the menu configuration code is provided to the diagnostic terminal.
[0026] Receive the diagnostic request message sent by the diagnostic terminal;
[0027] The diagnostic request message is sent to the corresponding electronic control unit for diagnostic execution, and a diagnostic response message is generated.
[0028] The diagnostic response message is sent to the diagnostic terminal, which then obtains the vehicle diagnostic result based on the diagnostic response message.
[0029] In one embodiment, the method further includes:
[0030] Receive modification operation instructions;
[0031] The menu setting code is modified according to the modification operation instruction, so that the diagnostic terminal can obtain the modified target menu based on the modified menu configuration code.
[0032] Furthermore, to achieve the above objectives, this application also proposes a diagnostic access control device, which includes:
[0033] The reading module is used to read the menu configuration codes in the electronic control unit of the target vehicle;
[0034] The generation module is used to generate the target menu based on the menu configuration code;
[0035] The diagnostic module is used to perform target diagnostic operations on the target vehicle based on the target menu and obtain vehicle diagnostic results.
[0036] In addition, to achieve the above objectives, this application also proposes an apparatus, characterized in that the apparatus includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the diagnostic access control method as described above.
[0037] In addition, to achieve the above objectives, this application also provides a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the diagnostic permission management method described above.
[0038] One or more technical solutions proposed in this application have at least the following technical effects:
[0039] This application proposes a diagnostic permission management method, apparatus, device, and storage medium. The method reads the menu configuration code from the electronic control unit of a target vehicle; generates a target menu based on the menu configuration code; and performs a target diagnostic operation on the target vehicle based on the target menu to obtain vehicle diagnostic results. By setting the menu configuration code to manage the diagnostic function permissions of the target vehicle, this method effectively solves the technical problem of needing diagnostic permission management due to different diagnostic function requirements in different scenarios or vehicle configurations, thereby improving the efficiency of vehicle diagnostic operations. Attached Figure Description
[0040] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0041] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0042] Figure 1 This is a flowchart illustrating a first exemplary embodiment of the diagnostic access control method of this application;
[0043] Figure 2 This is a flowchart illustrating a third exemplary embodiment of the diagnostic access management method of this application;
[0044] Figure 3 This is a schematic diagram of the menu configuration code for a third exemplary embodiment of the diagnostic permission management method of this application;
[0045] Figure 4 This is a flowchart illustrating the fifth exemplary embodiment of the diagnostic permission management method of this application;
[0046] Figure 5 This is a schematic diagram illustrating the setting of a first-level menu in a menu configuration code, provided as an embodiment of this application.
[0047] Figure 6 This is a schematic diagram illustrating the setting of a second-level menu in a menu configuration code, provided as an embodiment of this application.
[0048] Figure 7 This is a schematic diagram of the target menu involved in the diagnostic permission management method of this application;
[0049] Figure 8 This is a schematic diagram of the module structure of the diagnostic access management device of this application;
[0050] Figure 9 This is a schematic diagram of the device structure of the hardware operating environment involved in the diagnostic permission management method in this application embodiment.
[0051] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0052] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0053] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0054] The main solution of this application embodiment is as follows: A menu configuration code is set in the electronic control unit (ECU) of the target vehicle; in response to a read command from the diagnostic terminal, the menu configuration code is provided to the diagnostic terminal, which then generates a target menu based on the menu configuration code; based on the target menu, a target diagnostic operation is performed on the target vehicle to obtain a vehicle diagnostic result; the diagnostic terminal reads the menu configuration code from the ECU of the target vehicle; a target menu is generated based on the menu configuration code; and a target diagnostic operation is performed on the target vehicle based on the target menu to obtain a vehicle diagnostic result. This invention sets and writes a menu configuration code in the ECU of the vehicle; the diagnostic terminal reads the menu configuration code, generates a target menu, and performs a target diagnostic operation on the target vehicle based on the target menu to obtain a vehicle diagnostic result. This effectively solves the technical problem of needing diagnostic permission management due to different diagnostic function requirements for vehicles in different scenarios or for different vehicle models, and improves the efficiency of vehicle diagnostic operations.
[0055] Currently, automotive diagnostics is an indispensable function in the research, development, production, and after-sales fields of automobiles. However, the required diagnostic functions of automobiles vary depending on the scenario or the vehicle model. Existing technologies either lack the necessary permissions to control the diagnostic scenarios and vehicle configurations, making it impossible to control the diagnostic functions, or require code modification for different vehicle configurations, which is extremely labor-intensive and costly.
[0056] This application manages vehicle diagnostic operations by writing preset menu configuration codes into the vehicle's electronic control unit based on specific diagnostic scenarios and vehicle model configurations. This effectively differentiates diagnostic operations according to diagnostic scenarios and vehicle model configurations, while avoiding extensive code modifications. This significantly improves the diagnostic efficiency of vehicle production, R&D, and after-sales services, saves costs, and reduces diagnostic risks.
[0057] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device or diagnostic permission management device capable of performing the above functions. The following description uses a diagnostic permission management device as an example to illustrate this embodiment and the subsequent embodiments.
[0058] Based on this, embodiments of this application provide a diagnostic permission management method, referring to... Figure 1 , Figure 1 This is a flowchart illustrating a first exemplary embodiment of the diagnostic permission management method of the present invention. The diagnostic permission management method is applied to the diagnostic end and includes the following steps:
[0059] Step S10: Read the menu configuration code from the electronic control unit of the target vehicle.
[0060] The subject executing the method in this embodiment can be a diagnostic permission management device, a diagnostic permission management equipment, or a server. This embodiment takes a diagnostic permission management device as an example, which can be integrated into an in-vehicle device with data processing capabilities.
[0061] It should be noted that the menu configuration code is bytecode written into the vehicle's electronic control unit to preset the diagnostic functions. It consists of several bytes, the length of which is determined by the specific vehicle model. It configures the diagnostic menu using binary numbers. The target menu is the function menu ultimately displayed on the diagnostic terminal, which contains the diagnostic functions required for the target diagnostic scenario and the target vehicle model configuration. It is determined by the menu configuration code.
[0062] Additionally, it's important to note that the vehicle's Electronic Control Unit (ECU) is a crucial component, also known as the vehicle's computer or onboard computer, responsible for managing and controlling various electronic systems. Like a regular computer, the ECU consists of a microprocessor, memory, input / output interfaces, analog-to-digital converters, and large-scale integrated circuits for shaping and driving. The CPU is the core of the ECU, possessing computational and control functions. During engine operation, it collects signals from various sensors, performs calculations, and converts the results into control signals to control the operation of the controlled object. It also controls the memory (ROM / FLASH / EEPROM, RAM, etc.), input / output interfaces (I / O), and other external circuits. The program stored in the ROM is based on data obtained through precise calculations and extensive experiments. This inherent program continuously compares and calculates with the signals collected from various sensors during engine operation. The results of these comparisons and calculations are used to control multiple parameters of the engine, such as ignition, air-fuel ratio, idle speed, and exhaust gas recirculation. Each vehicle's ECU contains specific software and configurations used to monitor and regulate the engine, transmission, braking system, safety systems, and more. Typically, the ECU's configuration and menu settings are predefined and installed by the vehicle manufacturer; different ECUs may have different configuration codes and functions.
[0063] Step S20: Generate the target menu based on the menu configuration code.
[0064] Step S30: Based on the target menu, perform a target diagnostic operation on the target vehicle to obtain the vehicle diagnostic result.
[0065] Specifically, after receiving a vehicle diagnostic command, the diagnostic terminal sends a diagnostic request message to the vehicle terminal based on the target menu and the vehicle terminal according to the vehicle diagnostic command. The vehicle terminal then sends the diagnostic request message to the corresponding electronic control unit for diagnostic request execution and generates a diagnostic response message. The diagnostic terminal receives the diagnostic response message from the vehicle terminal and obtains the vehicle diagnostic result based on the diagnostic response message.
[0066] This embodiment, through the above-described scheme, specifically generates a target menu by reading the menu configuration code from the vehicle's terminal at the diagnostic end; based on the target menu, a target diagnostic operation is performed on the target vehicle to obtain the vehicle diagnostic result. This invention sets and writes a menu configuration code into the vehicle's electronic control unit; the diagnostic end reads the menu configuration code to generate the target menu, and performs a target diagnostic operation on the target vehicle based on the target menu to obtain the vehicle diagnostic result. This effectively solves the technical problem of needing diagnostic permission management due to different diagnostic function requirements for vehicles in different scenarios or with different vehicle models, and improves the efficiency of vehicle diagnostic operations.
[0067] Based on the first embodiment, a second embodiment of this application is proposed. The difference between the second embodiment and the first embodiment is as follows:
[0068] In this embodiment, the step of generating the target menu based on the menu configuration code includes:
[0069] Step S101: Read the menu configuration code.
[0070] Step S102: Initialize according to the menu configuration code to generate the target menu.
[0071] It should be noted that the target menu refers to the set of diagnostic functions obtained by the diagnostic end based on the menu configuration code initialization.
[0072] Specifically, the diagnostic terminal first connects to the vehicle (either wirelessly or via a wired connection). The diagnostic terminal reads the menu configuration code from the vehicle's electronic control unit (ECU). Then, it initializes the full-function menu based on the settings in the menu configuration code, generating the target menu. The full-function menu refers to the collection of all available diagnostic functions on the diagnostic terminal.
[0073] Furthermore, as one implementation, the step of initializing according to the menu configuration code to obtain the target menu includes:
[0074] Step S1021: If the status in the menu configuration code is no, then the diagnostic function is disabled.
[0075] Step S1022: If the status in the menu configuration code is yes, then add the diagnostic function to the target menu.
[0076] Specifically, the diagnostic terminal is initialized according to the menu state set by the menu configuration code. The menu state is determined by binary numbers "0" and "1" in the menu configuration code. If the menu state in the configuration code is "no" (binary number "0 / 1"), the diagnostic function is disabled, meaning it is not displayed on the diagnostic terminal or is displayed but cannot be selected. If the menu state in the configuration code is "yes" (binary number "1 / 0"), the diagnostic function is added to the target menu, allowing selection of diagnostic operations. For ease of explanation, "1" will represent "yes," meaning the diagnostic function is added to the target menu and can be selected; "0" will represent "no," meaning the diagnostic function is disabled.
[0077] Reference Figure 2 , Figure 2 This is a flowchart illustrating a third exemplary embodiment of the diagnostic permission management method of the present invention.
[0078] Based on the second embodiment, a third embodiment of this application is proposed. The difference between the third embodiment and the second embodiment is as follows:
[0079] In this embodiment, the step of performing a target diagnostic operation on the target vehicle based on the target menu and obtaining the vehicle diagnostic result includes:
[0080] Step S21: Receive vehicle diagnostic instructions.
[0081] Step S22: According to the vehicle diagnostic instruction and based on the target menu, a diagnostic request message is sent to the vehicle terminal. The vehicle terminal then sends the diagnostic request message to the corresponding electronic control unit to execute the diagnostic request and generate a diagnostic response message.
[0082] Step S23: Receive the diagnostic response message sent by the vehicle terminal, and obtain the vehicle diagnostic result based on the diagnostic response message.
[0083] It should be noted that the vehicle diagnostic instructions may include diagnostic tasks to be performed (such as reading fault codes) and target objects of the tasks to be performed (such as vehicle parts that need to be diagnosed), depending on the specific diagnostic scenario and vehicle configuration requirements. These instructions may be initiated by the user or the system on a scheduled or proactive basis.
[0084] Additionally, it should be noted that diagnostic request messages are data packets used to send request information to the vehicle's electronic control unit (ECU) during vehicle diagnostics. These messages are typically generated and sent by diagnostic tools or diagnostic software provided by the vehicle manufacturer. They contain specific instructions and parameters for requesting data reading, performing tests, clearing fault codes, or adjusting specific vehicle parameters. Diagnostic request messages include, but are not limited to, request type, target ECU address, request parameters, and communication protocol. The request type specifies the specific operation to be performed, such as reading data, performing tests, or clearing fault codes; the target ECU address specifies the address of the specific ECU to which the request is sent, and each ECU has a unique address within the vehicle network; the request parameters include the specific parameters and data required to perform the operation, such as the data type to be read and the test items to be performed; the communication protocol specifies the protocol type used to communicate with the ECU, such as CAN (Controller Area Network) or LIN (Local Area Network Interconnect).
[0085] Additionally, it should be noted that diagnostic response messages refer to the response data packets returned by the vehicle's electronic control unit (ECU) to the diagnostic tool or software during the vehicle diagnostic process. These responses include the result of the requested operation, the requested data, the execution result of the test, or other relevant information. Diagnostic response messages include, but are not limited to, response type, target ECU address, response data, execution status, and error codes. The response type indicates the specific type of response, such as data response, execution result confirmation, or error report. The target ECU address indicates which specific ECU the response originates from. The response data includes the result of the requested operation or the specific data requested, such as sensor data or vehicle status information. The execution status indicates the execution status of the requested operation, such as success, failure, or other specific status codes. Error codes, which may be included when problems occur during operation, help diagnose the cause of the problem.
[0086] Additionally, it should be noted that vehicle diagnostic results refer to the conclusions and reports obtained after diagnosing the vehicle. These typically include fault codes, sensor data, system status, performance parameters, etc. Each fault code corresponds to a specific problem or system failure, such as problems with the engine, braking system, transmission system, etc. Real-time data from various vehicle sensors includes engine speed, vehicle speed, oil pressure, coolant temperature, etc. System status reports show the operating status of various vehicle systems, such as the health status and operating parameters of the engine, transmission, braking system, air conditioning system, etc. Vehicle performance parameters include acceleration time, fuel economy, emission levels, etc.
[0087] Specifically, firstly, the diagnostic terminal receives the vehicle diagnostic command, and sends a diagnostic request message to the vehicle terminal according to the vehicle diagnostic command and the target menu. The vehicle terminal then sends the diagnostic request message to the corresponding electronic control unit for diagnostic execution and generates a diagnostic response message. The diagnostic terminal receives the diagnostic response message sent by the vehicle terminal, obtains the vehicle diagnostic result based on the diagnostic response message, and displays the vehicle diagnostic result on the diagnostic terminal.
[0088] Based on the third embodiment, a fourth embodiment of this application is proposed. The difference between the fourth embodiment and the third embodiment is as follows:
[0089] In this embodiment, the diagnostic permission management method is applied to the vehicle side and includes the following steps:
[0090] Step S40: Set the menu configuration code in the electronic control unit of the target vehicle.
[0091] Step S50: In response to the read command from the diagnostic terminal, the menu configuration code is provided to the diagnostic terminal. The diagnostic terminal generates a target menu based on the menu configuration code. Based on the target menu, the target diagnostic operation is performed on the target vehicle to obtain the vehicle diagnostic result.
[0092] Specifically, a menu configuration code is set in the electronic control unit of the target vehicle. The setting of the menu configuration code includes setting at least one of the following: menu type, number of menus, menu identifier, number of menu bytes, and menu status.
[0093] The menu configuration code is used to set the management permissions for diagnostic functions. The menu type indicates the type of menu to be set, such as a first-level, second-level, or third-level menu. For example, a menu type of "0x01" indicates a first-level menu. The menu count indicates the number of corresponding menus under this menu type. For example, a menu count of "0x09" indicates 9 menus of this type. The menu identifier indicates the level of the second-level or lower-level menu it belongs to, meaning it is located under which parent menu. For example, a second-level menu with an identifier of "0x02" is located under the second first-level menu. The menu byte count indicates how many bytes of space are needed for the menu state. For example, if the menu state has 9 bits, 2 bytes of space are needed for the menu state, resulting in a menu byte count of "0x02". The menu state indicates the status of all sub-options under this menu. There are two states: disabled and diagnostic. For example, a second-level menu with a state of "0xC0" is equivalent to "1100" in binary. "0000" and "1" indicate that the diagnostic functions under this sub-menu are available, while "0" indicates that the diagnostic functions under this sub-menu are disabled. For easier understanding, please refer to [link / reference]. Figure 3 , Figure 3This is a diagram illustrating the configuration codes for a menu with a first-level menu and a second-level menu. Code 100 sets the menu type to a first-level menu, code 200 sets the number of first-level menu items, code 300 sets the menu status of the first-level menu, code 400 sets the menu type to a second-level menu, code 500 sets the number of second-level menu items, code 600 sets the menu identifier of the second-level menu, code 700 sets the number of bytes in the second-level menu, and code 800 sets the menu status of the second-level menu.
[0094] This embodiment, through the above-described solution, specifically by setting a menu configuration code in the electronic control unit of the target vehicle, manages the access permissions of the diagnostic functions on the diagnostic end through the menu configuration code. This effectively solves the technical problem of needing to manage diagnostic access permissions due to different diagnostic function requirements of vehicles in different scenarios or for different vehicle models, and improves the work efficiency of vehicle diagnostic operations.
[0095] Reference Figure 4 , Figure 4 This is a flowchart illustrating a fifth exemplary embodiment of the diagnostic permission management method of the present invention.
[0096] Based on the fourth embodiment, a fifth embodiment of this application is proposed. The difference between the fifth embodiment and the fourth embodiment is as follows:
[0097] In this embodiment, the steps of responding to the read command from the diagnostic terminal, providing the menu configuration code to the diagnostic terminal, having the diagnostic terminal generate a target menu based on the menu configuration code, and performing a target diagnostic operation on the target vehicle based on the target menu to obtain the vehicle diagnostic result include:
[0098] Step S51: In response to the read request command from the diagnostic terminal, the read request command is sent to the corresponding electronic control unit for execution, and the menu configuration code is provided to the diagnostic terminal.
[0099] Step S52: Receive the diagnostic request message sent by the diagnostic terminal.
[0100] Step S53: Send the diagnostic request message to the corresponding electronic control unit for diagnostic execution and generate a diagnostic response message.
[0101] Step S54: The diagnostic response message is sent to the diagnostic terminal, and the diagnostic terminal obtains the vehicle diagnostic result based on the diagnostic response message.
[0102] Specifically, the vehicle first responds to the read request command issued by the diagnostic terminal by sending the read request command to the corresponding electronic control unit for execution, and provides the menu configuration code to the diagnostic terminal. The read request command is the command issued by the diagnostic terminal to request the read of the menu configuration code.
[0103] Then, the vehicle receives a diagnostic request message sent by the diagnostic terminal. This diagnostic request message is generated by the diagnostic terminal after receiving a vehicle diagnostic command.
[0104] Then, the vehicle sends the diagnostic request message to the corresponding electronic control unit (ECU). Upon receiving the diagnostic request message, the ECU performs diagnostic execution and generates a diagnostic response message. The diagnostic request message, depending on the specific diagnostic scenario and vehicle configuration requirements, may include the diagnostic task to be executed and the target object of the task (such as the ECU requiring diagnostics). The request message is sent to the target ECU to execute the specific diagnostic task.
[0105] Finally, the vehicle sends the diagnostic response message to the diagnostic terminal, which then obtains the vehicle diagnostic results based on the diagnostic response message. After receiving the diagnostic response message, the diagnostic terminal can perform further analysis and processing to obtain information such as the diagnostic request execution result and vehicle diagnostic data, which can be displayed on the diagnostic terminal's interface.
[0106] This invention sets a menu configuration code in the electronic control unit (ECU) of the target vehicle. This menu configuration code is used to set the management permissions for diagnostic functions. The diagnostic terminal reads the menu configuration code from the vehicle and generates a target menu. Based on the target menu, a target diagnostic operation is performed on the target vehicle to obtain the vehicle diagnostic result. This effectively solves the technical problem of needing diagnostic permission management due to different diagnostic function requirements in different scenarios or for different vehicle models, thus improving the efficiency of vehicle diagnostic operations.
[0107] Based on the fifth embodiment, a sixth embodiment of this application is proposed. The difference between the sixth embodiment and the fifth embodiment is as follows:
[0108] In this embodiment, the method further includes:
[0109] Step S60: Receive modification operation instruction;
[0110] Step S70: Modify the menu setting code according to the modification operation instruction, so that the diagnostic terminal can obtain the modified target menu according to the modified menu configuration code.
[0111] It should be noted that the modification operation instruction is an instruction that specifies how to modify the menu configuration code; the modified target menu is a new function menu obtained after the diagnostic end initializes based on the original target menu and the menu configuration code is modified according to the specific actual changes; the modification operation includes, but is not limited to, adding, deleting, and modifying menu status, etc., used to modify the menu configuration code according to the specific actual changes, thereby generating the target menu corresponding to the requirements.
[0112] This embodiment, through the above-described solution, specifically modifies the menu setting code according to the actual situation, and then the diagnostic end obtains the target menu based on the modified menu configuration code. This effectively solves the problem of changes in diagnostic function permission management when the diagnostic needs of the target vehicle change due to specific actual needs. It can effectively adapt to changes in the diagnostic scenario, improve the precise control of diagnostic function permissions, and improve the efficiency of diagnostic operations on the target vehicle.
[0113] For example, in order to help understand the implementation process of the diagnostic permission management method in this embodiment, this embodiment provides a specific scenario-based description of the solution:
[0114] I. The diagnostic permission management method described above is applied to the vehicle side:
[0115] (1) Set the menu configuration code in the electronic control unit of the target vehicle.
[0116] The user determines the target diagnostic function required based on the diagnostic scenario and vehicle configuration. In the vehicle's electronic control unit (EUC), based on the target diagnostic function, a menu configuration code is set in the EUC, that is, the bytecode of the menu configuration code is written into the control unit. The menu configuration code is used to set the management permissions of the diagnostic function.
[0117] The target menu is set in the menu configuration code. Setting the target menu includes at least one of the following: menu type, number of menus, menu identifier, menu byte count, and menu status. For ease of understanding, this solution provides specific scenario-based examples of target menus, including first-level and second-level menus. Many other menu types can be set according to the same rules, but these will not be elaborated upon here. For further understanding, please refer to... Figure 5 , Figure 5 This is a schematic diagram illustrating the setting of the first-level menu in the menu configuration code provided in an embodiment of this application. It can be seen that... Figure 5 The menu type is represented by "0x01" in the orange area, indicating that the following is a setting for the first-level menu in the target menu; for example... Figure 5The blue area "0x09" indicates that the target menu has 9 first-level menus. Because there are 9 first-level menus, their menu status occupies the following two bytes. Figure 5 The menu status of the first-level menu described above is represented by the yellow area "0×FB, 0×80", corresponding to the binary number "1111 1011, 1000 0000". This indicates the status of all first-level menus. "1" indicates that the target vehicle's electronic control unit has the diagnostic function of that first-level menu, while "0" indicates that the target vehicle's electronic control unit has disabled the diagnostic function of that first-level menu.
[0118] Then, for easier understanding, please refer to... Figure 6 , Figure 6 This is a schematic diagram illustrating the setting of a second-level menu in a menu configuration code, as provided in an embodiment of this application. It can be seen that in the setting of the second-level menu in the menu configuration code, in... Figure 6 The menu type is indicated by "0x02" in the orange area, signifying a second-level menu setting; for example... Figure 6 The blue area "0x03" indicates the number of sub-menus, meaning there are 3 sub-menus. The menu identifier indicates the position of the target primary menu to which the target sub-menu belongs, determined by the position of the target primary menu. Figure 6 The green area indicates the sub-menu identifiers "0x02", "0x07", and "0x08", signifying that the sub-menu is located under the second, seventh, and eighth first-level menus, respectively. The menu byte count indicates the number of bytes occupied by the menu state, determining how many bytes of binary data are subsequently read to represent the menu state. Figure 6 The menu byte counts in the gray area are "0x01", "0x01", and "0x01", indicating that each of the three second-level menus occupies one byte of space; for example... Figure 6 The yellow areas in the middle menu are “0×C0”, “0×80”, and “0×C1”, which correspond to the binary numbers “1100 0000”, “1000 0000”, and “1100 0001”. “1” indicates that the target menu has the diagnostic function under this second-level menu, and “0” indicates that the target menu disables the diagnostic function under this second-level menu.
[0119] Therefore, the menu configuration code in the specific scenario-based embodiment of this solution is: 0×01 / 0×09 / 0×FB / 0×80 / 0×02 / 0×03 / 0×02 / 0×01 / 0×C0 / 0×07 / 0×01 / 0×80 / 0×01 / 0×C1
[0120] (2) In response to the reading command of the diagnostic terminal, the menu configuration code is provided to the diagnostic terminal, the diagnostic terminal generates a target menu based on the menu configuration code, and performs target diagnostic operations on the target vehicle based on the target menu to obtain the vehicle diagnostic result.
[0121] First, in response to the read request command from the diagnostic terminal, the read request command is sent to the corresponding electronic control unit for execution, and the menu configuration code is provided to the diagnostic terminal.
[0122] Then, the vehicle receives a diagnostic request message sent by the diagnostic terminal. This diagnostic request message is generated by the diagnostic terminal after receiving a vehicle diagnostic command.
[0123] Then, the vehicle sends the diagnostic request message to the corresponding electronic control unit (ECU). Upon receiving the diagnostic request message, the ECU performs diagnostic execution and generates a diagnostic response message. The diagnostic request message, depending on the specific diagnostic scenario and vehicle configuration requirements, may include the diagnostic task to be executed and the target object of the task (such as the ECU requiring diagnostics). The request message is sent to the target ECU to execute the specific diagnostic task.
[0124] Finally, the vehicle sends the diagnostic response message to the diagnostic terminal, which then obtains the vehicle diagnostic results based on the diagnostic response message. After receiving the diagnostic response message, the diagnostic terminal can perform further analysis and processing to obtain information such as the diagnostic request execution result and vehicle diagnostic data, which can be displayed on the diagnostic terminal's interface.
[0125] (3) Receive modification operation instruction; modify the menu setting code according to the modification operation instruction so that the diagnostic terminal can obtain the modified target menu according to the modified menu configuration code.
[0126] When specific needs change, such as when some diagnostic functions need to be disabled while others need to be authorized, a modification operation instruction is issued according to the specific needs. The menu configuration code is modified according to the modification operation instruction, and then the diagnostic terminal generates the modified target menu based on the modified menu configuration code.
[0127] II. The diagnostic permission management method described above is applied to the diagnostic end:
[0128] (1) Read the menu configuration code in the electronic control unit of the target vehicle; generate the target menu based on the menu configuration code.
[0129] First, the diagnostic tool reads the menu configuration code set in the electronic control unit of the target vehicle. The diagnostic terminal connects to the vehicle (either wirelessly or via a wired connection) and reads the menu configuration code from the vehicle's electronic control unit.
[0130] Then, the diagnostic terminal initializes the full-featured menu according to the settings in the menu configuration code, generating the target menu. If the menu status in the menu configuration code is negative, the diagnostic function is disabled; if the menu status in the menu configuration code is positive, the diagnostic function is added to the target menu. Here, the full-featured menu refers to the collection of all available diagnostic functions in the diagnostic terminal.
[0131] For easier understanding, please refer to Figure 7 , Figure 7 A schematic diagram of the target menu provided in the embodiments of this application. Figure 7 The diagnostic functions in black and red are the full-function menu of the diagnostic terminal. The red text represents the target menu generated after initialization based on the menu configuration code, while the black text represents the diagnostic functions that are disabled in the full-function menu and cannot be displayed or selected on the diagnostic terminal. The binary numbers following the diagnostic functions in the full-function menu represent the menu status in the menu configuration code. The green text, from top to bottom, represents the menu status of the first-level menu. The first-level menu occupies nine bits, so two bytes (16 bits) are allocated. Empty parts are represented by "0", corresponding to "0×FB, 0×80", and the corresponding binary number is "11111011, 1000 0000". The black text binary numbers following each second-level menu, from top to bottom, represent the menu status of the second-level menu. Each second-level menu is allocated 8 bits, with empty parts padded with "0" to indicate insufficient space. Therefore, the menu statuses of the three second-level menus are "0×C0", "0×80", and "0×C1", and the corresponding binary number is "1100". 0000, 1000 0000, 11000001.
[0132] (2) Based on the target menu, perform the target diagnosis operation on the target vehicle to obtain the vehicle diagnosis result.
[0133] First, a vehicle diagnostic command is received. Then, based on the vehicle diagnostic command and the target menu, a diagnostic request message is sent to the vehicle. The vehicle then forwards the diagnostic request message to the corresponding electronic control unit for diagnostic execution, generating a diagnostic response message. Finally, the diagnostic response message sent by the vehicle is received, and the vehicle diagnostic result is obtained based on the diagnostic response message and displayed on the diagnostic terminal.
[0134] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the diagnostic permission management method of this application. Any simple modifications based on this technical concept are within the protection scope of this application.
[0135] This application also provides a diagnostic access control device; please refer to [reference needed]. Figure 8 The diagnostic permission management device includes:
[0136] The reading module 801 is used to read the menu configuration code in the electronic control unit of the target vehicle;
[0137] Generation module 802 is used to generate a target menu based on the menu configuration code;
[0138] The diagnostic module 803 is used to perform target diagnostic operations on the target vehicle based on the target menu and obtain vehicle diagnostic results.
[0139] The diagnostic access management device provided in this application, employing the diagnostic access management method in the above embodiments, can solve the technical problem of diagnostic access management. Compared with the prior art, the beneficial effects of the diagnostic access management device provided in this application are the same as those of the diagnostic access management method provided in the above embodiments, and other technical features in the diagnostic access management device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.
[0140] This application provides a diagnostic permission management device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the diagnostic permission management method in Embodiment 1 above.
[0141] The following is for reference. Figure 9 The diagram illustrates a structural schematic suitable for implementing a diagnostic access management device according to embodiments of this application. The diagnostic access management device in embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable App Displays), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 9 The diagnostic access control device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0142] like Figure 9 As shown, the diagnostic access control device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.) that can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 1002 or programs loaded from storage device 1003 into random access memory (RAM) 1004. RAM 1004 also stores various programs and data required for the operation of the diagnostic access control device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via bus 1005. Input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the diagnostic access management device to communicate wirelessly or wiredly with other devices to exchange data. Although a diagnostic access management device with various systems is shown in the figure, it should be understood that it is not required to implement or possess all the systems shown. More or fewer systems may be implemented alternatively.
[0143] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0144] The diagnostic access management device provided in this application, employing the diagnostic access management method described in the above embodiments, can solve the technical problem of needing diagnostic access management due to different diagnostic function requirements for vehicles in different scenarios or with different vehicle models. Compared with the prior art, the beneficial effects of the diagnostic access management device provided in this application are the same as those of the diagnostic access management method provided in the above embodiments, and other technical features of this diagnostic access management device are the same as those disclosed in the previous embodiment method, and will not be repeated here.
[0145] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0146] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0147] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the diagnostic permission management method in the above embodiments.
[0148] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0149] The aforementioned computer-readable storage medium may be included in the diagnostic access control device; or it may exist independently and not be assembled into the diagnostic access control device.
[0150] The aforementioned computer-readable storage medium carries one or more programs, which, when executed by the diagnostic permission management device, cause the diagnostic permission management device to: perform diagnostic permission management.
[0151] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, SmallTalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0152] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0153] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0154] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described diagnostic permission management method, thereby solving the technical problem of diagnostic permission management. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the diagnostic permission management method provided in the above embodiments, and will not be repeated here.
[0155] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the diagnostic permission management method described above.
[0156] The computer program product provided in this application can solve the technical problem of needing diagnostic access management due to different diagnostic function requirements for vehicles in different scenarios or with different vehicle models. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the diagnostic access management method provided in the above embodiments, and will not be repeated here.
[0157] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.
Claims
1. A diagnostic access control method, characterized in that, The diagnostic permission management method is applied to the diagnostic terminal, and the method includes: The menu configuration code is read from the electronic control unit of the target vehicle. The menu configuration code is bytecode written into the electronic control unit of the target vehicle to preset the diagnostic function. It is used to configure the diagnostic function required by the target vehicle. The setting of the menu configuration code includes setting the menu type, number of menus, menu identifier, number of menu bytes and menu status. Generate the target menu based on the menu configuration code; Based on the target menu, a target diagnostic operation is performed on the target vehicle to obtain the vehicle diagnostic result; The step of generating the target menu based on the menu configuration code includes: Read menu configuration code; Initialize according to the menu configuration code to generate the target menu; The step of initializing according to the menu configuration code to obtain the target menu includes: If the menu status in the menu configuration code is no, then the diagnostic function will be disabled. If the menu status in the menu configuration code is yes, then the diagnostic function is added to the target menu; The method further includes: receiving a modification operation instruction from the vehicle end, modifying the menu setting code according to the modification operation instruction, so that the diagnostic end can obtain the modified target menu according to the modified menu configuration code.
2. The method as described in claim 1, characterized in that, The steps of performing target diagnostic operations on the target vehicle based on the target menu and obtaining vehicle diagnostic results include: Receive vehicle diagnostic commands; According to the vehicle diagnostic instruction, based on the target menu, a diagnostic request message is sent to the vehicle terminal, which then sends the diagnostic request message to the corresponding electronic control unit for diagnostic execution and generates a diagnostic response message. The system receives a diagnostic response message sent by the vehicle and obtains the vehicle diagnostic result based on the diagnostic response message.
3. A diagnostic access control method, characterized in that, The diagnostic permission management method is applied to the vehicle end, and the method includes: A menu configuration code is set in the electronic control unit of the target vehicle. The menu configuration code is bytecode written into the electronic control unit of the target vehicle to preset the diagnostic function. It is used to configure the diagnostic function required by the target vehicle. The menu configuration code includes menu type, number of menus, menu identifier, number of menu bytes and menu status. In response to the read command from the diagnostic terminal, the menu configuration code is provided to the diagnostic terminal, which generates a target menu based on the menu configuration code, performs the target diagnostic operation on the target vehicle based on the target menu, and obtains the vehicle diagnostic result. The step of generating the target menu by the diagnostic terminal based on the menu configuration code includes: Read the menu configuration code, initialize according to the menu configuration code, and generate the target menu; The step of initializing based on the menu configuration code and generating the target menu includes: If the menu status in the menu configuration code is no, then the diagnostic function will be disabled. If the menu status in the menu configuration code is yes, then the diagnostic function is added to the target menu; The method further includes: Receive modification operation instructions; The menu setting code is modified according to the modification operation instruction, so that the diagnostic terminal can obtain the modified target menu based on the modified menu configuration code.
4. The method as described in claim 3, characterized in that, The steps of responding to a read command from the diagnostic terminal, providing the menu configuration code to the diagnostic terminal, having the diagnostic terminal generate a target menu based on the menu configuration code, and performing a target diagnostic operation on the target vehicle based on the target menu to obtain the vehicle diagnostic result include: In response to a read request command from the diagnostic terminal, the read request command is sent to the corresponding electronic control unit for execution, and the menu configuration code is provided to the diagnostic terminal. Receive the diagnostic request message sent by the diagnostic terminal; The diagnostic request message is sent to the corresponding electronic control unit for diagnostic execution, and a diagnostic response message is generated. The diagnostic response message is sent to the diagnostic terminal, which then obtains the vehicle diagnostic result based on the diagnostic response message.
5. A diagnostic access control device, characterized in that, The device includes: The reading module is used to read the menu configuration code in the electronic control unit of the target vehicle. The menu configuration code is bytecode written into the electronic control unit of the target vehicle to preset the diagnostic function and is used to configure the diagnostic function required by the target vehicle. The menu configuration code includes menu type, number of menus, menu identifier, number of menu bytes and menu status. The generation module is used to generate the target menu based on the menu configuration code; The diagnostic module is used to perform target diagnostic operations on the target vehicle based on the target menu and obtain vehicle diagnostic results; The generation module is further configured to: read menu configuration codes; Initialize according to the menu configuration code to generate the target menu; The generation module is further configured to: if the menu status in the menu configuration code is no, then disable the diagnostic function. If the menu status in the menu configuration code is yes, then the diagnostic function is added to the target menu; The device further includes a modification module, which is used to: receive a modification operation instruction from the vehicle end, and modify the menu setting code according to the modification operation instruction, so that the diagnostic end can obtain the modified target menu according to the modified menu configuration code.
6. A diagnostic access control device, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the diagnostic access management method as described in any one of claims 1 to 4.
7. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the diagnostic permission management method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Vehicle diagnosis menu generation method and device, equipment and medium
CN111694345A