CN116149293A - A vehicle remote diagnosis method, system and computer equipment - Google Patents
A vehicle remote diagnosis method, system and computer equipment Download PDFInfo
- Publication number
- CN116149293A CN116149293A CN202211102074.7A CN202211102074A CN116149293A CN 116149293 A CN116149293 A CN 116149293A CN 202211102074 A CN202211102074 A CN 202211102074A CN 116149293 A CN116149293 A CN 116149293A
- Authority
- CN
- China
- Prior art keywords
- diagnosis
- vehicle
- diagnosed
- diagnostic
- task
- 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.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B23/00—Testing or monitoring of control systems or parts thereof
- G05B23/02—Electric testing or monitoring
- G05B23/0205—Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults
- G05B23/0259—Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults characterized by the response to fault detection
- G05B23/0262—Confirmation of fault detection, e.g. extra checks to confirm that a failure has indeed occurred
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B2219/00—Program-control systems
- G05B2219/20—Pc systems
- G05B2219/24—Pc safety
- G05B2219/24065—Real time diagnostics
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Automation & Control Theory (AREA)
- Vehicle Cleaning, Maintenance, Repair, Refitting, And Outriggers (AREA)
Abstract
本发明实施例提供了一种车辆远程诊断方法、系统及计算机设备,方法包括:创建诊断任务;判断待诊断车辆是否支持MQTT协议;当待诊断车辆支持MQTT协议时,判断待诊断车辆是否在线;若待诊断车辆在线,通过MQTT协议发送诊断指令至所有任务关联的待诊断车辆,待诊断车辆通过HTTPS协议获取诊断任务并下载诊断包;当待诊断车辆不支持MQTT协议或待诊断车辆不在线时,待诊断车辆通过HTTPS协议周期性拉取诊断任务并下载诊断包;待诊断车辆执行诊断任务,得到诊断结果;待诊断车辆将诊断结果上传至远程诊断平台。采用MQTT协议与HTTPS协议相结合的通信协议方式,有效提高了复杂网络环境下远程诊断的执行率和成功率。
The embodiment of the present invention provides a vehicle remote diagnosis method, system and computer equipment. The method includes: creating a diagnosis task; judging whether the vehicle to be diagnosed supports the MQTT protocol; when the vehicle to be diagnosed supports the MQTT protocol, judging whether the vehicle to be diagnosed is online; If the vehicle to be diagnosed is online, send diagnostic commands to all task-related vehicles to be diagnosed through the MQTT protocol, and the vehicle to be diagnosed will obtain the diagnostic task and download the diagnostic package through the HTTPS protocol; when the vehicle to be diagnosed does not support the MQTT protocol or the vehicle to be diagnosed is not online , the vehicle to be diagnosed periodically pulls the diagnosis task and downloads the diagnosis package through the HTTPS protocol; the vehicle to be diagnosed performs the diagnosis task and obtains the diagnosis result; the vehicle to be diagnosed uploads the diagnosis result to the remote diagnosis platform. The communication protocol method combining MQTT protocol and HTTPS protocol is adopted, which effectively improves the execution rate and success rate of remote diagnosis in complex network environment.
Description
技术领域technical field
本发明涉及汽车技术领域,具体而言,涉及一种车辆远程诊断方法、系统及计算机设备。The invention relates to the technical field of automobiles, in particular to a vehicle remote diagnosis method, system and computer equipment.
背景技术Background technique
目前,车辆故障诊断的方式包括通过车载设备或便携式诊断仪硬件实现的本地诊断、通过车车互联信息实现的近场诊断以及通过云平台实现的远程诊断,其中,远程诊断技术与传统诊断技术的主要区别为使车辆制造商从被动诊断转变为主动诊断,可通过云平台随时或定期对车辆进行远程诊断。At present, vehicle fault diagnosis methods include local diagnosis through on-board equipment or portable diagnostic instrument hardware, near-field diagnosis through vehicle-vehicle interconnection information, and remote diagnosis through cloud platform. Among them, the difference between remote diagnosis technology and traditional diagnosis technology The main difference is to enable vehicle manufacturers to change from passive diagnosis to active diagnosis, which can remotely diagnose vehicles at any time or on a regular basis through the cloud platform.
远程诊断的实现方式大多通过传输控制协议(Transmission Control Protocol,TCP)建立车辆与云平台之间的连接,云平台通过基于TCP协议之上的应用层协议,即消息队列遥测传输协议(Message Queuing Telemetry Transport,MQTT)将诊断指令实时推送到车辆,再由车辆中的诊断模块完成相应的诊断。但是,基于MQTT协议的诊断指令式远程诊断方式存在很多问题和缺陷:第一,终端设备的软件开发工具包(Software DevelopmentKit,SDK)集成复杂,但基于各种平台的终端设备都需集成SDK来实现MQTT功能,不仅集成难度较大,且有些平台并不支持MQTT协议;第二,其不支持文件,远程诊断通常需要传输大量的诊断脚本文件和诊断日志文件,因此限制了远程诊断的应用场景;第三,其不支持离线消息,由于车辆与诊断云平台需要先完成通信链路的连接后才能实现诊断功能,但车辆的实际运行条件很复杂,经常出现连接异常、连接中断、连接时间不可控等问题,尤其是高并发场景下带宽限制导致车辆无法连接云平台的问题,从而导致无法完整的完成远程诊断;第四,诊断触发条件不可控,远程诊断的主要目的是实现车辆定位、监控车辆故障信息、读取故障码、故障报警处理等,从而实现故障诊断和修复,当基于某些特殊条件才能触发诊断或者需要周期性的触发诊断时,无法控制触发条件且长时间保持车辆与平台的连接无疑会占用大量物理和网络资源;第五,无法实现批量诊断,由于其需要连接车辆后通过实时指令方式实现诊断,因此无法保证想要诊断的大量车辆同时在线且同时满足诊断条件,故很难实现批量诊断。The implementation of remote diagnosis mostly establishes the connection between the vehicle and the cloud platform through the Transmission Control Protocol (TCP), and the cloud platform uses an application layer protocol based on the TCP protocol, namely the Message Queuing Telemetry Transmission Transport, MQTT) pushes the diagnostic command to the vehicle in real time, and then the diagnostic module in the vehicle completes the corresponding diagnosis. However, there are many problems and defects in the diagnostic instruction-based remote diagnosis method based on the MQTT protocol: First, the integration of the software development kit (Software Development Kit, SDK) of the terminal equipment is complicated, but the terminal equipment based on various platforms needs to integrate the SDK to Realizing the MQTT function is not only difficult to integrate, but also some platforms do not support the MQTT protocol; second, it does not support files, and remote diagnosis usually needs to transmit a large number of diagnostic script files and diagnostic log files, thus limiting the application scenarios of remote diagnosis ; Third, it does not support offline messages, because the vehicle and the diagnostic cloud platform need to complete the communication link connection before realizing the diagnostic function, but the actual operating conditions of the vehicle are very complicated, and there are often connection exceptions, connection interruptions, and connection time. control and other issues, especially the problem that the vehicle cannot connect to the cloud platform due to bandwidth limitations in high-concurrency scenarios, resulting in the inability to complete remote diagnosis completely; fourth, the trigger conditions for diagnosis are uncontrollable, and the main purpose of remote diagnosis is to realize vehicle positioning and monitoring. Vehicle fault information, reading fault codes, fault alarm processing, etc., so as to realize fault diagnosis and repair. When diagnosis can only be triggered based on certain special conditions or periodic trigger diagnosis is required, the trigger conditions cannot be controlled and the vehicle and platform can be maintained for a long time. The connection will undoubtedly take up a lot of physical and network resources; fifth, batch diagnosis cannot be realized, because it needs to connect the vehicle to realize diagnosis through real-time instructions, so it cannot guarantee that a large number of vehicles to be diagnosed will be online at the same time and meet the diagnosis conditions at the same time, so It is difficult to achieve batch diagnosis.
发明内容Contents of the invention
本说明书提供一种车辆远程诊断方法、系统及计算机设备,用以克服现有技术中存在的至少一个技术问题。This specification provides a vehicle remote diagnosis method, system and computer equipment to overcome at least one technical problem existing in the prior art.
第一方面,根据本说明书实施例,提供了一种车辆远程诊断方法,包括:In the first aspect, according to an embodiment of the present specification, a method for remote diagnosis of a vehicle is provided, including:
创建诊断任务;Create diagnostic tasks;
判断待诊断车辆是否支持MQTT协议;Determine whether the vehicle to be diagnosed supports the MQTT protocol;
当所述待诊断车辆支持MQTT协议时,判断所述待诊断车辆是否在线;When the vehicle to be diagnosed supports the MQTT protocol, determine whether the vehicle to be diagnosed is online;
若所述待诊断车辆在线,通过MQTT协议发送诊断指令至所有任务关联的所述待诊断车辆,所述待诊断车辆通过HTTPS协议获取所述诊断任务,并下载诊断包;If the vehicle to be diagnosed is online, send a diagnosis instruction to all the vehicles to be diagnosed associated with the task through the MQTT protocol, and the vehicle to be diagnosed obtains the diagnosis task through the HTTPS protocol, and downloads the diagnosis package;
当所述待诊断车辆不支持MQTT协议或所述待诊断车辆不在线时,所述待诊断车辆通过HTTPS协议周期性拉取所述诊断任务,并下载所述诊断包;When the vehicle to be diagnosed does not support the MQTT protocol or the vehicle to be diagnosed is not online, the vehicle to be diagnosed periodically pulls the diagnostic task through the HTTPS protocol, and downloads the diagnostic package;
所述待诊断车辆执行所述诊断任务,得到诊断结果;The vehicle to be diagnosed executes the diagnosis task to obtain a diagnosis result;
所述待诊断车辆将诊断结果上传至远程诊断平台。The vehicle to be diagnosed uploads the diagnosis result to the remote diagnosis platform.
可选的,所述创建诊断任务包括:Optionally, the creating a diagnostic task includes:
通过所述远程诊断平台创建诊断任务描述信息;所述诊断任务描述信息包括诊断任务开始时间、诊断任务结束时间、诊断类型、诊断策略、诊断包类型、诊断包文件、执行时间间隔、触发事件、触发延迟时间、任务描述信息;Create diagnosis task description information through the remote diagnosis platform; the diagnosis task description information includes diagnosis task start time, diagnosis task end time, diagnosis type, diagnosis strategy, diagnosis package type, diagnosis package file, execution time interval, trigger event, Trigger delay time, task description information;
通过所述远程诊断平台创建诊断包;所述诊断包包括诊断数据文件、待诊断ECU列表文件、触发策略文件、诊断脚本文件、签名文件。A diagnostic package is created through the remote diagnostic platform; the diagnostic package includes a diagnostic data file, an ECU list file to be diagnosed, a trigger policy file, a diagnostic script file, and a signature file.
进一步可选的,所述创建诊断任务还包括:Further optionally, the creating a diagnostic task further includes:
对所述诊断任务描述信息进行加密和签名,得到加密诊断任务描述信息。The diagnostic task description information is encrypted and signed to obtain the encrypted diagnostic task description information.
再进一步可选的,所述判断所述待诊断车辆是否在线包括:Still further optionally, the judging whether the vehicle to be diagnosed is online includes:
所述待诊断车辆发布状态消息至Broker服务器,所述Broker服务器确定所述状态消息对应的第一目标主题,并将所述状态消息发布至订阅所述第一目标主题的第一MQTT客户端;所述第一MQTT客户端包括所述待诊断车辆和所述远程诊断平台,所述状态消息包括在线消息和离线消息;The vehicle to be diagnosed publishes a status message to the Broker server, and the Broker server determines the first target topic corresponding to the status message, and publishes the status message to the first MQTT client subscribing to the first target topic; The first MQTT client includes the vehicle to be diagnosed and the remote diagnosis platform, and the status message includes an online message and an offline message;
所述远程诊断平台根据所述状态消息,判断所述待诊断车辆是否在线。The remote diagnosis platform judges whether the vehicle to be diagnosed is online according to the status message.
再进一步可选的,所述通过MQTT协议发送诊断指令至所有任务关联的所述待诊断车辆,所述待诊断车辆通过HTTPS协议获取所述诊断任务,并下载诊断包具体包括:Still further optionally, the sending the diagnosis instruction to all the vehicles to be diagnosed associated with the task through the MQTT protocol, the vehicle to be diagnosed obtains the diagnosis task through the HTTPS protocol, and downloading the diagnosis package specifically includes:
所述远程诊断平台发布待诊断消息至所述Broker服务器,所述Broker服务器确定所述待诊断消息对应的第二目标主题,并将所述第二目标主题发布至订阅所述第二目标主题的第二MQTT客户端;所述第二MQTT客户端包括所述待诊断车辆和所述远程诊断平台,所述待诊断消息包括诊断指令;The remote diagnosis platform publishes a message to be diagnosed to the Broker server, and the Broker server determines a second target topic corresponding to the message to be diagnosed, and publishes the second target topic to subscribers of the second target topic A second MQTT client; the second MQTT client includes the vehicle to be diagnosed and the remote diagnosis platform, and the message to be diagnosed includes a diagnosis instruction;
根据所述待诊断消息,所述待诊断车辆通过HTTPS协议向所述远程诊断平台发送车辆当前基础信息及获取诊断任务请求;According to the message to be diagnosed, the vehicle to be diagnosed sends the current basic information of the vehicle and a diagnosis task request to the remote diagnosis platform through the HTTPS protocol;
所述远程诊断平台根据所述车辆当前基础信息和所述获取诊断任务请求,向所述待诊断车辆发送加密诊断任务描述信息和诊断包下载链接信息;The remote diagnosis platform sends encrypted diagnosis task description information and diagnosis package download link information to the vehicle to be diagnosed according to the current basic information of the vehicle and the request for obtaining a diagnosis task;
所述待诊断车辆接收所述加密诊断任务描述信息和所述诊断包下载链接信息,验证消息的完整性和可靠性,若验签通过,则解密所述加密诊断任务描述信息,获得所述诊断任务描述信息,并根据所述诊断包下载链接信息,通过HTTPS协议从所述远程诊断平台下载所述诊断包。The vehicle to be diagnosed receives the encrypted diagnostic task description information and the diagnostic package download link information, verifies the integrity and reliability of the message, and if the signature verification is passed, decrypts the encrypted diagnostic task description information to obtain the diagnosis Task description information, and according to the diagnostic package download link information, download the diagnostic package from the remote diagnostic platform through the HTTPS protocol.
再进一步可选的,所述待诊断车辆通过HTTPS协议周期性拉取所述诊断任务,并下载所述诊断包具体包括:Further optionally, the vehicle to be diagnosed periodically pulls the diagnostic task through the HTTPS protocol, and downloading the diagnostic package specifically includes:
当所述待诊断车辆满足拉取任务条件时,所述待诊断车辆基于HTTPS协议与所述远程诊断平台建立远程通信,并向所述远程诊断平台发送车辆当前基础信息及获取诊断任务请求;所述拉取任务条件包括车辆处于IGON档和达到预设拉取时间;When the vehicle to be diagnosed meets the pull task conditions, the vehicle to be diagnosed establishes remote communication with the remote diagnosis platform based on the HTTPS protocol, and sends the current basic information of the vehicle and a diagnosis task request to the remote diagnosis platform; The pulling task conditions mentioned above include that the vehicle is in IGON gear and the preset pulling time is reached;
所述远程诊断平台根据所述车辆当前基础信息及所述获取诊断任务请求,提取数据库中的所述诊断任务;所述诊断任务包括加密诊断任务描述信息、诊断包和诊断包下载链接信息;The remote diagnosis platform extracts the diagnostic task in the database according to the current basic information of the vehicle and the request for obtaining the diagnostic task; the diagnostic task includes encrypted diagnostic task description information, diagnostic package and diagnostic package download link information;
所述远程诊断平台将所述加密诊断任务描述信息和所述诊断包下载链接信息发送至所述待诊断车辆;The remote diagnosis platform sends the encrypted diagnosis task description information and the diagnosis package download link information to the vehicle to be diagnosed;
所述待诊断车辆接收所述加密诊断任务描述信息和所述诊断包下载链接信息,验证消息的完整性和可靠性,若验签通过,则解密所述加密诊断任务描述信息,获得所述诊断任务描述信息,并根据所述诊断包下载链接信息,通过HTTPS协议从所述远程诊断平台下载所述诊断包。The vehicle to be diagnosed receives the encrypted diagnostic task description information and the diagnostic package download link information, verifies the integrity and reliability of the message, and if the signature verification is passed, decrypts the encrypted diagnostic task description information to obtain the diagnosis Task description information, and according to the diagnostic package download link information, download the diagnostic package from the remote diagnostic platform through the HTTPS protocol.
进一步可选的,所述待诊断车辆执行所述诊断任务,得到诊断结果包括:Further optionally, the vehicle to be diagnosed executes the diagnosis task, and obtaining a diagnosis result includes:
所述待诊断车辆获取所述诊断任务的所述诊断任务描述信息,提取并判断所述诊断任务的所述诊断类型;所述诊断类型包括触发型和周期型;The vehicle to be diagnosed acquires the diagnostic task description information of the diagnostic task, extracts and judges the diagnostic type of the diagnostic task; the diagnostic type includes trigger type and periodic type;
当所述诊断类型为触发型时,所述待诊断车辆提取所述诊断任务描述信息中的所述诊断策略,并根据所述诊断策略进行检查,判断当前的车辆状态或状态组合是否满足所述诊断任务的触发条件;When the diagnosis type is triggered, the vehicle to be diagnosed extracts the diagnosis strategy in the diagnosis task description information, and checks according to the diagnosis strategy to determine whether the current vehicle state or state combination satisfies the Trigger conditions for diagnostic tasks;
若满足所述诊断任务的触发条件,所述待诊断车辆提取所述诊断包中的所述诊断脚本文件,按照所述诊断脚本文件中的指令执行远程诊断任务,得到诊断结果,所述待诊断车辆结束远程诊断任务;If the triggering condition of the diagnosis task is met, the vehicle to be diagnosed extracts the diagnosis script file in the diagnosis package, executes the remote diagnosis task according to the instructions in the diagnosis script file, and obtains the diagnosis result, and the vehicle to be diagnosed The vehicle ends the remote diagnosis task;
若不满足所述诊断任务的触发条件,所述待诊断车辆将所述当前的车辆状态或状态组合和不满足的条件集合反馈至所述远程诊断平台;If the trigger condition of the diagnosis task is not satisfied, the vehicle to be diagnosed will feed back the current vehicle state or state combination and unsatisfied condition set to the remote diagnosis platform;
所述远程诊断平台根据所述当前的车辆状态或状态组合和所述不满足的条件集合,生成并记录诊断信息;The remote diagnosis platform generates and records diagnostic information according to the current vehicle state or state combination and the unsatisfied condition set;
当所述诊断类型为周期型时,所述待诊断车辆提取所述诊断任务描述信息中的所述诊断任务开始时间、诊断任务结束时间和所述执行时间间隔,并提取所述诊断包中的所述诊断脚本文件;When the diagnosis type is periodic, the vehicle to be diagnosed extracts the diagnosis task start time, diagnosis task end time and execution time interval in the diagnosis task description information, and extracts the said diagnostic script file;
所述待诊断车辆按照所述诊断任务开始时间和所述执行时间间隔,重复执行所述诊断脚本文件中的指令,得到诊断结果,直至到所述诊断任务结束时间,所述待诊断车辆结束所述远程诊断任务。The vehicle to be diagnosed repeatedly executes the instructions in the diagnosis script file according to the start time of the diagnosis task and the execution time interval to obtain a diagnosis result, until the end time of the diagnosis task, the vehicle to be diagnosed ends Described remote diagnostic tasks.
再进一步可选的,所述待诊断车辆将诊断结果上传至远程诊断平台包括:Further optionally, the vehicle to be diagnosed uploads the diagnosis result to the remote diagnosis platform including:
所述待诊断车辆将所述诊断结果记录到诊断日志中;The vehicle to be diagnosed records the diagnosis result in a diagnosis log;
结束所述远程诊断任务后,所述待诊断车辆将所述诊断日志上传至所述远程诊断平台。After the remote diagnosis task is completed, the vehicle to be diagnosed uploads the diagnosis log to the remote diagnosis platform.
第二方面,根据本说明书实施例,提供了一种车辆远程诊断系统,包括:In the second aspect, according to the embodiment of this specification, a vehicle remote diagnosis system is provided, including:
任务创建模块,用于远程诊断平台创建诊断任务;A task creation module is used for remote diagnosis platform to create diagnostic tasks;
协议判断模块,用于判断待诊断车辆是否支持MQTT协议;A protocol judging module, used to judge whether the vehicle to be diagnosed supports the MQTT protocol;
在线判断模块,用于判断支持MQTT协议的所述待诊断车辆是否在线;An online judging module, configured to judge whether the vehicle to be diagnosed that supports the MQTT protocol is online;
第一诊断任务获取模块,用于当所述待诊断车辆支持MQTT协议且在线时,通过MQTT协议发送诊断指令至所有任务关联的所述待诊断车辆,所述待诊断车辆通过HTTPS协议获取所述诊断任务,并下载诊断包;The first diagnostic task acquisition module is used to send diagnostic instructions to all task-related vehicles to be diagnosed through the MQTT protocol when the vehicle to be diagnosed supports the MQTT protocol and is online, and the vehicle to be diagnosed obtains the Diagnose tasks and download diagnostic packages;
第二诊断任务获取模块,用于当所述待诊断车辆不支持MQTT协议或所述待诊断车辆不在线时,所述待诊断车辆通过HTTPS协议周期性拉取所述诊断任务,并下载所述诊断包;The second diagnosis task acquisition module is used for when the vehicle to be diagnosed does not support the MQTT protocol or the vehicle to be diagnosed is not online, the vehicle to be diagnosed periodically pulls the diagnosis task through the HTTPS protocol, and downloads the diagnostic kit;
执行模块,用于所述待诊断车辆执行所述诊断任务,以得到诊断结果;An execution module, used for the vehicle to be diagnosed to execute the diagnosis task to obtain a diagnosis result;
反馈模块,用于所述待诊断车辆将诊断结果上传至所述远程诊断平台。The feedback module is used for the vehicle to be diagnosed to upload the diagnosis result to the remote diagnosis platform.
第三方面,根据本说明书实施例,提供了一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现第一方面所述的车辆远程诊断方法的步骤。In a third aspect, according to an embodiment of this specification, there is provided a computer device, including a memory and a processor, the memory stores a computer program, and the processor implements the vehicle remote control described in the first aspect when executing the computer program. Steps of the diagnostic method.
第四方面,根据本说明书实施例,提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现第一方面所述的车辆远程诊断方法的步骤。In a fourth aspect, according to an embodiment of the present specification, a computer-readable storage medium is provided, and a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the vehicle described in the first aspect is implemented. Steps of remote diagnosis method.
本说明书实施例的有益效果如下:The beneficial effects of the embodiments of this description are as follows:
相对于传统的本地诊断和近场诊断,本车辆远程诊断方法不需要在待诊断车辆附近架设诊断设备,只要有网络便可实施诊断,大大丰富了诊断的应用场景。相对于现有技术中的云平台,本车辆远程诊断方法中的远程诊断平台通过实时的诊断指令实现远程诊断,即使待诊断车辆没有实时连接远程诊断平台也可以实现远程诊断,同时可以实现在指定事件触发条件下和指定时间间隔下实施诊断,更有效的提高了复杂网络环境下远程诊断的执行率和成功率。相对于现有技术中仅使用MQTT协议的方式进行在线指令式远程诊断,采用MQTT协议与HTTPS协议相结合的通信协议方式,通过MQTT协议下发诊断指令,通过HTTPS协议获取诊断任务和诊断包,大大提高了远程诊断的并发能力,避免了使用MQTT协议导致数据包丢失,诊断任务描述信息和诊断包都通过HTTPS协议传输能够保证数据信息的安全性。此外,HTTPS协议方式的诊断包传输可以使用CDN加速方式进行,提高了传输效率,且远程诊断任务结束后自动上传诊断日志文件,此种方式收集诊断结果不需要长时间等待诊断结果,大大提高了诊断效率,同时,采用任务实现远程诊断,可以实现同时对大量车辆实施诊断。Compared with traditional local diagnosis and near-field diagnosis, this vehicle remote diagnosis method does not need to set up diagnostic equipment near the vehicle to be diagnosed, as long as there is a network, the diagnosis can be implemented, which greatly enriches the application scenarios of diagnosis. Compared with the cloud platform in the prior art, the remote diagnosis platform in the vehicle remote diagnosis method realizes remote diagnosis through real-time diagnosis instructions. Diagnosis is implemented under event-triggered conditions and specified time intervals, which more effectively improves the execution rate and success rate of remote diagnosis in complex network environments. Compared with the prior art that only uses the MQTT protocol for online command-based remote diagnosis, the MQTT protocol and the HTTPS protocol are used to combine the communication protocol method, the diagnostic command is issued through the MQTT protocol, and the diagnostic task and diagnostic package are obtained through the HTTPS protocol. The concurrency capability of remote diagnosis is greatly improved, and the loss of data packets caused by the use of MQTT protocol is avoided. The diagnostic task description information and diagnostic packets are transmitted through the HTTPS protocol to ensure the security of data information. In addition, the diagnostic package transmission in the HTTPS protocol mode can be accelerated by CDN, which improves the transmission efficiency, and the diagnostic log files are automatically uploaded after the remote diagnostic task is completed. This method does not need to wait for a long time to collect diagnostic results, which greatly improves Diagnosis efficiency. At the same time, the use of tasks to realize remote diagnosis can realize the diagnosis of a large number of vehicles at the same time.
附图说明Description of drawings
为了更清楚地说明本说明书实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of this specification or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only These are some embodiments of the present invention. Those skilled in the art can also obtain other drawings based on these drawings without creative work.
图1为本说明书实施例提供的车辆远程诊断方法的流程示意图;FIG. 1 is a schematic flow chart of a vehicle remote diagnosis method provided by an embodiment of this specification;
图2为本说明书实施例提供的车辆远程诊断方法实现远程诊断的示意图。Fig. 2 is a schematic diagram of remote diagnosis implemented by the vehicle remote diagnosis method provided by the embodiment of this specification.
具体实施方式Detailed ways
下面将结合本说明书实施例中的附图,对本说明书实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有付出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present specification in conjunction with the accompanying drawings in the embodiments of the present specification. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.
需要说明的是,本说明书实施例及附图中的术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。It should be noted that the terms "include" and "have" in the embodiments of this specification and the drawings, as well as any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but optionally also includes unlisted steps or units, or optionally further includes For other steps or units inherent in these processes, methods, products or apparatuses.
本说明书实施例公开了一种车辆远程诊断方法。以下分别进行详细说明。The embodiment of this specification discloses a vehicle remote diagnosis method. Each will be described in detail below.
图1和图2示出了根据本说明书实施例提供的一种车辆远程诊断方法。Fig. 1 and Fig. 2 show a vehicle remote diagnosis method provided according to an embodiment of the present specification.
如图1和图2所示,该车辆远程诊断方法包括:As shown in Figure 1 and Figure 2, the vehicle remote diagnosis method includes:
步骤100:创建诊断任务。Step 100: Create a diagnosis task.
通过远程诊断平台创建诊断任务,主要包括以下两个步骤:Creating a diagnosis task through the remote diagnosis platform mainly includes the following two steps:
(1)创建诊断任务描述信息。(1) Create diagnostic task description information.
在一实施例中,通过远程诊断平台创建诊断任务描述信息,该诊断任务描述信息包括但不限于诊断任务开始时间、诊断任务结束时间、诊断类型、诊断策略、诊断包类型、诊断包文件、执行时间间隔、触发事件、触发延迟时间和任务描述信息,其中,诊断类型包括触发型和周期型。In one embodiment, the diagnostic task description information is created through the remote diagnostic platform, and the diagnostic task description information includes but not limited to the diagnostic task start time, diagnostic task end time, diagnostic type, diagnostic policy, diagnostic package type, diagnostic package file, execution Time interval, trigger event, trigger delay time and task description information, wherein, the diagnosis type includes trigger type and periodic type.
在另一个实施例中,远程诊断平台对所创建的诊断任务描述信息进行加密和签名,得到加密诊断任务描述信息,以保证通讯的安全性。In another embodiment, the remote diagnosis platform encrypts and signs the created diagnostic task description information to obtain encrypted diagnostic task description information to ensure communication security.
(2)创建诊断包。(2) Create a diagnostic package.
在一实施例中,通过远程诊断平台创建诊断包,该诊断包包括但不限于诊断数据文件(例如,.bin文件,.s19文件等)、待诊断ECU列表文件、触发策略文件、诊断脚本文件(包含诊断序列)、签名文件。In one embodiment, a diagnostic package is created through a remote diagnostic platform, which includes but is not limited to diagnostic data files (for example, .bin files, .s19 files, etc.), ECU list files to be diagnosed, trigger strategy files, and diagnostic script files (contains diagnostic sequence), signature file.
步骤200:判断待诊断车辆是否支持MQTT协议。Step 200: Determine whether the vehicle to be diagnosed supports the MQTT protocol.
由于待诊断车辆的Agent程序运行在车载远程信息处理器(Telematics BOX,T–BOX)或者网关上,因此,若待诊断车辆的设备不便于集成MQTT协议的SDK,则无法基于MQTT协议实现接收诊断指令,即不支持MQTT协议,相应的,若待诊断车辆的设备集成有MQTT协议的SDK,则可基于MQTT协议实现接收诊断指令,即支持MQTT协议。Since the agent program of the vehicle to be diagnosed runs on the on-board telematics processor (Telematics BOX, T-BOX) or the gateway, if the equipment of the vehicle to be diagnosed is not convenient for integrating the SDK of the MQTT protocol, the receiving diagnosis cannot be realized based on the MQTT protocol Instructions, that is, the MQTT protocol is not supported. Correspondingly, if the device of the vehicle to be diagnosed is integrated with the SDK of the MQTT protocol, it can receive diagnostic instructions based on the MQTT protocol, that is, it supports the MQTT protocol.
当待诊断车辆支持MQTT协议时,则从步骤200进入步骤300;当待诊断车辆不支持MQTT协议时,则从步骤200进入步骤900。When the vehicle to be diagnosed supports the MQTT protocol, proceed from
步骤300:判断待诊断车辆是否在线。Step 300: Determine whether the vehicle to be diagnosed is online.
MQTT协议的通信是通过基于主题(Topic)的发布/订阅的方式来实现的,发布方和订阅方通过这种方式进行解耦,但由于两者之间没有直接连接,便需要一个中间方,即Broker服务器,进行消息的存储和转发。远程诊断平台通过Broker服务器和订阅的主题判断待诊断车辆是否在线。The communication of the MQTT protocol is realized by publishing/subscribing based on topics. The publisher and the subscriber are decoupled in this way, but since there is no direct connection between the two, an intermediate party is needed. That is, the Broker server stores and forwards messages. The remote diagnosis platform judges whether the vehicle to be diagnosed is online through the Broker server and the subscribed topics.
在一个实施例中,待诊断车辆发布状态消息至Broker服务器,Broker服务器确定状态消息对应的第一目标主题,并将状态消息发布至订阅第一目标主题的第一MQTT客户端。其中,第一目标主题为车辆是否在线的主题,相应的,状态消息包括在线消息和离线消息,第一MQTT客户端包括待诊断车辆和远程诊断平台,待诊断车辆为发布方,远程诊断平台为订阅方。远程诊断平台根据Broker服务器发布的状态消息,判断待诊断车辆是否在线,当发布的状态消息为在线消息时,则判断待诊断车辆在线,而当发布的状态消息为离线消息时,则判断待诊断车辆离线,即不在线,例如,在一个具体的实施过程中,待诊断车辆向Broker服务器发布主题为/topic/online/vin的消息,远程诊断平台同时向Broker服务器订阅/topic/online/+主题即可接收到待诊断车辆的连接信息。In one embodiment, the vehicle to be diagnosed publishes a status message to the Broker server, and the Broker server determines the first target topic corresponding to the status message, and publishes the status message to the first MQTT client that subscribes to the first target topic. Among them, the first target topic is the topic of whether the vehicle is online or not. Correspondingly, the status message includes online messages and offline messages. The first MQTT client includes the vehicle to be diagnosed and the remote diagnosis platform. The vehicle to be diagnosed is the issuer, and the remote diagnosis platform is Subscriber. The remote diagnosis platform judges whether the vehicle to be diagnosed is online according to the status message released by the Broker server. When the published status message is an online message, it judges that the vehicle to be diagnosed is online; The vehicle is offline, that is, not online. For example, in a specific implementation process, the vehicle to be diagnosed publishes a message with the topic /topic/online/vin to the Broker server, and the remote diagnosis platform subscribes the topic /topic/online/+ to the Broker server at the same time The connection information of the vehicle to be diagnosed can be received.
若待诊断车辆在线,则从步骤300进入步骤400;若待诊断车辆离线,则从步骤300进入步骤900。If the vehicle to be diagnosed is online, proceed to step 400 from
步骤400:通过MQTT协议发送诊断指令至所有任务关联的待诊断车辆。Step 400: Send a diagnosis instruction to all task-related vehicles to be diagnosed through the MQTT protocol.
创建完诊断任务后,远程诊断平台立即向所有任务关联的在线待诊断车辆发送诊断任务,并采用MQTT协议发送诊断指令、HTTPS协议获取诊断任务和诊断包的方式来实现在线待诊断车辆的远程诊断。After the diagnosis task is created, the remote diagnosis platform immediately sends the diagnosis task to all the online vehicles to be diagnosed associated with the task, and uses the MQTT protocol to send the diagnosis command, and the HTTPS protocol to obtain the diagnosis task and the diagnosis package to realize the remote diagnosis of the online vehicle to be diagnosed .
在一实施例中,远程诊断平台发布待诊断消息至Broker服务器,Broker服务器确定待诊断消息对应的第二目标主题,并将第二目标主题发布至订阅第二目标主题的第二MQTT客户端。其中,第二目标主题为诊断任务的主题,待诊断消息包括诊断指令,第二MQTT客户端包括待诊断车辆和远程诊断平台,远程诊断平台为发布方,待诊断车辆为订阅方。例如,在一个具体的实施过程中,远程诊断平台通过Broker服务器发布主题为/topic/vin/campaign/{id}的消息来通知待诊断车辆有一个诊断任务待执行,待诊断车辆由于订阅了/topic/vin/campaign消息,便可立即收到相关消息。In one embodiment, the remote diagnosis platform publishes the message to be diagnosed to the Broker server, and the Broker server determines the second target topic corresponding to the message to be diagnosed, and publishes the second target topic to the second MQTT client that subscribes to the second target topic. Wherein, the second target topic is the topic of the diagnosis task, the message to be diagnosed includes a diagnosis instruction, the second MQTT client includes a vehicle to be diagnosed and a remote diagnosis platform, the remote diagnosis platform is a publisher, and the vehicle to be diagnosed is a subscriber. For example, in a specific implementation process, the remote diagnosis platform publishes a message with the topic /topic/vin/campaign/{id} through the Broker server to notify the vehicle to be diagnosed that there is a diagnostic task to be performed. The vehicle to be diagnosed has subscribed to / topic/vin/campaign news, you can receive relevant news immediately.
步骤500:待诊断车辆通过HTTPS协议获取诊断任务。Step 500: The vehicle to be diagnosed obtains the diagnosis task through the HTTPS protocol.
待诊断车辆收到关于诊断任务的消息后,立即触发拉取诊断任务的操作,通过HTTPS协议向远程诊断平台发送车辆当前基础信息并获取诊断任务,远程诊断平台将加密诊断任务描述信息和诊断包下载链接信息一同发送至待诊断车辆。After the vehicle to be diagnosed receives the message about the diagnosis task, it immediately triggers the operation of pulling the diagnosis task, sends the current basic information of the vehicle to the remote diagnosis platform through HTTPS protocol and obtains the diagnosis task, and the remote diagnosis platform will encrypt the diagnosis task description information and diagnosis package The download link information is sent to the vehicle to be diagnosed together.
在一实施例中,待诊断车辆根据待诊断消息立即触发拉取诊断任务的操作,其通过HTTPS协议向远程诊断平台发送车辆当前基础信息及获取诊断任务请求。远程诊断平台接收待诊断车辆所发送的车辆当前基础信息及获取诊断任务请求,并根据车辆当前基础信息和获取诊断任务请求,向待诊断车辆发送相应的加密诊断任务描述信息和诊断包下载链接信息,待诊断车辆接收加密诊断任务描述信息和诊断包下载链接信息。In one embodiment, the vehicle to be diagnosed immediately triggers the operation of pulling the diagnosis task according to the message to be diagnosed, which sends the current basic information of the vehicle and the request for obtaining the diagnosis task to the remote diagnosis platform through the HTTPS protocol. The remote diagnosis platform receives the current basic information of the vehicle and the diagnostic task request sent by the vehicle to be diagnosed, and sends the corresponding encrypted diagnostic task description information and diagnostic package download link information to the vehicle to be diagnosed according to the current basic information of the vehicle and the diagnostic task request , the vehicle to be diagnosed receives encrypted diagnostic task description information and diagnostic package download link information.
步骤600:待诊断车辆通过HTTPS协议下载诊断包。Step 600: The vehicle to be diagnosed downloads the diagnosis package through the HTTPS protocol.
本发明实施例采用MQTT协议与HTTPS协议相结合的通信协议方式,所有的数据链路均通过HTTPS协议,因此待诊断车辆会以HTTPS协议的方式从远程诊断平台下载诊断包,其下载链接来自诊断任务中。The embodiment of the present invention adopts the communication protocol mode combining the MQTT protocol and the HTTPS protocol, and all data links pass the HTTPS protocol, so the vehicle to be diagnosed will download the diagnostic package from the remote diagnostic platform in the form of the HTTPS protocol, and the download link comes from the diagnostic on task.
在一实施例中,待诊断车辆接收加密诊断任务描述信息和诊断包下载链接信息后,验证消息的完整性和可靠性,若验签通过,则解密加密诊断任务描述信息,获得诊断任务描述信息,并根据诊断包下载链接信息获取诊断包的下载链接,从而通过HTTPS协议从远程诊断平台下载诊断包,若消息不可靠不完整,则直接返回错误码。In one embodiment, after the vehicle to be diagnosed receives the encrypted diagnostic task description information and the diagnostic package download link information, it verifies the integrity and reliability of the message, and if the signature verification is passed, decrypts the encrypted diagnostic task description information to obtain the diagnostic task description information , and obtain the download link of the diagnostic package according to the download link information of the diagnostic package, so as to download the diagnostic package from the remote diagnostic platform through the HTTPS protocol. If the message is unreliable and incomplete, an error code is returned directly.
步骤700:待诊断车辆执行诊断任务,得到诊断结果。Step 700: The vehicle to be diagnosed executes a diagnosis task to obtain a diagnosis result.
待诊断车辆根据诊断任务的诊断类型执行诊断任务。The vehicle to be diagnosed executes the diagnosis task according to the diagnosis type of the diagnosis task.
诊断任务的诊断类型为触发型时,待诊断车辆根据诊断策略中定义的各项诊断策略依次检查,判断当前的车辆状态或状态组合是否满足触发型诊断任务的触发条件,若满足,待诊断车辆立即按照诊断脚本文件的指令执行该次远程诊断任务,并将诊断结果记录到诊断日志中,该次远程诊断任务结束,若不满足,待诊断车辆则不执行,但该诊断任务会一直有效直至诊断任务结束时间到,同时将当前的车辆状态或状态组合和不满足的条件集合一同返回到远程诊断平台,远程诊断平台记录诊断信息。When the diagnostic type of the diagnostic task is triggered, the vehicle to be diagnosed is checked sequentially according to the diagnostic strategies defined in the diagnostic strategy to determine whether the current vehicle state or state combination meets the triggering conditions of the triggered diagnostic task. If so, the vehicle to be diagnosed Immediately execute the remote diagnosis task according to the instructions of the diagnosis script file, and record the diagnosis result in the diagnosis log. After the remote diagnosis task ends, if it is not satisfied, the vehicle to be diagnosed will not be executed, but the diagnosis task will remain valid until When the end time of the diagnosis task is reached, the current vehicle state or state combination and unsatisfied condition set are returned to the remote diagnosis platform at the same time, and the remote diagnosis platform records the diagnosis information.
在一实施例中,待诊断车辆获取诊断任务的诊断任务描述信息,提取并判断诊断任务的诊断类型。当诊断类型为触发型时,待诊断车辆提取诊断任务描述信息中的诊断策略,并根据诊断策略进行检查,判断当前的车辆状态或状态组合是否满足诊断任务的触发条件。若满足诊断任务的触发条件,待诊断车辆提取诊断包中的诊断脚本文件,按照诊断脚本文件中的指令执行远程诊断任务,得到诊断结果,待诊断车辆结束远程诊断任务;若不满足诊断任务的触发条件,但诊断任务一直有效直至诊断任务结束时间到,在此期间若满足了诊断任务的触发条件,则待诊断车辆执行远程诊断任务并得到诊断结果,从而结束远程诊断任务,若直至诊断任务结束时间到,还不满足诊断任务的触发条件,则待诊断车辆将当前的车辆状态或状态组合和不满足的条件集合反馈至远程诊断平台,远程诊断平台根据当前的车辆状态或状态组合和不满足的条件集合,生成并记录诊断信息。In an embodiment, the vehicle to be diagnosed obtains the diagnostic task description information of the diagnostic task, extracts and determines the diagnostic type of the diagnostic task. When the diagnosis type is triggered, the vehicle to be diagnosed extracts the diagnosis strategy in the diagnosis task description information, and checks according to the diagnosis strategy to determine whether the current vehicle state or state combination meets the trigger condition of the diagnosis task. If the triggering conditions of the diagnosis task are met, the vehicle to be diagnosed extracts the diagnosis script file in the diagnosis package, executes the remote diagnosis task according to the instructions in the diagnosis script file, and obtains the diagnosis result, and the vehicle to be diagnosed ends the remote diagnosis task; Trigger conditions, but the diagnostic task is valid until the end of the diagnostic task. When the end time is up and the trigger conditions of the diagnostic task are not met, the vehicle to be diagnosed will feed back the current vehicle state or state combination and unsatisfied condition set to the remote diagnosis platform, and the remote diagnosis platform will A collection of conditions met that generate and log diagnostic information.
诊断任务的诊断类型为周期型时,待诊断车辆按照诊断任务开始时间和执行时间间隔,重复执行诊断脚本文件的指令,并将诊断结果记录到诊断日志中,直至诊断任务结束时间到,该次远程诊断任务结束。When the diagnostic type of the diagnostic task is periodical, the vehicle to be diagnosed will repeatedly execute the instructions of the diagnostic script file according to the start time of the diagnostic task and the execution time interval, and record the diagnostic results in the diagnostic log until the end of the diagnostic task. The remote diagnosis task ends.
在一实施例中,当诊断类型为周期型时,待诊断车辆提取诊断任务描述信息中的诊断任务开始时间、诊断任务结束时间和执行时间间隔,并提取诊断包中的诊断脚本文件,待诊断车辆按照诊断任务开始时间和执行时间间隔,重复执行诊断脚本文件中的指令,得到诊断结果,直至到诊断任务结束时间,待诊断车辆结束远程诊断任务。In one embodiment, when the diagnosis type is periodic, the vehicle to be diagnosed extracts the diagnosis task start time, diagnosis task end time and execution time interval in the diagnosis task description information, and extracts the diagnosis script file in the diagnosis package, and the diagnosis task The vehicle repeatedly executes the instructions in the diagnostic script file according to the start time of the diagnostic task and the execution time interval, and obtains the diagnostic result until the end time of the diagnostic task, and the vehicle to be diagnosed ends the remote diagnostic task.
步骤800:待诊断车辆将诊断结果上传至远程诊断平台。Step 800: The vehicle to be diagnosed uploads the diagnosis result to the remote diagnosis platform.
在一实施例中,待诊断车辆将诊断结果记录到诊断日志中,结束远程诊断任务后,待诊断车辆将诊断日志上传至远程诊断平台。In one embodiment, the vehicle to be diagnosed records the diagnosis result in a diagnosis log, and after the remote diagnosis task is completed, the vehicle to be diagnosed uploads the diagnosis log to the remote diagnosis platform.
诊断任务为触发型诊断任务,满足任务的触发条件时,待诊断车辆按照诊断脚本文件的指令执行该次远程诊断任务,并将诊断结果记录到诊断日志中,该次远程诊断任务结束,待诊断车辆将诊断结果以日志的形式上传至远程诊断平台。诊断任务为周期型诊断任务,待诊断车辆按照诊断任务开始时间和执行时间间隔,重复执行执行诊断脚本文件的指令,并将诊断结果记录到诊断日志中,直至诊断任务结束时间到,该次远程诊断任务结束,同样,待诊断车辆将诊断结果以日志的形式上传至远程诊断平台。The diagnostic task is a triggered diagnostic task. When the triggering conditions of the task are met, the vehicle to be diagnosed will execute the remote diagnostic task according to the instructions of the diagnostic script file, and record the diagnostic result in the diagnostic log. The vehicle uploads the diagnosis results to the remote diagnosis platform in the form of logs. The diagnostic task is a periodic diagnostic task. The vehicle to be diagnosed will repeatedly execute the instructions of the diagnostic script file according to the start time of the diagnostic task and the execution time interval, and record the diagnostic results in the diagnostic log until the end of the diagnostic task. When the diagnosis task is over, similarly, the vehicle to be diagnosed will upload the diagnosis result to the remote diagnosis platform in the form of a log.
步骤900:待诊断车辆通过HTTPS协议周期性拉取诊断任务。Step 900: The vehicle to be diagnosed periodically pulls the diagnosis task through the HTTPS protocol.
当待诊断车辆不支持MQTT协议或待诊断车辆不在线时,待诊断车辆的诊断主程序采用主动拉取任务的方式实现远程诊断,拉取任务的触发条件为车辆处于IGON档时,以及定时拉取方式,如每6小时拉取一次。当待诊断车辆不支持MQTT协议或者待诊断车辆离线时,无法通过MQTT协议发送消息到待诊断车辆,但可以将所创建的诊断任务存储于远程诊断平台的数据库中,当待诊断车辆下次连接到远程诊断平台的时候,远程诊断平台便可将加密诊断任务描述信息和诊断包下载链接信息一同发送到待诊断车辆,待诊断车辆通过接收诊断任务、下载诊断包完成远程诊断。When the vehicle to be diagnosed does not support the MQTT protocol or the vehicle to be diagnosed is offline, the diagnostic main program of the vehicle to be diagnosed implements remote diagnosis by actively pulling tasks. The method of extraction, for example, once every 6 hours. When the vehicle to be diagnosed does not support the MQTT protocol or the vehicle to be diagnosed is offline, the message cannot be sent to the vehicle to be diagnosed through the MQTT protocol, but the created diagnostic task can be stored in the database of the remote diagnosis platform. When the vehicle to be diagnosed is connected next time When arriving at the remote diagnosis platform, the remote diagnosis platform can send the encrypted diagnosis task description information and the diagnosis package download link information to the vehicle to be diagnosed, and the vehicle to be diagnosed can complete the remote diagnosis by receiving the diagnosis task and downloading the diagnosis package.
具体的,在一实施例中,当待诊断车辆满足拉取任务条件时,待诊断车辆基于HTTPS协议与远程诊断平台建立远程通信,并向远程诊断平台发送车辆当前基础信息及获取诊断任务请求,其中,拉取任务条件(即拉取任务的触发条件)包括车辆处于IGON档和达到预设拉取时间,也就是说,当车辆处于IGON档时,待诊断车辆便通过HTTPS协议连接远程诊断平台,以获取诊断任务,或达到预设拉取时间,例如,间隔预设时间段,便将待诊断车辆与远程诊断平台通过HTTPS协议连接,以获取诊断任务。远程诊断平台接收待诊断车辆发送的车辆当前基础信息及获取诊断任务请求,并根据车辆当前基础信息及获取诊断任务请求,提取数据库中的诊断任务,其中,诊断任务包括加密诊断任务描述信息、诊断包和诊断包下载链接信息。远程诊断平台将提取的加密诊断任务描述信息和诊断包下载链接信息发送至待诊断车辆,待诊断车辆接收加密诊断任务描述信息和诊断包下载链接信息,验证消息的完整性和可靠性,若验签通过,则解密加密诊断任务描述信息,获得诊断任务描述信息,并根据诊断包下载链接信息获取诊断包的下载链接,从而通过HTTPS协议从远程诊断平台下载诊断包,若消息不可靠不完整,则直接返回错误码。Specifically, in one embodiment, when the vehicle to be diagnosed meets the pull task conditions, the vehicle to be diagnosed establishes remote communication with the remote diagnosis platform based on the HTTPS protocol, and sends the current basic information of the vehicle and a diagnosis task request to the remote diagnosis platform, Among them, the pulling task conditions (that is, the triggering conditions of the pulling task) include the vehicle being in the IGON gear and reaching the preset pulling time, that is, when the vehicle is in the IGON gear, the vehicle to be diagnosed will connect to the remote diagnosis platform through the HTTPS protocol , to obtain the diagnosis task, or reach the preset pull time, for example, the vehicle to be diagnosed is connected to the remote diagnosis platform through the HTTPS protocol to obtain the diagnosis task after a preset time interval. The remote diagnosis platform receives the current basic information of the vehicle and the diagnostic task request sent by the vehicle to be diagnosed, and extracts the diagnostic tasks in the database according to the current basic information of the vehicle and the diagnostic task request. Package and diagnostic package download link information. The remote diagnosis platform sends the extracted encrypted diagnostic task description information and diagnostic package download link information to the vehicle to be diagnosed, and the vehicle to be diagnosed receives the encrypted diagnostic task description information and diagnostic package download link information, and verifies the integrity and reliability of the message. If the signature is passed, the encrypted diagnostic task description information will be decrypted to obtain the diagnostic task description information, and the download link of the diagnostic package will be obtained according to the diagnostic package download link information, so as to download the diagnostic package from the remote diagnostic platform through the HTTPS protocol. If the message is unreliable and incomplete, Then return the error code directly.
综上所述,本说明书公开一种车辆远程诊断方法,采用MQTT协议与HTTPS协议相结合的通信协议方式,待诊断车辆无论是否在线,均可通过远程诊断平台创建诊断任务,待诊断车辆在线时可立即通过MQTT协议发送诊断指令至待诊断车辆,以通知待诊断车辆有新的诊断任务,待诊断车辆通过HTTPS协议实时获取诊断任务并完成远程诊断,待诊断车辆离线时,远程诊断平台可长时间存储诊断任务,一旦待诊断车辆通过HTTPS协议主动连接到远程诊断平台,便可立即获取到诊断任务并完成远程诊断。To sum up, this manual discloses a vehicle remote diagnosis method, which adopts the communication protocol method combining the MQTT protocol and the HTTPS protocol. Regardless of whether the vehicle to be diagnosed is online or not, a diagnosis task can be created through the remote diagnosis platform. When the vehicle to be diagnosed is online Immediately send diagnostic commands to the vehicle to be diagnosed through the MQTT protocol to notify the vehicle to be diagnosed of a new diagnostic task. The vehicle to be diagnosed can obtain the diagnostic task in real time through the HTTPS protocol and complete the remote diagnosis. When the vehicle to be diagnosed is offline, the remote diagnosis platform can be extended The diagnostic tasks are stored in time. Once the vehicle to be diagnosed actively connects to the remote diagnosis platform through the HTTPS protocol, the diagnostic tasks can be obtained immediately and the remote diagnosis can be completed.
相对于传统的本地诊断和近场诊断,本车辆远程诊断方法不需要在待诊断车辆附近架设诊断设备,只要有网络便可实施诊断,大大丰富了诊断的应用场景。相对于现有技术中的云平台,本车辆远程诊断方法中的远程诊断平台通过实时的诊断指令实现远程诊断,即使待诊断车辆没有实时连接远程诊断平台也可以实现远程诊断,同时可以实现在指定事件触发条件下和指定时间间隔下实施诊断,更有效的提高了复杂网络环境下远程诊断的执行率和成功率。相对于现有技术中仅使用MQTT协议的方式进行在线指令式远程诊断,采用MQTT协议与HTTPS协议相结合的通信协议方式,通过MQTT协议下发诊断指令,通过HTTPS协议获取诊断任务和诊断包,大大提高了远程诊断的并发能力,避免了使用MQTT协议导致数据包丢失,诊断任务描述信息和诊断包都通过HTTPS协议传输能够保证数据信息的安全性。此外,HTTPS协议方式的诊断包传输可以使用CDN加速方式进行,提高了传输效率,且远程诊断任务结束后自动上传诊断日志文件,此种方式收集诊断结果不需要长时间等待诊断结果,大大提高了诊断效率,同时,采用任务实现远程诊断,可以实现同时对大量车辆实施诊断。Compared with traditional local diagnosis and near-field diagnosis, this vehicle remote diagnosis method does not need to set up diagnostic equipment near the vehicle to be diagnosed, as long as there is a network, the diagnosis can be implemented, which greatly enriches the application scenarios of diagnosis. Compared with the cloud platform in the prior art, the remote diagnosis platform in the vehicle remote diagnosis method realizes remote diagnosis through real-time diagnosis instructions. Diagnosis is implemented under event-triggered conditions and specified time intervals, which more effectively improves the execution rate and success rate of remote diagnosis in complex network environments. Compared with the prior art that only uses the MQTT protocol for online command-based remote diagnosis, the MQTT protocol and the HTTPS protocol are used to combine the communication protocol method, the diagnostic command is issued through the MQTT protocol, and the diagnostic task and diagnostic package are obtained through the HTTPS protocol. The concurrency capability of remote diagnosis is greatly improved, and the loss of data packets caused by the use of MQTT protocol is avoided. The diagnostic task description information and diagnostic packets are transmitted through the HTTPS protocol to ensure the security of data information. In addition, the diagnostic package transmission in the HTTPS protocol mode can be accelerated by CDN, which improves the transmission efficiency, and the diagnostic log files are automatically uploaded after the remote diagnostic task is completed. This method does not need to wait for a long time to collect diagnostic results, which greatly improves Diagnosis efficiency. At the same time, the use of tasks to realize remote diagnosis can realize the diagnosis of a large number of vehicles at the same time.
本说明书实施例还公开了一种车辆远程诊断系统,包括任务创建模块、协议判断模块、在线判断模块、第一诊断任务获取模块、第二诊断任务获取模块、执行模块和反馈模块。The embodiment of the specification also discloses a vehicle remote diagnosis system, including a task creation module, a protocol judgment module, an online judgment module, a first diagnosis task acquisition module, a second diagnosis task acquisition module, an execution module and a feedback module.
其中,任务创建模块用于远程诊断平台创建诊断任务。Among them, the task creation module is used for the remote diagnosis platform to create diagnosis tasks.
协议判断模块用于判断待诊断车辆是否支持MQTT协议。The protocol judging module is used to judge whether the vehicle to be diagnosed supports the MQTT protocol.
在线判断模块用于判断支持MQTT协议的待诊断车辆是否在线。The online judging module is used to judge whether the vehicle to be diagnosed supporting the MQTT protocol is online.
第一诊断任务获取模块用于当待诊断车辆支持MQTT协议且在线时,通过MQTT协议发送诊断指令至所有任务关联的待诊断车辆,待诊断车辆通过HTTPS协议获取诊断任务,并下载诊断包。The first diagnostic task acquisition module is used to send diagnostic instructions to all task-related vehicles to be diagnosed through the MQTT protocol when the vehicle to be diagnosed supports the MQTT protocol and is online, and the vehicle to be diagnosed obtains the diagnostic task through the HTTPS protocol and downloads the diagnostic package.
第二诊断任务获取模块用于当待诊断车辆不支持MQTT协议或待诊断车辆不在线时,待诊断车辆通过HTTPS协议周期性拉取诊断任务,并下载诊断包。The second diagnosis task acquiring module is used for when the vehicle to be diagnosed does not support the MQTT protocol or the vehicle to be diagnosed is not online, the vehicle to be diagnosed periodically pulls the diagnosis task through the HTTPS protocol and downloads the diagnosis package.
执行模块用于待诊断车辆执行诊断任务,以得到诊断结果。The execution module is used for the vehicle to be diagnosed to execute the diagnosis task to obtain the diagnosis result.
反馈模块用于待诊断车辆将诊断结果上传至远程诊断平台。The feedback module is used for the vehicle to be diagnosed to upload the diagnosis result to the remote diagnosis platform.
本实施例提供的车辆远程诊断系统与本发明的车辆远程诊断方法基于同一构思,其带来的技术效果与本发明的车辆远程诊断方法实施例相同,故关于车辆远程诊断系统的具体限定可以参见上述对车辆远程诊断方法的限定,在此不再赘述。上述车辆远程诊断系统中的各个模块可全部或部分通过软件、硬件及其组合来实现。此外,上述各模块可以硬件形式内嵌于或独立于计算机设备的处理器中,也可以软件形式存储于计算机设备的存储器中,以便于处理器调用执行以上各个模块对应的操作。The vehicle remote diagnosis system provided in this embodiment is based on the same concept as the vehicle remote diagnosis method of the present invention, and the technical effect it brings is the same as the embodiment of the vehicle remote diagnosis method of the present invention, so for specific limitations on the vehicle remote diagnosis system, please refer to The above-mentioned limitations on the vehicle remote diagnosis method will not be repeated here. Each module in the above-mentioned vehicle remote diagnosis system can be fully or partially realized by software, hardware and a combination thereof. In addition, the above-mentioned modules can be embedded in or independent of the processor of the computer device in the form of hardware, and can also be stored in the memory of the computer device in the form of software, so that the processor can call and execute the corresponding operations of the above-mentioned modules.
本说明书实施例还公开了一种计算机设备,包括存储器和处理器,存储器存储有计算机程序,处理器执行计算机程序时实现上述车辆远程诊断方法的步骤。The embodiment of the specification also discloses a computer device, which includes a memory and a processor, the memory stores a computer program, and the processor implements the steps of the vehicle remote diagnosis method when executing the computer program.
本说明书实施例还公开了一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现上述车辆远程诊断方法的步骤。The embodiment of this specification also discloses a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned vehicle remote diagnosis method are realized.
本领域普通技术人员可以理解:附图只是一个实施例的示意图,附图中的模块或流程并不一定是实施本发明所必须的。Those skilled 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 for implementing the present invention.
本领域普通技术人员可以理解:实施例中的装置中的模块可以按照实施例描述分布于实施例的装置中,也可以进行相应变化位于不同于本实施例的一个或多个装置中。上述实施例的模块可以合并为一个模块,也可以进一步拆分成多个子模块。Those skilled in the art can understand that: the modules in the device in the embodiment can be distributed in the device in the embodiment according to the description in the embodiment, and can also be changed and located in one or more devices different from the embodiment. The modules in the above embodiments can be combined into one module, and can also 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, rather than 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 Modifications are made to the technical solutions described in the foregoing embodiments, or equivalent replacements are made to some of the technical features; these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211102074.7A CN116149293B (en) | 2022-09-09 | 2022-09-09 | Vehicle remote diagnosis method, system and computer equipment |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211102074.7A CN116149293B (en) | 2022-09-09 | 2022-09-09 | Vehicle remote diagnosis method, system and computer equipment |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN116149293A true CN116149293A (en) | 2023-05-23 |
| CN116149293B CN116149293B (en) | 2025-08-15 |
Family
ID=86372506
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202211102074.7A Active CN116149293B (en) | 2022-09-09 | 2022-09-09 | Vehicle remote diagnosis method, system and computer equipment |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN116149293B (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116893661A (en) * | 2023-08-29 | 2023-10-17 | 成都市卡蛙科技有限公司 | Fault diagnosis methods, systems, equipment and media |
| CN119439970A (en) * | 2025-01-08 | 2025-02-14 | 浙江国利信安科技有限公司 | Method, computing device and storage medium for industrial control system fault diagnosis |
Citations (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20140100737A1 (en) * | 2011-04-30 | 2014-04-10 | Daimler Ag | System For Diagnosing Faults of a Component in a Vehicle |
| KR20160054298A (en) * | 2014-11-06 | 2016-05-16 | 주식회사 엘지화학 | Apparatus and method for diagnosing errors of task execution |
| CN111131358A (en) * | 2018-10-31 | 2020-05-08 | 比亚迪股份有限公司 | Information acquisition method, device and system, readable storage medium and electronic equipment |
| US20200209845A1 (en) * | 2018-12-28 | 2020-07-02 | Didi Research America, Llc | System and method for remote intervention of vehicles |
| CN111781911A (en) * | 2020-06-23 | 2020-10-16 | 浙江吉利汽车研究院有限公司 | Automobile remote diagnosis method and system |
| CN113325830A (en) * | 2021-06-16 | 2021-08-31 | 江铃汽车股份有限公司 | Remote diagnosis method for automobile diagnosis instrument |
| CN113824795A (en) * | 2021-10-21 | 2021-12-21 | 上海波顿诺华智能科技有限公司 | Communication method, device and system of vehicle end and cloud end |
| CN114675616A (en) * | 2021-05-19 | 2022-06-28 | 北京新能源汽车股份有限公司 | A remote diagnosis control system, method, device and electric vehicle |
| CN114924548A (en) * | 2022-05-20 | 2022-08-19 | 上汽通用五菱汽车股份有限公司 | Vehicle remote diagnosis method, system, vehicle, and computer-readable storage medium |
-
2022
- 2022-09-09 CN CN202211102074.7A patent/CN116149293B/en active Active
Patent Citations (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20140100737A1 (en) * | 2011-04-30 | 2014-04-10 | Daimler Ag | System For Diagnosing Faults of a Component in a Vehicle |
| KR20160054298A (en) * | 2014-11-06 | 2016-05-16 | 주식회사 엘지화학 | Apparatus and method for diagnosing errors of task execution |
| CN111131358A (en) * | 2018-10-31 | 2020-05-08 | 比亚迪股份有限公司 | Information acquisition method, device and system, readable storage medium and electronic equipment |
| US20200209845A1 (en) * | 2018-12-28 | 2020-07-02 | Didi Research America, Llc | System and method for remote intervention of vehicles |
| CN111781911A (en) * | 2020-06-23 | 2020-10-16 | 浙江吉利汽车研究院有限公司 | Automobile remote diagnosis method and system |
| CN114675616A (en) * | 2021-05-19 | 2022-06-28 | 北京新能源汽车股份有限公司 | A remote diagnosis control system, method, device and electric vehicle |
| CN113325830A (en) * | 2021-06-16 | 2021-08-31 | 江铃汽车股份有限公司 | Remote diagnosis method for automobile diagnosis instrument |
| CN113824795A (en) * | 2021-10-21 | 2021-12-21 | 上海波顿诺华智能科技有限公司 | Communication method, device and system of vehicle end and cloud end |
| CN114924548A (en) * | 2022-05-20 | 2022-08-19 | 上汽通用五菱汽车股份有限公司 | Vehicle remote diagnosis method, system, vehicle, and computer-readable storage medium |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116893661A (en) * | 2023-08-29 | 2023-10-17 | 成都市卡蛙科技有限公司 | Fault diagnosis methods, systems, equipment and media |
| CN119439970A (en) * | 2025-01-08 | 2025-02-14 | 浙江国利信安科技有限公司 | Method, computing device and storage medium for industrial control system fault diagnosis |
| CN119439970B (en) * | 2025-01-08 | 2025-07-11 | 浙江国利信安科技有限公司 | Method, computing device and storage medium for industrial control system fault diagnosis |
Also Published As
| Publication number | Publication date |
|---|---|
| CN116149293B (en) | 2025-08-15 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US7516244B2 (en) | Systems and methods for providing server operations in a work machine | |
| US20100057865A1 (en) | Transferable Debug Session in a Team Environment | |
| CN113852785B (en) | 5G-based intelligent monitoring and scheduling method, device and system | |
| CN116149293A (en) | A vehicle remote diagnosis method, system and computer equipment | |
| CN112613024A (en) | Data interaction method, device and system and storage medium | |
| CN111338893A (en) | Process log processing method and device, computer equipment and storage medium | |
| US12309672B2 (en) | Method for wireless event-driven everything-to-everything (X2X) payload delivery | |
| CN107005453B (en) | Method and system for secure two-way communication of industrial devices | |
| US12113777B2 (en) | Secure remote access to historical data | |
| CN112202635A (en) | Link monitoring method and device, storage medium and electronic device | |
| CN115884129A (en) | Log obtaining method, device and system of vehicle terminal and storage medium | |
| EP2869530B1 (en) | Systems and methods for secure remote access | |
| CN113342503B (en) | Real-time progress feedback method, device, equipment and storage medium | |
| EP2869529B1 (en) | Systems and methods for secure file transfers | |
| CN108206864B (en) | Vehicle information synchronization real-time query system and information synchronization method based on WeChat | |
| CN119003318A (en) | Remote debugging method and device and related products | |
| CN114679472A (en) | Communication system, method, apparatus, storage medium, and electronic device | |
| CN105656659A (en) | Management method and device for network element upgrade | |
| CN114553941B (en) | A service dialing test method and device based on RPC communication | |
| CN114915668B (en) | Full-connection port scanning method, scanner, system, electronic device and medium | |
| WO2015162225A1 (en) | Methods of exchanging data with a device comprising radio communication means | |
| CN117499454A (en) | RPA robot control system and method | |
| CN119835333B (en) | A multi-cluster cloud native task scheduling method and system based on zero trust | |
| CN119536226A (en) | Vehicle remote diagnosis method, system, device and computer readable storage medium | |
| CN116610580A (en) | Vehicle cloud interaction interface testing method and device, electronic equipment and storage medium |
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 | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |