CN114326672A - ECU simulation detection method, electronic device and storage medium - Google Patents

ECU simulation detection method, electronic device and storage medium Download PDF

Info

Publication number
CN114326672A
CN114326672A CN202111633733.5A CN202111633733A CN114326672A CN 114326672 A CN114326672 A CN 114326672A CN 202111633733 A CN202111633733 A CN 202111633733A CN 114326672 A CN114326672 A CN 114326672A
Authority
CN
China
Prior art keywords
simulation
ecu
detection
ecu simulation
communication parameters
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
CN202111633733.5A
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.)
Shenzhen Launch Technology Co Ltd
Original Assignee
Shenzhen Launch Technology 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 Shenzhen Launch Technology Co Ltd filed Critical Shenzhen Launch Technology Co Ltd
Priority to CN202111633733.5A priority Critical patent/CN114326672A/en
Publication of CN114326672A publication Critical patent/CN114326672A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Small-Scale Networks (AREA)

Abstract

The invention discloses an ECU simulation detection method, electronic equipment and a storage medium, wherein the ECU simulation detection method is applied to the ECU simulation equipment; the ECU simulation equipment stores communication parameters and simulation data of each ECU simulation system under at least two CAN networks; the method comprises the following steps: receiving a detection instruction triggered by a vehicle diagnosis detection system; judging whether the communication parameters of the target ECU simulation system in the detection instruction are consistent with the stored communication parameters of the target ECU simulation system; if yes, sending simulation data corresponding to the detection instruction in the target ECU simulation system to the vehicle diagnosis and detection system, so that the vehicle diagnosis and detection system displays a detection result according to the simulation data. The ECU simulation equipment CAN meet the ECU detection function under various CAN networks, so that the detection efficiency is improved, and when the ECU simulation system under multiple CAN networks is detected, corresponding ECU simulation equipment does not need to be re-developed for each CAN network, and the development cost is saved.

Description

ECU simulation detection method, electronic device and storage medium
Technical Field
The invention relates to the technical field of automotive electronics, in particular to an ECU (electronic control unit) simulation detection method, electronic equipment and a storage medium.
Background
With the rapid development of the automobile industry, the national requirements for the detection equipment of automobile manufacturers are increasing day by day. In order to guarantee the yield of the automobile leaving factory, the automobile offline electrical inspection equipment is required to be combined to detect functions such as configuration, flash, fault diagnosis and the like aiming at each ECU of the automobile.
Currently, in order to improve the detection efficiency of the vehicle ECU, ECU data is generally simulated by an ECU simulation device to simulate and verify the function of the ECU. However, the existing ECU simulation equipment CAN only simulate ECU simulation data of one CAN network at a time, and off-line detection of the vehicle has the functions of configuration, flash and fault diagnosis under multiple CAN networks (such as a vehicle body CAN network, a power CAN network and a CAN bus network), and the ECU simulation equipment needs to be re-developed for detection of the ECU simulation system under each CAN network, so that the simulation detection efficiency is low and the development cost is high.
Disclosure of Invention
The embodiment of the invention provides an ECU simulation detection method, electronic equipment and a storage medium, and aims to solve the problems that the conventional ECU simulation equipment CAN only support the detection of an ECU simulation system under one CAN network in the ECU simulation detection process, so that the simulation detection efficiency is low and the development cost is high.
In a first aspect, the invention provides an ECU simulation detection method, which is applied to ECU simulation equipment; the ECU simulation equipment stores communication parameters and simulation data of each ECU simulation system under at least two CAN networks; the method comprises the following steps:
receiving a detection instruction triggered by a vehicle diagnosis detection system; the detection instruction carries communication parameters of a target ECU simulation system;
judging whether the communication parameters of the target ECU simulation system in the detection instruction are consistent with the stored communication parameters of the target ECU simulation system;
if yes, sending simulation data corresponding to the detection instruction in the target ECU simulation system to the vehicle diagnosis and detection system, so that the vehicle diagnosis and detection system displays a detection result according to the simulation data.
With reference to the first aspect, in a first possible implementation manner of the first aspect, the at least two CAN networks include a power CAN network, a body CAN network, and a CAN bus network.
With reference to the first aspect, in a second possible implementation manner of the first aspect, the communication parameter includes a communication PIN, a communication baud rate, a caid, or a CAN bus ID.
With reference to the first aspect, in a third possible implementation manner of the first aspect, the sending simulation data corresponding to the detection instruction in the target ECU simulation system to the vehicle diagnosis detection system includes:
determining the target ECU simulation system according to the CANID or the CAN bus ID;
and sending the simulation data corresponding to the detection instruction in the target ECU simulation system to the vehicle diagnosis and detection system.
In a second aspect, the present invention provides an ECU simulation detection method applied to the ECU simulation apparatus in the first aspect, where the ECU simulation device includes the ECU simulation apparatus and a simulation platform, the ECU simulation apparatus stores communication parameters of each ECU simulation system in at least two CAN networks, and the simulation platform stores communication parameters and simulation data of each ECU simulation system in at least two CAN networks, the method includes:
receiving a detection instruction triggered by a vehicle diagnosis detection system; the detection instruction carries communication parameters of a target ECU simulation system;
judging whether the communication parameters of the target ECU simulation system in the detection instruction are consistent with the stored communication parameters of the target ECU simulation system;
if yes, acquiring simulation data corresponding to the detection instruction in the target ECU simulation system sent by the simulation platform;
and sending the simulation data to the vehicle diagnosis and detection system so that the vehicle diagnosis and detection system displays a detection result according to the simulation data.
With reference to the second aspect, in a first possible implementation manner of the second aspect, the communication parameter includes a caidd; the acquiring of the simulation data corresponding to the detection instruction in the target ECU simulation system sent by the simulation platform includes:
sending the detection instruction to the simulation platform so that the simulation platform determines a target ECU simulation system and simulation data corresponding to the detection instruction in the target ECU simulation system according to the CANID;
and acquiring simulation data corresponding to the detection instruction and responded by the simulation platform.
With reference to the second aspect, in a second possible implementation manner of the second aspect, the communication parameter includes a CAN bus ID; the acquiring of the simulation data corresponding to the detection instruction in the target ECU simulation system sent by the simulation platform includes:
and acquiring simulation data corresponding to the detection instruction in a target ECU simulation system corresponding to the CAN bus ID broadcasted by the simulation platform.
In a third aspect, the present invention provides an ECU simulation detection method, applied to a simulation platform in an ECU simulation device, where the ECU simulation device includes the ECU simulation apparatus and the simulation platform; the simulation platform stores communication parameters and simulation data of each ECU simulation system under at least two CAN networks, and the method comprises the following steps:
receiving a detection instruction sent by the ECU simulation device;
judging whether the communication parameters of the target ECU simulation system in the detection instruction are consistent with the stored communication parameters of the target ECU simulation system; and if so, sending simulation data corresponding to the detection instruction in the target ECU simulation system to the ECU simulation device.
In a fourth aspect, the present invention provides an ECU simulation device, wherein the ECU simulation device stores communication parameters and simulation data of each ECU simulation system under at least two kinds of CAN networks; the ECU simulation apparatus includes:
the instruction receiving module is used for receiving a detection instruction triggered by the vehicle diagnosis detection system; the detection instruction carries communication parameters of a target ECU simulation system;
the judging module is used for judging whether the communication parameters of the target ECU simulation system in the detection instruction are consistent with the stored communication parameters of the target ECU simulation system;
and if so, sending the simulation data corresponding to the detection instruction in the target ECU simulation system to the vehicle diagnosis and detection system so that the vehicle diagnosis and detection system displays a detection result according to the simulation data.
In a fifth aspect, the present invention provides an electronic device, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the ECU simulation detection method according to the first aspect, or the steps of the ECU simulation detection method according to the second aspect, or the steps of the ECU simulation detection method according to the third aspect when executing the computer program.
In a sixth aspect, the present invention provides a computer storage medium storing a computer program that, when executed by a processor, implements the steps of the ECU simulation detection method of the first aspect, or implements the steps of the ECU simulation detection method of the second aspect, or implements the steps of the ECU simulation detection method of the third aspect.
According to the ECU simulation detection method, the ECU simulation equipment, the electronic equipment and the storage medium, the communication parameters and the simulation data of each ECU simulation system under at least two CAN networks are stored in the ECU simulation equipment, so that after a detection instruction triggered by a vehicle diagnosis detection system is received, whether the communication parameters of a target ECU simulation system in the detection instruction are consistent with the stored communication parameters of the target ECU simulation system is judged; if so, sending the simulation data corresponding to the detection instruction in the target ECU simulation system to the vehicle diagnosis and detection system so that the vehicle diagnosis and detection system displays the detection result according to the simulation data. The ECU simulation equipment CAN meet the ECU detection function under various CAN networks, so that the detection efficiency is improved, and when the ECU simulation system under multiple CAN networks is detected, corresponding ECU simulation equipment does not need to be re-developed for each CAN network, and the development cost is saved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive labor.
FIG. 1 is a schematic diagram of an application environment of an ECU simulation detection method according to an embodiment of the present invention;
FIG. 2 is a flow chart of the ECU simulation detection method according to one embodiment of the present invention;
FIG. 3 is a flow chart of the ECU simulation detection method according to one embodiment of the present invention;
FIG. 4 is a flow chart of the ECU simulation detection method according to one embodiment of the present invention;
FIG. 5 is an interactive flow chart of the ECU simulation test method in accordance with one embodiment of the present invention;
FIG. 6 is another interactive flow chart of an ECU simulation test method in accordance with an embodiment of the present invention;
FIG. 7 is a flow chart of yet another interaction of an ECU simulation test method in accordance with an embodiment of the present invention;
FIG. 8 is a diagram illustrating an exemplary data structure of a CAN frame in accordance with an embodiment of the present invention;
FIG. 9 is a diagram illustrating an exemplary data structure of a CAN frame in accordance with an embodiment of the present invention;
FIG. 10 is a schematic block diagram of an ECU simulation apparatus according to an embodiment of the present invention;
fig. 11 is an internal structural diagram of an electronic device according to an embodiment of the invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
A CAN bus (Controller Area Network, serial communication protocol), i.e. a Controller Area Network, belongs to the field of industrial field buses, and is one of the most widely used bus networks in automobiles at present.
An ECU (Electronic Control Unit), also called a "traveling computer", a "vehicle-mounted computer", or the like.
The VCI (Vehicle Communication Interface) is used for analyzing and processing the detection command and filtering the bus network data in this embodiment.
In this embodiment, the vehicle diagnostic device is connected to the ECU simulation apparatus through an OBD interface to simulate an OBD diagnostic interface in the ECU system in a real detection environment.
The ECU simulation detection method provided by the embodiment of the invention can be applied to the ECU simulation detection system shown in FIG. 1, wherein the ECU simulation detection system comprises a vehicle diagnosis detection system, vehicle diagnosis equipment and ECU simulation equipment. The ECU simulation equipment comprises an ECU simulation device and a simulation platform, the vehicle diagnosis equipment is respectively connected with the vehicle diagnosis detection system and the ECU simulation device, and the ECU simulation device is connected with the simulation platform. The vehicle diagnosis equipment is used for realizing communication between the vehicle diagnosis detection system and the ECU simulation device. The ECU simulation device is used for being connected with external equipment, namely vehicle diagnosis equipment, so as to send simulation data. The simulation platform is used for storing or configuring communication parameters and ECU simulation detection data corresponding to different ECU simulation systems.
It should be understood that, in the analog detection system, the vehicle diagnosis detection system can be regarded as a detection client for triggering a detection instruction; the ECU simulation equipment is regarded as a detection server side and used for responding to a detection instruction and sending simulation data corresponding to the detection instruction to the vehicle diagnosis equipment so as to forward the simulation data to the vehicle diagnosis detection system through the vehicle diagnosis equipment, and the detection client side and the detection server side are communicated through the vehicle diagnosis equipment.
In an embodiment, as shown in fig. 2, an ECU simulation detection method is provided, which is applied to an ECU simulation device, where communication parameters and simulation data of each ECU simulation system in at least two CAN networks are stored in the ECU simulation device; the method comprises the following steps:
s101: receiving a detection instruction triggered by a vehicle diagnosis detection system; the detection instruction carries communication parameters of the target ECU simulation system.
S102: and judging whether the communication parameters of the target ECU simulation system in the detection instruction are consistent with the stored communication parameters of the target ECU simulation system.
S103: if yes, sending simulation data corresponding to the detection instruction in the target ECU simulation system to the vehicle diagnosis and detection system, so that the vehicle diagnosis and detection system displays the detection result according to the simulation data.
The ECU simulation device is used for simulating an ECU system to be connected with an external device. The simulation platform is used for configuring simulation data corresponding to different ECU simulation systems. The vehicle diagnosis detection system is used for triggering a detection instruction. The detection instruction may include, but is not limited to, instructions for diagnosing (detecting) the functional configuration of each ECU simulation system, flushing, and reading CAN bus data (i.e., second CAN network data). The detection instruction is used for indicating a target ECU simulation system under one or more CAN networks. The at least two CAN networks include a power CAN network, a vehicle body CAN network and a CAN bus network. The detection instruction carries communication parameters of the target ECU simulation system. The communication parameters stored in the ECU simulation equipment comprise a communication PIN foot, a communication baud rate, a CANID or a CAN bus ID. The CANID comprises a request CANID and a corresponding response CANID, and is used for requesting/responding analog data corresponding to the detection instruction of the target ECU analog system in a power CAN network and a vehicle body CAN network. And the CAN bus ID is used for requesting simulation data of the target ECU simulation system under the CAN bus network.
The vehicle diagnosis and detection system is pre-configured with communication parameters of each ECU simulation system, so that when a detection instruction is triggered, the detection instruction carries the communication parameters of a target ECU simulation system. The communication parameters include, but are not limited to, the PIN foot (CAN network) and the baud rate of the communication.
For example, the vehicle diagnostic detection system may configure the first communication parameters of each ECU simulation system via the configuration interface as follows. For example, the configuration interface of the ECU simulation system for SRS is as follows: canentersystemlnfo (0xE0a0,0xE1a0,1,9,0x03,2000);
description of the parameters: 0xE0a 0: requesting a CANID
0xE1A 0: answering CANID
1,9: communication PIN foot
0x 03: communication Baud rates (1M (0X01),800K (0X02),500K (0X03) … …)
2000: link hold time
Further, after the communication parameter configuration is completed, other functions such as function configuration, flash and the like are performed. After the functional configuration of each ECU simulation system is completed, the functional configuration of the next ECU simulation system is entered, and corresponding communication parameters need to be reconfigured when one ECU simulation system is replaced.
In this embodiment, the vehicle diagnosis and detection system triggers a detection instruction for detecting a target ECU simulation system, where the detection instruction carries communication parameters, and after the ECU simulation device receives the detection instruction, the ECU simulation device determines whether the communication parameters of the target ECU simulation system in the detection instruction are consistent with the stored communication parameters of the target ECU simulation system, and if so, the ECU simulation system is a detectable ECU simulation system configured in advance, and at this time, the ECU simulation device may obtain simulation data corresponding to the detection instruction sent by the simulation platform, and if matching fails, the ECU simulation device does not execute the step of sending the simulation data corresponding to the detection instruction in the target ECU simulation system to the vehicle diagnosis and detection system, so as to ensure validity of obtaining the simulation data.
In this embodiment, the power CAN network may refer to a CAN network in which data transmission is performed with a communication PIN of 3.11 and a communication baud rate of 500K. The CAN network of the vehicle body CAN be a CAN network for data transmission with the communication PIN of 1.9 and the communication baud rate of 250K. The bus CAN network CAN be a CAN network which carries out data transmission by using a communication PIN of 6.14 and a communication baud rate of 250K. It should be noted that, specific parameters of the communication PIN and the communication baud rate corresponding to each CAN network are only shown by way of example here, and the present solution is not limited thereto.
The simulation data comprises first CAN network data or second CAN network data, and the first CAN network data is CAN network data corresponding to the first CAN network. The second CAN network data is CAN network data corresponding to the second CAN network. The detection result includes, but is not limited to, a configuration result of the ECU simulation system, a fault detection result, a CAN bus data reading result, and the like.
Specifically, referring to fig. 1 (the illustration takes CAN networks including a power CAN network, a vehicle body CAN network, and a CAN bus network as an example) and fig. 2, the flow of steps S101 to S103 will be explained. As shown in the figure, a user CAN trigger a detection instruction through a vehicle diagnosis detection system to send the detection instruction to vehicle diagnosis equipment through the vehicle diagnosis detection system, the vehicle diagnosis equipment analyzes and processes the detection instruction and sends the detection instruction to an ECU simulation device in the ECU simulation equipment through a vehicle-mounted OBD diagnosis head in a CAN network communication mode, and the ECU simulation device receives the detection instruction and judges whether the communication parameters of a target ECU simulation system in the detection instruction are consistent with the stored communication parameters of the target ECU simulation system; if the simulation data corresponding to the detection instruction in the target ECU simulation system is sent to the vehicle diagnosis and detection system, for example, the CAN network is a power CAN network, the ECU simulation device forwards the simulation data to the vehicle diagnosis equipment through a PIN foot and a communication baud rate indicated by the power CAN network configured in advance. And finally, the vehicle diagnosis equipment analyzes the received analog data and then responds to the vehicle diagnosis and detection system so that the vehicle diagnosis and detection system analyzes the analog data and displays the detection result.
The simulation platform CAN configure simulation data and communication parameters corresponding to each ECU simulation system in at least two CAN networks, and send the communication parameters to the ECU simulation device, and the ECU simulation device, as a simulation external device of the ECU simulation system, sends simulation data of a target ECU simulation system in one or more CAN networks sent by the simulation platform to the vehicle diagnosis equipment after receiving a detection instruction.
Further, in practical application, different ECU simulation systems may configure the same or different CAN networks, and may be configured according to actual needs, which is not limited herein. The ECU simulation system is used as a node in the CAN network, and when processing node data in the CAN network, the processing is performed in a serial processing manner, for example, when the detection instruction includes a plurality of target ECU simulation systems, for example, a target ECU simulation system a and a target ECU simulation system B, the method performs processing in a serial manner, that is, processing a before processing B or processing B before processing a when processing the two systems, and the processing is not limited herein.
In one embodiment, after one target ECU simulation system is processed by executing the above steps S102 to S103, the process loops to the detection (e.g., function configuration, flash, CAN bus data reading, etc.) of the next target ECU simulation system, that is, the steps S102 to S103 are repeatedly executed until all target ECU simulation systems are processed.
Specifically, the ECU simulation means forwards the simulation data to the vehicle diagnosis device, for example, in the case where the CAN network is a power CAN network, the simulation data is responded to the vehicle diagnosis device in the form of a CAN response frame. The data structure of the CAN response frame is shown in fig. 8, which takes the CAN response frame structure under the first CAN network as an example, and the description information of the data structure of the response frame (an frame in the figure) is as follows:
a, representing effective byte length
And b, representing a response CANID, wherein the response CANID is a reply CANID corresponding to a preset target ECU simulation system and can be used for uniquely identifying the target ECU simulation system, so that only simulation data corresponding to the CANID is processed in the detection process.
c, representing valid byte data
d, representing a detection command (or a clear fault code command) for describing the detection requirement, including but not limited to diagnosing (detecting) the functional configuration of each ECU simulation system, flashing, reading the CAN bus data (i.e. the second CAN network data) and the like.
e (g) indicates reserved bits
f, representing analog data
As shown in example fig. 9, taking the response frame structure under the second CAN network as an example, the data structure description information of the response frame (Ans frame in the figure) is as follows:
a' represents the effective byte length
And b', indicating a response CANID, wherein the response CANID is a reply CAN bus ID corresponding to a preset target ECU simulation system and CAN be used for uniquely identifying second CAN network data broadcast by the target ECU simulation system on the simulation platform.
c' represents valid byte data
d' second CAN network data
e' denotes reserved bits
And finally, after the vehicle diagnosis equipment receives the analog data, analyzing the analog data, responding the analyzed analog data to the vehicle diagnosis and detection system, so that the vehicle diagnosis and detection system analyzes the analog data and displays the detection result.
In this embodiment, the ECU simulation device stores communication parameters and simulation data of each ECU simulation system in at least two kinds of CAN networks, so as to determine whether communication parameters of a target ECU simulation system in a detection instruction are consistent with stored communication parameters of the target ECU simulation system after receiving the detection instruction triggered by the vehicle diagnosis and detection system; if the simulation data corresponding to the detection instruction in the target ECU simulation system are sent to the vehicle diagnosis and detection system, so that the vehicle diagnosis and detection system displays the detection result according to the simulation data.
In one embodiment, in step S103, that is, sending simulation data corresponding to the detection instruction in the target ECU simulation system to the vehicle diagnosis and detection system, the method specifically includes the following steps:
s1031: and determining the target ECU simulation system according to the CANID or the CAN bus ID.
S1034: and sending the simulation data corresponding to the detection instruction in the target ECU simulation system to a vehicle diagnosis and detection system.
The CANID comprises a request CANID and a corresponding response CANID, and is used for requesting/responding CAN network data (namely first CAN network data) corresponding to the detection instruction of the target ECU simulation system in a power CAN network and a vehicle body CAN network. A CAN bus ID for requesting the target ECU to simulate bus data (i.e., second CAN network data) of the system under the CAN bus network. It is understood that each ECU simulation system is correspondingly provided with a CAN ID or CAN bus ID.
Specifically, after receiving the detection instruction, the ECU simulation device determines a target ECU simulation system that needs to communicate according to the CAN ID or the CAN bus ID in the communication parameter, and then responds to the detection instruction to communicate with the target ECU simulation system, so as to send simulation data corresponding to the detection instruction in the target ECU simulation system to the vehicle diagnosis and detection system, where for example, if the detection instruction is a functional configuration, the corresponding simulation data is a feedback result corresponding to the functional configuration obtained in response to the detection instruction.
In an embodiment, an ECU simulation detection method is provided, which is applied to an ECU simulation device, where the ECU simulation device includes an ECU simulation device and a simulation platform, the ECU simulation device stores communication parameters of each ECU simulation system in at least two CAN networks, and the simulation platform stores communication parameters and simulation data of each ECU simulation system in at least two CAN networks, as shown in fig. 3, the method includes the following steps:
s201: receiving a detection instruction triggered by a vehicle diagnosis detection system; the detection instruction carries communication parameters of the target ECU simulation system.
S202: and judging whether the communication parameters of the target ECU simulation system in the detection instruction are consistent with the stored communication parameters of the target ECU simulation system.
S203: and if so, acquiring simulation data corresponding to the detection instruction in the target ECU simulation system sent by the simulation platform.
S204: and sending the simulation data to the vehicle diagnosis and detection system so that the vehicle diagnosis and detection system displays the detection result according to the simulation data.
Wherein, the ECU analog device is connected with the analog platform, such as through UART communication. In a possible embodiment, since the method CAN support different CAN networks, the ECU simulation device obtains the simulation data in different ways for the simulation data under different CAN networks, including but not limited to, the first CAN network data for a non-CAN bus network (such as a power CAN network and a vehicle body CAN network), and in response to the detection instruction, queries the first CAN network data of a target ECU simulation system pre-stored locally, and responds to the ECU simulation device, so that the ECU simulation device obtains the simulation data; and the other is second CAN network data aiming at the CAN bus network, and the simulation platform broadcasts the second CAN network data to the ECU simulation device in a circulating way, so that the ECU simulation device obtains simulation output data.
Specifically, the ECU simulation device receives a detection instruction triggered by the vehicle diagnosis detection system, and judges whether the communication parameters of the target ECU simulation system in the detection instruction are consistent with the stored communication parameters of the target ECU simulation system. If so, acquiring the simulation data corresponding to the detection instruction sent by the simulation platform, and sending the simulation data to the vehicle diagnosis equipment so as to respond the simulation data to the vehicle diagnosis detection system through the vehicle diagnosis equipment, so that the vehicle diagnosis detection system analyzes the simulation data, and displays the detection result so as to simultaneously support the forwarding and receiving of the simulation data under different CAN networks.
In one embodiment, as shown in fig. 4, the communication parameters include a CANID; step S203 specifically includes the following steps:
s301: and issuing the detection instruction to the simulation platform so that the simulation platform determines the target ECU simulation system and the simulation data corresponding to the detection instruction in the target ECU simulation system according to the CANID.
S302: and acquiring simulation data corresponding to the detection instruction responded by the simulation platform.
In one embodiment, referring to fig. 4 and 5, when the CAN network is the first CAN network (i.e., the power CAN network or the vehicle body CAN network), the detection instruction is sent to the simulation platform in a CAN request frame manner, so that the simulation platform determines the target ECU simulation system and the simulation data (i.e., the first CAN network data) corresponding to the detection instruction in the target ECU simulation system according to the CAN id, and finally, the simulation data is forwarded to the vehicle diagnosis and detection system in a CAN response frame manner through the power CAN network or the vehicle body CAN network. The data structure of the CAN request frame is shown in fig. 8, which takes the CAN request frame structure under the first CAN network as an example, and the description information of the data structure of the request frame (Req frame in the figure) or the response frame (Ans frame in the figure) is as follows:
a, representing effective byte length
And b, representing a request CANID (or a response CANID), wherein the request CANID is a request CANID corresponding to a target ECU simulation system which is configured in advance, and the response CANID is a response ID corresponding to the target ECU simulation system which is configured in advance, and is used for uniquely identifying the target ECU simulation system, so that only a detection instruction corresponding to the request CANID is processed in the detection process.
c, representing valid byte data
d, indicating a detection command (or clear fault code command)
e, representing reserved bits
In an embodiment, as shown in fig. 4, the communication parameter includes a CAN bus ID, and step S203 specifically includes S401: and acquiring simulation data corresponding to the detection instruction in a target ECU simulation system corresponding to the CAN bus ID broadcasted by the simulation platform.
Referring to fig. 4, in the embodiment, since the second CAN network data corresponding to the second CAN network (i.e., the CAN bus network) is broadcast to the ECU simulation apparatus by the simulation platform in a circulating manner, for the second CAN network data, the ECU simulation apparatus may directly acquire the second CAN network data and forward the second CAN network data to the vehicle diagnosis device through the second CAN network corresponding to the target ECU simulation system.
The second CAN network data is broadcast to the ECU simulation apparatus by the simulation platform in a CAN response frame mode according to the configured communication parameters, the specific data structure of the CAN response frame is shown in fig. 10, the meaning of each field is as in steps S201-S204, and details are not repeated here to avoid repetition.
It should be noted that step S501 may be executed before step S201 or after step S201, and is not limited herein. Here, the description will be made taking an example that step S501 can be executed after step S201.
In an embodiment, referring to fig. 4 and 6, when the CAN network is a first CAN network (i.e., a power CAN network or a vehicle body CAN network), after receiving a detection instruction forwarded by the vehicle diagnosis device, the ECU simulation apparatus performs step S202, if the matching is successful, the ECU simulation apparatus receives second CAN network data broadcasted by the simulation platform and forwards the second CAN network data to the vehicle diagnosis device, and the vehicle diagnosis device filters the CAN bus ID of the response frame, i.e., determines whether the CAN bus ID carried in the received CAN frame is the CAN bus ID corresponding to the target ECU system, and if so, receives the second CAN network data and replies to the vehicle diagnosis detection system.
In one embodiment, an ECU simulation detection method is provided, which is applied to a simulation platform in an ECU simulation device, where the ECU simulation device includes an ECU simulation apparatus and a simulation platform, and the method includes:
s501: and receiving a detection command sent by the ECU simulation device.
S502: judging whether the communication parameters of the target ECU simulation system in the detection instruction are consistent with the stored communication parameters of the target ECU simulation system; and if so, sending simulation data corresponding to the detection instruction in the target ECU simulation system to the ECU simulation device.
The simulation platform is provided with simulation data and communication parameters corresponding to an ECU simulation system under a multi-channel CAN network. The CAN networks include, but are not limited to, a first CAN network and a second CAN network. The first CAN network includes but is not limited to a power CAN network, a body CAN network; the second CAN network includes, but is not limited to, a CAN bus network. The simulation data comprises first CAN network data or second CAN network data, and the first CAN network data is CAN network data corresponding to the first CAN network. The second CAN network data is CAN network data corresponding to the second CAN network.
In an embodiment, for the first CAN network data, after receiving the detection instruction, the ECU simulation apparatus sends the detection instruction to the simulation platform in a CAN request frame (as shown in example fig. 8), the simulation platform searches for corresponding simulation data in the file configured by the local vehicle model data in response to the detection instruction, and if the matching is successful, the ECU simulation apparatus responds to the corresponding simulation data in a CAN response frame (as shown in example fig. 8).
In another embodiment, for the second CAN network data, after the ECU simulation apparatus receives the detection instruction, the simulation platform broadcasts the second CAN network data to the ECU simulation apparatus in a CAN response frame (as shown in fig. 9 as an example).
Further, as shown in fig. 7, before receiving the detection instruction, the simulation platform establishes a communication connection with the ECU simulation apparatus, and after establishing the connection, the simulation platform configures and issues communication parameters (including but not limited to a communication PIN, a baud rate, a request for a caid, and a response for a caid) of each ECU simulation system in the vehicle to be detected to the ECU simulation apparatus according to a predetermined communication protocol. And the ECU simulation device receives the communication parameters of each ECU, which are configured and issued by the simulation platform, and stores the relevant configuration information of each ECU simulation system in a classified manner.
In this embodiment, the configuration and the flash function of the ECU simulation system including one or more types of CAN networks (e.g., a power CAN network, a vehicle body CAN network, or a bus CAN network) CAN be simultaneously detected at one time through the communication parameter configuration of the simulation platform and the ECU simulation device.
Further, the simulation platform also supports a function of dynamically configuring simulation data, and the simulation data of each ECU simulation system can be dynamically configured according to actual needs, which is not limited herein.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
In one embodiment, an ECU simulation apparatus is provided, which corresponds one-to-one to the ECU simulation detection method in the above-described embodiments. As shown in fig. 10, the ECU simulation apparatus includes an instruction receiving module 10, a determination module 20, a simulation data acquisition module 30, and a data transmission module 40.
The functional modules are explained in detail as follows:
the instruction receiving module 10 is used for receiving a detection instruction triggered by a vehicle diagnosis detection system; the detection instruction carries communication parameters of a target ECU simulation system;
the judging module 20 is configured to judge whether the communication parameter of the target ECU simulation system in the detection instruction is consistent with the stored communication parameter of the target ECU simulation system;
and if so, the simulation data acquisition module 30 is configured to acquire the simulation data corresponding to the detection instruction sent by the simulation platform.
And the data sending module 40 is configured to send the analog data to the vehicle diagnosis and detection system, so that the vehicle diagnosis and detection system displays a detection result according to the analog data.
Further, the analog data obtaining module 30 includes a detection instruction issuing unit 311 and a first obtaining list 312.
A detection instruction issuing unit 311, configured to issue the detection instruction to the simulation platform, so that the simulation platform determines, according to the caidd, a target ECU simulation system and simulation data corresponding to the detection instruction in the target ECU simulation system;
a first obtaining unit 312, configured to obtain simulation data corresponding to the detection instruction and responded by the simulation platform.
The analog data acquisition module 30 includes a second acquisition unit 321.
A second obtaining unit 321, configured to obtain analog data corresponding to the detection instruction in the target ECU simulation system corresponding to the CAN bus ID broadcast by the simulation platform.
For specific definition of the ECU simulation device, reference may be made to the definition of the ECU simulation detection method above, and details are not repeated here. The modules in the ECU simulation apparatus described above may be implemented in whole or in part by software, hardware, and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, an ECU simulation detection system is provided, which corresponds to the ECU simulation detection method in the above embodiments one to one. Referring to fig. 1, the system includes a vehicle diagnosis detection system, a vehicle diagnosis apparatus, and an ECU simulation apparatus including an ECU simulation device and a simulation platform; the vehicle diagnosis equipment is respectively connected with the vehicle diagnosis detection system and the ECU simulation device; the ECU simulation device is connected with the simulation platform;
the vehicle diagnosis equipment is used for receiving a detection instruction sent by the vehicle diagnosis detection system and forwarding the detection instruction to the ECU simulation device; the detection instruction is used for indicating a target ECU simulation system under at least one CAN network;
the ECU simulation equipment is used for receiving a detection instruction triggered by the vehicle diagnosis detection system; the detection instruction carries communication parameters of a target ECU simulation system; judging whether the communication parameters of the target ECU simulation system in the detection instruction are consistent with the stored communication parameters of the target ECU simulation system; if so, sending simulation data corresponding to the detection instruction in the target ECU simulation system to the vehicle diagnosis and detection system so that the vehicle diagnosis and detection system displays a detection result according to the simulation data;
the vehicle diagnosis equipment is also used for responding the simulation data to the vehicle diagnosis detection system so that the vehicle diagnosis detection system can analyze the simulation data and display the detection result;
the ECU simulation device is used for receiving a detection instruction triggered by the vehicle diagnosis detection system; the detection instruction carries communication parameters of a target ECU simulation system; judging whether the communication parameters of the target ECU simulation system in the detection instruction are consistent with the stored communication parameters of the target ECU simulation system; if yes, acquiring simulation data corresponding to the detection instruction in the target ECU simulation system sent by the simulation platform; sending the simulation data to the vehicle diagnosis and detection system so that the vehicle diagnosis and detection system displays a detection result according to the simulation data;
the simulation platform is used for receiving a detection instruction sent by the ECU simulation device, and the detection instruction carries communication parameters of a target ECU simulation system; judging whether the communication parameters of the target ECU simulation system in the detection instruction are consistent with the stored communication parameters of the target ECU simulation system; if yes, sending simulation data corresponding to the detection instruction in the target ECU simulation system to the ECU simulation device; or broadcasting the CAN bus data of each ECU analog system.
In one possible embodiment, the vehicle diagnosis device is connected with the vehicle diagnosis detection system through a USB interface; the vehicle diagnosis equipment is connected with the ECU simulation device through an OBD interface. The ECU simulation device and the simulation platform communicate through UART.
In one embodiment, an electronic device is provided, which may be a server, and the internal structure thereof may be as shown in fig. 11. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the electronic device is configured to provide computing and control capabilities. The memory of the computer device comprises a computer storage medium and an internal memory. The computer storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the computer storage media. The database of the computer device is used for storing data generated or acquired during execution of the ECU simulation test method. The network interface of the electronic device is used for connecting and communicating with an external terminal through a network. The computer program is executed by a processor to implement an ECU simulation detection method.
In one embodiment, an electronic device is provided, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the computer program, the steps of the ECU simulation detection method in the above-described embodiments are implemented, for example, steps S201 to S203 shown in fig. 2, or steps shown in fig. 3 to 6, or steps shown in fig. 7. Alternatively, the processor implements the functions of each module/unit in the embodiment of the ECU simulation apparatus when executing the computer program, for example, the functions of each module/unit shown in fig. 10, and are not described herein again for avoiding repetition.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware related to instructions of a computer program, and the computer program can be stored in a computer readable storage medium, and when executed, the computer program can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules, so as to perform all or part of the functions described above.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (10)

