[go: up one dir, main page]

CN114415631A - Diagnostic tool based ECU (electronic control Unit) diagnostic method and diagnostic tool - Google Patents

Diagnostic tool based ECU (electronic control Unit) diagnostic method and diagnostic tool Download PDF

Info

Publication number
CN114415631A
CN114415631A CN202111672234.7A CN202111672234A CN114415631A CN 114415631 A CN114415631 A CN 114415631A CN 202111672234 A CN202111672234 A CN 202111672234A CN 114415631 A CN114415631 A CN 114415631A
Authority
CN
China
Prior art keywords
module
diagnosis
request
request message
diagnostic
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111672234.7A
Other languages
Chinese (zh)
Inventor
刘鑫蜚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jingwei Hengrun Tianjin Research And Development Co ltd
Original Assignee
Jingwei Hengrun Tianjin Research And Development Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jingwei Hengrun Tianjin Research And Development Co ltd filed Critical Jingwei Hengrun Tianjin Research And Development Co ltd
Priority to CN202111672234.7A priority Critical patent/CN114415631A/en
Publication of CN114415631A publication Critical patent/CN114415631A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B23/00Testing or monitoring of control systems or parts thereof
    • G05B23/02Electric testing or monitoring
    • G05B23/0205Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults
    • G05B23/0218Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults characterised by the fault detection method dealing with either existing or incipient faults
    • G05B23/0221Preprocessing measurements, e.g. data collection rate adjustment; Standardization of measurements; Time series or signal analysis, e.g. frequency analysis or wavelets; Trustworthiness of measurements; Indexes therefor; Measurements using easily measured parameters to estimate parameters difficult to measure; Virtual sensor creation; De-noising; Sensor fusion; Unconventional preprocessing inherently present in specific fault detection methods like PCA-based methods

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Computer And Data Communications (AREA)

Abstract

本发明公开一种基于诊断工具的ECU诊断方法及诊断工具,包括:请求报文生成模块通过交互模块向用户设备提目标诊断请求列表,通过交互模块接收指定诊断请求标识,从诊断管理模块获取目标请求报文参数和目标请求报文结构,通过交互模块向用户设备提供目标请求报文参数,通过交互模块接收用户设备反馈的请求报文参数值,根据目标请求报文结构和请求报文参数值生成诊断请求报文,将诊断请求报文发送给待诊断ECU;响应报文解析模块接收待诊断ECU发送的对应于诊断请求报文的诊断响应报文,将诊断响应报文发送给诊断管理模块,接收诊断管理模块发送的目标响应报文结构,根据目标响应报文结构对诊断响应报文进行解析,通过交互模块向用户设备提供的解析结果。

Figure 202111672234

The invention discloses an ECU diagnosis method and a diagnosis tool based on a diagnosis tool, comprising: a request message generation module submits a target diagnosis request list to a user equipment through an interaction module, receives a designated diagnosis request identifier through the interaction module, and obtains a target diagnosis from a diagnosis management module Request message parameters and target request message structure, provide target request message parameters to the user equipment through the interaction module, receive request message parameter values fed back by the user equipment through the interaction module, according to the target request message structure and request message parameter values Generate a diagnosis request message, and send the diagnosis request message to the ECU to be diagnosed; the response message parsing module receives the diagnosis response message corresponding to the diagnosis request message sent by the ECU to be diagnosed, and sends the diagnosis response message to the diagnosis management module. Receive the target response message structure sent by the diagnosis management module, parse the diagnosis response message according to the target response message structure, and provide the analysis result to the user equipment through the interaction module.

Figure 202111672234

Description

基于诊断工具的ECU诊断方法及诊断工具ECU Diagnosis Method and Diagnosis Tool Based on Diagnosis Tool

技术领域technical field

本发明涉及汽车技术领域,具体而言,涉及一种基于诊断工具的ECU诊断方法及诊断工具。The invention relates to the technical field of automobiles, and in particular, to an ECU diagnosis method and a diagnosis tool based on a diagnosis tool.

背景技术Background technique

ECU(Electronic Control Unit,电子控制单元)是种用于对车辆的某一部分系统进行控制的控制器,它和普通的电脑一样,由微控制器、存储器、输入/输出接口、模数转换器以及驱动等大规模集成电路组成。用一句简单的话来形容就是“ECU就是车辆的大脑”。ECU (Electronic Control Unit, Electronic Control Unit) is a controller used to control a certain part of the system of the vehicle. Like an ordinary computer, it consists of a microcontroller, memory, input/output interface, analog-to-digital converter and It is composed of large-scale integrated circuits such as drivers. To describe it in a simple sentence is "ECU is the brain of the vehicle".

ECU的诊断软件是其内置程序的重要组成部分,它的任务是对自身的硬件和软件进行实时监控,并对发现的各种故障进行适当处理,从而确保人车安全、加速维修。目前的ECU诊断方案依赖特定ECU的诊断数据,一旦需要适配不同型号ECU,诊断数据发生变更,导致诊断仪代码需要修改,并且需要重写编译才能适配修改,从而使得无论是首次开发还是二次修改都需要消耗较长的时间。The diagnostic software of the ECU is an important part of its built-in program. Its task is to monitor its own hardware and software in real time, and to properly handle the various faults found, so as to ensure the safety of people and vehicles and speed up maintenance. The current ECU diagnostic solution relies on the diagnostic data of a specific ECU. Once it needs to adapt to different types of ECUs, the diagnostic data changes, resulting in the need to modify the code of the diagnostic instrument, and it needs to be rewritten and compiled to adapt to the modification, so that whether it is the first development or the second Each modification takes a long time.

发明内容SUMMARY OF THE INVENTION

本发明提供了一种基于诊断工具的ECU诊断方法及诊断工具,能够基于ODX(OpenDiagnostic data exchang,开放式诊断数据交换)文件实现解耦的ECU诊断软件框架,从而当ECU类型发生改变时,只需加载不同的ODX文件即可,使得开发效率得到了提高,且由于各个模块相对独立对诊断需求进行了功能分解,使得开发周期及维护周期的成本得到了很大压缩。The invention provides an ECU diagnosis method and a diagnosis tool based on a diagnosis tool, which can realize a decoupled ECU diagnosis software framework based on an ODX (OpenDiagnostic data exchange) file, so that when the ECU type changes, only the It only needs to load different ODX files, which improves the development efficiency, and because each module relatively independently decomposes the diagnostic requirements, the cost of the development cycle and maintenance cycle has been greatly reduced.

具体的技术方案如下:The specific technical solutions are as follows:

第一方面,本发明实施例提供了一种基于诊断工具的ECU诊断方法,所述诊断工具包括数据库模块、诊断管理模块、请求报文生成模块、响应报文解析模块和交互模块,所述方法包括:In a first aspect, an embodiment of the present invention provides an ECU diagnosis method based on a diagnosis tool. The diagnosis tool includes a database module, a diagnosis management module, a request message generation module, a response message analysis module, and an interaction module. The method include:

所述请求报文生成模块通过所述交互模块向用户设备提供所述数据库模块支持的目标诊断请求列表,其中,所述目标诊断请求列表是根据所述数据库模块对开放式诊断数据交换ODX文件解析得到的诊断数据生成的,所述目标诊断请求列表包括指定诊断服务对应的诊断请求列表;The request message generation module provides the user equipment with a target diagnosis request list supported by the database module through the interaction module, wherein the target diagnosis request list is based on the database module parsing the ODX file of the open diagnostic data exchange Generated from the obtained diagnosis data, the target diagnosis request list includes a diagnosis request list corresponding to the specified diagnosis service;

所述请求报文生成模块通过所述交互模块接收所述用户设备反馈的指定诊断请求标识,其中,所述指定诊断请求标识为所述指定诊断服务对应的诊断请求列表中的诊断请求标识;The request message generation module receives, through the interaction module, a designated diagnosis request identifier fed back by the user equipment, wherein the designated diagnosis request identifier is a diagnosis request identifier in a diagnosis request list corresponding to the designated diagnosis service;

所述请求报文生成模块从所述诊断管理模块获取目标请求报文参数和目标请求报文结构,并通过所述交互模块向所述用户设备提供所述目标请求报文参数,通过所述交互模块接收所述用户设备反馈的所述目标请求报文参数对应的请求报文参数值,其中,所述目标请求报文参数为与所述指定诊断请求标识对应的请求报文参数,所述目标请求报文结构为与所述指定诊断请求标识对应的请求报文结构,所述诊断管理模块中存储的所述目标请求报文参数和所述目标请求报文结构是从所述数据库模块中存储的所述诊断数据中获取的;The request message generation module obtains the target request message parameters and the target request message structure from the diagnosis management module, and provides the user equipment with the target request message parameters through the interaction module. The module receives the request message parameter value corresponding to the target request message parameter fed back by the user equipment, wherein the target request message parameter is the request message parameter corresponding to the specified diagnosis request identifier, and the target request message parameter The request message structure is a request message structure corresponding to the specified diagnosis request identifier, and the target request message parameters and the target request message structure stored in the diagnosis management module are stored in the database module. obtained from the diagnostic data of ;

所述请求报文生成模块根据所述目标请求报文结构和所述请求报文参数值生成诊断请求报文,并将所述诊断请求报文发送给待诊断ECU;The request message generation module generates a diagnosis request message according to the target request message structure and the request message parameter value, and sends the diagnosis request message to the ECU to be diagnosed;

所述响应报文解析模块接收所述待诊断ECU发送的对应于所述诊断请求报文的诊断响应报文,并将所述诊断响应报文发送给所述诊断管理模块;The response message parsing module receives a diagnosis response message corresponding to the diagnosis request message sent by the to-be-diagnosed ECU, and sends the diagnosis response message to the diagnosis management module;

所述响应报文解析模块接收所述诊断管理模块发送的目标响应报文结构,根据所述目标响应报文结构对所述诊断响应报文进行解析,并通过所述交互模块向所述用户设备提供针对所述诊断响应报文的解析结果,其中,所述目标响应报文结构为与所述诊断响应报文对应的响应报文结构,所述诊断管理模块中存储的所述目标响应报文结构是从所述数据库模块中存储的所述诊断数据中获取的。The response message parsing module receives the target response message structure sent by the diagnosis management module, parses the diagnosis response message according to the target response message structure, and sends the message to the user equipment through the interaction module. Provide a parsing result for the diagnosis response message, wherein the target response message structure is a response message structure corresponding to the diagnosis response message, and the target response message stored in the diagnosis management module The structure is obtained from the diagnostic data stored in the database module.

在一种实施方式中,所述请求报文生成模块通过所述交互模块向用户设备提供所述数据库模块支持的目标诊断请求列表,包括:In an implementation manner, the request message generation module provides the user equipment with a list of target diagnosis requests supported by the database module through the interaction module, including:

所述请求报文生成模块将从所述诊断管理模块中获取的诊断服务列表通过所述交互模块提供给所述用户设备,其中,所述诊断管理模块从所述数据库模块获取所述诊断数据,并根据所述诊断数据生成所述诊断服务列表和所述诊断服务列表中每个诊断服务对应的诊断请求列表;The request message generation module provides the diagnosis service list obtained from the diagnosis management module to the user equipment through the interaction module, wherein the diagnosis management module obtains the diagnosis data from the database module, and generating the list of diagnostic services and a list of diagnostic requests corresponding to each diagnostic service in the list of diagnostic services according to the diagnostic data;

所述请求报文生成模块通过所述交互模块接收所述用户设备反馈的指定诊断服务;The request message generation module receives the specified diagnostic service fed back by the user equipment through the interaction module;

所述请求报文生成模块从所述诊断管理模块中获取与所述指定诊断服务对应的诊断请求列表作为所述目标诊断请求列表;The request message generation module obtains a diagnosis request list corresponding to the specified diagnosis service from the diagnosis management module as the target diagnosis request list;

所述请求报文生成模块通过所述交互模块向所述用户设备提供所述目标诊断请求列表。The request message generating module provides the user equipment with the target diagnosis request list through the interaction module.

在一种实施方式中,所述诊断数据包括至少一个诊断服务,至少一个诊断请求标识,至少一个请求报文参数,至少一个请求报文结构,至少一个响应报文结构,诊断服务和诊断请求标识的第一映射关系,以及诊断请求标识、请求报文参数与请求报文结构的第二映射关系,所述诊断管理模块包括诊断服务管理子模块和诊断请求管理子模块;In one embodiment, the diagnostic data includes at least one diagnostic service, at least one diagnostic request identifier, at least one request message parameter, at least one request message structure, at least one response message structure, diagnostic service and diagnostic request identifier The first mapping relationship, and the second mapping relationship between the diagnosis request identifier, the request message parameter and the request message structure, the diagnosis management module includes a diagnosis service management submodule and a diagnosis request management submodule;

所述请求报文生成模块将从所述诊断管理模块中获取的诊断服务列表通过所述交互模块提供给所述用户设备,包括:所述请求报文生成模块将从所述诊断服务管理子模块中获取的诊断服务列表通过所述交互模块提供给所述用户设备;The request message generating module provides the diagnostic service list obtained from the diagnostic management module to the user equipment through the interaction module, including: the request message generating module will generate a list of diagnostic services from the diagnostic service management sub-module. The list of diagnostic services obtained in is provided to the user equipment through the interaction module;

所述请求报文生成模块从所述诊断管理模块中获取与所述指定诊断服务对应的诊断请求列表作为所述目标诊断请求列表,包括:所述请求报文生成模块从所述诊断请求管理子模块中获取与所述指定诊断服务对应的诊断请求列表作为所述目标诊断请求列表,其中,所述诊断请求管理子模块从所述诊断管理服务子模块获取所述指定诊断服务,根据所述指定诊断服务、所述第一映射关系确定所述目标诊断请求列表;The request message generation module obtains a diagnosis request list corresponding to the specified diagnosis service from the diagnosis management module as the target diagnosis request list, including: the request message generation module obtains from the diagnosis request management sub-module. The diagnosis request list corresponding to the specified diagnosis service is obtained in the module as the target diagnosis request list, wherein the diagnosis request management sub-module obtains the specified diagnosis service from the diagnosis management service sub-module, and the specified diagnosis service is obtained according to the specified diagnosis service sub-module. The diagnosis service, the first mapping relationship determines the target diagnosis request list;

所述请求报文生成模块从所述诊断管理模块获取目标请求报文参数和目标请求报文结构,包括:所述请求报文生成模块从所述诊断请求管理子模块获取所述目标请求报文参数和所述目标请求报文结构,其中,所述诊断请求管理子模块根据所述第二映射关系和所述指定诊断请求标识确定所述目标请求报文参数和所述目标请求报文结构。The request message generation module obtains the target request message parameters and the target request message structure from the diagnosis management module, including: the request message generation module obtains the target request message from the diagnosis request management sub-module parameters and the target request message structure, wherein the diagnosis request management sub-module determines the target request message parameters and the target request message structure according to the second mapping relationship and the specified diagnosis request identifier.

在一种实施方式中,所述诊断数据还包括诊断请求标识与响应报文结构的第三映射关系,所述诊断管理模块还包括诊断响应管理子模块;In one embodiment, the diagnosis data further includes a third mapping relationship between the diagnosis request identifier and the response message structure, and the diagnosis management module further includes a diagnosis response management sub-module;

所述响应报文解析模块将所述诊断响应报文发送给所述诊断管理模块,包括:所述响应报文解析模块将所述诊断响应报文发送给所述诊断响应管理子模块;The response message parsing module sending the diagnostic response message to the diagnostic management module includes: the response message parsing module sending the diagnostic response message to the diagnostic response management sub-module;

所述响应报文解析模块接收所述诊断管理模块发送的目标响应报文结构,包括:所述响应报文解析模块接收所述诊断响应管理子模块发送的目标响应报文结构,其中,所述诊断响应管理子模块从所述诊断请求管理子模块中获取所述指定诊断诊断请求标识,根据所述指定诊断请求标识、所述第三映射关系确定目标响应报文结构。The response message parsing module receiving the target response message structure sent by the diagnosis management module includes: the response message parsing module receiving the target response message structure sent by the diagnostic response management sub-module, wherein the The diagnosis response management sub-module acquires the specified diagnosis diagnosis request identifier from the diagnosis request management sub-module, and determines a target response message structure according to the specified diagnosis request identifier and the third mapping relationship.

在一种实施方式中,根据所述目标响应报文结构对所述诊断响应报文进行解析,并通过所述交互模块向所述用户设备提供针对所述诊断响应报文的解析结果,包括:In one embodiment, the diagnostic response message is parsed according to the target response message structure, and the user equipment is provided with a parsing result for the diagnostic response message through the interaction module, including:

所述响应报文解析模块根据所述目标响应报文结构对所述诊断响应报文进行解析,获得基于json格式的解析结果,并将所述基于json格式的解析结果发送给所述交互模块;The response message parsing module parses the diagnostic response message according to the target response message structure, obtains a parsing result based on the json format, and sends the parsing result based on the json format to the interaction module;

所述交互模块将所述基于json格式的解析结果解析成满足预设解析需求的解析结果,并将所述满足预设解析需求的解析结果反馈给所述用户设备。The interaction module parses the parsing result based on the json format into an parsing result satisfying a preset parsing requirement, and feeds back the parsing result satisfying the preset parsing requirement to the user equipment.

在一种实施方式中,所述交互模块包括服务交互子模块和请求交互子模块,所述请求报文生成模块将从所述诊断管理模块中获取的诊断服务列表通过所述交互模块提供给所述用户设备,包括:所述请求报文生成模块将从所述诊断管理模块中获取的诊断服务列表通过所述服务交互子模块提供给所述用户设备;In one embodiment, the interaction module includes a service interaction submodule and a request interaction submodule, and the request message generation module provides the diagnostic service list obtained from the diagnosis management module to the user through the interaction module. The user equipment includes: the request message generation module provides the diagnosis service list obtained from the diagnosis management module to the user equipment through the service interaction sub-module;

所述请求报文生成模块通过所述交互模块接收所述用户设备反馈的指定诊断服务,包括:所述请求报文生成模块通过所述服务交互子模块接收所述用户设备反馈的指定诊断服务;The request message generation module receives the specified diagnostic service fed back by the user equipment through the interaction module, including: the request message generation module receives the specified diagnostic service fed back by the user equipment through the service interaction sub-module;

所述请求报文生成模块通过所述交互模块向所述用户设备提供所述目标诊断请求列表,包括:所述请求报文生成模块通过所述请求交互子模块向所述用户设备提供所述目标诊断请求列表;The request message generation module provides the user equipment with the target diagnosis request list through the interaction module, including: the request message generation module provides the user equipment with the target through the request interaction sub-module list of diagnostic requests;

所述请求报文生成模块通过所述交互模块接收所述用户设备反馈的指定诊断请求标识,包括:所述请求报文生成模块通过所述请求交互子模块接收所述用户设备反馈的指定诊断请求标识;The request message generation module receives the specified diagnosis request identifier fed back by the user equipment through the interaction module, including: the request message generation module receives the specified diagnosis request fed back by the user equipment through the request interaction sub-module identification;

所述请求报文生成模块通过所述交互模块向所述用户设备提供所述目标请求报文参数,通过所述交互模块接收所述用户设备反馈的所述目标请求报文参数对应的请求报文参数值,包括:所述请求报文生成模块通过所述请求交互子模块向所述用户设备提供所述目标请求报文参数,通过所述请求交互子模块接收所述用户设备反馈的所述目标请求报文参数对应的请求报文参数值。The request message generation module provides the user equipment with the target request message parameters through the interaction module, and receives, through the interaction module, a request message corresponding to the target request message parameters fed back by the user equipment parameter value, including: the request message generation module provides the target request message parameter to the user equipment through the request interaction sub-module, and receives the target feedback from the user equipment through the request interaction sub-module The request message parameter value corresponding to the request message parameter.

在一种实施方式中,所述交互模块还包括响应交互子模块,所述响应报文解析模块将所述基于json格式的解析结果发送给所述交互模块,包括:所述响应报文解析模块将所述基于json格式的解析结果发送给所述响应交互子模块;In an embodiment, the interaction module further includes a response interaction sub-module, and the response message parsing module sends the parsing result based on json format to the interaction module, including: the response message parsing module sending the json format-based parsing result to the response interaction submodule;

所述交互模块将所述基于json格式的解析结果解析成满足预设解析需求的解析结果,并将所述满足预设解析需求的解析结果发送给所述用户设备包括:所述响应交互子模块将所述基于json格式的解析结果解析成满足预设解析需求的解析结果,并将所述满足预设解析需求的解析结果发送给所述用户设备。The interaction module parses the parsing result based on the json format into an parsing result that meets the preset parsing requirement, and sends the parsing result that meets the preset parsing requirement to the user equipment, including: the response interaction sub-module The parsing result based on the json format is parsed into a parsing result that meets the preset parsing requirement, and the parsing result that meets the preset parsing requirement is sent to the user equipment.

在一种实施方式中,所述诊断工具还包括诊断报文记录模块,所述诊断报文记录模块用于记录所述诊断请求报文和/或所述诊断响应报文。In an embodiment, the diagnostic tool further includes a diagnostic message recording module, where the diagnostic message recording module is configured to record the diagnostic request message and/or the diagnostic response message.

第二方面,本发明实施例提供了一种诊断工具,所述诊断工具包括数据库模块、诊断管理模块、请求报文生成模块、响应报文解析模块和交互模块;In a second aspect, an embodiment of the present invention provides a diagnosis tool, where the diagnosis tool includes a database module, a diagnosis management module, a request message generation module, a response message analysis module, and an interaction module;

所述数据库模块,用于对开放式诊断数据交换ODX文件进行解析,获得诊断数据;The database module is used to parse the open diagnostic data exchange ODX file to obtain diagnostic data;

所述诊断管理模块,用于从所述数据库模块获取所述诊断数据,并根据所述诊断数据生成每个诊断服务对应的诊断请求列表;the diagnosis management module, configured to obtain the diagnosis data from the database module, and generate a diagnosis request list corresponding to each diagnosis service according to the diagnosis data;

所述请求生成报文模块,用于从所述诊断管理模块获取目标诊断请求列表,并将所述目标诊断请求列表发送给所述交互模块,其中,所述目标诊断请求列表包括指定诊断服务对应的诊断请求列表;The request generating message module is used to obtain a target diagnosis request list from the diagnosis management module, and send the target diagnosis request list to the interaction module, wherein the target diagnosis request list includes the corresponding diagnosis service. list of diagnostic requests;

所述交互模块,用于接收所述请求报文生成模块发送的所述目标诊断请求列表,并将所述目标诊断请求列表反馈给用户设备,接收所述用户设备反馈的指定诊断请求标识,并将所述指定诊断请求标识发送给所述请求生成报文模块,其中,所述指定诊断请求标识为所述指定诊断服务对应的诊断请求列表中的诊断请求标识;The interaction module is configured to receive the target diagnosis request list sent by the request message generation module, and feed back the target diagnosis request list to the user equipment, receive the specified diagnosis request identifier fed back by the user equipment, and sending the specified diagnosis request identifier to the request generating message module, wherein the specified diagnosis request identifier is the diagnosis request identifier in the diagnosis request list corresponding to the specified diagnosis service;

所述请求生成报文模块,还用于接收所述交互模块发送的所述指定诊断请求标识,并将所述指定诊断请求标识发送给所述诊断管理模块;The request generating message module is further configured to receive the designated diagnosis request identifier sent by the interaction module, and send the designated diagnosis request identifier to the diagnosis management module;

所述诊断管理模块,还用于接收所述请求生成报文模块发送的所述指定诊断请求标识,并查找指定诊断请求标识对应的目标请求报文参数和目标请求报文结构,并将所述目标请求报文参数和所述目标请求报文结构发送给所述请求报文生成模块,其中,所述目标请求报文参数为与所述指定诊断请求标识对应的请求报文参数,所述目标请求报文结构为与所述指定诊断请求标识对应的请求报文结构,所述目标请求报文参数和所述目标请求报文结构是从所述诊断数据中获取的;The diagnosis management module is further configured to receive the specified diagnosis request identifier sent by the request generation message module, search for the target request message parameter and target request message structure corresponding to the specified diagnosis request identifier, and store the specified diagnosis request message. The target request message parameter and the target request message structure are sent to the request message generation module, wherein the target request message parameter is a request message parameter corresponding to the specified diagnosis request identifier, and the target request message parameter is The request message structure is a request message structure corresponding to the specified diagnosis request identifier, and the target request message parameter and the target request message structure are obtained from the diagnosis data;

所述请求报文生成模块,还用于接收所述诊断管理模块发送的所述目标请求报文参数和所述目标请求报文结构,并向所述交互模块发送所述目标请求报文参数,;The request message generation module is further configured to receive the target request message parameters and the target request message structure sent by the diagnosis management module, and send the target request message parameters to the interaction module, ;

所述交互模块,还用于接收所述请求报文生成模块发送的所述目标请求报文参数,并将所述目标请求报文参数反馈给所述用户设备,接收所述用户设备反馈的所述目标请求报文参数对应的请求报文参数值,将所述请求报文参数值发送给所述请求报文生成模块;The interaction module is further configured to receive the target request message parameters sent by the request message generation module, feed back the target request message parameters to the user equipment, and receive all the feedback from the user equipment. the request message parameter value corresponding to the target request message parameter, and send the request message parameter value to the request message generation module;

所述请求报文生成模块,还用于接收所述交互模块发送的所述请求报文参数值,根据所述目标请求报文结构和所述请求报文参数值生成诊断请求报文,并将所述诊断请求报文发送给待诊断ECU;The request message generation module is further configured to receive the request message parameter value sent by the interaction module, generate a diagnosis request message according to the target request message structure and the request message parameter value, and send the request message to the request message. The diagnosis request message is sent to the ECU to be diagnosed;

所述响应报文解析模块,用于接收所述待诊断ECU发送的对应于所述诊断请求报文的诊断响应报文,并将所述诊断响应报文发送给所述诊断管理模块;The response message parsing module is configured to receive a diagnosis response message corresponding to the diagnosis request message sent by the ECU to be diagnosed, and send the diagnosis response message to the diagnosis management module;

所述诊断管理模块,还用于接收所述响应报文解析模块发送的所述诊断响应报文,查找目标响应报文结构,并将所述目标响应报文结构发送给所述响应报文解析模块,其中,所述目标响应报文结构为所述诊断响应报文对应的响应报文结构,所述目标响应报文结构是从所述诊断数据中获取的;The diagnostic management module is further configured to receive the diagnostic response message sent by the response message parsing module, search for a target response message structure, and send the target response message structure to the response message parsing module, wherein the target response message structure is a response message structure corresponding to the diagnostic response message, and the target response message structure is obtained from the diagnostic data;

所述响应报文解析模块,还用于接收所述诊断管理模块发送的所述目标响应报文结构,根据所述目标响应报文结构对所述诊断响应报文进行解析,并通过所述交互模块向所述用户设备提供针对所述诊断响应报文的解析结果。The response message parsing module is further configured to receive the target response message structure sent by the diagnosis management module, parse the diagnostic response message according to the target response message structure, and use the interactive The module provides the user equipment with a parsing result for the diagnostic response message.

在一种实施方式中,所述诊断工具还包括诊断报文记录模块,所述诊断报文记录模块,用于记录所述诊断请求报文和/或所述诊断响应报文。In an embodiment, the diagnostic tool further includes a diagnostic message recording module, the diagnostic message recording module is configured to record the diagnostic request message and/or the diagnostic response message.

在一种实施方式中,所述诊断管理模块,还用于根据所述诊断数据生成诊断服务列表,并将所述诊断服务列表发送给所述请求报文生成模块;In an embodiment, the diagnosis management module is further configured to generate a diagnosis service list according to the diagnosis data, and send the diagnosis service list to the request message generation module;

所述请求报文生成模块,用于接收所述诊断管理模块发送的所述诊断服务列表,并将所述诊断服务列表发送给所述交互模块;The request message generation module is configured to receive the diagnosis service list sent by the diagnosis management module, and send the diagnosis service list to the interaction module;

所述交互模块,用于接收所述请求报文生成模块发送的所述诊断服务列表,并将所述诊断服务列表提供给所述用户设备,接收所述用户设备反馈的指定诊断服务,将所述指定诊断服务发送给所述请求报文生成模块;The interaction module is configured to receive the diagnosis service list sent by the request message generation module, provide the diagnosis service list to the user equipment, receive the specified diagnosis service fed back by the user equipment, and convert the diagnosis service list to the user equipment. The specified diagnostic service is sent to the request message generation module;

所述请求报文生成模块,用于接收所述交互模块发送的所述指定诊断服务,将所述指定诊断服务发送给所述诊断管理模块;The request message generation module is configured to receive the designated diagnosis service sent by the interaction module, and send the designated diagnosis service to the diagnosis management module;

所述诊断管理模块,用于接收所述请求报文生成模块发送的所述指定诊断服务,并将所述指定诊断服务对应的诊断请求列表作为所述目标诊断请求列表,将所述目标诊断请求列表发送给所述请求报文生成模块。The diagnosis management module is configured to receive the specified diagnosis service sent by the request message generation module, and use the diagnosis request list corresponding to the specified diagnosis service as the target diagnosis request list, and use the target diagnosis request list The list is sent to the request message generation module.

在一种实施方式中,所述诊断数据包括至少一个诊断服务,至少一个诊断请求标识,至少一个请求报文参数,至少一个请求报文结构,至少一个响应报文结构,诊断服务和诊断请求标识的第一映射关系,以及诊断请求标识、请求报文参数与请求报文结构的第二映射关系,所述诊断管理模块包括诊断服务管理子模块和诊断请求管理子模块;In one embodiment, the diagnostic data includes at least one diagnostic service, at least one diagnostic request identifier, at least one request message parameter, at least one request message structure, at least one response message structure, diagnostic service and diagnostic request identifier The first mapping relationship, and the second mapping relationship between the diagnosis request identifier, the request message parameter and the request message structure, the diagnosis management module includes a diagnosis service management submodule and a diagnosis request management submodule;

所述诊断服务管理子模块,用于根据所述诊断数据生成诊断服务列表,并将所述诊断服务列表发送给所述请求报文生成模块;The diagnostic service management submodule is configured to generate a diagnostic service list according to the diagnostic data, and send the diagnostic service list to the request message generation module;

所述诊断请求管理子模块,用于存储第一映射关系,并根据所述诊断数据生成每个诊断服务对应的诊断请求列表;The diagnosis request management submodule is used to store the first mapping relationship, and generate a diagnosis request list corresponding to each diagnosis service according to the diagnosis data;

所述诊断服务管理子模块,还用于接收所述请求报文生成模块发送的所述指定诊断服务,并将所述指定诊断服务发送给所述诊断请求管理子模块;The diagnosis service management sub-module is further configured to receive the designated diagnosis service sent by the request message generation module, and send the designated diagnosis service to the diagnosis request management sub-module;

所述诊断请求管理子模块,还用于根据所述第一映射关系查找所述指定诊断服务对应的诊断请求列表作为所述目标诊断请求列表,将所述目标诊断请求列表发送给所述请求报文生成模块;The diagnosis request management sub-module is further configured to look up the diagnosis request list corresponding to the designated diagnosis service as the target diagnosis request list according to the first mapping relationship, and send the target diagnosis request list to the request report. text generation module;

所述诊断请求管理子模块,还用于接收所述请求生成报文模块发送的所述指定诊断请求标识,并查找指定诊断请求标识对应的目标请求报文参数和目标请求报文结构,将所述目标请求报文参数和所述目标请求报文结构发送给所述请求报文生成模块。The diagnosis request management sub-module is further configured to receive the specified diagnosis request identifier sent by the request generation message module, and find the target request message parameter and target request message structure corresponding to the specified diagnosis request identifier, and The target request message parameters and the target request message structure are sent to the request message generation module.

在一种实施方式中,所述诊断数据还包括诊断请求标识与响应报文结构的第三映射关系,所述诊断管理模块还包括诊断响应管理子模块;In one embodiment, the diagnosis data further includes a third mapping relationship between the diagnosis request identifier and the response message structure, and the diagnosis management module further includes a diagnosis response management sub-module;

所述诊断响应管理子模块,用于接收所述响应报文解析模块发送的所述诊断响应报文,从所述诊断请求管理子模块中获取指定诊断请求标识,并根据所述指定诊断请求标识和所述第三映射关系查找目标响应报文结构,将所述目标响应报文结构发送给所述响应报文解析模块。The diagnostic response management sub-module is configured to receive the diagnostic response message sent by the response message parsing module, obtain a designated diagnostic request identifier from the diagnostic request management sub-module, and obtain a designated diagnostic request identifier according to the designated diagnostic request identifier Find a target response message structure with the third mapping relationship, and send the target response message structure to the response message parsing module.

在一种实施方式中,所述响应报文解析模块,用于根据所述目标响应报文结构对所述诊断响应报文进行解析,获得基于json格式的解析结果,并将所述基于json格式的解析结果发送给所述交互模块;In one embodiment, the response packet parsing module is configured to parse the diagnostic response packet according to the target response packet structure, obtain a parsing result based on json format, and parse the response packet based on json format The analysis result is sent to the interaction module;

所述交互模块,用于将所述基于json格式的解析结果解析成满足预设解析需求的解析结果,并将所述满足预设解析需求的解析结果反馈给所述用户设备。The interaction module is configured to parse the json format-based parsing result into an parsing result that meets a preset parsing requirement, and feed back the parsing result that meets the preset parsing requirement to the user equipment.

在一种实施方式中,所述交互模块包括服务交互子模块和请求交互子模块;In one embodiment, the interaction module includes a service interaction submodule and a request interaction submodule;

所述服务交互子模块,用于接收所述请求报文生成模块发送的所述诊断服务列表,并将所述诊断服务列表提供给所述用户设备,接收所述用户设备反馈的指定诊断服务,将所述指定诊断服务发送给所述请求报文生成模块;The service interaction sub-module is configured to receive the diagnosis service list sent by the request message generation module, provide the diagnosis service list to the user equipment, and receive the designated diagnosis service fed back by the user equipment, sending the designated diagnostic service to the request message generation module;

所述请求交互子模块,还用于接收所述请求报文生成模块发送的所述目标诊断请求列表,将所述目标诊断请求列表反馈给用户设备,接收所述用户设备反馈的指定诊断请求标识,并将所述指定诊断请求标识发送给所述请求生成报文模块;The request interaction sub-module is further configured to receive the target diagnosis request list sent by the request message generation module, feed back the target diagnosis request list to the user equipment, and receive the specified diagnosis request identifier fed back by the user equipment , and send the specified diagnosis request identifier to the request generation message module;

所述请求交互子模块,还用于接收所述请求报文生成模块发送的所述目标请求报文参数,并将所述目标请求报文参数反馈给所述用户设备,接收所述用户设备反馈的所述目标请求报文参数对应的请求报文参数值,将所述请求报文参数值发送给所述请求报文生成模块。The request interaction sub-module is further configured to receive the target request message parameters sent by the request message generation module, and feed back the target request message parameters to the user equipment, and receive feedback from the user equipment The request message parameter value corresponding to the target request message parameter is sent to the request message generation module.

在一种实施方式中,所述交互模块还包括响应交互子模块;In one embodiment, the interaction module further includes a response interaction sub-module;

所述响应交互子模块,用于将所述基于json格式的解析结果解析成满足预设解析需求的解析结果,并将所述满足预设解析需求的解析结果反馈给所述用户设备。The response interaction sub-module is configured to parse the json format-based parsing result into parsing results that meet preset parsing requirements, and feed back the parsing results that meet preset parsing requirements to the user equipment.

第三方面,本发明实施例提供了一种存储介质,其上存储有可执行指令,该指令被处理器执行时使处理器实现第一方面中任一实施方式所述的方法。In a third aspect, an embodiment of the present invention provides a storage medium on which executable instructions are stored, and when the instructions are executed by a processor, the processor implements the method described in any one of the implementation manners of the first aspect.

第四方面,本发明实施例提供了一种车辆,包括:In a fourth aspect, an embodiment of the present invention provides a vehicle, including:

一个或多个处理器;one or more processors;

存储装置,用于存储一个或多个程序,storage means for storing one or more programs,

其中,当所述一个或多个程序被所述一个或多个处理器执行时,使得所述一个或多个处理器实现第一方面中任一项实施方式所述的方法。Wherein, when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the method described in any one of the embodiments of the first aspect.

由上述内容可知,本发明实施例提供的基于诊断工具的ECU诊断方法及诊断工具,能够在诊断工具中设置相互独立的数据库模块、诊断管理模块、请求报文生成模块、响应报文解析模块、交互模块,在数据库模块对ODX文件解析获得诊断数据后,请求报文生成模块可以通过交互模块向用户设备提供数据库模块支持的目标诊断请求列表,并通过交互模块接收用户设备反馈的用户指定诊断服务的诊断请求列表中的指定诊断请求标识,请求报文生成模块从诊断管理模块获取指定诊断请求标识所对应的目标请求报文参数和目标请求报文结构,并通过交互模块向用户设备提供目标请求报文参数,通过交互模块接收用户设备反馈的目标请求报文参数对应的请求报文参数值,请求报文生成模块根据目标请求报文结构和请求报文参数值生成诊断请求报文,并将诊断请求报文发送给待诊断ECU,响应报文解析模块接收待诊断ECU发送的对应于诊断请求报文的诊断响应报文,并将诊断响应报文发送给诊断管理模块,响应报文解析模块接收诊断管理模块发送的与诊断响应报文对应的目标响应报文结构,根据目标响应报文结构对诊断响应报文进行解析,并通过交互模块向用户设备提供针对诊断响应报文的解析结果。由此可知,本发明实施例可以通过多种相互解耦的模块之间交互实现ECU诊断功能,使得开发周期及维护周期的成本得到了很大压缩,且由于本发明实施例是基于用于整车生命周期中诊断数据交互的、开放式的诊断数据格式ODX文件获取诊断数据的,所以当ECU类型发生改变时,只需加载不同的ODX文件即可,而无需修改代码,从而提高了ECU诊断软件的开发效率。It can be seen from the above that the ECU diagnosis method and the diagnosis tool based on the diagnosis tool provided by the embodiment of the present invention can set mutually independent database module, diagnosis management module, request message generation module, response message analysis module, The interactive module, after the database module parses the ODX file to obtain diagnostic data, the request message generation module can provide the user equipment with a list of target diagnostic requests supported by the database module through the interactive module, and receive user-specified diagnostic services fed back by the user equipment through the interactive module The specified diagnostic request identifier in the diagnostic request list of the specified diagnostic request list, the request message generation module obtains the target request message parameters and target request message structure corresponding to the specified diagnostic request identifier from the diagnostic management module, and provides the target request message to the user equipment through the interaction module. Packet parameters, the request packet parameter value corresponding to the target request packet parameter fed back by the user equipment is received by the interaction module, and the request packet generation module generates a diagnosis request packet according to the target request packet structure and the request packet parameter value, and generates a diagnosis request packet. The diagnostic request message is sent to the ECU to be diagnosed, and the response message parsing module receives the diagnostic response message corresponding to the diagnostic request message sent by the ECU to be diagnosed, and sends the diagnostic response message to the diagnostic management module, and the response message parsing module The target response message structure corresponding to the diagnosis response message sent by the diagnosis management module is received, the diagnosis response message is parsed according to the target response message structure, and the analysis result for the diagnosis response message is provided to the user equipment through the interaction module. It can be seen from this that the embodiment of the present invention can realize the ECU diagnosis function through the interaction between various mutually decoupled modules, so that the cost of the development cycle and the maintenance cycle is greatly reduced, and because the embodiment of the present invention is based on the The diagnostic data interactive and open diagnostic data format ODX file obtains diagnostic data in the vehicle life cycle, so when the ECU type changes, it is only necessary to load a different ODX file without modifying the code, thus improving the ECU diagnostics. software development efficiency.

本发明实施例至少还可以实现如下技术效果:The embodiments of the present invention can also achieve at least the following technical effects:

1、通过将诊断管理模块划分为多个子模块,例如包括诊断服务管理子模块、诊断请求管理子模块、诊断响应管理子模块,可以使得诊断管理模块中诊断服务、诊断请求和诊断响应的管理得到解耦,从而进一步降低开发周期和维护周期的成本,提高诊断管理的效率。此外,与直接向用户设备反馈所有诊断请求列表相比,本发明实施例通过先向用户设备反馈诊断服务列表,再根据用户基于诊断服务列表反馈的指定诊断服务,来获取指定诊断服务对应的目标诊断请求列表,可以减少数据调用、数据传输和数据存储的数量,从而可以提高数据传输效率和节省资源。1. By dividing the diagnosis management module into multiple sub-modules, including, for example, a diagnosis service management sub-module, a diagnosis request management sub-module, and a diagnosis response management sub-module, the management of the diagnosis service, diagnosis request and diagnosis response in the diagnosis management module can be obtained. Decoupling, thereby further reducing the cost of the development cycle and maintenance cycle, and improving the efficiency of diagnostic management. In addition, compared with directly feeding back all the diagnosis request lists to the user equipment, the embodiment of the present invention first feeds back the diagnosis service list to the user equipment, and then obtains the target corresponding to the designated diagnosis service according to the designated diagnosis service fed back by the user based on the diagnosis service list. The list of diagnostic requests can reduce the number of data calls, data transfers, and data storage, thereby improving data transfer efficiency and saving resources.

2、通过将交互模块划分为多个子模块,例如包括服务交互子模块、请求交互子模块和响应交互子模块,可以使得针对诊断服务、诊断请求和诊断响应与外界的交互得到解耦,从而进一步降低开发周期和维护周期的成本,提高诊断交互的效率。2. By dividing the interaction module into multiple sub-modules, such as service interaction sub-module, request interaction sub-module and response interaction sub-module, the interaction between diagnosis service, diagnosis request and diagnosis response and the outside world can be decoupled, thereby further Reduce the cost of development and maintenance cycles and improve the efficiency of diagnostic interactions.

3、通过在诊断工具中设置用于记录诊断过程中涉及的诊断请求报文和/或诊断响应报文的诊断报文记录模块,可以在诊断过程中发生异常时,使得技术人员通过诊断报文记录模块快速定位异常原因。3. By setting the diagnostic message recording module in the diagnostic tool for recording the diagnostic request message and/or diagnostic response message involved in the diagnostic process, when an abnormality occurs during the diagnostic process, the technician can pass the diagnostic message. The record module quickly locates the cause of the abnormality.

当然,实施本发明的任一产品或方法并不一定需要同时达到以上所述的所有优点。Of course, it is not necessary for any product or method of the present invention to achieve all of the advantages described above at the same time.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单介绍。显而易见地,下面描述中的附图仅仅是本发明的一些实施例。对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the embodiments of the present invention or the technical solutions in the prior art more clearly, the following briefly introduces the accompanying drawings that are required in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the invention. For those of ordinary skill in the art, other drawings can also be obtained from these drawings without creative effort.

图1为本发明实施例提供的一种基于诊断工具的ECU诊断方法的流程示意图;FIG. 1 is a schematic flowchart of an ECU diagnostic method based on a diagnostic tool provided by an embodiment of the present invention;

图2为本发明实施例提供的另一种基于诊断工具的ECU诊断方法的流程示意图;FIG. 2 is a schematic flowchart of another ECU diagnostic method based on a diagnostic tool provided by an embodiment of the present invention;

图3为本发明实施例提供的又一种基于诊断工具的ECU诊断方法的流程示意图;3 is a schematic flowchart of another ECU diagnosis method based on a diagnosis tool provided by an embodiment of the present invention;

图4为本发明实施例提供的一种诊断工具的组成框图;4 is a block diagram of a diagnostic tool provided by an embodiment of the present invention;

图5为本发明实施例提供的一种基于诊断工具的ECU组成框图。FIG. 5 is a block diagram of an ECU based on a diagnostic tool provided by an embodiment of the present invention.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整的描述。显然,所描述的实施例仅仅是本发明的一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有付出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, but not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

需要说明的是,本发明实施例及附图中的术语“包括”和“具有”以及它们的任何变形,意图在于覆盖不排他的包含。例如包含的一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其他步骤或单元。It should be noted that the terms "comprising" and "having" and any modifications thereof in the embodiments of the present invention and the accompanying drawings are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the steps or units listed, but optionally also includes steps or units not listed, or optionally also includes For other steps or units inherent to these processes, methods, products or devices.

本发明实施例提供了一种基于诊断工具的ECU诊断方法及诊断工具,能够基于ODX文件实现解耦的ECU诊断软件框架,从而当ECU类型发生改变时,只需加载不同的ODX文件即可,使得开发效率得到了提高,且由于各个模块相对独立对诊断需求进行了功能分解,使得开发周期及维护周期的成本得到了很大压缩。The embodiments of the present invention provide an ECU diagnostic method and a diagnostic tool based on a diagnostic tool, which can implement a decoupled ECU diagnostic software framework based on an ODX file, so that when the ECU type changes, it is only necessary to load different ODX files, The development efficiency has been improved, and the cost of the development cycle and maintenance cycle has been greatly reduced due to the relatively independent functional decomposition of the diagnostic requirements of each module.

下面对本发明实施例进行详细说明。The embodiments of the present invention will be described in detail below.

图1为本发明实施例提供的一种基于诊断工具的ECU诊断方法的流程示意图,所述方法应用于诊断工具,该诊断工具可以部署在ECU中,且该ECU可以为待诊断ECU,也可以为其他ECU,即该诊断工具可以诊断所属ECU,还可以诊断其他ECU,所述诊断工具包括数据库模块、诊断管理模块、请求报文生成模块、响应报文解析模块和交互模块,该方法可以包括如下步骤:1 is a schematic flowchart of an ECU diagnosis method based on a diagnosis tool provided by an embodiment of the present invention. The method is applied to a diagnosis tool. The diagnosis tool can be deployed in an ECU, and the ECU can be an ECU to be diagnosed, or it can be For other ECUs, that is, the diagnostic tool can diagnose the ECU to which it belongs, and can also diagnose other ECUs. The diagnostic tool includes a database module, a diagnostic management module, a request message generation module, a response message parsing module, and an interaction module. The method may include Follow the steps below:

S110:请求报文生成模块通过交互模块向用户设备提供数据库模块支持的目标诊断请求列表。S110: The request message generation module provides the user equipment with a target diagnosis request list supported by the database module through the interaction module.

其中,所述目标诊断请求列表是根据所述数据库模块对开放式诊断数据交换ODX文件解析得到的诊断数据生成的,所述目标诊断请求列表包括指定诊断服务对应的诊断请求列表。本文中的指定诊断服务可以理解为指定的或者用户选择的诊断服务。Wherein, the target diagnosis request list is generated according to the diagnosis data obtained by parsing the open diagnosis data exchange ODX file by the database module, and the target diagnosis request list includes a diagnosis request list corresponding to a specified diagnosis service. The designated diagnostic service in this document may be understood as a designated or user-selected diagnostic service.

由于ODX文件以xml格式保存诊断数据,且ISO22901协议规范了一些用于诊断数据的描述及描述诊断数据的内部引用的数据结构,如Parameter、Structure、MUX(Multiplexer,数据选择器)、EndOfPdu等。所以数据库模块可以基于ISO22901协议规范和DOM(Document Object Model,文档对象模型)方法对ODX文件进行解析获得诊断数据。所述诊断数据包括至少一个诊断服务、至少一个诊断请求、诊断服务和诊断请求的第一映射关系、每个诊断请求对应的请求报文参数、请求报文结构、响应报文结构,还可以包括DID(Data Identifier,数据标识)数据、DTC(Diagnostic Trouble Code,诊断故障码)数据及ODX协议内部引用依赖的数据结构Parameter、Structure、MUX、EndOfPdu等。数据库模块定义及储存这些数据结构的实例化对象,提供给诊断管理模块进行访问。ODX作为描述诊断数据的文件,每个数据元都有唯一独占的DID作为识别。DTC用于描述汽车故障原因,可通过诊断服务获取。Since the ODX file saves the diagnostic data in xml format, and the ISO22901 protocol standardizes some data structures for the description of the diagnostic data and the internal reference to the description of the diagnostic data, such as Parameter, Structure, MUX (Multiplexer, data selector), EndOfPdu and so on. Therefore, the database module can parse the ODX file based on the ISO22901 protocol specification and the DOM (Document Object Model, document object model) method to obtain diagnostic data. The diagnostic data includes at least one diagnostic service, at least one diagnostic request, the first mapping relationship between the diagnostic service and the diagnostic request, the request message parameters corresponding to each diagnostic request, the request message structure, the response message structure, and may also include DID (Data Identifier, Data Identifier) data, DTC (Diagnostic Trouble Code, Diagnostic Trouble Code) data and the data structures Parameter, Structure, MUX, EndOfPdu and so on that the internal reference of the ODX protocol depends on. The database module defines and stores the instantiated objects of these data structures, and provides access to the diagnostic management module. ODX is a file describing diagnostic data, and each data element has a unique DID for identification. DTCs are used to describe the cause of a car failure and are available through diagnostic services.