1. An ECU simulation detection method is characterized by being applied to ECU simulation equipment; the ECU simulation equipment stores communication parameters and simulation data of each ECU simulation system under at least two CAN networks; the method comprises the following steps:
receiving a detection instruction triggered by a vehicle diagnosis detection system; the detection instruction carries communication parameters of a target ECU simulation system;
judging whether the communication parameters of the target ECU simulation system in the detection instruction are consistent with the stored communication parameters of the target ECU simulation system;
if yes, sending simulation data corresponding to the detection instruction in the target ECU simulation system to the vehicle diagnosis and detection system, so that the vehicle diagnosis and detection system displays a detection result according to the simulation data.
2. The ECU analog detection method of claim 1, wherein the at least two CAN networks include a power CAN network, a body CAN network, and a CAN bus network.
3. The ECU simulation test method as set forth in claim 1, wherein said communication parameters include a communication PIN, a communication baud rate, a CAN ID or a CAN bus ID.
4. The ECU simulation detection method according to claim 3, the transmitting simulation data corresponding to the detection instruction in the target ECU simulation system to the vehicle diagnosis detection system, includes: determining the target ECU simulation system according to the CANID or the CAN bus ID;
and sending the simulation data corresponding to the detection instruction in the target ECU simulation system to the vehicle diagnosis and detection system.
5. An ECU simulation detection method is applied to an ECU simulation device in ECU simulation equipment, the ECU simulation equipment comprises the ECU simulation device and a simulation platform, the ECU simulation device stores communication parameters of each ECU simulation system under at least two CAN networks, and the simulation platform stores the communication parameters and simulation data of each ECU simulation system under at least two CAN networks, the method comprises the following steps:
receiving a detection instruction triggered by a vehicle diagnosis detection system; the detection instruction carries communication parameters of a target ECU simulation system;
judging whether the communication parameters of the target ECU simulation system in the detection instruction are consistent with the stored communication parameters of the target ECU simulation system;
if yes, acquiring simulation data corresponding to the detection instruction in the target ECU simulation system sent by the simulation platform;
and sending the simulation data to the vehicle diagnosis and detection system so that the vehicle diagnosis and detection system displays a detection result according to the simulation data.
6. The ECU simulation detection method according to claim 5, wherein the communication parameter includes a caidd, and the acquiring of the simulation data corresponding to the detection instruction in the target ECU simulation system sent by the simulation platform includes:
sending the detection instruction to the simulation platform so that the simulation platform determines a target ECU simulation system and simulation data corresponding to the detection instruction in the target ECU simulation system according to the CANID;
and acquiring simulation data corresponding to the detection instruction and responded by the simulation platform.
7. The ECU simulation detection method of claim 5, wherein the communication parameters include CAN bus ID; the acquiring of the simulation data corresponding to the detection instruction in the target ECU simulation system sent by the simulation platform includes:
and acquiring simulation data corresponding to the detection instruction in a target ECU simulation system corresponding to the CAN bus ID broadcasted by the simulation platform.
8. The ECU simulation detection method is characterized by being applied to a simulation platform in ECU simulation equipment, wherein the ECU simulation equipment comprises the ECU simulation device and the simulation platform; the simulation platform stores communication parameters and simulation data of each ECU simulation system under at least two CAN networks, and the method comprises the following steps:
receiving a detection instruction sent by the ECU simulation device, wherein the detection instruction carries communication parameters of a target ECU simulation system;
judging whether the communication parameters of the target ECU simulation system in the detection instruction are consistent with the stored communication parameters of the target ECU simulation system; if yes, sending simulation data corresponding to the detection instruction in the target ECU simulation system to the ECU simulation device;
or broadcasting the CAN bus data of each ECU analog system.
9. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the steps of the ECU simulation detection method according to any one of claims 1 to 4; or the processor, when executing the computer program, implementing the steps of the ECU simulation detection method according to any one of claims 5-7; alternatively, the processor implements the steps of the ECU simulation detection method as claimed in claim 8 when executing the computer program.
10. A computer storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of the ECU simulation detection method according to any one of claims 1 to 4; or, the computer program when executed by a processor implements the steps of the ECU simulation detection method of any one of claims 5 to 7; alternatively, the computer program realizes the steps of the ECU simulation detection method as claimed in claim 8 when executed by a processor.
CN202111633733.5A 2021-12-28 2021-12-28 ECU simulation detection method, electronic device and storage medium Pending CN114326672A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111633733.5A CN114326672A (en) 2021-12-28 2021-12-28 ECU simulation detection method, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111633733.5A CN114326672A (en) 2021-12-28 2021-12-28 ECU simulation detection method, electronic device and storage medium