所述请求报文生成模块中可以包括用于生成支持PDU(Protocol Data Unit,协议数据单元)的请求报文的PDU请求报文生成子模块,并基于PDU请求报文生成子模块实现与交互模块、诊断管理模块之间的通信。下述关于请求报文生成模块的执行过程均可以使用PDU请求报文生成子模块来实现,在此不再赘述。The request message generation module may include a PDU request message generation sub-module for generating a request message supporting a PDU (Protocol Data Unit, protocol data unit), and a sub-module implementation and interaction module based on the PDU request message generation sub-module , Communication between diagnostic management modules. The following execution process of the request message generation module can be implemented by using the PDU request message generation sub-module, which will not be repeated here.

所述诊断数据包括至少一个诊断服务,至少一个诊断请求标识,至少一个请求报文参数,至少一个请求报文结构,至少一个响应报文结构,诊断服务和诊断请求标识的第一映射关系,以及诊断请求标识、请求报文参数、请求报文结构与响应报文结构的第二映射关系。诊断管理模块可以从数据库模块中获取诊断数据,并根据诊断数据生成诊断服务列表和诊断服务列表中每个诊断服务对应的诊断请求列表。诊断服务列表包括诊断服务标识,诊断服务标识可以为诊断服务DID,也可以为诊断服务名称+诊断服务DID。诊断请求列表包括诊断请求标识,还可以包括诊断请求标识对应正响应DID、诊断请求对应的负响应DID。诊断请求标识可以为诊断请求DID,也可以为诊断请求名称+诊断请求DID。每个诊断请求列表与诊断服务的映射关系可以是一个单独的映射关系表,也可以直接将诊断请求列表的列表名称命名为对应的诊断服务名称,还可以在诊断服务列表中添加对应的诊断请求列表的列表名称。The diagnostic data includes at least one diagnostic service, at least one diagnostic request identifier, at least one request message parameter, at least one request message structure, at least one response message structure, the first mapping relationship between the diagnostic service and the diagnostic request identifier, and Diagnose the second mapping relationship between the request identifier, the request message parameter, the request message structure and the response message structure. The diagnosis management module can obtain the diagnosis data from the database module, and generate a diagnosis service list and a diagnosis request list corresponding to each diagnosis service in the diagnosis service list according to the diagnosis data. The diagnostic service list includes a diagnostic service identifier, and the diagnostic service identifier may be a diagnostic service DID, or may be a diagnostic service name + a diagnostic service DID. The diagnosis request list includes a diagnosis request identifier, and may also include a positive response DID corresponding to the diagnosis request identifier, and a negative response DID corresponding to the diagnosis request. The diagnostic request identifier may be the diagnostic request DID, or may be the diagnostic request name + the diagnostic request DID. The mapping relationship between each diagnostic request list and the diagnostic service can be a separate mapping relationship table, or the list name of the diagnostic request list can be directly named as the corresponding diagnostic service name, and the corresponding diagnostic request can also be added to the diagnostic service list The list name of the list.

当诊断为本地诊断时,用户设备可以为诊断仪或者上位机,当诊断为远程诊断时,用户设备可以为远程服务器。在需要支持远程诊断的项目中,这种数据传输可通过HTTP(Hyper Text Transfer Protocol,超文本传输协议)完成,此时需要实现交互模块与客户端模块交互,客户端模块负责与远程服务器通信,远程服务器提供与用户交互的功能,即需要客户端模块作为中继模块,转发交互模块与远程服务器之间的需要交互的数据。When the diagnosis is local diagnosis, the user equipment may be a diagnostic instrument or a host computer, and when the diagnosis is remote diagnosis, the user equipment may be a remote server. In projects that need to support remote diagnosis, this data transmission can be completed through HTTP (Hyper Text Transfer Protocol, hypertext transfer protocol). At this time, the interaction module needs to interact with the client module. The remote server provides the function of interacting with the user, that is, the client module is required as a relay module to forward the data that needs to be interacted between the interaction module and the remote server.

在向用户设备提供目标诊断请求列表时,可以直接向用户设备提供所有的诊断请求列表或者部分诊断请求列表(如用户近期访问频率较高的几个诊断请求列表)供用户选择,也可以先向用户设备提供诊断服务列表,待用户指定诊断服务后,再向用户设备提供指定诊断服务对应的诊断请求列表。其中,最后一种方案相对于前两种方案而言,通过先向用户设备反馈诊断服务列表,再根据用户基于诊断服务列表反馈的指定诊断服务,来获取指定诊断服务对应的诊断请求列表,可以减少数据调用、数据传输和数据存储的数量,从而可以提高数据传输效率和节省资源。When providing the target diagnosis request list to the user equipment, all the diagnosis request lists or part of the diagnosis request list (such as several diagnosis request lists that the user has recently accessed frequently) can be directly provided to the user equipment for selection by the user, or the The user equipment provides a list of diagnostic services, and after the user specifies the diagnostic service, it provides the user equipment with a list of diagnostic requests corresponding to the specified diagnostic service. Among them, the last solution, compared with the first two solutions, firstly feeds back the diagnosis service list to the user equipment, and then obtains the diagnosis request list corresponding to the designated diagnosis service according to the designated diagnosis service fed back by the user based on the diagnosis service list. Reduce the number of data calls, data transfers, and data storage, which can improve data transfer efficiency and save resources.

下面以最后一种方案为例,对本步骤的具体实现过程进行阐述,如图2所示,该过程包括:Taking the last solution as an example below, the specific implementation process of this step will be described. As shown in Figure 2, the process includes:

S111、请求报文生成模块将从诊断管理模块中获取的诊断服务列表通过交互模块提供给用户设备。S111. The request message generation module provides the diagnostic service list obtained from the diagnostic management module to the user equipment through the interaction module.

诊断管理模块向所述请求报文生成模块发送诊断服务列表,请求报文生成模块将接收到的诊断服务列表发送给交互模块,交互模块将诊断服务列表发送给用户设备。The diagnosis management module sends the diagnosis service list to the request message generation module, the request message generation module sends the received diagnosis service list to the interaction module, and the interaction module sends the diagnosis service list to the user equipment.

为了提高诊断服务和诊断请求管理的效率以及降低诊断管理模块的开发周期、维护周期的成本,诊断管理模块中可以设置用于管理诊断服务的诊断服务子模块和用于管理诊断请求的诊断请求管理子模块。当所述诊断管理模块包括诊断服务管理子模块和诊断请求管理子模块时,所述诊断服务管理子模块从所述数据库模块获取所述至少一个诊断服务,并根据所述至少一个诊断服务生成诊断服务列表,所述诊断请求管理子模块从所述数据库模块获取至少一个诊断请求标识,至少一个请求报文参数,至少一个请求报文结构,诊断服务和诊断请求标识的第一映射关系,以及诊断请求标识、请求报文参数与请求报文结构的第二映射关系,并根据第一映射关系生成每个诊断服务的诊断请求列表。也就是说,诊断服务管理子模块向上与数据库模块交互获取ODX文件支持的诊断服务,向下与请求报文生成模块交互,提供数据库模块支持的这些诊断服务相关数据,以及管理诊断数据支持的诊断服务列表。诊断请求管理子模块向上与数据库模块交互,获取第一映射关系和第二映射关系,与诊断服务管理子模块交互,获取指定诊断服务,向下与请求报文生成模块交互,提供请求相关信息。In order to improve the efficiency of diagnosis service and diagnosis request management and reduce the cost of the development cycle and maintenance cycle of the diagnosis management module, a diagnosis service sub-module for managing diagnosis services and a diagnosis request management module for managing diagnosis requests can be set in the diagnosis management module. submodule. When the diagnosis management module includes a diagnosis service management submodule and a diagnosis request management submodule, the diagnosis service management submodule acquires the at least one diagnosis service from the database module, and generates a diagnosis according to the at least one diagnosis service Service list, the diagnostic request management sub-module obtains from the database module at least one diagnostic request identifier, at least one request message parameter, at least one request message structure, the first mapping relationship between the diagnostic service and the diagnostic request identifier, and the diagnostic A second mapping relationship between the request identifier, the request message parameter and the request message structure, and a diagnostic request list of each diagnostic service is generated according to the first mapping relationship. That is to say, the diagnostic service management sub-module interacts with the database module upward to obtain the diagnostic service supported by the ODX file, and interacts with the request message generation module downward to provide the related data of these diagnostic services supported by the database module, and manage the diagnostic data supported by the diagnostic data. List of services. The diagnostic request management sub-module interacts with the database module upward, obtains the first mapping relationship and the second mapping relationship, interacts with the diagnostic service management sub-module, obtains the specified diagnostic service, and interacts downward with the request message generation module to provide request-related information.

为了提高与用户设备交互的效率以及降低交互模块的开发周期、维护周期的成本,交互模块可以包括用于交互诊断服务的服务交互子模块和用于交互诊断请求的请求交互子模块,且服务交互子模块和请求交互子模块相互独立。当交互模块包括服务交互子模块时,所述请求报文生成模块将从所述诊断管理模块中获取的诊断服务列表通过所述服务交互子模块提供给所述用户设备。In order to improve the efficiency of interaction with the user equipment and reduce the cost of the development cycle and maintenance cycle of the interaction module, the interaction module may include a service interaction sub-module for interactive diagnosis services and a request interaction sub-module for interactive diagnosis requests, and the service interaction Submodules and request interaction submodules are independent of each other. When the interaction module includes a service interaction submodule, the request message generation module provides the diagnostic service list obtained from the diagnosis management module to the user equipment through the service interaction submodule.

综上所述,当请求报文生成模块包括PDU请求报文生成子模块、诊断管理模块包括诊断服务管理子模块、交互模块包括服务交互子模块时,PDU请求报文生成子模块将从诊断服务管理子模块中获取的诊断服务列表通过服务交互子模块提供给用户设备。To sum up, when the request message generation module includes a PDU request message generation sub-module, the diagnostic management module includes a diagnostic service management sub-module, and the interaction module includes a service interaction sub-module, the PDU request message generation sub-module will convert the diagnostic service The list of diagnostic services obtained in the management sub-module is provided to the user equipment through the service interaction sub-module.

S112、请求报文生成模块通过交互模块接收用户设备反馈的指定诊断服务。S112. The request message generation module receives the specified diagnostic service fed back by the user equipment through the interaction module.

其中,用户设备反馈的指定诊断服务是用户在用户设备上显示的诊断服务列表中选择的诊断服务,而非用户设备自动选择的诊断服务。用户设备获取到用户选择的指定诊断服务后,可以将指定诊断服务发送给交互模块,交互模块再将指定诊断服务转发给请求报文生成模块。The specified diagnosis service fed back by the user equipment is the diagnosis service selected by the user in the diagnosis service list displayed on the user equipment, rather than the diagnosis service automatically selected by the user equipment. After acquiring the specified diagnostic service selected by the user, the user equipment may send the specified diagnostic service to the interaction module, and the interaction module then forwards the specified diagnostic service to the request message generation module.

当交互模块包括服务交互子模块时,所述请求报文生成模块通过所述服务交互子模块接收所述用户设备反馈的指定诊断服务,即用户设备获取到用户选择的指定诊断服务后,可以将指定诊断服务发送给服务交互子模块,服务交互子模块再将指定诊断服务转发给请求报文生成模块。When the interaction module includes a service interaction sub-module, the request message generation module receives the specified diagnosis service fed back by the user equipment through the service interaction sub-module, that is, after the user equipment obtains the specified diagnosis service selected by the user, it can The designated diagnosis service is sent to the service interaction sub-module, and the service interaction sub-module then forwards the designated diagnosis service to the request message generation module.

S113、请求报文生成模块从诊断管理模块中获取与指定诊断服务对应的诊断请求列表作为目标诊断请求列表。S113. The request message generation module acquires a diagnosis request list corresponding to the specified diagnosis service from the diagnosis management module as a target diagnosis request list.

请求报文生成模块将指定诊断服务发送给诊断管理模块,诊断管理模块可以根据第一映射关系查找指定诊断服务对应的诊断请求列表,并将查找到的诊断请求列表发送给请求报文生成模块,以便请求报文生成模块将查找到的诊断请求列表作为目标诊断请求列表。The request message generation module sends the specified diagnosis service to the diagnosis management module, and the diagnosis management module can search for the diagnosis request list corresponding to the specified diagnosis service according to the first mapping relationship, and send the found diagnosis request list to the request message generation module, So that the request message generation module takes the found list of diagnostic requests as the list of target diagnostic requests.

当诊断管理模块包括诊断请求管理子模块时,所述请求报文生成模块可以从所述诊断请求管理子模块中获取与所述指定诊断服务对应的诊断请求列表作为所述目标诊断请求列表,其中,所述诊断请求管理子模块从所述诊断管理服务子模块获取所述指定诊断服务,根据所述指定诊断服务、所述第一映射关系确定所述目标诊断请求列表。When the diagnosis management module includes a diagnosis request management sub-module, the request message generation module may acquire a diagnosis request list corresponding to the specified diagnosis service from the diagnosis request management sub-module as the target diagnosis request list, wherein , the diagnosis request management sub-module acquires the specified diagnosis service from the diagnosis management service sub-module, and determines the target diagnosis request list according to the specified diagnosis service and the first mapping relationship.

S114、请求报文生成模块通过交互模块向用户设备提供目标诊断请求列表。S114. The request message generation module provides the user equipment with a target diagnosis request list through the interaction module.

所述请求报文生成模块将目标诊断请求列表发送给交互模块,交互模块将目标诊断请求列表再转发给用户设备,以供用户设备向用户展示目标诊断请求列表,使得用户在目标诊断请求列表中选择指定诊断请求标识。The request message generation module sends the target diagnosis request list to the interaction module, and the interaction module forwards the target diagnosis request list to the user equipment, so that the user equipment can display the target diagnosis request list to the user, so that the user is in the target diagnosis request list. Select Specify Diagnostic Request ID.

当交互模块包括请求交互子模块时,所述请求报文生成模块通过所述请求交互子模块向所述用户设备提供所述目标诊断请求列表,即所述请求报文生成模块将目标诊断请求列表发送给请求交互子模块,请求交互子模块将目标诊断请求列表再转发给用户设备,以供用户设备向用户展示目标诊断请求列表。When the interaction module includes a request interaction submodule, the request message generation module provides the user equipment with the target diagnosis request list through the request interaction submodule, that is, the request message generation module generates the target diagnosis request list It is sent to the request interaction sub-module, and the request interaction sub-module forwards the target diagnosis request list to the user equipment, so that the user equipment can display the target diagnosis request list to the user.

S120:请求报文生成模块通过交互模块接收用户设备反馈的指定诊断请求标识。S120: The request message generation module receives the specified diagnosis request identifier fed back by the user equipment through the interaction module.

用户设备获取用户选择的指定诊断请求标识,并将指定诊断请求标识发送给交互模块,交互模块再将指定诊断请求标识转发给请求报文生成模块。所述指定诊断请求标识为用户指定诊断服务对应的诊断请求列表中的诊断请求标识。The user equipment acquires the designated diagnosis request identifier selected by the user, and sends the designated diagnosis request identifier to the interaction module, and the interaction module then forwards the designated diagnosis request identifier to the request message generation module. The specified diagnosis request identifier is the diagnosis request identifier in the diagnosis request list corresponding to the user-specified diagnosis service.

当交互模块包括请求交互子模块时,所述请求报文生成模块通过所述请求交互子模块接收所述用户设备反馈的指定诊断请求标识,即用户设备获取用户选择的指定诊断请求标识,并将指定诊断请求标识发送给请求交互子模块,请求交互子模块再将指定诊断请求标识转发给请求报文生成模块。When the interaction module includes a request interaction sub-module, the request message generation module receives the specified diagnosis request identifier fed back by the user equipment through the request interaction sub-module, that is, the user equipment obtains the specified diagnosis request identifier selected by the user, and sends The designated diagnosis request identifier is sent to the request interaction sub-module, and the request interaction sub-module then forwards the designated diagnosis request identifier to the request message generation module.

S130:请求报文生成模块从诊断管理模块获取目标请求报文参数和目标请求报文结构,并通过交互模块向用户设备提供目标请求报文参数,通过交互模块接收用户设备反馈的目标请求报文参数对应的请求报文参数值。S130: The request message generation module obtains the target request message parameters and the target request message structure from the diagnosis management module, provides the target request message parameters to the user equipment through the interaction module, and receives the target request message fed back by the user equipment through the interaction module The parameter value of the request message corresponding to the parameter.

其中,所述目标请求报文参数为与所述指定诊断请求标识对应的请求报文参数,所述目标请求报文结构为与所述指定诊断请求标识对应的请求报文结构,所述诊断管理模块中存储的所述目标请求报文参数和所述目标请求报文结构是从所述数据库模块中存储的所述诊断数据中获取的。The target request message parameter is a request message parameter corresponding to the specified diagnosis request identifier, the target request message structure is a request message structure corresponding to the specified diagnosis request identifier, and the diagnosis management The target request message parameters and the target request message structure stored in the module are acquired from the diagnostic data stored in the database module.

当诊断管理模块包括诊断请求管理子模块时,所述请求报文生成模块从所述诊断请求管理子模块获取所述目标请求报文参数和所述目标请求报文结构,其中,所述诊断请求管理子模块根据所述第二映射关系和所述指定诊断请求标识确定所述目标请求报文参数和所述目标请求报文结构。When the diagnosis management module includes a diagnosis request management submodule, the request message generation module acquires the target request message parameters and the target request message structure from the diagnosis request management submodule, wherein the diagnosis request The management submodule determines the target request message parameter and the target request message structure according to the second mapping relationship and the specified diagnosis request identifier.

当交互模块包括请求交互子模块时,所述请求报文生成模块通过所述请求交互子模块向所述用户设备提供所述目标请求报文参数,通过所述请求交互子模块接收所述用户设备反馈的所述目标请求报文参数对应的请求报文参数值。When the interaction module includes a request interaction submodule, the request message generation module provides the target request message parameters to the user equipment through the request interaction submodule, and receives the user equipment through the request interaction submodule The feedback parameter value of the request message corresponding to the target request message parameter.

综上所述,当请求报文生成模块包括PDU请求报文生成子模块、诊断管理模块包括诊断请求管理子模块以及交互模块包括请求交互子模块时,PDU请求报文生成子模块从诊断请求管理子模块获取目标请求报文参数和目标请求报文结构,并通过请求交互子模块向所述用户设备提供所述目标请求报文参数,通过请求交互子模块接收所述用户设备反馈的所述目标请求报文参数对应的请求报文参数值。To sum up, when the request message generation module includes a PDU request message generation sub-module, the diagnosis management module includes a diagnosis request management sub-module, and the interaction module includes a request interaction sub-module, the PDU request message generation sub-module is managed from the diagnosis request. The sub-module obtains the target request message parameters and the target request message structure, provides the target request message parameters to the user equipment through the request interaction sub-module, and receives the target feedback from the user equipment through the request interaction sub-module The request message parameter value corresponding to the request message parameter.

S140:请求报文生成模块根据目标请求报文结构和请求报文参数值生成诊断请求报文,并将诊断请求报文发送给待诊断ECU。S140: The request message generation module generates a diagnosis request message according to the target request message structure and the request message parameter value, and sends the diagnosis request message to the ECU to be diagnosed.

当请求报文生成模块包括PDU请求报文生成子模块时,PDU请求报文生成子模块可以根请求报文结构和请求报文参数值生成符合UDS(Unified diagnostic services,统一诊断服务)协议的诊断请求报文,并将所述诊断请求报文发送给待诊断ECU。When the request message generation module includes a PDU request message generation sub-module, the PDU request message generation sub-module can generate a diagnosis that conforms to the UDS (Unified diagnostic services, unified diagnostic services) protocol based on the request message structure and the request message parameter values. request message, and send the diagnosis request message to the ECU to be diagnosed.

当所述诊断工具部署在待诊断ECU内时,待诊断ECU内请求报文生成模块发送给待诊断ECU中部署的用于转发数据的ECU模块,由ECU模块将诊断请求报文发送给待诊断ECU的操作系统。When the diagnostic tool is deployed in the to-be-diagnosed ECU, the request message generation module in the to-be-diagnosed ECU sends the request message to the ECU module deployed in the to-be-diagnosed ECU for data forwarding, and the ECU module sends the diagnostic request message to the to-be-diagnosed ECU ECU's operating system.

当所述诊断工具部署在待诊断ECU外的其他ECU内时,其他ECU内请求报文生成模块可以先将诊断请求报文发送给待诊断ECU内ECU模块,由待诊断ECU内ECU模块将诊断请求报文发送给待诊断ECU的操作系统。When the diagnostic tool is deployed in other ECUs other than the ECU to be diagnosed, the request message generation module in the other ECU can first send the diagnostic request message to the ECU module in the ECU to be diagnosed, and the ECU module in the ECU to be diagnosed will diagnose The request message is sent to the operating system of the ECU to be diagnosed.

S150:响应报文解析模块接收待诊断ECU发送的对应于诊断请求报文的诊断响应报文,并将诊断响应报文发送给诊断管理模块。S150: The response message parsing module receives a diagnosis response message corresponding to the diagnosis request message sent by the ECU to be diagnosed, and sends the diagnosis response message to the diagnosis management module.

当所述诊断管理模块包括诊断响应管理子模块时,所述响应报文解析模块将所述诊断响应报文发送给所述诊断响应管理子模块。响应报文解析模块中可以包括用于生成支持PDU(Protocol Data Unit,协议数据单元)的响应报文的PDU响应报文解析子模块,PDU响应报文解析子模块接收所述待诊断ECU发送的对应于所述诊断请求报文的诊断响应报文,并将所述诊断响应报文发送给诊断响应管理子模块。关于响应报文解析模块的执行过程均可以使用PDU响应报文解析子模块来实现。When the diagnosis management module includes a diagnosis response management submodule, the response message parsing module sends the diagnosis response message to the diagnosis response management submodule. The response message parsing module may include a PDU response message parsing sub-module for generating a response message supporting a PDU (Protocol Data Unit, protocol data unit), and the PDU response message parsing sub-module receives the message sent by the to-be-diagnosed ECU. The diagnostic response message corresponding to the diagnostic request message is sent to the diagnostic response management sub-module. The execution process of the response message parsing module can be implemented by using the PDU response message parsing sub-module.

S160:响应报文解析模块接收诊断管理模块发送的目标响应报文结构,根据目标响应报文结构对诊断响应报文进行解析,并通过交互模块向用户设备提供针对诊断响应报文的解析结果。S160: The response message parsing module receives the target response message structure sent by the diagnosis management module, parses the diagnostic response message according to the target response message structure, and provides the user equipment with a parsing result of the diagnostic response message through the interaction module.

其中,所述目标响应报文结构为与所述诊断响应报文对应的响应报文结构,且由于诊断响应报文与诊断请求报文相对应,诊断请求报文与指定诊断请求标识相对应,所以目标响应报文结构是指定诊断请求标识对应的响应报文结构。所述诊断管理模块中存储的所述目标响应报文结构是从所述数据库模块中存储的所述诊断数据中获取的。可以理解的是,在诊断响应报文分为正响应和负响应时,还需要结合诊断响应报文的相应类型确定目标响应报文结构。Wherein, the target response message structure is a response message structure corresponding to the diagnosis response message, and since the diagnosis response message corresponds to the diagnosis request message, the diagnosis request message corresponds to the specified diagnosis request identifier, Therefore, the target response message structure is the response message structure corresponding to the specified diagnostic request identifier. The target response message structure stored in the diagnosis management module is obtained from the diagnosis data stored in the database module. It can be understood that, when the diagnostic response message is divided into a positive response and a negative response, the structure of the target response message needs to be determined in combination with the corresponding type of the diagnostic response message.

当所述诊断管理模块包括诊断响应管理子模块,交互模块包括响应交互子模块时,所述响应报文解析模块接收所述诊断响应管理子模块发送的目标响应报文结构,根据所述目标响应报文结构对所述诊断响应报文进行解析,并通过所述响应交互子模块向所述用户设备提供针对所述诊断响应报文的解析结果,其中,所述诊断响应管理子模块从所述诊断请求管理子模块中获取所述指定诊断请求标识,根据所述指定诊断请求标识、所述第三映射关系确定目标响应报文结构,第三映射关系为诊断请求标识与响应报文结构之间的映射关系,诊断响应管理子模块从数据库模块的诊断数据中获取第三映射关系。当响应报文解析模块包括PDU响应报文解析子模块时,PDU响应报文解析子模块接收诊断响应管理子模块发送的与所述诊断响应报文对应的目标响应报文结构,根据所述目标响应报文结构对所述诊断响应报文进行解析,并通过所述响应交互子模块向所述用户设备提供针对所述诊断响应报文的解析结果。When the diagnosis management module includes a diagnosis response management submodule and the interaction module includes a response interaction submodule, the response message parsing module receives the target response message structure sent by the diagnosis response management submodule, and responds according to the target response. The message structure parses the diagnostic response message, and provides the user equipment with a parsing result for the diagnostic response message through the response interaction sub-module, wherein the diagnostic response management sub-module The specified diagnosis request identifier is obtained in the diagnosis request management sub-module, and the target response message structure is determined according to the specified diagnosis request identifier and the third mapping relationship, and the third mapping relationship is between the diagnosis request identifier and the response message structure. The diagnostic response management sub-module obtains the third mapping relationship from the diagnostic data of the database module. When the response message parsing module includes a PDU response message parsing sub-module, the PDU response message parsing sub-module receives the target response message structure corresponding to the diagnostic response message sent by the diagnostic response management sub-module, and according to the target The response message structure parses the diagnostic response message, and provides the user equipment with a parsing result for the diagnostic response message through the response interaction sub-module.

诊断过程中待诊断ECU会对诊断请求报文做出响应,肯定的响应为正响应,否定的响应为负响应,诊断响应管理子模块可以维护当前诊断请求报文的正/负响应报文结构。当诊断响应报文为正响应时,诊断响应管理子模块将正响应报文结构发送给响应报文解析模块;当诊断响应报文为负响应时,诊断响应管理子模块将负响应报文结构发送给响应报文解析模块。During the diagnosis process, the ECU to be diagnosed will respond to the diagnosis request message. A positive response is a positive response, and a negative response is a negative response. The diagnosis response management sub-module can maintain the positive/negative response message structure of the current diagnosis request message. . When the diagnostic response message is a positive response, the diagnostic response management sub-module sends the positive response message structure to the response message parsing module; when the diagnostic response message is a negative response, the diagnostic response management sub-module sends the negative response message structure Sent to the response packet parsing module.

响应报文解析模块根据所述目标响应报文结构对所述诊断响应报文进行解析,并通过所述交互模块向所述用户设备提供针对所述诊断响应报文的解析结果的具体实现过程可以如图3所示。The response message parsing module parses the diagnostic response message according to the target response message structure, and provides the user equipment with the analysis result for the diagnostic response message through the interaction module. The specific implementation process may be: As shown in Figure 3.

S151、响应报文解析模块根据目标响应报文结构对诊断响应报文进行解析,获得基于json格式的解析结果,并将基于json格式的解析结果发送给交互模块。S151. The response message parsing module parses the diagnostic response message according to the target response message structure, obtains the parsing result based on the json format, and sends the parsing result based on the json format to the interaction module.

当所述交互模块还包括响应交互子模块时,所述响应报文解析模块将所述基于json格式的解析结果发送给所述响应交互子模块。When the interaction module further includes a response interaction submodule, the response message parsing module sends the json format-based parsing result to the response interaction submodule.

S152、交互模块将基于json格式的解析结果解析成满足预设解析需求的解析结果,并将满足预设解析需求的解析结果反馈给用户设备。S152. The interaction module parses the parsing result based on the json format into an parsing result that meets the preset parsing requirement, and feeds back the parsing result that meets the preset parsing requirement to the user device.

当所述交互模块包括响应交互子模块时,所述响应交互子模块将所述基于json格式的解析结果解析成满足预设解析需求的解析结果,并将所述满足预设解析需求的解析结果反馈给所述用户设备。其中,满足预设解析需求的解析结果也即为诊断响应报文的解析结果。预设解析需求包括预设解析格式要求,例如,预设解析格式要求为中文格式或者英文格式的自然语言。当解析结果包括针对多个诊断对象的诊断结果时,预设解析需求还可以包括诊断结果输出项要求,例如,当多个诊断结果中既包括故障结果又包括无故障结果时,要求只输出故障结果,当多个诊断结果中均为无故障结果时,要求只输出用于表征无故障的一个结果即可。When the interaction module includes a response interaction sub-module, the response interaction sub-module parses the parsing result based on json format into parsing results that meet preset parsing requirements, and converts the parsing results that meet preset parsing requirements feedback to the user equipment. The parsing result satisfying the preset parsing requirement is also the parsing result of the diagnostic response message. The preset parsing requirements include preset parsing format requirements, for example, the preset parsing format requires a natural language in Chinese format or English format. When the analysis results include diagnosis results for multiple diagnosis objects, the preset analysis requirements may also include requirements for output items of diagnosis results. For example, when the multiple diagnosis results include both fault results and no-fault results, only faults are required to be output As a result, when all of the multiple diagnosis results are non-faulty results, it is required to output only one result representing no faults.

在一种实施方式中,所述ECU还包括诊断报文记录模块,所述诊断报文记录模块用于记录所述诊断请求报文和/或所述诊断响应报文。如果程序异常,例如,诊断命令下发后无响应或者用户界面诊断结果出现乱码,此时诊断报文记录模块记录了诊断过程中所有诊断请求报文及诊断响应报文,可以交给专业工程师来定位问题。诊断报文记录模块可以通过与交互模块通信,实现交互模块接收到的诊断请求报文和/或所述诊断响应报文,也可以通过与请求报文生成模块通信获取诊断请求报文,与响应报文解析模块通信获取诊断响应报文。In an embodiment, the ECU further includes a diagnostic message recording module, and the diagnostic message recording module is configured to record the diagnostic request message and/or the diagnostic response message. If the program is abnormal, for example, there is no response after the diagnostic command is issued or the user interface diagnostic result is garbled, the diagnostic message recording module records all the diagnostic request messages and diagnostic response messages during the diagnostic process, which can be handed over to professional engineers. positioning problem. The diagnostic message recording module can realize the diagnostic request message and/or the diagnostic response message received by the interactive module by communicating with the interactive module, or obtain the diagnostic request message by communicating with the request message generating module, and communicate with the response message. The message parsing module communicates to obtain a diagnostic response message.