Publications (1)

Publication Number Publication Date
CN114326672A true CN114326672A (en) 2022-04-12

Family

ID=81017000

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111633733.5A Pending CN114326672A (en) 2021-12-28 2021-12-28 ECU simulation detection method, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN114326672A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115643124A (en) * 2022-06-23 2023-01-24 南京轶诺科技有限公司 PC simulation automobile CAN bus communication system
CN116224201A (en) * 2023-05-09 2023-06-06 苏州清研精准汽车科技有限公司 Diagnosis test method and device for battery pack offline detection equipment and diagnosis equipment
CN117744389A (en) * 2023-12-25 2024-03-22 广州虹科电子科技有限公司 ECU simulation method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115643124A (en) * 2022-06-23 2023-01-24 南京轶诺科技有限公司 PC simulation automobile CAN bus communication system
CN116224201A (en) * 2023-05-09 2023-06-06 苏州清研精准汽车科技有限公司 Diagnosis test method and device for battery pack offline detection equipment and diagnosis equipment
CN116224201B (en) * 2023-05-09 2023-08-04 苏州清研精准汽车科技有限公司 Diagnosis test method and device for battery pack offline detection equipment and diagnosis equipment
CN117744389A (en) * 2023-12-25 2024-03-22 广州虹科电子科技有限公司 ECU simulation method