本发明实施例提供的基于诊断工具的ECU诊断方法,能够在诊断工具中设置相互独立的数据库模块、诊断管理模块、请求报文生成模块、响应报文解析模块、交互模块,在数据库模块对ODX文件解析获得诊断数据后,请求报文生成模块可以通过交互模块向用户设备提供数据库模块支持的目标诊断请求列表,并通过交互模块接收用户设备反馈的用户指定诊断服务的诊断请求列表中的指定诊断请求标识,请求报文生成模块从诊断管理模块获取指定诊断请求标识所对应的目标请求报文参数和目标请求报文结构,并通过交互模块向用户设备提供目标请求报文参数,通过交互模块接收用户设备反馈的目标请求报文参数对应的请求报文参数值,请求报文生成模块根据目标请求报文结构和请求报文参数值生成诊断请求报文,并将诊断请求报文发送给待诊断ECU,响应报文解析模块接收待诊断ECU发送的对应于诊断请求报文的诊断响应报文,并将诊断响应报文发送给诊断管理模块,响应报文解析模块接收诊断管理模块发送的与诊断响应报文对应的目标响应报文结构,根据目标响应报文结构对诊断响应报文进行解析,并通过交互模块向用户设备提供针对诊断响应报文的解析结果。由此可知,本发明实施例可以通过多种相互解耦的模块之间交互实现ECU诊断功能,使得开发周期及维护周期的成本得到了很大压缩,且由于本发明实施例是基于用于整车生命周期中诊断数据交互的、开放式的诊断数据格式ODX文件获取诊断数据的,所以当ECU类型发生改变时,只需加载不同的ODX文件即可,而无需修改代码,从而提高了ECU诊断软件的开发效率。通过将诊断管理模块划分为多个子模块,例如包括诊断服务管理子模块、诊断请求管理子模块、诊断响应管理子模块,可以使得诊断管理模块中诊断服务、诊断请求和诊断响应的管理得到解耦,从而进一步降低开发周期和维护周期的成本,提高诊断管理的效率。此外,与直接向用户设备反馈所有诊断请求列表相比,本发明实施例通过先向用户设备反馈诊断服务列表,再根据用户基于诊断服务列表反馈的指定诊断服务,来获取指定诊断服务对应的目标诊断请求列表,可以减少数据调用、数据传输和数据存储的数量,从而可以提高数据传输效率和节省资源。通过将交互模块划分为多个子模块,例如包括服务交互子模块、请求交互子模块和响应交互子模块,可以使得针对诊断服务、诊断请求和诊断响应与外界的交互得到解耦,从而进一步降低开发周期和维护周期的成本,提高诊断交互的效率。通过在诊断工具中设置用于记录诊断过程中涉及的诊断请求报文和/或诊断响应报文的诊断报文记录模块,可以在诊断过程中发生异常时,使得技术人员通过诊断报文记录模块快速定位异常原因。The ECU diagnosis method based on the diagnosis tool provided by the embodiment of the present invention can set up mutually independent database module, diagnosis management module, request message generation module, response message analysis module, and interaction module in the diagnosis tool. After the file parsing obtains the diagnostic data, the request message generation module can provide the user equipment with the target diagnosis request list supported by the database module through the interaction module, and receive the specified diagnosis in the diagnosis request list of the user-specified diagnosis service fed back by the user equipment through the interaction module. request identifier, the request message generation module obtains the target request message parameters and target request message structure corresponding to the specified diagnosis request identifier from the diagnosis management module, and provides the target request message parameters to the user equipment through the interaction module, and receives through the interaction module The request message parameter value corresponding to the target request message parameter returned by the user equipment, the request message generation module generates a diagnosis request message according to the target request message structure and the request message parameter value, and sends the diagnosis request message to the to-be-diagnosed ECU, the response message parsing module receives the diagnostic response message corresponding to the diagnostic request message sent by the ECU to be diagnosed, and sends the diagnostic response message to the diagnostic management module, and the response message parsing module receives and diagnoses sent by the diagnostic management module. The target response message structure corresponding to the response message, the diagnostic response message is parsed according to the target response message structure, and the analysis result for the diagnostic response message is provided to the user equipment through the interaction module. It can be seen from this that the embodiment of the present invention can realize the ECU diagnosis function through the interaction between various mutually decoupled modules, so that the cost of the development cycle and the maintenance cycle is greatly reduced, and because the embodiment of the present invention is based on the The diagnostic data interactive and open diagnostic data format ODX file obtains diagnostic data in the vehicle life cycle, so when the ECU type changes, it is only necessary to load a different ODX file without modifying the code, thus improving the ECU diagnostics. software development efficiency. By dividing the diagnosis management module into multiple sub-modules, for example, including a diagnosis service management sub-module, a diagnosis request management sub-module, and a diagnosis response management sub-module, the management of diagnosis services, diagnosis requests and diagnosis responses in the diagnosis management module can be decoupled , so as to further reduce the cost of development cycle and maintenance cycle, and improve the efficiency of diagnosis management. In addition, compared with directly feeding back all the diagnosis request lists to the user equipment, the embodiment of the present invention first feeds back the diagnosis service list to the user equipment, and then obtains the target corresponding to the designated diagnosis service according to the designated diagnosis service fed back by the user based on the diagnosis service list. The list of diagnostic requests can reduce the number of data calls, data transfers, and data storage, thereby improving data transfer efficiency and saving resources. By dividing the interaction module into multiple sub-modules, for example, including a service interaction sub-module, a request interaction sub-module and a response interaction sub-module, the interaction between the diagnosis service, diagnosis request and diagnosis response and the outside world can be decoupled, thereby further reducing development costs. Cycle and maintenance cycle costs, improve the efficiency of diagnostic interactions. By setting the diagnostic message recording module in the diagnostic tool for recording the diagnostic request message and/or the diagnostic response message involved in the diagnostic process, when an abnormality occurs during the diagnostic process, the technician can record the module through the diagnostic message. Quickly locate the cause of the abnormality.

相应于上述方法实施例,本发明实施例提供了一种诊断工具,诊断工具可以部署在ECU中,且待诊断ECU可以为部署有诊断工具的ECU,也可以且车辆内其他ECU。如图4所示,所述诊断工具包括数据库模块21、诊断管理模块22、请求报文生成模块23、响应报文解析模块24和交互模块25;Corresponding to the above method embodiments, the embodiments of the present invention provide a diagnostic tool. The diagnostic tool can be deployed in an ECU, and the ECU to be diagnosed can be an ECU in which the diagnostic tool is deployed, or other ECUs in the vehicle. As shown in FIG. 4 , the diagnosis tool includes a database module 21, a diagnosis management module 22, a request message generation module 23, a response message analysis module 24 and an interaction module 25;

所述数据库模块21,用于对开放式诊断数据交换ODX文件进行解析,获得诊断数据;The database module 21 is used to parse the open diagnostic data exchange ODX file to obtain diagnostic data;

所述诊断管理模块22,用于从所述数据库模块21获取所述诊断数据,并根据所述诊断数据生成每个诊断服务对应的诊断请求列表;The diagnosis management module 22 is configured to obtain the diagnosis data from the database module 21, and generate a diagnosis request list corresponding to each diagnosis service according to the diagnosis data;

所述请求生成报文模块,用于从所述诊断管理模块22获取目标诊断请求列表,并将所述目标诊断请求列表发送给所述交互模块25,其中,所述目标诊断请求列表包括指定诊断服务对应的诊断请求列表;The request generating message module is used to obtain the target diagnosis request list from the diagnosis management module 22, and send the target diagnosis request list to the interaction module 25, wherein the target diagnosis request list includes the specified diagnosis A list of diagnostic requests corresponding to the service;

所述交互模块25,用于接收所述请求报文生成模块23发送的所述目标诊断请求列表,并将所述目标诊断请求列表反馈给用户设备,接收所述用户设备反馈的指定诊断请求标识,并将所述指定诊断请求标识发送给所述请求生成报文模块,其中,所述指定诊断请求标识为所述指定诊断服务对应的诊断请求列表中的诊断请求标识;The interaction module 25 is configured to receive the target diagnosis request list sent by the request message generation module 23, and feed back the target diagnosis request list to the user equipment, and receive the specified diagnosis request identifier fed back by the user equipment , and send the designated diagnosis request identifier to the request generating message module, wherein the designated diagnosis request identifier is the diagnosis request identifier in the diagnosis request list corresponding to the designated diagnosis service;

所述请求生成报文模块,还用于接收所述交互模块25发送的所述指定诊断请求标识,并将所述指定诊断请求标识发送给所述诊断管理模块22;The request generating message module is further configured to receive the designated diagnosis request identifier sent by the interaction module 25, and send the designated diagnosis request identifier to the diagnosis management module 22;

所述诊断管理模块22,还用于接收所述请求生成报文模块发送的所述指定诊断请求标识,并查找指定诊断请求标识对应的目标请求报文参数和目标请求报文结构,并将所述目标请求报文参数和所述目标请求报文结构发送给所述请求报文生成模块23,其中,所述目标请求报文参数为与所述指定诊断请求标识对应的请求报文参数,所述目标请求报文结构为与所述指定诊断请求标识对应的请求报文结构,所述目标请求报文参数和所述目标请求报文结构是从所述诊断数据中获取的;The diagnosis management module 22 is further configured to receive the specified diagnosis request identifier sent by the request generation message module, search for the target request message parameter and target request message structure corresponding to the specified diagnosis request identifier, and store the specified diagnosis request message. The target request message parameter and the target request message structure are sent to the request message generation module 23, wherein the target request message parameter is the request message parameter corresponding to the specified diagnosis request identifier, so The target request message structure is a request message structure corresponding to the specified diagnosis request identifier, and the target request message parameter and the target request message structure are obtained from the diagnostic data;

所述请求报文生成模块23,还用于接收所述诊断管理模块22发送的所述目标请求报文参数和所述目标请求报文结构,并向所述交互模块25发送所述目标请求报文参数,;The request message generation module 23 is further configured to receive the target request message parameters and the target request message structure sent by the diagnosis management module 22, and send the target request message to the interaction module 25. text parameter,

所述交互模块25,还用于接收所述请求报文生成模块23发送的所述目标请求报文参数,并将所述目标请求报文参数反馈给所述用户设备,接收所述用户设备反馈的所述目标请求报文参数对应的请求报文参数值,将所述请求报文参数值发送给所述请求报文生成模块23;The interaction module 25 is further configured to receive the target request message parameters sent by the request message generation module 23, and feed back the target request message parameters to the user equipment, and receive feedback from the user equipment the request message parameter value corresponding to the target request message parameter, and send the request message parameter value to the request message generation module 23;

所述请求报文生成模块23,还用于接收所述交互模块25发送的所述请求报文参数值,根据所述目标请求报文结构和所述请求报文参数值生成诊断请求报文,并将所述诊断请求报文发送给待诊断ECU;The request message generation module 23 is further configured to receive the request message parameter value sent by the interaction module 25, and generate a diagnosis request message according to the target request message structure and the request message parameter value, and send the diagnosis request message to the ECU to be diagnosed;

所述响应报文解析模块24,用于接收所述待诊断ECU发送的对应于所述诊断请求报文的诊断响应报文,并将所述诊断响应报文发送给所述诊断管理模块22;The response message parsing module 24 is configured to receive a diagnosis response message corresponding to the diagnosis request message sent by the to-be-diagnosed ECU, and send the diagnosis response message to the diagnosis management module 22;

所述诊断管理模块22,还用于接收所述响应报文解析模块24发送的所述诊断响应报文,查找目标响应报文结构,并将所述目标响应报文结构发送给所述响应报文解析模块24,其中,所述目标响应报文结构为所述诊断响应报文对应的响应报文结构,所述目标响应报文结构是从所述诊断数据中获取的;The diagnostic management module 22 is further configured to receive the diagnostic response message sent by the response message parsing module 24, search for the target response message structure, and send the target response message structure to the response message. The text parsing module 24, wherein the target response message structure is the response message structure corresponding to the diagnostic response message, and the target response message structure is obtained from the diagnostic data;

所述响应报文解析模块24,还用于接收所述诊断管理模块22发送的所述目标响应报文结构,根据所述目标响应报文结构对所述诊断响应报文进行解析,并通过所述交互模块25向所述用户设备提供针对所述诊断响应报文的解析结果。The response message parsing module 24 is further configured to receive the target response message structure sent by the diagnosis management module 22, parse the diagnostic response message according to the target response message structure, and pass the target response message structure. The interaction module 25 provides the user equipment with a parsing result for the diagnosis response message.

在一种实施方式中,如图5所示,所述诊断工具还包括诊断报文记录模块26,所述诊断报文记录模块26,用于记录所述诊断请求报文和/或所述诊断响应报文。In one embodiment, as shown in FIG. 5 , the diagnostic tool further includes a diagnostic message recording module 26, which is configured to record the diagnostic request message and/or the diagnostic message response message.

在一种实施方式中,所述诊断管理模块22,还用于根据所述诊断数据生成诊断服务列表,并将所述诊断服务列表发送给所述请求报文生成模块23;In an embodiment, the diagnosis management module 22 is further configured to generate a diagnosis service list according to the diagnosis data, and send the diagnosis service list to the request message generation module 23;

所述请求报文生成模块23,用于接收所述诊断管理模块22发送的所述诊断服务列表,并将所述诊断服务列表发送给所述交互模块25;The request message generation module 23 is configured to receive the diagnosis service list sent by the diagnosis management module 22, and send the diagnosis service list to the interaction module 25;

所述交互模块25,用于接收所述请求报文生成模块23发送的所述诊断服务列表,并将所述诊断服务列表提供给所述用户设备,接收所述用户设备反馈的指定诊断服务,将所述指定诊断服务发送给所述请求报文生成模块23;The interaction module 25 is configured to receive the diagnosis service list sent by the request message generation module 23, provide the diagnosis service list to the user equipment, and receive the specified diagnosis service fed back by the user equipment, sending the designated diagnostic service to the request message generation module 23;

所述请求报文生成模块23,用于接收所述交互模块25发送的所述指定诊断服务,将所述指定诊断服务发送给所述诊断管理模块22;The request message generation module 23 is configured to receive the designated diagnosis service sent by the interaction module 25, and send the designated diagnosis service to the diagnosis management module 22;

所述诊断管理模块22,用于接收所述请求报文生成模块23发送的所述指定诊断服务,并将所述指定诊断服务对应的诊断请求列表作为所述目标诊断请求列表,将所述目标诊断请求列表发送给所述请求报文生成模块23。The diagnosis management module 22 is configured to receive the specified diagnosis service sent by the request message generation module 23, and use the diagnosis request list corresponding to the specified diagnosis service as the target diagnosis request list, and use the target diagnosis request list. The diagnosis request list is sent to the request message generation module 23 .

在一种实施方式中,如图5所示,所述诊断数据包括至少一个诊断服务,至少一个诊断请求标识,至少一个请求报文参数,至少一个请求报文结构,至少一个响应报文结构,诊断服务和诊断请求标识的第一映射关系,以及诊断请求标识、请求报文参数与请求报文结构的第二映射关系,所述诊断管理模块22包括诊断服务管理子模块221和诊断请求管理子模块222;In one embodiment, as shown in FIG. 5 , the diagnostic data includes at least one diagnostic service, at least one diagnostic request identifier, at least one request message parameter, at least one request message structure, at least one response message structure, The first mapping relationship between the diagnostic service and the diagnostic request identifier, and the second mapping relationship between the diagnostic request identifier, the request message parameter and the request message structure, the diagnostic management module 22 includes a diagnostic service management sub-module 221 and a diagnostic request management sub-module. module 222;

所述诊断服务管理子模块221,用于根据所述诊断数据生成诊断服务列表,并将所述诊断服务列表发送给所述请求报文生成模块23;The diagnostic service management sub-module 221 is configured to generate a diagnostic service list according to the diagnostic data, and send the diagnostic service list to the request message generation module 23;

所述诊断请求管理子模块222,用于存储第一映射关系,并根据所述诊断数据生成每个诊断服务对应的诊断请求列表;The diagnosis request management sub-module 222 is configured to store the first mapping relationship, and generate a diagnosis request list corresponding to each diagnosis service according to the diagnosis data;

所述诊断服务管理子模块221,还用于接收所述请求报文生成模块23发送的所述指定诊断服务,并将所述指定诊断服务发送给所述诊断请求管理子模块222;The diagnosis service management sub-module 221 is further configured to receive the designated diagnosis service sent by the request message generation module 23, and send the designated diagnosis service to the diagnosis request management sub-module 222;

所述诊断请求管理子模块222,还用于根据所述第一映射关系查找所述指定诊断服务对应的诊断请求列表作为所述目标诊断请求列表,将所述目标诊断请求列表发送给所述请求报文生成模块23;The diagnosis request management sub-module 222 is further configured to look up the diagnosis request list corresponding to the specified diagnosis service as the target diagnosis request list according to the first mapping relationship, and send the target diagnosis request list to the requester message generation module 23;

所述诊断请求管理子模块222,还用于接收所述请求生成报文模块发送的所述指定诊断请求标识,并查找指定诊断请求标识对应的目标请求报文参数和目标请求报文结构,将所述目标请求报文参数和所述目标请求报文结构发送给所述请求报文生成模块23。The diagnosis request management sub-module 222 is further configured to receive the specified diagnosis request identifier sent by the request generation message module, and find the target request message parameter and target request message structure corresponding to the specified diagnosis request identifier, and set the The target request message parameters and the target request message structure are sent to the request message generation module 23 .

在一种实施方式中,如图5所示,所述诊断数据还包括诊断请求标识与响应报文结构的第三映射关系,所述诊断管理模块22还包括诊断响应管理子模块223;In an embodiment, as shown in FIG. 5 , the diagnosis data further includes a third mapping relationship between the diagnosis request identifier and the response message structure, and the diagnosis management module 22 further includes a diagnosis response management sub-module 223;

所述诊断响应管理子模块223,用于接收所述响应报文解析模块24发送的所述诊断响应报文,从所述诊断请求管理子模块222中获取指定诊断请求标识,并根据所述指定诊断请求标识和所述第三映射关系查找目标响应报文结构,将所述目标响应报文结构发送给所述响应报文解析模块24。The diagnostic response management sub-module 223 is configured to receive the diagnostic response message sent by the response message parsing module 24, obtain the specified diagnostic request identifier from the diagnostic request management sub-module 222, and according to the specified diagnostic request The diagnosis request identifier and the third mapping relationship look up the target response message structure, and send the target response message structure to the response message parsing module 24 .

在一种实施方式中,所述响应报文解析模块24,用于根据所述目标响应报文结构对所述诊断响应报文进行解析,获得基于json格式的解析结果,并将所述基于json格式的解析结果发送给所述交互模块25;In one embodiment, the response message parsing module 24 is configured to parse the diagnostic response message according to the target response message structure, obtain a parsing result based on json format, and analyze the json-based The parsing result of the format is sent to the interaction module 25;

所述交互模块25,用于将所述基于json格式的解析结果解析成满足预设解析需求的解析结果,并将所述满足预设解析需求的解析结果反馈给所述用户设备。The interaction module 25 is configured to parse the parsing result based on the json format into an parsing result satisfying a preset parsing requirement, and feed back the parsing result satisfying the preset parsing requirement to the user equipment.

在一种实施方式中,如图5所示,所述交互模块25包括服务交互子模块251和请求交互子模块252;In one embodiment, as shown in FIG. 5 , the interaction module 25 includes a service interaction sub-module 251 and a request interaction sub-module 252;

所述服务交互子模块251,用于接收所述请求报文生成模块23发送的所述诊断服务列表,并将所述诊断服务列表提供给所述用户设备,接收所述用户设备反馈的指定诊断服务,将所述指定诊断服务发送给所述请求报文生成模块23;The service interaction sub-module 251 is configured to receive the diagnosis service list sent by the request message generation module 23, provide the diagnosis service list to the user equipment, and receive the specified diagnosis fed back by the user equipment service, sending the specified diagnostic service to the request message generation module 23;

所述请求交互子模块252,还用于接收所述请求报文生成模块23发送的所述目标诊断请求列表,将所述目标诊断请求列表反馈给用户设备,接收所述用户设备反馈的指定诊断请求标识,并将所述指定诊断请求标识发送给所述请求生成报文模块;The request interaction sub-module 252 is further configured to receive the target diagnosis request list sent by the request message generation module 23, feed back the target diagnosis request list to the user equipment, and receive the specified diagnosis fed back by the user equipment. request identification, and send the specified diagnosis request identification to the request generation message module;

所述请求交互子模块252,还用于接收所述请求报文生成模块23发送的所述目标请求报文参数,并将所述目标请求报文参数反馈给所述用户设备,接收所述用户设备反馈的所述目标请求报文参数对应的请求报文参数值,将所述请求报文参数值发送给所述请求报文生成模块23。The request interaction sub-module 252 is further configured to receive the target request message parameters sent by the request message generation module 23, and feed back the target request message parameters to the user equipment, and receive the user The request message parameter value corresponding to the target request message parameter fed back by the device is sent to the request message generation module 23 .

在一种实施方式中,如图5所示,所述交互模块25还包括响应交互子模块253;In one embodiment, as shown in FIG. 5 , the interaction module 25 further includes a response interaction sub-module 253;

所述响应交互子模块253,用于将所述基于json格式的解析结果解析成满足预设解析需求的解析结果,并将所述满足预设解析需求的解析结果反馈给所述用户设备。The response interaction sub-module 253 is configured to parse the json format-based parsing result into parsing results that meet preset parsing requirements, and feed back the parsing results that meet preset parsing requirements to the user equipment.

在一种实施方式中,如图5所示,请求报文生成模块23包括PDU请求报文生成子模块231,PDU请求报文生成子模块231用于执行上述请求报文生成模块23执行的步骤;In one embodiment, as shown in FIG. 5 , the request message generation module 23 includes a PDU request message generation sub-module 231, and the PDU request message generation sub-module 231 is configured to perform the steps performed by the request message generation module 23 above. ;

响应报文解析模块24包括PDU响应报文解析子模块241,PDU响应报文解析子模块241用于执行上述响应报文解析模块24执行的步骤。The response message parsing module 24 includes a PDU response message parsing sub-module 241, and the PDU response message parsing sub-module 241 is configured to perform the steps performed by the response message parsing module 24 above.

基于上述方法实施例,本发明的另一实施例提供了一种存储介质,其上存储有可执行指令,该指令被处理器执行时使处理器实现如上所述的方法。Based on the above method embodiments, another embodiment of the present invention provides a storage medium on which executable instructions are stored, and when the instructions are executed by a processor, the processor implements the above method.

基于上述方法实施例,本发明的另一实施例提供了一种车辆,包括:Based on the above method embodiment, another embodiment of the present invention provides a vehicle, including:

一个或多个处理器;one or more processors;

存储装置,用于存储一个或多个程序,storage means for storing one or more programs,

其中,当所述一个或多个程序被所述一个或多个处理器执行时,使得所述一个或多个处理器实现如上所述的方法。Wherein, when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the method as described above.

上述系统、装置实施例与方法实施例相对应,与该方法实施例具有同样的技术效果,具体说明参见方法实施例。装置实施例是基于方法实施例得到的,具体的说明可以参见方法实施例部分,此处不再赘述。本领域普通技术人员可以理解:附图只是一个实施例的示意图,附图中的模块或流程并不一定是实施本发明所必须的。The foregoing system and device embodiments correspond to the method embodiments, and have the same technical effects as the method embodiments. For specific descriptions, refer to the method embodiments. The apparatus embodiment is obtained based on the method embodiment, and the specific description can refer to the method embodiment section, which will not be repeated here. Those of ordinary skill in the art can understand that the accompanying drawing is only a schematic diagram of an embodiment, and the modules or processes in the accompanying drawing are not necessarily necessary to implement the present invention.

本领域普通技术人员可以理解:实施例中的装置中的模块可以按照实施例描述分布于实施例的装置中,也可以进行相应变化位于不同于本实施例的一个或多个装置中。上述实施例的模块可以合并为一个模块,也可以进一步拆分成多个子模块。Those skilled in the art may understand that: the modules in the apparatus in the embodiment may be distributed in the apparatus in the embodiment according to the description of the embodiment, and may also be located in one or more apparatuses different from this embodiment with corresponding changes. The modules in the foregoing embodiments may be combined into one module, or may be further split into multiple sub-modules.

最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明实施例技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, but not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that it can still be The technical solutions described in the foregoing embodiments are modified, or some technical features thereof are equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions in the embodiments of the present invention.

Claims (10)