Similar Documents

Publication Publication Date Title
CN114326672A (en) ECU simulation detection method, electronic device and storage medium
CN109164783B (en) Vehicle diagnosis method, apparatus, device, and medium
CN111371638B (en) Intelligent equipment testing method and device, server and storage medium
CN108803580B (en) Method for matching vehicle CAN protocol and related equipment
CN112286171B (en) Remote diagnosis method, device, vehicle and storage medium
EP3761605B1 (en) Vehicle diagnosis method, related device and system
CN113608518B (en) Data generation method, device, terminal equipment and medium
CN113406946B (en) Automobile diagnosis method and device and automobile diagnosis equipment
CN113468070A (en) Consistency test method for vehicle-mounted Ethernet
CN111527389A (en) Vehicle diagnosis method, vehicle diagnosis device and storage medium
CN113433923A (en) Vehicle remote diagnosis method, system, readable storage medium and device
CN113965904B (en) Device registration method, device and storage medium
CN113485920B (en) Method and device for realizing DoIP entity, readable storage medium and electronic equipment
CN117640720A (en) Remote diagnosis channel creation method, vehicle connector and remote diagnosis system
CN115118577B (en) Remote upgrade abnormality cause determination method, device, electronic equipment and storage medium
CN115225481B (en) Gateway diagnosis route configuration method and device, vehicle-mounted gateway, vehicle and medium
CN113934198A (en) Vehicle diagnosis method, vehicle diagnosis device, electronic device, and storage medium
CN112199389A (en) Automobile system scanning method and device, automobile diagnosis equipment and storage medium
CN114328229A (en) Over-the-air technology test system
CN116224976B (en) Test method and device
CN117640614A (en) Remote diagnosis method, communication equipment and system
CN114167834A (en) Vehicle diagnosis method, device, server and computer storage medium
CN117168838A (en) Vehicle signal processing method, device, terminal equipment and storage medium
CN117527869A (en) Remote diagnosis method and system
CN114839954A (en) Method, device and system for vehicle remote diagnosis

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