1.一种基于诊断工具的ECU诊断方法,其特征在于,所述诊断工具包括数据库模块、诊断管理模块、请求报文生成模块、响应报文解析模块和交互模块,所述方法包括:1. an ECU diagnosis method based on a diagnosis tool, is characterized in that, described diagnosis tool comprises database module, diagnosis management module, request message generation module, response message analysis module and interaction module, and described method comprises: 所述请求报文生成模块通过所述交互模块向用户设备提供所述数据库模块支持的目标诊断请求列表,其中,所述目标诊断请求列表是根据所述数据库模块对开放式诊断数据交换ODX文件解析得到的诊断数据生成的,所述目标诊断请求列表包括指定诊断服务对应的诊断请求列表;The request message generation module provides the user equipment with a target diagnosis request list supported by the database module through the interaction module, wherein the target diagnosis request list is based on the database module parsing the ODX file of the open diagnostic data exchange Generated from the obtained diagnosis data, the target diagnosis request list includes a diagnosis request list corresponding to the specified diagnosis service; 所述请求报文生成模块通过所述交互模块接收所述用户设备反馈的指定诊断请求标识,其中,所述指定诊断请求标识为所述指定诊断服务对应的诊断请求列表中的诊断请求标识;The request message generation module receives, through the interaction module, a designated diagnosis request identifier fed back by the user equipment, wherein the designated diagnosis request identifier is a diagnosis request identifier in a diagnosis request list corresponding to the designated diagnosis service; 所述请求报文生成模块从所述诊断管理模块获取目标请求报文参数和目标请求报文结构,并通过所述交互模块向所述用户设备提供所述目标请求报文参数,通过所述交互模块接收所述用户设备反馈的所述目标请求报文参数对应的请求报文参数值,其中,所述目标请求报文参数为与所述指定诊断请求标识对应的请求报文参数,所述目标请求报文结构为与所述指定诊断请求标识对应的请求报文结构,所述诊断管理模块中存储的所述目标请求报文参数和所述目标请求报文结构是从所述数据库模块中存储的所述诊断数据中获取的;The request message generation module obtains the target request message parameters and the target request message structure from the diagnosis management module, and provides the user equipment with the target request message parameters through the interaction module. The module receives the request message parameter value corresponding to the target request message parameter fed back by the user equipment, wherein the target request message parameter is the request message parameter corresponding to the specified diagnosis request identifier, and the target request message parameter The request message structure is a request message structure corresponding to the specified diagnosis request identifier, and the target request message parameters and the target request message structure stored in the diagnosis management module are stored in the database module. obtained from the diagnostic data of ; 所述请求报文生成模块根据所述目标请求报文结构和所述请求报文参数值生成诊断请求报文,并将所述诊断请求报文发送给待诊断ECU;The request message generation module generates a diagnosis request message according to the target request message structure and the request message parameter value, and sends the diagnosis request message to the ECU to be diagnosed; 所述响应报文解析模块接收所述待诊断ECU发送的对应于所述诊断请求报文的诊断响应报文,并将所述诊断响应报文发送给所述诊断管理模块;The response message parsing module receives a diagnosis response message corresponding to the diagnosis request message sent by the to-be-diagnosed ECU, and sends the diagnosis response message to the diagnosis management module; 所述响应报文解析模块接收所述诊断管理模块发送的目标响应报文结构,根据所述目标响应报文结构对所述诊断响应报文进行解析,并通过所述交互模块向所述用户设备提供针对所述诊断响应报文的解析结果,其中,所述目标响应报文结构为与所述诊断响应报文对应的响应报文结构,所述诊断管理模块中存储的所述目标响应报文结构是从所述数据库模块中存储的所述诊断数据中获取的。The response message parsing module receives the target response message structure sent by the diagnosis management module, parses the diagnosis response message according to the target response message structure, and sends the message to the user equipment through the interaction module. Provide a parsing result for the diagnosis response message, wherein the target response message structure is a response message structure corresponding to the diagnosis response message, and the target response message stored in the diagnosis management module The structure is obtained from the diagnostic data stored in the database module. 2.根据权利要求1所述的方法,其特征在于,所述请求报文生成模块通过所述交互模块向用户设备提供所述数据库模块支持的目标诊断请求列表,包括:2. The method according to claim 1, wherein the request message generation module provides the user equipment with a target diagnosis request list supported by the database module through the interaction module, comprising: 所述请求报文生成模块将从所述诊断管理模块中获取的诊断服务列表通过所述交互模块提供给所述用户设备,其中,所述诊断管理模块从所述数据库模块获取所述诊断数据,并根据所述诊断数据生成所述诊断服务列表和所述诊断服务列表中每个诊断服务对应的诊断请求列表;The request message generation module provides the diagnosis service list obtained from the diagnosis management module to the user equipment through the interaction module, wherein the diagnosis management module obtains the diagnosis data from the database module, and generating the list of diagnostic services and a list of diagnostic requests corresponding to each diagnostic service in the list of diagnostic services according to the diagnostic data; 所述请求报文生成模块通过所述交互模块接收所述用户设备反馈的指定诊断服务;The request message generation module receives the specified diagnostic service fed back by the user equipment through the interaction module; 所述请求报文生成模块从所述诊断管理模块中获取与所述指定诊断服务对应的诊断请求列表作为所述目标诊断请求列表;The request message generation module obtains a diagnosis request list corresponding to the specified diagnosis service from the diagnosis management module as the target diagnosis request list; 所述请求报文生成模块通过所述交互模块向所述用户设备提供所述目标诊断请求列表。The request message generating module provides the user equipment with the target diagnosis request list through the interaction module. 3.根据权利要求2所述的方法,其特征在于,所述诊断数据包括至少一个诊断服务,至少一个诊断请求标识,至少一个请求报文参数,至少一个请求报文结构,至少一个响应报文结构,诊断服务和诊断请求标识的第一映射关系,以及诊断请求标识、请求报文参数与请求报文结构的第二映射关系,所述诊断管理模块包括诊断服务管理子模块和诊断请求管理子模块;3. The method according to claim 2, wherein the diagnostic data comprises at least one diagnostic service, at least one diagnostic request identifier, at least one request message parameter, at least one request message structure, at least one response message structure, the first mapping relationship between the diagnostic service and the diagnostic request identifier, and the second mapping relationship between the diagnostic request identifier, the request message parameter and the request message structure, and the diagnostic management module includes a diagnostic service management sub-module and a diagnostic request management sub-module. module; 所述请求报文生成模块将从所述诊断管理模块中获取的诊断服务列表通过所述交互模块提供给所述用户设备,包括:所述请求报文生成模块将从所述诊断服务管理子模块中获取的诊断服务列表通过所述交互模块提供给所述用户设备;The request message generating module provides the diagnostic service list obtained from the diagnostic management module to the user equipment through the interaction module, including: the request message generating module will generate a list of diagnostic services from the diagnostic service management sub-module. The list of diagnostic services obtained in is provided to the user equipment through the interaction module; 所述请求报文生成模块从所述诊断管理模块中获取与所述指定诊断服务对应的诊断请求列表作为所述目标诊断请求列表,包括:所述请求报文生成模块从所述诊断请求管理子模块中获取与所述指定诊断服务对应的诊断请求列表作为所述目标诊断请求列表,其中,所述诊断请求管理子模块从所述诊断管理服务子模块获取所述指定诊断服务,根据所述指定诊断服务、所述第一映射关系确定所述目标诊断请求列表;The request message generation module obtains a diagnosis request list corresponding to the specified diagnosis service from the diagnosis management module as the target diagnosis request list, including: the request message generation module obtains from the diagnosis request management sub-module. The diagnosis request list corresponding to the specified diagnosis service is obtained in the module as the target diagnosis request list, wherein the diagnosis request management sub-module obtains the specified diagnosis service from the diagnosis management service sub-module, and the specified diagnosis service is obtained according to the specified diagnosis service sub-module. The diagnosis service, the first mapping relationship determines the target diagnosis request list; 所述请求报文生成模块从所述诊断管理模块获取目标请求报文参数和目标请求报文结构,包括:所述请求报文生成模块从所述诊断请求管理子模块获取所述目标请求报文参数和所述目标请求报文结构,其中,所述诊断请求管理子模块根据所述第二映射关系和所述指定诊断请求标识确定所述目标请求报文参数和所述目标请求报文结构。The request message generation module obtains the target request message parameters and the target request message structure from the diagnosis management module, including: the request message generation module obtains the target request message from the diagnosis request management sub-module parameters and the target request message structure, wherein the diagnosis request management sub-module determines the target request message parameters and the target request message structure according to the second mapping relationship and the specified diagnosis request identifier. 4.根据权利要求3所述的方法,其特征在于,所述诊断数据还包括诊断请求标识与响应报文结构的第三映射关系,所述诊断管理模块还包括诊断响应管理子模块;4. The method according to claim 3, wherein the diagnosis data further comprises a third mapping relationship between a diagnosis request identifier and a response message structure, and the diagnosis management module further comprises a diagnosis response management submodule; 所述响应报文解析模块将所述诊断响应报文发送给所述诊断管理模块,包括:所述响应报文解析模块将所述诊断响应报文发送给所述诊断响应管理子模块;The response message parsing module sending the diagnostic response message to the diagnostic management module includes: the response message parsing module sending the diagnostic response message to the diagnostic response management sub-module; 所述响应报文解析模块接收所述诊断管理模块发送的目标响应报文结构,包括:所述响应报文解析模块接收所述诊断响应管理子模块发送的目标响应报文结构,其中,所述诊断响应管理子模块从所述诊断请求管理子模块中获取所述指定诊断请求标识,根据所述指定诊断请求标识、所述第三映射关系确定目标响应报文结构。The response message parsing module receiving the target response message structure sent by the diagnosis management module includes: the response message parsing module receiving the target response message structure sent by the diagnostic response management sub-module, wherein the The diagnostic response management sub-module acquires the designated diagnostic request identifier from the diagnostic request management sub-module, and determines a target response message structure according to the designated diagnostic request identifier and the third mapping relationship. 5.根据权利要求2所述的方法,其特征在于,根据所述目标响应报文结构对所述诊断响应报文进行解析,并通过所述交互模块向所述用户设备提供针对所述诊断响应报文的解析结果,包括:5 . The method according to claim 2 , wherein the diagnostic response message is parsed according to the target response message structure, and the diagnostic response is provided to the user equipment through the interaction module. 6 . Packet parsing results, including: 所述响应报文解析模块根据所述目标响应报文结构对所述诊断响应报文进行解析,获得基于json格式的解析结果,并将所述基于json格式的解析结果发送给所述交互模块;The response message parsing module parses the diagnostic response message according to the target response message structure, obtains a parsing result based on the json format, and sends the parsing result based on the json format to the interaction module; 所述交互模块将所述基于json格式的解析结果解析成满足预设解析需求的解析结果,并将所述满足预设解析需求的解析结果反馈给所述用户设备。The interaction module parses the parsing result based on the json format into an parsing result satisfying a preset parsing requirement, and feeds back the parsing result satisfying the preset parsing requirement to the user equipment. 6.根据权利要求5所述的方法,其特征在于,所述交互模块包括服务交互子模块和请求交互子模块,所述请求报文生成模块将从所述诊断管理模块中获取的诊断服务列表通过所述交互模块提供给所述用户设备,包括:所述请求报文生成模块将从所述诊断管理模块中获取的诊断服务列表通过所述服务交互子模块提供给所述用户设备;6. The method according to claim 5, wherein the interaction module comprises a service interaction submodule and a request interaction submodule, and the request message generation module obtains a list of diagnostic services from the diagnosis management module Providing to the user equipment through the interaction module includes: the request message generation module provides the diagnosis service list obtained from the diagnosis management module to the user equipment through the service interaction sub-module; 所述请求报文生成模块通过所述交互模块接收所述用户设备反馈的指定诊断服务,包括:所述请求报文生成模块通过所述服务交互子模块接收所述用户设备反馈的指定诊断服务;The request message generation module receives the specified diagnostic service fed back by the user equipment through the interaction module, including: the request message generation module receives the specified diagnostic service fed back by the user equipment through the service interaction sub-module; 所述请求报文生成模块通过所述交互模块向所述用户设备提供所述目标诊断请求列表,包括:所述请求报文生成模块通过所述请求交互子模块向所述用户设备提供所述目标诊断请求列表;The request message generation module provides the user equipment with the target diagnosis request list through the interaction module, including: the request message generation module provides the user equipment with the target through the request interaction sub-module list of diagnostic requests; 所述请求报文生成模块通过所述交互模块接收所述用户设备反馈的指定诊断请求标识,包括:所述请求报文生成模块通过所述请求交互子模块接收所述用户设备反馈的指定诊断请求标识;The request message generation module receives the specified diagnosis request identifier fed back by the user equipment through the interaction module, including: the request message generation module receives the specified diagnosis request fed back by the user equipment through the request interaction sub-module identification; 所述请求报文生成模块通过所述交互模块向所述用户设备提供所述目标请求报文参数,通过所述交互模块接收所述用户设备反馈的所述目标请求报文参数对应的请求报文参数值,包括:所述请求报文生成模块通过所述请求交互子模块向所述用户设备提供所述目标请求报文参数,通过所述请求交互子模块接收所述用户设备反馈的所述目标请求报文参数对应的请求报文参数值。The request message generation module provides the user equipment with the target request message parameters through the interaction module, and receives, through the interaction module, a request message corresponding to the target request message parameters fed back by the user equipment parameter value, including: the request message generation module provides the target request message parameter to the user equipment through the request interaction sub-module, and receives the target feedback from the user equipment through the request interaction sub-module The request message parameter value corresponding to the request message parameter. 7.根据权利要求6所述的方法,其特征在于,所述交互模块还包括响应交互子模块,所述响应报文解析模块将所述基于json格式的解析结果发送给所述交互模块,包括:所述响应报文解析模块将所述基于json格式的解析结果发送给所述响应交互子模块;7. The method according to claim 6, wherein the interaction module further comprises a response interaction sub-module, and the response message parsing module sends the parsing result based on the json format to the interaction module, comprising: : the response message parsing module sends the parsing result based on the json format to the response interaction sub-module; 所述交互模块将所述基于json格式的解析结果解析成满足预设解析需求的解析结果,并将所述满足预设解析需求的的解析结果发送给所述用户设备包括:所述响应交互子模块将所述基于json格式的解析结果解析成满足预设解析需求的解析结果,并将所述满足预设解析需求的解析结果发送给所述用户设备。The interaction module parses the parsing result based on the json format into an parsing result that meets the preset parsing requirement, and sends the parsing result that meets the preset parsing requirement to the user equipment. The module parses the parsing result based on the json format into an parsing result that meets the preset parsing requirement, and sends the parsing result that meets the preset parsing requirement to the user equipment. 8.根据权利要求1-7中任一项所述的方法,其特征在于,所述诊断工具还包括诊断报文记录模块,所述诊断报文记录模块用于记录所述诊断请求报文和/或所述诊断响应报文。8. The method according to any one of claims 1-7, wherein the diagnostic tool further comprises a diagnostic message recording module, and the diagnostic message recording module is configured to record the diagnostic request message and /or the diagnostic response message. 9.一种诊断工具,其特征在于,所述诊断工具包括数据库模块、诊断管理模块、请求报文生成模块、响应报文解析模块和交互模块;9. A diagnostic tool, characterized in that the diagnostic tool comprises a database module, a diagnostic management module, a request message generation module, a response message analysis module and an interaction module; 所述数据库模块,用于对开放式诊断数据交换ODX文件进行解析,获得诊断数据;The database module is used to parse the open diagnostic data exchange ODX file to obtain diagnostic data; 所述诊断管理模块,用于从所述数据库模块获取所述诊断数据,并根据所述诊断数据生成每个诊断服务对应的诊断请求列表;the diagnosis management module, configured to obtain the diagnosis data from the database module, and generate a diagnosis request list corresponding to each diagnosis service according to the diagnosis data; 所述请求生成报文模块,用于从所述诊断管理模块获取目标诊断请求列表,并将所述目标诊断请求列表发送给所述交互模块,其中,所述目标诊断请求列表包括指定诊断服务对应的诊断请求列表;The request generating message module is used to obtain a target diagnosis request list from the diagnosis management module, and send the target diagnosis request list to the interaction module, wherein the target diagnosis request list includes the corresponding diagnosis service. list of diagnostic requests; 所述交互模块,用于接收所述请求报文生成模块发送的所述目标诊断请求列表,并将所述目标诊断请求列表反馈给用户设备,接收所述用户设备反馈的指定诊断请求标识,并将所述指定诊断请求标识发送给所述请求生成报文模块,其中,所述指定诊断请求标识为所述指定诊断服务对应的诊断请求列表中的诊断请求标识;The interaction module is configured to receive the target diagnosis request list sent by the request message generation module, and feed back the target diagnosis request list to the user equipment, receive the specified diagnosis request identifier fed back by the user equipment, and sending the specified diagnosis request identifier to the request generating message module, wherein the specified diagnosis request identifier is the diagnosis request identifier in the diagnosis request list corresponding to the specified diagnosis service; 所述请求生成报文模块,还用于接收所述交互模块发送的所述指定诊断请求标识,并将所述指定诊断请求标识发送给所述诊断管理模块;The request generating message module is further configured to receive the designated diagnosis request identifier sent by the interaction module, and send the designated diagnosis request identifier to the diagnosis management module; 所述诊断管理模块,还用于接收所述请求生成报文模块发送的所述指定诊断请求标识,并查找所述指定诊断请求标识对应的目标请求报文参数和目标请求报文结构,并将所述目标请求报文参数和所述目标请求报文结构发送给所述请求报文生成模块,其中,所述目标请求报文参数为与所述指定诊断请求标识对应的请求报文参数,所述目标请求报文结构为与所述指定诊断请求标识对应的请求报文结构,所述目标请求报文参数和所述目标请求报文结构是从所述诊断数据中获取的;The diagnosis management module is further configured to receive the specified diagnosis request identifier sent by the request generation message module, search for target request message parameters and target request message structure corresponding to the specified diagnosis request identifier, and The target request message parameter and the target request message structure are sent to the request message generation module, wherein the target request message parameter is the request message parameter corresponding to the specified diagnosis request identifier, so The target request message structure is a request message structure corresponding to the specified diagnosis request identifier, and the target request message parameter and the target request message structure are obtained from the diagnostic data; 所述请求报文生成模块,还用于接收所述诊断管理模块发送的所述目标请求报文参数和所述目标请求报文结构,并向所述交互模块发送所述目标请求报文参数,;The request message generation module is further configured to receive the target request message parameters and the target request message structure sent by the diagnosis management module, and send the target request message parameters to the interaction module, ; 所述交互模块,还用于接收所述请求报文生成模块发送的所述目标请求报文参数,并将所述目标请求报文参数反馈给所述用户设备,接收所述用户设备反馈的所述目标请求报文参数对应的请求报文参数值,将所述请求报文参数值发送给所述请求报文生成模块;The interaction module is further configured to receive the target request message parameters sent by the request message generation module, feed back the target request message parameters to the user equipment, and receive all the feedback from the user equipment. the request message parameter value corresponding to the target request message parameter, and send the request message parameter value to the request message generation module; 所述请求报文生成模块,还用于接收所述交互模块发送的所述请求报文参数值,根据所述目标请求报文结构和所述请求报文参数值生成诊断请求报文,并将所述诊断请求报文发送给待诊断ECU;The request message generation module is further configured to receive the request message parameter value sent by the interaction module, generate a diagnosis request message according to the target request message structure and the request message parameter value, and send the request message to the request message. The diagnosis request message is sent to the ECU to be diagnosed; 所述响应报文解析模块,用于接收所述待诊断ECU发送的对应于所述诊断请求报文的诊断响应报文,并将所述诊断响应报文发送给所述诊断管理模块;The response message parsing module is configured to receive a diagnosis response message corresponding to the diagnosis request message sent by the ECU to be diagnosed, and send the diagnosis response message to the diagnosis management module; 所述诊断管理模块,还用于接收所述响应报文解析模块发送的所述诊断响应报文,查找目标响应报文结构,并将所述目标响应报文结构发送给所述响应报文解析模块,其中,所述目标响应报文结构为所述诊断响应报文对应的响应报文结构,所述目标响应报文结构是从所述诊断数据中获取的;The diagnostic management module is further configured to receive the diagnostic response message sent by the response message parsing module, search for a target response message structure, and send the target response message structure to the response message parsing module, wherein the target response message structure is a response message structure corresponding to the diagnostic response message, and the target response message structure is obtained from the diagnostic data; 所述响应报文解析模块,还用于接收所述诊断管理模块发送的所述目标响应报文结构,根据所述目标响应报文结构对所述诊断响应报文进行解析,并通过所述交互模块向所述用户设备提供针对所述诊断响应报文的解析结果。The response message parsing module is further configured to receive the target response message structure sent by the diagnosis management module, parse the diagnostic response message according to the target response message structure, and use the interactive The module provides the user equipment with a parsing result for the diagnostic response message. 10.根据权利要求9所述的诊断工具,其特征在于,所述诊断工具还包括诊断报文记录模块,所述诊断报文记录模块用于记录所述诊断请求报文和/或所述诊断响应报文。10. The diagnostic tool according to claim 9, wherein the diagnostic tool further comprises a diagnostic message recording module, and the diagnostic message recording module is used to record the diagnostic request message and/or the diagnostic message response message.
CN202111672234.7A 2021-12-31 2021-12-31 Diagnostic tool based ECU (electronic control Unit) diagnostic method and diagnostic tool Pending CN114415631A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111672234.7A CN114415631A (en) 2021-12-31 2021-12-31 Diagnostic tool based ECU (electronic control Unit) diagnostic method and diagnostic tool

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111672234.7A CN114415631A (en) 2021-12-31 2021-12-31 Diagnostic tool based ECU (electronic control Unit) diagnostic method and diagnostic tool

Publications (1)

Publication Number Publication Date
CN114415631A true CN114415631A (en) 2022-04-29

Family

ID=81272145

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111672234.7A Pending CN114415631A (en) 2021-12-31 2021-12-31 Diagnostic tool based ECU (electronic control Unit) diagnostic method and diagnostic tool

Country Status (1)

Country Link
CN (1) CN114415631A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103197930A (en) * 2013-03-27 2013-07-10 北京经纬恒润科技有限公司 Method for generating automobile diagnostic software automatically
CN107491061A (en) * 2017-08-31 2017-12-19 中国第汽车股份有限公司 The network automatically test system and its method of a kind of commercial car OBD diagnostic devices
CN110262459A (en) * 2019-06-30 2019-09-20 潍柴动力股份有限公司 A kind of fault message output control method and system
CN111857100A (en) * 2020-07-30 2020-10-30 深圳市元征科技股份有限公司 Automobile diagnosis method and device and related equipment
CN113282072A (en) * 2021-07-19 2021-08-20 江铃汽车股份有限公司 Vehicle remote diagnosis method, device, storage medium and system
WO2021168864A1 (en) * 2020-02-29 2021-09-02 华为技术有限公司 Fault diagnostic method and apparatus, and vehicle

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103197930A (en) * 2013-03-27 2013-07-10 北京经纬恒润科技有限公司 Method for generating automobile diagnostic software automatically
CN107491061A (en) * 2017-08-31 2017-12-19 中国第汽车股份有限公司 The network automatically test system and its method of a kind of commercial car OBD diagnostic devices
CN110262459A (en) * 2019-06-30 2019-09-20 潍柴动力股份有限公司 A kind of fault message output control method and system
WO2021168864A1 (en) * 2020-02-29 2021-09-02 华为技术有限公司 Fault diagnostic method and apparatus, and vehicle
CN111857100A (en) * 2020-07-30 2020-10-30 深圳市元征科技股份有限公司 Automobile diagnosis method and device and related equipment
CN113282072A (en) * 2021-07-19 2021-08-20 江铃汽车股份有限公司 Vehicle remote diagnosis method, device, storage medium and system

Similar Documents

Publication Publication Date Title
JP4712962B2 (en) Image-based artifact troubleshooting for medical systems
US6526442B1 (en) Programmable operational system for managing devices participating in a network
US5724516A (en) System for dynamically creating and retrieving formatted dump data by setting value in dump object indicating that the dump agent is to generate formatted dump data
CN112051832B (en) Fault testing method, device and system based on simulation node and storage medium
JP2001188765A (en) Technique for referring to fault information showing plural related fault under distributed computing environment
JP2002131123A (en) System and method for diagnosing and validating machine over network using waveform data
JP2003186696A (en) Method for diagnosing system risk, and program and device therefor
CN111708611B (en) Lightweight Kubernetes monitoring system and method
US7313728B2 (en) Method and system for logging and accessing diagnostic result messages
CN113448988A (en) Method and device for training algorithm model, electronic equipment and storage medium
US20210390010A1 (en) Software Application Diagnostic Aid
CN116118510A (en) Fault diagnosis method, device, equipment and storage medium
US20040039804A1 (en) Method and framework for service-based remote support delivery
CN114415631A (en) Diagnostic tool based ECU (electronic control Unit) diagnostic method and diagnostic tool
CN114610000A (en) Automobile ECU diagnosis test method based on hardware-in-the-loop platform
CN119676328A (en) Vehicle diagnostic method, device, chip and vehicle
WO2025044195A1 (en) Fault diagnosis method, system, and device, and medium
CN117527938A (en) Automatic configuration method, device and equipment for communication protocol stack applied to vehicle
CN115484184B (en) Fault diagnosis method, fault diagnosis system, vehicle, and readable storage medium
CN115933592A (en) Diagnostic service automated test method, device and storage medium
CN113535840A (en) Data access system and data access method
US7284163B2 (en) Event mechanism for reporting diagnostic event messages
JPH11102303A (en) Electronic mail linked diagnostic processing system
CN114268569A (en) Configurable network operation, maintenance, acceptance and test method and device
CN114201517B (en) Method and device for inquiring atomic capability based on equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Room 601, Building 4, Jingwei Hengrun R&D Center, No. 2, Huixiang Road, Zhangjiawo Town, Xiqing District, Tianjin, 300380

Applicant after: Jingwei Hengrun (Tianjin) research and Development Co.,Ltd.

Address before: 300380 Room 308, No. 9, Fengze Road, Xiqing automobile industrial zone (Zhangjiawo Industrial Zone), Xiqing District, Tianjin

Applicant before: Jingwei Hengrun (Tianjin) research and Development Co.,Ltd.