WO2024037304A1 - Vehicle diagnosis communication method and apparatus, and device, medium and program product - Google Patents

Vehicle diagnosis communication method and apparatus, and device, medium and program product Download PDF

Info

Publication number
WO2024037304A1
WO2024037304A1 PCT/CN2023/109481 CN2023109481W WO2024037304A1 WO 2024037304 A1 WO2024037304 A1 WO 2024037304A1 CN 2023109481 W CN2023109481 W CN 2023109481W WO 2024037304 A1 WO2024037304 A1 WO 2024037304A1
Authority
WO
WIPO (PCT)
Prior art keywords
diagnosis
message
computing unit
diagnostic
request
Prior art date
Application number
PCT/CN2023/109481
Other languages
French (fr)
Chinese (zh)
Inventor
杨东耳
Original Assignee
北京经纬恒润科技股份有限公司
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 北京经纬恒润科技股份有限公司 filed Critical 北京经纬恒润科技股份有限公司
Publication of WO2024037304A1 publication Critical patent/WO2024037304A1/en

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B23/00Testing or monitoring of control systems or parts thereof
    • G05B23/02Electric testing or monitoring
    • G05B23/0205Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults
    • G05B23/0208Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults characterized by the configuration of the monitoring system
    • G05B23/0213Modular or universal configuration of the monitoring system, e.g. monitoring system having modules that may be combined to build monitoring program; monitoring system that can be applied to legacy systems; adaptable monitoring system; using different communication protocols
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/24Pc safety
    • G05B2219/24065Real time diagnostics

Definitions

  • This application belongs to the field of vehicle technology, and specifically relates to a vehicle diagnostic communication method, device, equipment, media and program products.
  • domain controllers have become an important part of vehicle electronic products.
  • a control unit and a computing unit are integrated.
  • the control unit and the computing unit usually also need to communicate with each other.
  • the domain controller communicates with other devices in the vehicle network. Domain controllers are also required for diagnostic communications.
  • inventions of the present application provide a vehicle diagnostic communication method, which is applied to a control unit in a domain controller of a vehicle.
  • the vehicle diagnostic communication method includes:
  • diagnosis object In response to the diagnosis request, determine the diagnosis object based on the request content in the diagnosis request, where the diagnosis object includes the target component required to be diagnosed or accessed by the diagnosis request,
  • a response message of the diagnosis request is returned to the diagnosis initiating device.
  • inventions of the present application provide a vehicle diagnostic communication device, which is applied to a control unit in a domain controller of a vehicle.
  • the vehicle diagnostic communication device includes:
  • a receiving unit configured to receive a diagnosis request sent by the diagnosis initiating device
  • a determination unit configured to respond to the diagnosis request and determine the diagnosis object based on the request content in the diagnosis request, wherein the diagnosis object includes the target component required to be diagnosed or accessed by the diagnosis request,
  • the sending unit is configured to return a response message of the diagnosis request to the diagnosis initiating device according to the diagnosis situation of the diagnosis object.
  • the present application provides a chip, which includes a control unit configured to execute the vehicle diagnostic communication method as described in the first aspect.
  • inventions of the present application provide an electronic device.
  • the electronic device includes: a processor and a memory storing computer program instructions.
  • the processor executes the computer program instructions, the vehicle diagnostic communication method of the first aspect is implemented:
  • embodiments of the present application provide a computer storage medium.
  • Computer program instructions are stored on the computer-readable storage medium.
  • the vehicle diagnostic communication method of the first aspect is implemented.
  • inventions of the present application provide a chip.
  • the chip includes a processor and a communication interface.
  • the communication interface is coupled to the processor.
  • the processor is used to run programs or instructions to implement the vehicle diagnostic communication method of the first aspect.
  • embodiments of the present application provide a computer program product, the program product is stored in a storage medium, and the program product is executed by at least one processor to implement the vehicle diagnostic communication method as in the first aspect.
  • Figure 1 shows an example diagram of a vehicle network architecture using a domain controller.
  • Figure 2 shows an example flow diagram of diagnostic communication of a domain controller in the related art.
  • Figure 3 shows an example diagram of the software architecture for diagnostic communication between the control unit and the computing unit in the domain controller in the related art.
  • FIG. 4 shows a schematic flowchart 1 of the vehicle diagnostic communication method provided by the embodiment of the present application.
  • FIG. 5 shows a schematic flowchart 2 of the vehicle diagnostic communication method provided by the embodiment of the present application.
  • Figure 6 shows a schematic flowchart three of the vehicle diagnostic communication method provided by the embodiment of the present application.
  • Figure 7 shows a schematic flow chart of diagnostic communication when the diagnostic object is a domain controller, the domain controller is in a diagnostic state, and the diagnostic communication is used to instruct the domain controller to upgrade,
  • Figure 8 shows a schematic flow chart of diagnostic communication when the diagnostic object is a domain controller, the domain controller is in a diagnostic state, and the diagnostic communication is used to instruct the domain controller to upgrade,
  • FIG. 9 shows a schematic flowchart 4 of the vehicle diagnostic communication method provided by the embodiment of the present application.
  • Figure 10 shows a schematic diagram of the software architecture for diagnostic communication between the control unit and the computing unit in the domain controller provided by the embodiment of the present application.
  • Figure 11 shows a schematic structural diagram of a vehicle diagnostic communication device provided by an embodiment of the present application.
  • Figure 12 shows the second structural schematic diagram of the vehicle diagnostic communication device provided by the embodiment of the present application.
  • Figure 13 shows a schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present application.
  • Diagnostic communication The process in which the diagnostic instrument communicates with the vehicle based on the communication protocol used for vehicle diagnosis to provide diagnostic services to the vehicle.
  • the communication protocol used for vehicle diagnosis is such as Unified Diagnostic Services (UDS).
  • the maintenance personnel can connect the diagnostic instrument to the OBD (On-Board Diagnostic) port on the vehicle, and the diagnostic instrument sends a diagnostic request to the domain controller of the vehicle through the OBD port to request to read the interior of the vehicle.
  • OBD On-Board Diagnostic
  • Some information such as requesting some sensor data, application running logs, etc.
  • Domain controller Divide various electronic functions on the vehicle into several areas, and the domain controller is responsible for realizing the functions in the corresponding areas.
  • the control unit can be called a microcontroller unit (MCU)
  • the computing unit can be called a microprocessor unit (MPU).
  • the external diagnostic instrument sends the diagnosis request to the computing unit in the domain controller.
  • the computing unit acts as a collaborator for diagnostic communication between the domain controller and the external diagnostic instrument through the Internet Diagnostic Communication Protocol (Diagnostic communication over Internet Protocol).
  • DoIp for short
  • the control unit sends the response content to the computing unit through DoIP, and then the computing unit forwards the response content to the external diagnostic instrument.
  • Embodiments of the present application provide a vehicle diagnostic communication method, device, equipment, media and program products, which can solve the problem of low efficiency of vehicle diagnostic communication.
  • the control unit in the domain controller serves as the route of the diagnostic communication (that is, as the coordinator of the diagnostic communication) and can directly receive the diagnostic request from the diagnostic initiating device without domain control.
  • the computing unit in the processor forwards the diagnostic request to the control unit; after confirming After determining the diagnosis object, the control unit can also directly return the response message of the diagnosis request to the diagnosis initiating device based on the diagnosis status of the diagnosis object, without the need for the computing unit to forward the response message of the diagnosis request to the diagnosis initiating device. In this way, the number of message forwardings during the diagnostic communication process is reduced, the communication delay of the diagnostic communication is reduced, and the efficiency of the diagnostic communication is improved.
  • Figure 1 shows an example diagram of a vehicle network architecture using a domain controller.
  • the vehicle network architecture may include one or more domain controllers, such as domain controller 1, domain controller 2, ..., domain controller n in Figure 1, where n represents The number of domain controllers.
  • each domain controller can communicate with each other through the Ethernet in the car.
  • Each domain controller can connect multiple electronic control units (Electronic Control Unit, ECU).
  • ECU Electronic Control Unit
  • domain controller 1 is connected to ECU11 ⁇ ECU1N1, ECU21 ⁇ ECU2N2
  • domain controller 2 is connected to ECU31 ⁇ ECU3N3, ECU41 ⁇ ECU4N4
  • domain controller n is connected to ECU51 ⁇ ECU5N5, ECU61 ⁇ ECU6N6.
  • N1 ⁇ N6 all represent the number of ECUs.
  • the domain controller can also assume the function of the gateway.
  • domain controller 1 (can be another domain controller, Figure 1 takes domain controller 1 as an example) is connected to the OBD port through Ethernet (industrial grade Ethernet) and controller area network (Controller Area Network, CAN) , to communicate with an external diagnostic tool.
  • Domain controller 1 (can be other domain controllers, Figure 1 takes domain controller 1 as an example) can connect to multiple electronic control units (Electronic Control Units, ECUs), and can also connect through in-car Ethernet (car-grade Ethernet ) is connected to ECU7 with networking function.
  • ECU7 with networking function can also have a diagnostic instrument function and can send diagnostic communication requests to the domain controller through the in-vehicle Ethernet.
  • FIG. 2 shows an example flow chart of diagnostic communication of a domain controller in the related art.
  • the diagnostic communication process includes the following steps S201 to S204:
  • the external diagnostic instrument 10 sends a diagnosis request to the computing unit 20 in the domain controller.
  • the computing unit 20 forwards the diagnosis request to Control unit 30 in the domain controller.
  • step S205 when the diagnostic request is executed by other ECUs in the vehicle network, the diagnostic communication process is as follows: step S205:
  • the external diagnostic instrument 10 sends a diagnosis request to the computing unit 20 in the domain controller.
  • the computing unit 20 After receiving the diagnosis request, the computing unit 20 forwards the diagnosis request to the control unit 30 in the domain controller through DoIP based on the in-vehicle Ethernet.
  • control unit 30 receives the response message returned from the other ECU 40.
  • control unit 30 responds to the response message from other ECUs 40 and returns the response message to the computing unit 20 through DoIP.
  • the computing unit 20 in the domain controller is the collaborator between the domain controller and the external diagnostic instrument 10 .
  • FIG. 3 shows an example software architecture diagram for diagnostic communication between the control unit 30 and the computing unit 20 in the domain controller in the related art.
  • the external diagnostic instrument 10 communicates with the computing unit 20 through the switch (SWITCH) 50
  • the computing unit 20 and the control unit 30 also communicate through the switch 50
  • the computing unit 20 communicates with other ECUs 40 through CAN.
  • the external diagnostic instrument 10 sends the diagnostic request to the computing unit 20 through the switch 50.
  • the diagnostic request passes through multiple protocol layers 21 and enters the DoIP server 22.
  • the DoIP server 22 enters the DoIP client 23, and then the DoIP client 23 passes the diagnosis request to the protocol layer 21.
  • the diagnosis request is Among the multiple protocol layers 31 sent to the control unit 30 , the control unit 30 may route the diagnostic request in the routing module 32 , in the case where the diagnostic request is executed by the control unit 30 itself, such as by FIG.
  • the single-chip computer (Dcm) 33 in 3 can also send diagnostic requests to other ECUs 40 through the CAN communication link 34.
  • the response message of the diagnosis request may be transmitted from the control unit 20 to the computing unit 30 and then to the external diagnostic instrument 50 based on the transmission path of the diagnosis request.
  • Both the computing unit and the control unit in the domain controller need to implement the software functions of the DoIP-based diagnostic server and diagnostic client (for the external diagnostic instrument, the computing unit is the diagnostic server, and for the control unit, the computing unit The unit is a diagnostic client, for the computing unit, the control unit is a diagnostic server, for other ECUs, the control unit is a diagnostic client), the overall software complexity is high, resulting in long software development time and high development costs. .
  • embodiments of the present application provide a vehicle diagnostic communication method, device, equipment, medium and program product.
  • the diagnostic operations for the domain controller are mostly controlled and executed by the control unit in the domain controller.
  • the control unit in the domain controller is responsible for the communication between the diagnostic initiating device and the domain controller.
  • the computing unit in the domain controller forward information, which reduces the number of information forwardings, reduces communication delays, improves communication efficiency, and helps save communication resources.
  • the computing unit since the computing unit no longer needs to undertake the information forwarding work in diagnostic communication, the computing unit does not need to implement the software functions of the diagnostic server and the diagnostic client, and the control unit does not need to implement the software functions of the diagnostic client, thus reducing the burden on the computing unit and the control unit.
  • Software complexity associated with diagnostic communications since the computing unit no longer needs to undertake the information forwarding work in diagnostic communication, the computing unit does not need to implement the software functions of the diagnostic server and the diagnostic client, and the control unit does not need to implement the software functions of the diagnostic client, thus reducing the burden on the computing unit and the control unit.
  • Software complexity associated with diagnostic communications since the computing unit no longer needs to undertake the information forwarding work in diagnostic communication, the computing unit does not need to implement the software functions of the diagnostic server and the diagnostic client, and the control unit does not need to implement the software functions of the diagnostic client, thus reducing the burden on the computing unit and the control unit. Software complexity associated with diagnostic communications.
  • FIG 4 shows a schematic flowchart 1 of the vehicle diagnostic communication method provided by the embodiment of the present application.
  • the vehicle diagnostic communication method includes:
  • the control unit 30 in the domain controller receives the diagnosis request sent by the diagnosis initiating device 10.
  • the diagnosis initiating device 10 is a device that initiates a diagnosis request (which can also be understood as generating a diagnosis request).
  • the diagnosis request is used to request the domain controller to perform diagnostic communication.
  • the diagnosis initiating device 10 requests diagnosis of the vehicle by sending a diagnosis request to the control unit 30 in the domain controller.
  • control unit 30 directly receives the diagnosis request sent by the diagnosis initiating device 10 without receiving the diagnosis request forwarded by the computing unit in the domain controller.
  • the diagnosis initiating device 10 may include at least one of the following: an external device, an ECU with networking capabilities in the vehicle, or a computing unit in a domain controller. Therefore, the diagnosis request can be sent to the control unit 30 in the domain controller through the flexible and diverse diagnosis initiating device 10 .
  • diagnosis initiating device 10 is an external device
  • the external device can connect to the vehicle through a diagnostic communication port (such as an OBD port).
  • a diagnostic communication port such as an OBD port
  • a possible implementation of S401 includes: the control unit 30 in the domain controller receives data through the diagnostic communication port. A diagnosis request sent by the diagnosis initiating device 10.
  • the diagnosis initiating device 10 is an ECU with a networking function in a domain controller
  • the ECU with the networking function can generate a diagnosis request in response to an instruction from a third-party device to perform vehicle diagnostic communication through the network.
  • Another possibility in S401 The implementation method includes: the control unit 30 in the domain controller receives the diagnostic request sent by the ECU with the networking function through the in-vehicle Ethernet or CAN.
  • the computing unit has a diagnostic function, so the computing unit itself can generate diagnostic requests regularly, or the computing unit can perform vehicle diagnostic communication in response to instructions from a third-party device through the network. Instructions to generate diagnostic requests. Afterwards, the computing unit, as the diagnosis initiating device 10, sends a diagnosis request to the control unit 30.
  • S401 includes: the control unit 30 receives the diagnosis request generated and sent by the computing unit.
  • control unit 30 determines the diagnosis object based on the request content in the diagnosis request.
  • the diagnosis object refers to the target component required to be diagnosed or accessed by the diagnosis request.
  • the control unit 30 can obtain the target address of the diagnosis request from the request content in the diagnosis request, and determine the diagnosis object targeted by the diagnosis request based on the target address of the diagnosis request.
  • the target address of the diagnosis request includes the storage address and/or component identification where the data requested for the diagnosis request is located.
  • the control unit 30 returns a response message of the diagnosis request to the diagnosis initiating device 10 according to the diagnosis status of the diagnosis object.
  • the control unit 30 may execute the diagnosis request by the diagnosis object.
  • the control unit 30 can directly obtain the diagnosis status of the diagnosis object.
  • the control unit 30 can listen to the diagnosis request of the diagnosis object. situation, that is, monitoring the diagnosis situation of the diagnosis object, and then the control unit 30 may return a response message of the diagnosis request to the diagnosis initiating device 10 based on the diagnosis situation of the diagnosis object.
  • the response message may include diagnostic data requested by the diagnosis request, such as sensor data, running logs, etc. requested by the diagnosis request.
  • the response message may also be a timer message to inform the diagnosis initiating device 10 to wait for a further period of time.
  • the control unit 30 directly receives the diagnosis request from the diagnosis initiating device 10, determines the diagnosis object based on the request content in the diagnosis request, and returns a response message of the diagnosis request to the diagnosis initiating device 10 based on the diagnosis status of the diagnosis object. .
  • the control unit 30 in the domain controller acts as a route in the diagnostic communication process, without the need for the computing unit in the domain controller to be responsible for message forwarding in the diagnostic communication. It effectively reduces the number of message forwardings in the diagnostic communication process, reduces communication delays, improves communication efficiency, solves the problem of communication resources, and also reduces the software complexity related to diagnostic communication on the computing unit and control unit.
  • the domain controller also includes a shared memory between the computing unit and the control unit, and the communication method between the computing unit and the control unit is inter-core communication based on the shared memory between the computing unit and the control unit ( Core to Core Communication, C2CC).
  • C2CC Core to Core Communication
  • the computing unit and the control unit can store the messages or data to be sent and received from each other in the shared memory, and the other party can read them in the shared memory.
  • control When the unit sends a message or data to the computing unit, the control unit writes the message or data into the shared memory.
  • the computing unit reads the message or data written by the control unit from the shared memory.
  • the computing unit sends a message or data to the control unit The computing unit writes messages or data into the shared memory, and the control unit reads the messages or data written by the computing unit from the shared memory.
  • inter-core communication does not occupy the bus bandwidth of the switch, control unit and computing unit, and does not need to deal with Ethernet receiving interruptions and sending interruptions, saving communication resources.
  • the control unit may receive the diagnosis request sent by the computing unit through inter-core communication. Therefore, when the computing unit initiates diagnostic communication, the efficiency of diagnostic communication is improved through inter-core communication and communication resources are saved.
  • the shared memory may also be provided in the computing unit and/or the control unit to implement inter-core communication through the shared memory located in the computing unit and/or the control unit.
  • the shared memory in the computing unit is communicatively connected with the shared memory in the control unit.
  • the diagnostic object may include a domain controller where the control unit is located and/or a CAN ECU that communicates with the control unit via CAN. Therefore, the control unit can not only execute diagnostic requests for the domain controller where the control unit is located, but also serve as a route between the diagnostic initiating device and the CAN ECU, forwarding the diagnostic request to the CAN ECU to achieve diagnosis of the CAN ECU.
  • diagnostic object is a domain controller with reference to Figures 5 to 8:
  • FIG. 5 shows a schematic flowchart 2 of the vehicle diagnostic communication method provided by the embodiment of the present application.
  • the vehicle diagnostic communication method includes:
  • the control unit 30 in the domain controller receives the diagnosis request sent by the diagnosis initiating device 10.
  • control unit 30 determines that the diagnosis object is the domain controller based on the request content in the diagnosis request.
  • the control unit 30 may obtain the request content from the diagnosis request, for example, the request content It is simply a request to obtain the sensing data of a certain sensor or the fault information of a certain component. After that, the control unit 30 can determine the diagnosis object based on the target address in the request content. In the case where the target address in the request content points to the domain controller where the control unit 30 is located, the control unit 30 may determine that the diagnostic object is the domain controller where the control unit 30 is located.
  • the control unit 30 performs the diagnosis operation corresponding to the diagnosis request.
  • the control unit 30 processes the diagnosis request as the domain controller, that is, the control unit 30 performs the diagnosis operation corresponding to the diagnosis request. For example, the control unit 30 obtains sensing data of sensors on the domain controller, fault information of components on the domain controller, running logs of software on the domain controller, etc.
  • the control unit 30 returns a response message of the diagnosis request to the diagnosis initiating device 10 according to the execution status of the diagnosis operation.
  • the control unit 30 executes the diagnostic operation corresponding to the diagnostic request and obtains the execution request of the diagnostic operation, where the execution status of the diagnostic operation may include At least one of the following: the diagnostic operation is not completed, the diagnostic operation is completed, or the diagnostic data obtained by performing the diagnostic operation (such as sensor data, fault information, etc.).
  • the control unit 30 After obtaining the execution status of the diagnostic operation, the control unit 30 returns a response message of the diagnostic request to the diagnosis initiating device 10 .
  • the response message carries the execution status of the diagnostic operation, so that the control unit 30 directly feeds back the status of the diagnostic operation to the diagnosis initiating device 10 .
  • the control unit 30 in the domain controller receives the diagnosis request sent by the diagnosis initiating device 10.
  • the control unit 30 performs the diagnosis operation corresponding to the diagnosis request. , and directly feeds back the execution status of the diagnostic operation to the diagnosis initiating device 10 .
  • the embodiment of the present application effectively reduces the number of message forwardings during the diagnosis communication process and reduces Communication delay improves communication efficiency.
  • the diagnostic request may be related to a computing unit in the domain controller. Therefore, in some embodiments, if the diagnostic request is related to If the computing unit is related, the control unit and the computing unit perform diagnostic operations through inter-core communication. Therefore, through inter-core communication between the control unit and the computing unit, the efficiency of diagnostic communication is improved and the communication resources occupied by diagnostic communication are reduced.
  • the functions of diagnostic communication can include the following two: for vehicle fault diagnosis and for vehicle data upgrade. Therefore, in this embodiment, the diagnostic request related to the computing unit in the domain controller may include at least one of the following situations: the diagnostic request is used to request to obtain data stored in the computing unit, and the data requested by the diagnostic request needs to go through the computing unit Computed, diagnostic requests are used to request domain controllers for upgrades. Wherein, the diagnostic request used to request the domain controller to upgrade may include requesting the control unit and/or the computing unit to upgrade.
  • the device status of the domain controller may include the following two types: diagnostic status and upgrade status.
  • diagnostic state the domain controller receives and stores upgrade data from the diagnostic initiating device.
  • upgrade state the domain controller performs upgrades based on the upgrade data from the diagnostic initiating device. Therefore, the control unit can take different operations by determining the device status of the domain controller, which will be described below through embodiments.
  • the control unit and computing unit in the domain controller are also in the diagnosis state.
  • the control unit and computing unit in the domain controller are also in the upgrade state.
  • FIG. 6 shows a schematic flowchart 3 of the vehicle diagnostic communication method provided by this embodiment of the present application. This method is applied to the control unit in the domain controller. In other words, the execution subject of the vehicle diagnostic communication method provided by this embodiment is the control unit. unit. As shown in Figure 6, the vehicle diagnostic communication method includes:
  • diagnosis object In response to the diagnosis request, determine that the diagnosis object is the domain controller based on the request content in the diagnosis request.
  • control unit can determine whether the diagnosis request belongs to an upgrade service request. Determine whether the diagnostic request instructs the domain controller to upgrade. If the control unit determines that the diagnostic request instructs the domain controller to upgrade, S604 is executed; otherwise, S606 is executed.
  • the control unit can determine whether the diagnostic request is a 0 ⁇ 11 request, a 0 ⁇ 34 request, a 0 ⁇ 36 request, a 0 ⁇ 37 request or a 0 ⁇ 38 request, and if so, determine the diagnostic request indication.
  • Domain controller to upgrade otherwise it was determined that the diagnostic request did not direct the domain controller to upgrade.
  • 0 ⁇ 11 request, 0 ⁇ 34 request, 0 ⁇ 36 request, 0 ⁇ 37 request or 0 ⁇ 38 request are upgrade service requests in UDS. Therefore, based on these types of upgrade service requests in UDS, the accuracy of determining whether a diagnostic request belongs to an upgrade service request is improved.
  • control unit determines whether the domain controller is in the diagnostic state. If the domain controller is in the diagnostic state, S605 is executed. Otherwise, S606 is executed.
  • the execution order of S603 and S604 can be to execute S603 first, or to execute S604 first, or to execute S603 and S604 at the same time, and there is no restriction here.
  • the domain controller can enter diagnostic state by default upon startup. In this way, after the domain controller is started, the diagnostic initiating device can upgrade the domain controller by sending a diagnostic request instructing the domain controller to upgrade.
  • S605. Send the first upgrade data from the diagnosis initiating device to the computing unit through inter-core communication to assist the computing unit in upgrading.
  • the first upgrade data may include upgrade data used for upgrading the control unit and/or upgrade data used for upgrading the computing unit.
  • the control unit is mainly responsible for control and the computing unit is mainly responsible for data processing
  • the storage capacity of the computing unit is stronger than that of the control unit. Therefore, in the domain controller, the upgrade data can be stored and processed by the computing unit.
  • the control unit when the control unit determines that the diagnosis request instructs the domain controller to perform an upgrade and the domain controller is in a diagnosis state, the control unit may receive the first upgrade data from the diagnosis initiating device, and then send the first upgrade data to the computing unit. , stored by the computing unit.
  • the first upgrade data contains upgrade data used for upgrading the computing unit
  • sending the first upgrade data to the computing unit is beneficial to Assist in upgrading computing units.
  • the control unit when the diagnostic request does not instruct the domain controller to upgrade, the control unit itself can perform the diagnostic operation corresponding to the diagnostic request, for example, obtain the sensing data of the sensor, and when the diagnostic request instructs the domain controller to upgrade
  • the control unit when the domain controller is in an upgrade state (that is, not in a diagnostic state), the control unit can perform an upgrade operation based on the first upgrade data stored in the computing unit.
  • the diagnostic request instructs the domain controller to upgrade and the domain controller
  • the controller when in the diagnostic state, after transmitting the first upgrade data to the computing unit, the controller can wait for the domain controller to enter the upgrade state, and after the domain controller enters the upgrade state, perform an upgrade operation based on the first upgrade data.
  • the control unit when the diagnostic object is a domain controller, the domain controller is in a diagnostic state, and the diagnostic request is used to instruct the domain controller to upgrade, the control unit sends the first upgrade data to the computing unit through inter-core communication. , thus, through the inter-core communication between the control unit and the computing unit, and using the control unit as the route in the upgrade process, diagnostic communication for upgrading the domain controller is realized, which improves the communication efficiency of diagnostic communication and saves communication resources. .
  • FIG. 7 shows a schematic flowchart of diagnostic communication when the diagnostic object is a domain controller, the domain controller is in a diagnostic state, and the diagnostic communication is used to instruct the domain controller to upgrade.
  • the diagnostic communication process may include:
  • the diagnosis initiating device 10 sends a diagnosis request to the control unit 30.
  • the diagnosis request is used to instruct the domain controller to upgrade.
  • the control unit 30 returns a diagnosis response to the diagnosis initiating device 10.
  • the diagnosis response is used to indicate to the diagnosis initiating device 10 that the control unit 30 has received the diagnosis request.
  • control unit 30 when the control unit 30 determines that the diagnosis object is a domain controller according to the diagnosis request and the diagnosis request is used to instruct the domain controller to upgrade, the control unit 30 may return the diagnosis to the diagnosis initiating device 10 Response to inform the diagnostic initiating device that the control unit has received the diagnostic request.
  • the diagnosis initiating device 10 sends a first message to the control unit 30 in response to the diagnosis response.
  • the first message is used to indicate the start of data transmission to the control unit 30.
  • the diagnosis initiating device 10 may send a first message to the control unit 30 in response to the diagnosis response.
  • the first message is used to inform the control unit 30 of the start of data transmission.
  • the first message may also be used to request the data transmission requirements of the control unit 30.
  • the data transmission requirements of the control unit 30 may include the format that the control unit 30 can receive and parse, and the control unit 30 performs data transmission through inter-core communication. The data transfer rate that the transmission can accept.
  • control unit 30 sends a second message to the computing unit 20.
  • the second message is used to indicate the start of data transmission to the computing unit 20.
  • the control unit 30 can send a second message to the computing unit 20 to inform the computing unit 20 of the data through the second message.
  • the transmission begins so that the computing unit 20 is ready to receive the data.
  • the second message can also be used to request the data transmission requirements of the computing unit 20.
  • the data transmission requirements of the computing unit 20 may include the format that the data that the computing unit 20 can receive and parse must meet, and the computing unit 20 performs data transmission through inter-core communication. The data transfer rate that the transmission can accept.
  • the computing unit 20 In response to the second message, the computing unit 20 returns a response message of the second message to the control unit 30.
  • the response message of the second message is used to indicate that the computing unit 30 has received the second message and to indicate the data transmission requirement of the computing unit 30.
  • control unit 30 In response to the response message of the second message returned by the computing unit 20, the control unit 30 sends a response message of the first message to the diagnosis initiating device 10.
  • the response message of the first message is used to indicate that the control unit 30 has received the first message and Indicates the data transmission requirements of the control unit 30.
  • the diagnosis initiating device 10 sends a third message to the control unit 30, where the third message carries the first upgrade data.
  • the diagnosis initiating device 10 can transmit the upgrade data, and therefore sends the third message to the control unit 30, carrying the First upgrade data.
  • the control unit 30 carrying the First upgrade data.
  • control unit 30 sends a fourth message to the computing unit 20, where the fourth message carries the first upgrade data.
  • control unit 30 can obtain the first upgrade file from the third message, generate a fourth message carrying the first upgrade data based on inter-core communication, and convert the fourth message to Sent to the computing unit through inter-core communication.
  • the computing unit 20 After receiving the fourth message, the computing unit 20 returns a response message to the fourth message to the control unit 30.
  • the response message to the fourth message is used to indicate to the control unit 30 that the first upgrade data transmission is completed.
  • control unit 30 In response to the response message of the fourth message returned by the computing unit 20, the control unit 30 sends a response message of the third message to the diagnosis initiating device 10.
  • the response message of the third message is used to indicate the first upgrade data to the diagnosis initiating device 10. Transfer completed.
  • the computing unit 20 may obtain the first upgrade data from the fourth message and store the first upgrade data. At the same time, the computing unit 20 may return a response message of the fourth message to the control unit 30 to indicate to the control unit 30 that the computing unit 20 has received the first upgrade data. In response to the response message of the fourth message, the control unit 30 returns the response message of the third message to the diagnosis initiating device 10 to indicate to the diagnosis initiating device 10 that the transmission of the first upgrade data between the diagnosis initiating device 10 and the domain controller has been completed. , that is, the first upgrade data transmission is successful.
  • the vehicle diagnosis communication method also includes: S711.
  • the diagnosis initiating device 10 sends a data verification message to the control unit 30 to request the domain controller to verify the received first The upgrade data is verified.
  • the control unit 30 sends a data verification message to the computing unit 20 to request the computing unit 20 to verify the first upgrade data.
  • the computing unit 20 responds to the data verification message sent by the control unit 30 and returns a data verification response to the control unit 30 to indicate the data verification result to the control unit 30.
  • the control unit 20 responds to the data verification response of the computing unit.
  • the data verification result may be data verification success or failure.
  • the diagnosis response, the response message of the first message, the response message of the third message, and the data verification response returned by the control unit 30 to the diagnosis initiating device 10 all belong to the response messages of the diagnosis request.
  • the control unit 30 in the domain controller is used as a route to send the diagnosis initiating device 10 through inter-core communication.
  • Messages indicating the start of data transmission, messages carrying upgrade data, and messages indicating data verification are forwarded to the computing unit 20, and messages indicating data transmission requirements, messages indicating data transmission completion, and instructions returned by the computing unit 20 are received through inter-core communication.
  • Messages of data verification results are forwarded to the diagnosis initiating device 10 .
  • the computing unit may send the second upgrade data to the computing unit through inter-core communication, and the control unit may 2. Upgrade data to upgrade.
  • the second upgrade data is upgrade data used for upgrading the control unit.
  • the computing unit when the first upgrade data contains the second upgrade data for the control unit upgrade, the computing unit can send the second upgrade data to the control unit through inter-core communication, and the control unit receives After the second upgrade data, the firmware or software in the control unit can be upgraded according to the second upgrade data.
  • the computing unit may upgrade the firmware or software in the computing unit according to the third upgrade data. In this way, the domain controller is upgraded.
  • the computing unit can also obtain upgrade data for domain controller upgrade through Over-the-Air Technology (OTA).
  • OTA Over-the-Air Technology
  • the computing unit may send the second upgrade data to the control unit through inter-core communication.
  • the domain controller enters the Upgrade status.
  • the upgrade triggering condition may include at least one of the following: the first upgrade data transmission from the diagnosis initiating device is completed, and/or the control unit receives a fifth message from the diagnosis initiating device, and the fifth message instructs the control unit to enter the upgrade state, The control unit receives a sixth message from the computing unit, and the sixth message instructs the control unit to enter an upgrade state.
  • the domain controller can enter the upgrade state when the first upgrade data transmission is completed, so as to perform the upgrade in time after the upgrade data transmission is completed, and/or the control unit can control the control after receiving the instruction from the diagnosis initiating device.
  • the control domain controller enters the upgrade state, so that the diagnosis initiating device can actively trigger the domain controller to enter the upgrade state, and/or, the control unit can receive an instruction from the computing unit to enter the upgrade state.
  • the domain controller is controlled to enter the upgrade state, so that the computing unit can also actively trigger the domain controller to enter the upgrade state.
  • the fifth message may be a restart message or a reset message.
  • the restart message instructs the domain controller to restart
  • the reset message instructs the domain controller to reset.
  • the control unit can control the domain controller to restart or reset.
  • the diagnosis initiating device may send a fifth message to the control unit after the first upgrade data transmission is completed, so that the domain controller can upgrade in time.
  • the computing unit can send a sixth message to the control unit, so that the domain controller can perform the upgrade in time after receiving the upgrade data, thereby improving domain performance through diagnostic communication. Upgrade efficiency of controller upgrades.
  • FIG. 8 shows a schematic flowchart of diagnostic communication when the diagnostic object is a domain controller, the domain controller is in a diagnostic state, and the diagnostic communication is used to instruct the domain controller to upgrade.
  • the diagnostic communication process may include:
  • the control unit 30 receives the fifth message sent by the diagnosis initiating device 10.
  • control unit 30 In response to the fifth message, the control unit 30 returns a response message of the fifth message to the diagnosis initiating device 10. The response message of the fifth message is used to indicate that the control unit 30 has received the fifth message.
  • control unit 30 sends the seventh message to the computing unit 20.
  • the seventh message The message is used to indicate that the computing unit 20 is ready to enter the upgrade state.
  • the computing unit 20 In response to the seventh message, the computing unit 20 returns a response message of the seventh message to the control unit 30.
  • the response message of the seventh message is used to indicate that the computing unit 20 has received the seventh message.
  • both the control unit 30 and the computing unit 20 enter the upgrade state, that is, the domain controller enters the upgrade state.
  • the computing unit 20 sends the eighth message to the control unit 30.
  • the eighth message is used to indicate the start of data transmission to the control unit 30.
  • the computing unit 20 can, when the stored upgrade data includes the second upgrade data for upgrading the control unit 30 , through the inter-core Communication, sending an eighth message to the control unit 30 to inform the control unit 30 of the start of data transmission, that is, preparation for transmission of upgrade data.
  • the eighth message may also be used to request data transmission requirements from the control unit 30 so that the computing unit 20 sends upgrade data to the control unit 30 according to the data transmission requirements.
  • the data transmission requirements may refer to the previous embodiments and will not be described again.
  • control unit 30 In response to the eighth message, the control unit 30 returns a response message of the eighth message to the computing unit 20, so as to inform the computing unit 20 of the data transmission requirement of the control unit 30.
  • control unit 30 may return a response message of the eighth message to the computing unit 20 through inter-core communication.
  • the response message of the eighth message carries the data transmission request of the control unit 30 .
  • the computing unit 20 sends a ninth message to the control unit 30, where the ninth message carries the second upgrade data.
  • the computing unit 20 can obtain the second upgrade data from the stored upgrade data (such as the first upgrade data), and generate the ninth message carrying the second upgrade data, And the ninth message is sent to the control unit 30 through inter-core communication.
  • the stored upgrade data such as the first upgrade data
  • control unit 30 sends a response message of the ninth message to the computing unit 20 to inform the computing unit 20 that the second upgrade data transmission is completed.
  • control unit 30 can upgrade according to the second upgrade data, and the computing unit 20 can upgrade according to the third upgrade data used for upgrading the computing unit 20 . In this way, the upgrade of the domain controller is completed.
  • the computing unit 20 may send a data verification message to the control unit 30 in response to the response message of the ninth message.
  • the control unit 30 responds to the data verification message. Verify message, verify the received second upgrade data, and send a data verification response to the computing unit 20 according to the verification result. Therefore, through data verification, the accuracy and reliability of upgrade data transmission between the computing unit 20 and the control unit 30 in the upgrade state are improved.
  • control unit 30 may send an upgrade status query message to the computing unit 20 to query whether the computing unit 20 has completed the upgrade.
  • the computing unit 20 may send a query message to the computing unit 20 according to its own upgrade status.
  • the control unit 30 returns the upgrade status response message to inform the control unit 30 whether the computing unit 20 completes the upgrade through the upgrade status response message.
  • the control unit 30 after receiving the upgrade status response message from the computing unit 20, if the control unit 30 determines that the upgrade of the computing unit 20 is completed according to the upgrade status response message, it may send a shutdown command to the computing unit 20 to indicate The computing unit 20 is shut down. After receiving the shutdown command, the computing unit 20 returns a shutdown response to the control unit 30 if it determines that shutdown is currently allowed. Therefore, after the upgrade is completed, the control unit 30 and the computing unit 20 are automatically shut down to ensure that the upgraded control unit 30 and the computing unit 20 can run according to the upgraded firmware and/or software after restarting.
  • the data structure used in the communication message includes a command data structure and a diagnostic data structure.
  • the command data structure includes at least one of the following fields: command field, response field, error feedback field, command data length field, command data address field
  • the diagnosis data structure includes at least one of the following fields: target node field, diagnosis data length field, diagnosis Data address field.
  • the command data structure can be used.
  • the diagnostic data structure can be used to Improve data transmission efficiency in inter-core communication.
  • the command field carries a command type value, and the command type value reflects the execution operation corresponding to the command message.
  • the command field carries When the command type value is 1, it means that the control unit instructs the computing unit to start. When the command type value carried in the command field is 2, it means that the control unit instructs the computing unit to reset.
  • the response field carries a response type value, and the response type value reflects the response message.
  • the error code field carries an error type value.
  • the error type value feeds back the error that occurred when the control unit or computing unit executed the execution operation in the command message.
  • Error 4)
  • the data address refers to the storage address of the relevant data in the command message or response message.
  • the command data address field carries the relevant data in the command message or response message. Storage address.
  • the target node field carries the identification of the target node.
  • the target node refers to the object conveyed by the message. For example, if the control unit sends the message to the computing unit, the computing unit is the target node.
  • the diagnostic data length field carries the data length of the storage address where the diagnostic data is located
  • the diagnostic data address field carries the storage address where the diagnostic data is located. Therefore, in inter-core communication, based on the diagnostic data structure, the control unit and the computing unit can store data in the shared memory, and can also accurately know where the other party stores the data in the shared memory, improving the accuracy of inter-core communication.
  • FIG 9 shows a schematic flowchart 4 of the vehicle diagnostic communication method provided by the embodiment of the present application.
  • the vehicle diagnostic communication method includes:
  • the control unit 30 in the domain controller receives the diagnosis request sent by the diagnosis initiating device 10.
  • the control unit 30 responds to the diagnosis request and determines that the diagnosis object is the CAN ECU 60 based on the request content in the diagnosis request.
  • the control unit 30 can obtain the request content from the diagnosis request.
  • the request content is a request to obtain sensing data of a certain sensor or a request to obtain fault information of a certain component. After that, the control unit 30 can obtain the request content based on the request.
  • the target address in the content determines the diagnostic object. In the case where the target address in the request content points to the CAN ECU 60 connected to the control unit 30 through CAN, the control unit 30 may determine that the diagnostic object is the CAN ECU 60.
  • the control unit 30 sends a diagnosis request to the CAN ECU 60.
  • control unit 30 when the control unit 30 determines that the diagnosis object is the CAN ECU 60, it can forward the diagnosis request to the CAN ECU 60 through the diagnosis routing module located in the control unit 30.
  • control unit 30 can convert the diagnostic request from an Ethernet message (such as a DoIP message) to a diagnostic (Diagnostic over Controller Area Network, DoCAN) message on the control local area network through the diagnostic routing module, and convert the converted The diagnostic request is sent to CAN ECU 60.
  • an Ethernet message such as a DoIP message
  • a diagnostic Diagnostic over Controller Area Network, DoCAN
  • the control unit 30 returns a response message of the diagnosis request to the diagnosis initiating device 10 according to the diagnosis situation of the CAN ECU 60.
  • control unit 30 may send a response message of the diagnosis request to the diagnosis initiating device 10 after receiving the response message returned by the CAN ECU 60.
  • the CAN ECU 60 can send a response message to the control unit 30 through CAN, and the control unit 30 can convert the response message from the CAN ECU 60 from the DoCAN message to the Ethernet message through the diagnostic routing module. , and then send the converted response message to the diagnosis initiating device 10 .
  • control unit 30 may send a response message of the diagnosis request to the diagnosis initiating device 10 to inform the diagnosis initiating device 10 to wait if the response message returned by the CAN ECU 60 is not received for a period exceeding the preset market. for a period of time, or inform the diagnosis initiating device 10 to diagnose communication abnormalities.
  • the control unit 30 acts as a route between the CAN ECU 60 and the diagnosis initiating device 10.
  • the diagnosis request from the diagnosis initiating device 10 is forwarded to the CAN ECU 60 , and a response message to the diagnosis request can also be returned to the diagnosis initiating device 10 based on the diagnosis status of the CAN ECU 60 .
  • the embodiments of the present application effectively reduce the number of message forwardings in diagnostic communication, reduce the delay of diagnostic communication, and improve the efficiency of diagnostic communication.
  • FIG. 10 shows a schematic diagram of the software architecture for diagnostic communication between the control unit 30 and the computing unit 20 in the domain controller provided by the embodiment of the present application.
  • shared memories are provided in the control unit 30 and the computing unit 20 respectively.
  • the control unit 30 includes the shared memory 35 and the computing unit 20 includes the shared memory 24 .
  • the external diagnostic instrument 10 can send a diagnostic request to the control unit 30 through the switch 50 .
  • the routing module 32 determines The diagnostic object for this diagnostic request. If the diagnostic object is the domain controller where the control unit 30 is located, the diagnostic operation can be performed by the microcontroller 33 in the control unit 30 , otherwise, a diagnostic request can be sent to other ECUs 40 through the CAN communication link 34 .
  • the microcontroller 33 can communicate with the shared memory 35 in the computing unit 20 via the routing module 32 and the shared memory 35 in the control unit 30 to realize inter-core communication between the control unit 30 and the computing unit 20 .
  • the computing unit 20 is also provided with the following structures: Run-Time Environment (RTE) 25 and Over-the-Air Technology (OTA), which can be upgraded through OTA download data.
  • the control unit 30 is also provided with the following structures: RTE 36 and application layer 37, which can perform corresponding operations in response to the requirements of the application layer.
  • FIG 11 shows a schematic structural diagram 1 of a vehicle diagnostic communication device provided by an embodiment of the present application.
  • the vehicle diagnostic communication device includes:
  • the receiving module 1101 is configured to receive a diagnosis request sent by a diagnosis initiating device.
  • the determination module 1102 is configured to respond to the diagnosis request and determine the diagnosis object based on the request content in the diagnosis request, where the diagnosis object includes the target component required to be diagnosed or accessed by the diagnosis request.
  • the processing module 1103 is configured to return a response message of the diagnosis request to the diagnosis initiating device according to the diagnosis status of the diagnosis object.
  • the diagnosis object includes a domain controller.
  • the processing module 1103 is specifically configured to: perform a diagnosis operation corresponding to the diagnosis request. , according to the execution status of the diagnostic operation, return a response message of the diagnostic request to the diagnostic initiating device.
  • the domain controller further includes a shared memory between the computing unit and the control unit, and the communication method between the computing unit and the control unit includes inter-core communication based on the shared memory between the computing unit and the control unit.
  • the processing module 1103 is specifically configured to: when the diagnostic request is related to the computing unit in the domain controller, perform the diagnostic operation through inter-core communication with the computing unit.
  • the diagnostic request is related to the computing unit, including at least one of the following situations: the diagnostic request is used to request to obtain data stored in the computing unit, the data requested by the diagnostic request is obtained by the computing unit, and the diagnostic request is used to request
  • the domain controller performs an upgrade, wherein the diagnostic request for requesting the domain controller for upgrade may include requesting a control unit and/or computing unit upgrade.
  • the processing module 1103 when the diagnostic request is related to a computing unit in a domain controller, during the process of performing a diagnostic operation by performing inter-core communication with the computing unit, the processing module 1103 is specifically configured to: determine the diagnostic request indication domain The controller performs an upgrade, determines that the domain controller is in a diagnosis state, and sends the first upgrade data from the diagnosis initiating device to the computing unit through inter-core communication to assist the computing unit in upgrading.
  • the processing module 1103 is specifically configured to: include: receiving the diagnosis initiating device The first message is sent, the first message is used to indicate the start of data transmission to the control unit, in response to the first message, the second message is sent to the computing unit, the second message is used to indicate the start of data transmission to the computing unit, in response to the computing unit Return the response message of the second message, send the response message of the first message to the diagnosis initiating device, receive the third message sent by the diagnosis initiating device, the third message carries the first upgrade data, and respond to the third message to the computing device.
  • the unit sends a fourth message, the fourth message carries the first upgrade data, and responds to the response message of the fourth message returned by the computing unit. message, sending a response message of the third message to the diagnosis initiating device, where the response message of the fourth message and the response message of the third message are used to indicate that the first upgrade data transmission is completed.
  • the processing module 1103 when the diagnostic request is related to a computing unit in a domain controller, during the process of performing a diagnostic operation by performing inter-core communication with the computing unit, the processing module 1103 is specifically configured to: determine the diagnostic request indication domain The controller performs an upgrade, determines that the domain controller is in an upgrade state, receives the second upgrade data sent by the computing unit through inter-core communication, and performs the upgrade based on the second upgrade data.
  • the domain controller enters the upgrade state when the upgrade trigger condition is met.
  • the upgrade trigger condition includes at least one of the following: completion of the first upgrade data transmission, and/or receipt of the fifth step of the diagnosis initiating device.
  • message the fifth message indicates that the control unit enters the upgrade state, and/or a sixth message from the computing unit is received, the sixth message indicates that the control unit enters the upgrade state.
  • the processing module 1103 is specifically configured to: receive the fifth message sent by the diagnosis initiating device, and in response to the fifth message, return the fifth message to the diagnosis initiating device. response message, the response message of the fifth message indicates the start of the upgrade of the control unit, in response to the fifth message, send a seventh message to the computing unit, the seventh message instructs the computing unit to enter the upgrade state, and receive the response message of the seventh message returned by the computing unit , the response message of the seventh message indicates the start of the computing unit upgrade.
  • the processing module 1103 is specifically configured to: receive an eighth message sent by the computing unit, and the eighth message indicates data transmission to the control unit. Start, in response to the eighth message, return the response message of the eighth message to the computing unit to inform the computing unit of the data transmission requirements of the control unit, and receive the ninth message sent by the computing unit, the ninth message carrying the second upgrade data , in response to the ninth message, sending a response message to the ninth message to the computing unit to inform the computing unit that the second upgrade data transmission is completed.
  • the data structure used in the communication message includes a command data structure and a diagnostic data structure, wherein the command data structure includes at least one of the following fields: command field, response field, error feedback field, command data length field, command data address field, where the diagnostic data structure includes at least one of the following fields: target node word segment, diagnostic data length field, diagnostic data address field.
  • the diagnosis object includes a CAN ECU that communicates with the control unit through the controller area network CAN.
  • the processing module 1103 specifically uses In: Send a diagnosis request to the CAN ECU, obtain the diagnosis status of the CAN ECU, and return a diagnosis response to the diagnosis initiating device according to the diagnosis status of the CAN ECU.
  • the diagnosis initiating device includes at least one of the following: an external device, an ECU with networking capabilities in the vehicle, and a computing unit in the domain controller.
  • the control unit receives the diagnosis initiation.
  • the receiving module 1101 is specifically configured to: receive a request sent by the computing unit through inter-core communication.
  • the vehicle diagnostic communication device provided by the embodiment of the present application can perform various steps implemented by the control unit in the above method embodiment. To avoid duplication, they will not be described again here.
  • Figure 12 shows the second structural diagram of the vehicle diagnostic communication device provided by the embodiment of the present application. It is applied to the computing unit in the domain controller of the vehicle.
  • the communication method between the control unit and the computing unit in the domain controller is based on the control unit and Inter-core communication enabled by shared memory between computing units.
  • the vehicle diagnostic communication device includes:
  • the receiving module 1201 is configured to receive the first upgrade data sent by the control unit through inter-core communication when the domain controller is in a diagnostic state, and/or,
  • the sending module 1202 is configured to send the second upgrade data to the control unit through inter-core communication when the domain controller is in an upgrade state.
  • the vehicle diagnostic communication device provided by the embodiment of the present application can perform various steps implemented by the computing unit in the above method embodiment. To avoid duplication, they will not be described again here.
  • Embodiments of the present application also provide a chip.
  • the chip includes a control unit and/or a computing unit.
  • the control unit is used to perform the steps performed by the control unit in any of the foregoing embodiments.
  • the computing unit is used to perform the calculations in any of the foregoing embodiments. The steps executed by the unit will not be described again here.
  • FIG 13 shows a schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present application. As shown in Figure 13 As shown, electronic equipment includes:
  • the above-mentioned processor 1301 may include a central processing unit (CPU), or an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), or may be configured to implement one or more integrated circuits according to the embodiments of the present application.
  • CPU central processing unit
  • ASIC Application Specific Integrated Circuit
  • Memory 1302 may include bulk storage for data or instructions.
  • the memory 1302 may include a hard disk drive (HDD), a floppy disk drive, flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a Universal Serial Bus (USB) drive or two or more A combination of many of the above.
  • Storage 1302 may include removable or non-removable (or fixed) media, where appropriate.
  • the memory 1302 may be internal or external to the integrated gateway disaster recovery device.
  • memory 1302 is non-volatile solid-state memory.
  • memory 1302 may include read-only memory (ROM), random access memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical, or other physical/tangible memory storage devices .
  • ROM read-only memory
  • RAM random access memory
  • magnetic disk storage media devices e.g., magnetic disks
  • optical storage media devices e.g., magnetic disks
  • flash memory devices e.g., electrical, optical, or other physical/tangible memory storage devices.
  • memory 1302 includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or multiple processors) operable to perform the operations described with reference to a method according to an aspect of the present disclosure.
  • the processor 1301 reads and executes the computer program instructions stored in the memory 1302 to implement any of the vehicle diagnostic communication methods in the above embodiments.
  • the electronic device may also include a communication interface 1303 and a bus 1310. Among them, as shown in Figure 13, the processor 1301, the memory 1302, and the communication interface 1303 are connected through the bus 1310 and complete communication with each other.
  • the communication interface 1303 is mainly used to implement communication between modules, devices, units and/or equipment in the embodiments of this application.
  • Bus 1310 includes hardware, software, or both, coupling components of the vehicle diagnostic communication device to each other together.
  • the bus may include Accelerated Graphics Port (AGP) or other graphics bus, Enhanced Industry Standard Architecture (EISA) bus, Front Side Bus (FSB), HyperTransport (HT) interconnect, Industry Standard Architecture (ISA) Bus, Infinite Bandwidth Interconnect, Low Pin Count (LPC) Bus, Memory Bus, Micro Channel Architecture (MCA) Bus, Peripheral Component Interconnect (PCI) Bus, PCI-Express (PCI-X) Bus, Serial Advanced Technology Attachment (SATA) bus, Video Electronics Standards Association Local (VLB) bus or other suitable bus or a combination of two or more of these.
  • bus 1310 may include one or more buses.
  • the electronic device can execute the vehicle diagnostic communication method in the embodiment of the present application based on the sensing data, thereby realizing the vehicle diagnostic communication method and device described in conjunction with FIGS. 1 to 9 .
  • embodiments of the present application may provide a computer storage medium for implementation.
  • Computer program instructions are stored on the computer storage medium.
  • any one of the vehicle diagnostic communication methods in the above embodiments is implemented.
  • the functional blocks shown in the above structural block diagram can be implemented as hardware, software, firmware or a combination thereof.
  • it may be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, or the like.
  • ASIC application specific integrated circuit
  • elements of the application are programs or code segments that are used to perform the required tasks.
  • the program or code segments may be stored in a machine-readable medium or transmitted over a transmission medium or communications link via a data signal carried in a carrier wave.
  • "Machine-readable medium” may include any medium capable of storing or transmitting information.
  • machine-readable media examples include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, and the like.
  • Code snippets can Downloaded via computer networks such as the Internet, Intranet, etc.
  • Such a processor may be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It will also be understood that each block in the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can also be implemented by special purpose hardware that performs the specified functions or actions, or can be implemented by special purpose hardware and A combination of computer instructions.

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Small-Scale Networks (AREA)
  • Devices For Checking Fares Or Tickets At Control Points (AREA)
  • Vehicle Cleaning, Maintenance, Repair, Refitting, And Outriggers (AREA)

Abstract

Provided are a vehicle diagnosis communication method and apparatus, and a device, a medium and a program product. The method comprises: receiving a diagnosis request sent by a diagnosis initiation apparatus (S401); in response to the diagnosis request, determining a diagnosis object on the basis of request content in the diagnosis request, wherein the diagnosis object comprises a target component requested to be diagnosed or accessed by means of the diagnosis request (S402); and returning a response message of the diagnosis request to the diagnosis initiation apparatus according to the diagnostic condition of the diagnosis object (S403).

Description

车辆诊断通信方法、装置、设备、介质及程序产品Vehicle diagnostic communication methods, devices, equipment, media and program products
相关申请的交叉引用Cross-references to related applications
本公开要求享有于2022年08月16日提交的名称为“车辆诊断通信方法、装置、设备及介质”的中国专利申请202210983254.4的优先权,该申请的全部内容通过引用并入本文中。This disclosure claims priority to Chinese patent application 202210983254.4 titled "Vehicle Diagnostic Communication Method, Device, Equipment and Medium" submitted on August 16, 2022. The entire content of this application is incorporated herein by reference.
技术领域Technical field
本申请属于车辆技术领域,具体涉及一种车辆诊断通信方法、装置、设备、介质及程序产品。This application belongs to the field of vehicle technology, and specifically relates to a vehicle diagnostic communication method, device, equipment, media and program products.
背景技术Background technique
随着车辆电子技术的发展,域控制器已经成为车辆电子产品中的重要一员。在域控制器的主控芯片中,集成有控制单元和计算单元,域控制器进行诊断通信时,控制单元与计算单元通常也需要进行相应的信息通信,域控制器与整车网络中的其他域控制器也需要进行诊断通信。With the development of vehicle electronic technology, domain controllers have become an important part of vehicle electronic products. In the main control chip of the domain controller, a control unit and a computing unit are integrated. When the domain controller performs diagnostic communication, the control unit and the computing unit usually also need to communicate with each other. The domain controller communicates with other devices in the vehicle network. Domain controllers are also required for diagnostic communications.
申请内容Application content
第一方面,本申请实施例提供一种车辆诊断通信方法,应用于车辆的域控制器中的控制单元,车辆诊断通信方法包括:In a first aspect, embodiments of the present application provide a vehicle diagnostic communication method, which is applied to a control unit in a domain controller of a vehicle. The vehicle diagnostic communication method includes:
接收诊断发起装置发送的诊断请求,Receive a diagnostic request sent by the diagnostic initiating device,
响应于诊断请求,基于诊断请求中的请求内容确定诊断对象,其中,诊断对象包括诊断请求所要求诊断或者访问的目标元器件,In response to the diagnosis request, determine the diagnosis object based on the request content in the diagnosis request, where the diagnosis object includes the target component required to be diagnosed or accessed by the diagnosis request,
根据诊断对象的诊断情况,向诊断发起装置返回诊断请求的响应消息。According to the diagnosis situation of the diagnosis object, a response message of the diagnosis request is returned to the diagnosis initiating device.
第二方面,本申请实施例提供了一种车辆诊断通信装置,应用于车辆的域控制器中的控制单元,车辆诊断通信装置包括: In the second aspect, embodiments of the present application provide a vehicle diagnostic communication device, which is applied to a control unit in a domain controller of a vehicle. The vehicle diagnostic communication device includes:
接收单元,用于接收诊断发起装置发送的诊断请求,a receiving unit, configured to receive a diagnosis request sent by the diagnosis initiating device,
确定单元,用于响应于诊断请求,基于诊断请求中的请求内容确定诊断对象,其中,诊断对象包括诊断请求所要求诊断或者访问的目标元器件,a determination unit configured to respond to the diagnosis request and determine the diagnosis object based on the request content in the diagnosis request, wherein the diagnosis object includes the target component required to be diagnosed or accessed by the diagnosis request,
发送单元,用于根据诊断对象的诊断情况,向诊断发起装置返回诊断请求的响应消息。The sending unit is configured to return a response message of the diagnosis request to the diagnosis initiating device according to the diagnosis situation of the diagnosis object.
第三方面,本申请提供一种芯片,芯片包括控制单元,控制单元用于执行如前述第一方面的车辆诊断通信方法。In a third aspect, the present application provides a chip, which includes a control unit configured to execute the vehicle diagnostic communication method as described in the first aspect.
第四方面,本申请实施例提供了一种电子设备,电子设备包括:处理器以及存储有计算机程序指令的存储器,处理器执行计算机程序指令时实现如第一方面的车辆诊断通信方法:In a fourth aspect, embodiments of the present application provide an electronic device. The electronic device includes: a processor and a memory storing computer program instructions. When the processor executes the computer program instructions, the vehicle diagnostic communication method of the first aspect is implemented:
第五方面,本申请实施例提供了一种计算机存储介质,计算机可读存储介质上存储有计算机程序指令,计算机程序指令被处理器执行时实现如第一方面的车辆诊断通信方法。In a fifth aspect, embodiments of the present application provide a computer storage medium. Computer program instructions are stored on the computer-readable storage medium. When the computer program instructions are executed by a processor, the vehicle diagnostic communication method of the first aspect is implemented.
第六方面,本申请实施例提供了一种芯片,芯片包括处理器和通信接口,通信接口和处理器耦合,处理器用于运行程序或指令,实现如第一方面的车辆诊断通信方法。In a sixth aspect, embodiments of the present application provide a chip. The chip includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the vehicle diagnostic communication method of the first aspect.
第七方面,本申请实施例提供一种计算机程序产品,该程序产品被存储在存储介质中,该程序产品被至少一个处理器执行以实现如第一方面的车辆诊断通信方法。In a seventh aspect, embodiments of the present application provide a computer program product, the program product is stored in a storage medium, and the program product is executed by at least one processor to implement the vehicle diagnostic communication method as in the first aspect.
附图说明Description of drawings
图1示出了采用域控制器的整车网络架构的示例图,Figure 1 shows an example diagram of a vehicle network architecture using a domain controller.
图2示出了相关技术中域控制器的诊断通信的流程示例图,Figure 2 shows an example flow diagram of diagnostic communication of a domain controller in the related art.
图3示出了相关技术中域控制器中的控制单元与计算单元进行诊断通信的软件架构示例图,Figure 3 shows an example diagram of the software architecture for diagnostic communication between the control unit and the computing unit in the domain controller in the related art.
图4示出了本申请实施例提供的车辆诊断通信方法的流程示意图一, Figure 4 shows a schematic flowchart 1 of the vehicle diagnostic communication method provided by the embodiment of the present application.
图5示出了本申请实施例提供的车辆诊断通信方法的流程示意图二,Figure 5 shows a schematic flowchart 2 of the vehicle diagnostic communication method provided by the embodiment of the present application.
图6示出了本申请实施例提供的车辆诊断通信方法的流程示意图三,Figure 6 shows a schematic flowchart three of the vehicle diagnostic communication method provided by the embodiment of the present application.
图7示出了在诊断对象为域控制器、域控制器处于诊断状态且诊断通信用于指示域控制器进行升级的情况下诊断通信的流程示意图,Figure 7 shows a schematic flow chart of diagnostic communication when the diagnostic object is a domain controller, the domain controller is in a diagnostic state, and the diagnostic communication is used to instruct the domain controller to upgrade,
图8示出了在诊断对象为域控制器、域控制器处于诊断状态且诊断通信用于指示域控制器进行升级的情况下诊断通信的流程示意图,Figure 8 shows a schematic flow chart of diagnostic communication when the diagnostic object is a domain controller, the domain controller is in a diagnostic state, and the diagnostic communication is used to instruct the domain controller to upgrade,
图9示出了本申请实施例提供的车辆诊断通信方法的流程示意图四,Figure 9 shows a schematic flowchart 4 of the vehicle diagnostic communication method provided by the embodiment of the present application.
图10示出了本申请实施例提供的域控制器中的控制单元与计算单元进行诊断通信的软件架构示意图,Figure 10 shows a schematic diagram of the software architecture for diagnostic communication between the control unit and the computing unit in the domain controller provided by the embodiment of the present application.
图11示出了本申请实施例提供的车辆诊断通信装置的结构示意图一,Figure 11 shows a schematic structural diagram of a vehicle diagnostic communication device provided by an embodiment of the present application.
图12示出了本申请实施例提供的车辆诊断通信装置的结构示意图二,Figure 12 shows the second structural schematic diagram of the vehicle diagnostic communication device provided by the embodiment of the present application.
图13示出了本申请实施例提供的电子设备的硬件结构示意图。Figure 13 shows a schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将详细描述本申请的各个方面的特征和示例性实施例,为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及具体实施例,对本申请进行进一步详细描述。应理解,此处所描述的具体实施例仅意在解释本申请,而不是限定本申请。对于本领域技术人员来说,本申请可以在不需要这些具体细节中的一些细节的情况下实施。下面对实施例的描述仅仅是为了通过示出本申请的示例来提供对本申请更好的理解。Features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be described in further detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described here are only intended to explain the application, but not to limit the application. It will be apparent to one skilled in the art that the present application may be practiced without some of these specific details. The following description of embodiments is merely intended to provide a better understanding of the present application by illustrating examples thereof.
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在 没有更多限制的情况下,由语句“包括……”限定的要素,并不排除在包括要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that these entities or operations are mutually exclusive. any such actual relationship or sequence exists between them. Furthermore, the terms "comprises,""comprises," or any other variations thereof are intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus that includes a list of elements includes not only those elements, but also those not expressly listed other elements, or elements inherent to the process, method, article or equipment. exist Without further limitation, an element defined by the statement "including..." does not exclude the presence of additional identical elements in the process, method, article, or device that includes the element.
首先,对本申请涉及的用语进行解释,便于本领域技术人员理解:First, the terms involved in this application will be explained to facilitate understanding by those skilled in the art:
诊断通信:诊断仪基于用于车辆诊断的通信协议与车辆进行通信,以向车辆提供诊断服务的过程。其中,用于车辆诊断的通信协议比如统一诊断协议(Unified diagnostic services,UDS)。Diagnostic communication: The process in which the diagnostic instrument communicates with the vehicle based on the communication protocol used for vehicle diagnosis to provide diagnostic services to the vehicle. Among them, the communication protocol used for vehicle diagnosis is such as Unified Diagnostic Services (UDS).
作为示例的,车辆出现故障时,维修人员可在车上的OBD(On-Board Diagnostic)端口上连接诊断仪,诊断仪通过OBD端口向车辆的域控制器发送诊断请求,以请求读取车辆内部的一些信息,比如请求获取一些传感器数据、应用程序运行的日志等。As an example, when a vehicle fails, the maintenance personnel can connect the diagnostic instrument to the OBD (On-Board Diagnostic) port on the vehicle, and the diagnostic instrument sends a diagnostic request to the domain controller of the vehicle through the OBD port to request to read the interior of the vehicle. Some information, such as requesting some sensor data, application running logs, etc.
域控制器:将车辆上的各部分电子功能划分为几个领域,由域控制器负责相应领域的功能实现。在域控制器的主控芯片中,集成有至少一个控制单元和至少一个计算单元。控制单元可称为微控制单元(Microcontroller Unit,MCU),计算单元可称为微处理器(Microprocessor Unit,MPU)。Domain controller: Divide various electronic functions on the vehicle into several areas, and the domain controller is responsible for realizing the functions in the corresponding areas. In the main control chip of the domain controller, at least one control unit and at least one computing unit are integrated. The control unit can be called a microcontroller unit (MCU), and the computing unit can be called a microprocessor unit (MPU).
相关技术中,外部诊断仪将诊断请求发送给域控制器中的计算单元,计算单元作为域控制器和外部诊断仪之间进行诊断通信的协同者,通过互联网诊断通信协议(Diagnostic communication over Internet Protocol,简称DoIp)将诊断请求的请求内容发送给域控制器中的控制单元。在诊断通信的响应过程中,控制单元通过DoIP将响应内容发送给计算单元,之后,计算单元再将响应内容转发给外部诊断仪。In the related technology, the external diagnostic instrument sends the diagnosis request to the computing unit in the domain controller. The computing unit acts as a collaborator for diagnostic communication between the domain controller and the external diagnostic instrument through the Internet Diagnostic Communication Protocol (Diagnostic communication over Internet Protocol). (DoIp for short) sends the request content of the diagnostic request to the control unit in the domain controller. During the response process of diagnostic communication, the control unit sends the response content to the computing unit through DoIP, and then the computing unit forwards the response content to the external diagnostic instrument.
然而,上述车辆诊断通信方式的效率较低。However, the above vehicle diagnostic communication methods are less efficient.
本申请实施例提供一种车辆诊断通信方法、装置、设备、介质及程序产品,能够解决车辆诊断通信的效率较低的问题。Embodiments of the present application provide a vehicle diagnostic communication method, device, equipment, media and program products, which can solve the problem of low efficiency of vehicle diagnostic communication.
根据本申请实施例,在车辆的诊断通信过程中,域控制器中的控制单元作为诊断通信的路由(即作为诊断通信的协调者),可直接接收来自诊断发起装置的诊断请求,无需域控制器中的计算单元将诊断请求转发给控制单元;在确 定诊断对象后,控制单元还可基于诊断对象的诊断情况,直接向诊断发起装置返回诊断请求的响应消息,无需计算单元将诊断请求的响应消息转发给诊断发起装置。如此,减少了诊断通信过程中的消息转发次数,降低了诊断通信的通信延迟,提高了诊断通信的效率。According to the embodiment of the present application, during the diagnostic communication process of the vehicle, the control unit in the domain controller serves as the route of the diagnostic communication (that is, as the coordinator of the diagnostic communication) and can directly receive the diagnostic request from the diagnostic initiating device without domain control. The computing unit in the processor forwards the diagnostic request to the control unit; after confirming After determining the diagnosis object, the control unit can also directly return the response message of the diagnosis request to the diagnosis initiating device based on the diagnosis status of the diagnosis object, without the need for the computing unit to forward the response message of the diagnosis request to the diagnosis initiating device. In this way, the number of message forwardings during the diagnostic communication process is reduced, the communication delay of the diagnostic communication is reduced, and the efficiency of the diagnostic communication is improved.
图1示出了采用域控制器的整车网络架构的示例图。Figure 1 shows an example diagram of a vehicle network architecture using a domain controller.
如图1所示,在车辆的整车网络架构中,可包括一个或多个域控制器,比如图1中的域控制器1、域控制器2、……、域控制器n,n表示域控制器的数量。其中,各个域控制器之间可通过车内以太网进行通信。各个域控制器可连接连接多个电子控制单元(Electronic Control Unit,ECU)。比如,在图1中,域控制器1连接ECU11~ECU1N1、ECU21~ECU2N2,域控制器2连接ECU31~ECU3N3、ECU41~ECU4N4,域控制器n连接ECU51~ECU5N5、ECU61~ECU6N6。其中,N1~N6均表示ECU的数量。As shown in Figure 1, the vehicle network architecture may include one or more domain controllers, such as domain controller 1, domain controller 2, ..., domain controller n in Figure 1, where n represents The number of domain controllers. Among them, each domain controller can communicate with each other through the Ethernet in the car. Each domain controller can connect multiple electronic control units (Electronic Control Unit, ECU). For example, in Figure 1, domain controller 1 is connected to ECU11~ECU1N1, ECU21~ECU2N2, domain controller 2 is connected to ECU31~ECU3N3, ECU41~ECU4N4, and domain controller n is connected to ECU51~ECU5N5, ECU61~ECU6N6. Among them, N1~N6 all represent the number of ECUs.
如图1所示,在车辆的整车网络架构中,域控制器还可以承担网关的功能。比如,域控制器1(可以是其他域控制器,图1以域控制器1为例)通过以太网(工规级以太网)和控制器局域网络(Controller Area Network,CAN)连接到OBD端口,以与外部诊断仪通信。域控制器1(可以是其他域控制器,图1以域控制器1为例)可以连接多个电子控制单元(Electronic Control Unit,ECU),还可通过车内以太网(车规级以太网)与具备联网功能的ECU7连接。其中,具备联网功能的ECU7也可以具备诊断仪功能,可通过车内以太网向域控制器发送诊断通信的请求。As shown in Figure 1, in the vehicle's vehicle network architecture, the domain controller can also assume the function of the gateway. For example, domain controller 1 (can be another domain controller, Figure 1 takes domain controller 1 as an example) is connected to the OBD port through Ethernet (industrial grade Ethernet) and controller area network (Controller Area Network, CAN) , to communicate with an external diagnostic tool. Domain controller 1 (can be other domain controllers, Figure 1 takes domain controller 1 as an example) can connect to multiple electronic control units (Electronic Control Units, ECUs), and can also connect through in-car Ethernet (car-grade Ethernet ) is connected to ECU7 with networking function. Among them, ECU7 with networking function can also have a diagnostic instrument function and can send diagnostic communication requests to the domain controller through the in-vehicle Ethernet.
图2示出了相关技术中域控制器的诊断通信的流程示例图。FIG. 2 shows an example flow chart of diagnostic communication of a domain controller in the related art.
如图2所示,在诊断请求由控制单元自身执行的情况下,诊断通信过程包括如下步骤S201~S204:As shown in Figure 2, when the diagnostic request is executed by the control unit itself, the diagnostic communication process includes the following steps S201 to S204:
S201,外部诊断仪10将诊断请求发送给域控制器中的计算单元20。S201. The external diagnostic instrument 10 sends a diagnosis request to the computing unit 20 in the domain controller.
S202,计算单元20接收到诊断请求后,通过基于车内以太网的诊断通信(Diagnostic communication over Internet Protocol,DoIP),将诊断请求转发给 域控制器中的控制单元30。S202, after receiving the diagnosis request, the computing unit 20 forwards the diagnosis request to Control unit 30 in the domain controller.
S203,在诊断请求由控制单元30自身执行的情况下,控制单元30执行诊断请求后,通过DoIP将诊断请求对应的响应消息返回给计算单元20。S203, when the diagnosis request is executed by the control unit 30 itself, after the control unit 30 executes the diagnosis request, it returns a response message corresponding to the diagnosis request to the computing unit 20 through DoIP.
S204,计算单元20接收到来自控制单元30的响应消息后,向计算单元20发送诊断请求对应的响应消息。S204: After receiving the response message from the control unit 30, the computing unit 20 sends a response message corresponding to the diagnosis request to the computing unit 20.
如图2所示,在诊断请求由整车网络中的其他ECU执行的情况下,诊断通信过程如下步骤S205:As shown in Figure 2, when the diagnostic request is executed by other ECUs in the vehicle network, the diagnostic communication process is as follows: step S205:
S205,外部诊断仪10将诊断请求发送给域控制器中的计算单元20。S205, the external diagnostic instrument 10 sends a diagnosis request to the computing unit 20 in the domain controller.
S206,计算单元20接收到诊断请求后,通过基于车内以太网的DoIP,将诊断请求转发给域控制器中的控制单元30。S206: After receiving the diagnosis request, the computing unit 20 forwards the diagnosis request to the control unit 30 in the domain controller through DoIP based on the in-vehicle Ethernet.
S207,在诊断请求由整车网络中的其他ECU40执行的情况下,控制单元30将诊断请求发送给其他ECU40。S207: When the diagnosis request is executed by other ECUs 40 in the vehicle network, the control unit 30 sends the diagnosis request to the other ECUs 40.
S208,控制单元30接收来自该其他ECU40返回的响应消息。S208, the control unit 30 receives the response message returned from the other ECU 40.
S209,控制单元30响应于来自其他ECU40的响应消息,通过DoIP将该响应消息返回给计算单元20。S209, the control unit 30 responds to the response message from other ECUs 40 and returns the response message to the computing unit 20 through DoIP.
S210,计算单元20再将响应消息返回给外部诊断仪10。S210, the computing unit 20 returns the response message to the external diagnostic instrument 10.
可以看出,在上述过程中,域控制器中的计算单元20为域控制器与外部诊断仪10之间的协同者。It can be seen that in the above process, the computing unit 20 in the domain controller is the collaborator between the domain controller and the external diagnostic instrument 10 .
图3示出了相关技术中域控制器中的控制单元30与计算单元20进行诊断通信的软件架构示例图。如图3所示,外部诊断仪10通过交换机(SWITCH)50与计算单元20进行通信,计算单元20与控制单元30之间也通过交换机50进行通信,计算单元20通过CAN与其他ECU40通信。FIG. 3 shows an example software architecture diagram for diagnostic communication between the control unit 30 and the computing unit 20 in the domain controller in the related art. As shown in FIG. 3 , the external diagnostic instrument 10 communicates with the computing unit 20 through the switch (SWITCH) 50 , the computing unit 20 and the control unit 30 also communicate through the switch 50 , and the computing unit 20 communicates with other ECUs 40 through CAN.
如图3所示,在诊断通信过程中,外部诊断仪10通过交换机50将诊断请求发送至计算单元20,在计算单元20中,诊断请求经过多个协议层21,进入DoIP服务端22,由DoIP服务端22进入DoIP客户端23,再由DoIP客户端23将诊断请求传递给协议层21,经过多个协议层21和交换机50,将诊断请求 发送至控制单元30的多个协议层31中,在控制单元30中,控制单元30可以在路由模块32中进行诊断请求的路由,在由控制单元30自身执行诊断请求的情况下,比如通过图3中的单片机(Dcm)33,也可以将诊断请求通过CAN通信链路34发送给其他ECU40。同样的,诊断请求的响应消息可以基于诊断请求的传输路径,由控制单元20传递给计算单元30,再传递给外部诊断仪50。As shown in Figure 3, during the diagnostic communication process, the external diagnostic instrument 10 sends the diagnostic request to the computing unit 20 through the switch 50. In the computing unit 20, the diagnostic request passes through multiple protocol layers 21 and enters the DoIP server 22. The DoIP server 22 enters the DoIP client 23, and then the DoIP client 23 passes the diagnosis request to the protocol layer 21. After passing through multiple protocol layers 21 and the switch 50, the diagnosis request is Among the multiple protocol layers 31 sent to the control unit 30 , the control unit 30 may route the diagnostic request in the routing module 32 , in the case where the diagnostic request is executed by the control unit 30 itself, such as by FIG. The single-chip computer (Dcm) 33 in 3 can also send diagnostic requests to other ECUs 40 through the CAN communication link 34. Similarly, the response message of the diagnosis request may be transmitted from the control unit 20 to the computing unit 30 and then to the external diagnostic instrument 50 based on the transmission path of the diagnosis request.
图2和图3所示的诊断通信过程存在以下问题:The diagnostic communication process shown in Figures 2 and 3 has the following problems:
问题一,诊断通信过程需要进行多次信息转发,通信延迟大、效率低,Problem 1: The diagnostic communication process requires multiple information forwardings, resulting in large communication delays and low efficiency.
问题二,域控制器中的计算单元和控制单元之间基于以太网进行通信,不但占用了交换机、控制单元和计算单元的总线带宽,还需要处理以太网的接收中断和发送中断,占用的通信资源较多,Problem 2: The communication between the computing unit and the control unit in the domain controller is based on Ethernet. It not only occupies the bus bandwidth of the switch, control unit and computing unit, but also needs to handle the receiving interruption and sending interruption of the Ethernet, occupying the communication There are more resources,
问题三,域控制器中的计算单元和控制单元均需实现基于DoIP的诊断服务器端和诊断客户端的软件功能(对外部诊断仪而言,计算单元为诊断服务器端,对控制单元而言,计算单元为诊断客户端,对计算单元而言,控制单元为诊断服务端,对其他ECU而言,控制单元为诊断客户端),整体的软件复杂度较高,导致软件开发时间长和开发成本高。Question 3: Both the computing unit and the control unit in the domain controller need to implement the software functions of the DoIP-based diagnostic server and diagnostic client (for the external diagnostic instrument, the computing unit is the diagnostic server, and for the control unit, the computing unit The unit is a diagnostic client, for the computing unit, the control unit is a diagnostic server, for other ECUs, the control unit is a diagnostic client), the overall software complexity is high, resulting in long software development time and high development costs. .
为了解决上述问题,本申请实施例提供了一种车辆诊断通信方法、装置、设备、介质及程序产品。在本申请实施例中,考虑到针对域控制器的诊断操作,大多由域控制器中的控制单元控制执行,在诊断通信中由域控制器中的控制单元承担诊断发起装置与域控制器之间的协同者,而无需由域控制器中的计算单元进行信息转发,减少了信息转发次数,降低了通信延迟,提高了通信效率,还有利于节约通信资源。同时,由于计算单元无需再承担诊断通信中的信息转发工作,计算单元无需实现诊断服务器端和诊断客户端的软件功能,控制单元也无需实现诊断客户端的软件功能,从而降低了计算单元和控制单元上与诊断通信相关的软件复杂度。In order to solve the above problems, embodiments of the present application provide a vehicle diagnostic communication method, device, equipment, medium and program product. In the embodiment of the present application, it is considered that the diagnostic operations for the domain controller are mostly controlled and executed by the control unit in the domain controller. In the diagnostic communication, the control unit in the domain controller is responsible for the communication between the diagnostic initiating device and the domain controller. There is no need for the computing unit in the domain controller to forward information, which reduces the number of information forwardings, reduces communication delays, improves communication efficiency, and helps save communication resources. At the same time, since the computing unit no longer needs to undertake the information forwarding work in diagnostic communication, the computing unit does not need to implement the software functions of the diagnostic server and the diagnostic client, and the control unit does not need to implement the software functions of the diagnostic client, thus reducing the burden on the computing unit and the control unit. Software complexity associated with diagnostic communications.
下面,结合应用场景和附图,对本申请实施例所提供的车辆诊断通信方法进行介绍。 Next, the vehicle diagnostic communication method provided by the embodiment of the present application will be introduced with reference to application scenarios and drawings.
图4示出了本申请实施例提供的车辆诊断通信方法的流程示意图一。如图4所示,车辆诊断通信方法包括:Figure 4 shows a schematic flowchart 1 of the vehicle diagnostic communication method provided by the embodiment of the present application. As shown in Figure 4, the vehicle diagnostic communication method includes:
S401、域控制器中的控制单元30接收诊断发起装置10发送的诊断请求。S401. The control unit 30 in the domain controller receives the diagnosis request sent by the diagnosis initiating device 10.
其中,诊断发起装置10为发起诊断请求(又可理解为生成诊断请求)的装置。诊断请求用于请求域控制器进行诊断通信,换句话说,诊断发起装置10通过向域控制器中的控制单元30发送诊断请求,请求对车辆进行诊断。Among them, the diagnosis initiating device 10 is a device that initiates a diagnosis request (which can also be understood as generating a diagnosis request). The diagnosis request is used to request the domain controller to perform diagnostic communication. In other words, the diagnosis initiating device 10 requests diagnosis of the vehicle by sending a diagnosis request to the control unit 30 in the domain controller.
本实施例中,控制单元30直接接收诊断发起装置10发送的诊断请求,而无需接收由域控制器中的计算单元转发的诊断请求。In this embodiment, the control unit 30 directly receives the diagnosis request sent by the diagnosis initiating device 10 without receiving the diagnosis request forwarded by the computing unit in the domain controller.
在一些实施例中,诊断发起装置10可包括如下至少一种:外部设备、车辆中具备联网功能的ECU、域控制器中的计算单元。从而,可以通过灵活多样的诊断发起装置10向域控制器中的控制单元30发送诊断请求。In some embodiments, the diagnosis initiating device 10 may include at least one of the following: an external device, an ECU with networking capabilities in the vehicle, or a computing unit in a domain controller. Therefore, the diagnosis request can be sent to the control unit 30 in the domain controller through the flexible and diverse diagnosis initiating device 10 .
在诊断发起装置10为外部设备的情况下,外部设备可通过诊断通信端口(比如OBD端口)连接车辆,S401的一种可能的实现方式包括:域控制器中的控制单元30通过诊断通信端口接收诊断发起装置10发送的诊断请求。In the case where the diagnosis initiating device 10 is an external device, the external device can connect to the vehicle through a diagnostic communication port (such as an OBD port). A possible implementation of S401 includes: the control unit 30 in the domain controller receives data through the diagnostic communication port. A diagnosis request sent by the diagnosis initiating device 10.
在诊断发起装置10为域控制器中具备联网功能的ECU的情况下,具备联网功能的ECU可响应于第三方设备通过网络指示进行车辆诊断通信的指令,生成诊断请求,S401的又一种可能的实现方式包括:域控制器中的控制单元30通过车内以太网或者CAN,接收具备联网功能的ECU发送的诊断请求。In the case where the diagnosis initiating device 10 is an ECU with a networking function in a domain controller, the ECU with the networking function can generate a diagnosis request in response to an instruction from a third-party device to perform vehicle diagnostic communication through the network. Another possibility in S401 The implementation method includes: the control unit 30 in the domain controller receives the diagnostic request sent by the ECU with the networking function through the in-vehicle Ethernet or CAN.
在诊断发起装置10为域控制器中的计算单元的情况下,计算单元具备诊断功能,因此计算单元自身可定时生成诊断请求,或者计算单元可响应于第三方设备通过网络指示进行车辆诊断通信的指令,生成诊断请求。之后,计算单元作为诊断发起装置10,向控制单元30发送诊断请求,S401的又一种可能的实现方式包括:控制单元30接收计算单元生成并发送的诊断请求。In the case where the diagnosis initiating device 10 is a computing unit in a domain controller, the computing unit has a diagnostic function, so the computing unit itself can generate diagnostic requests regularly, or the computing unit can perform vehicle diagnostic communication in response to instructions from a third-party device through the network. Instructions to generate diagnostic requests. Afterwards, the computing unit, as the diagnosis initiating device 10, sends a diagnosis request to the control unit 30. Another possible implementation of S401 includes: the control unit 30 receives the diagnosis request generated and sent by the computing unit.
S402、控制单元30响应于诊断请求,基于诊断请求中的请求内容确定诊断对象。S402. In response to the diagnosis request, the control unit 30 determines the diagnosis object based on the request content in the diagnosis request.
其中,诊断对象是指诊断请求所要求诊断或者访问的目标元器件。 Among them, the diagnosis object refers to the target component required to be diagnosed or accessed by the diagnosis request.
本实施例中,控制单元30接收到诊断请求后,可从诊断请求中的请求内容中,获取诊断请求的目标地址,基于诊断请求的目标地址,确定诊断请求所针对的诊断对象。其中,诊断请求的目标地址包括为诊断请求所请求获取的数据所在的存储地址和/或元器件标识。In this embodiment, after receiving the diagnosis request, the control unit 30 can obtain the target address of the diagnosis request from the request content in the diagnosis request, and determine the diagnosis object targeted by the diagnosis request based on the target address of the diagnosis request. The target address of the diagnosis request includes the storage address and/or component identification where the data requested for the diagnosis request is located.
S403、控制单元30根据诊断对象的诊断情况,向诊断发起装置10返回诊断请求的响应消息。S403. The control unit 30 returns a response message of the diagnosis request to the diagnosis initiating device 10 according to the diagnosis status of the diagnosis object.
本实施例中,控制单元30在确定诊断对象之后,可由诊断对象执行诊断请求。在诊断对象的诊断由控制单元30控制的情况下,控制单元30可直接获得诊断对象的诊断情况,在诊断对象的诊断由其他元器件控制的情况下,控制单元30可监听诊断对象执行诊断请求的情况,即监听诊断对象的诊断情况,之后,控制单元30可基于诊断对象的诊断情况,向诊断发起装置10返回诊断请求的响应消息。在响应消息中,可包括诊断请求所请求的诊断数据,比如诊断请求所请求的传感器数据、运行日志等,响应消息还可以为定时器消息,以告知诊断发起装置10再等待一段时间。In this embodiment, after determining the diagnosis object, the control unit 30 may execute the diagnosis request by the diagnosis object. When the diagnosis of the diagnosis object is controlled by the control unit 30, the control unit 30 can directly obtain the diagnosis status of the diagnosis object. When the diagnosis of the diagnosis object is controlled by other components, the control unit 30 can listen to the diagnosis request of the diagnosis object. situation, that is, monitoring the diagnosis situation of the diagnosis object, and then the control unit 30 may return a response message of the diagnosis request to the diagnosis initiating device 10 based on the diagnosis situation of the diagnosis object. The response message may include diagnostic data requested by the diagnosis request, such as sensor data, running logs, etc. requested by the diagnosis request. The response message may also be a timer message to inform the diagnosis initiating device 10 to wait for a further period of time.
本申请实施例中,控制单元30直接接收来自诊断发起装置10的诊断请求,基于诊断请求中的请求内容,确定诊断对象,基于诊断对象的诊断情况,向诊断发起装置10返回诊断请求的响应消息。基于域控制器中控制单元30负责诊断请求的执行的特点,由域控制器中的控制单元30充当诊断通信过程中的路由,而无需域控制器中的计算单元负责诊断通信中的消息转发,有效地减少了诊断通信过程中的消息转发次数,降低了通信延迟,提高了通信效率,解决了通信资源,还降低了计算单元和控制单元上与诊断通信相关的软件复杂度。In the embodiment of the present application, the control unit 30 directly receives the diagnosis request from the diagnosis initiating device 10, determines the diagnosis object based on the request content in the diagnosis request, and returns a response message of the diagnosis request to the diagnosis initiating device 10 based on the diagnosis status of the diagnosis object. . Based on the characteristic that the control unit 30 in the domain controller is responsible for the execution of diagnostic requests, the control unit 30 in the domain controller acts as a route in the diagnostic communication process, without the need for the computing unit in the domain controller to be responsible for message forwarding in the diagnostic communication. It effectively reduces the number of message forwardings in the diagnostic communication process, reduces communication delays, improves communication efficiency, solves the problem of communication resources, and also reduces the software complexity related to diagnostic communication on the computing unit and control unit.
在一些实施例中,域控制器中还包括位于计算单元与控制单元之间的共享内存,计算单元与控制单元的通信方式为基于计算单元与控制单元之间的共享内存实现的核间通信(Core to Core Communication,C2CC)。In some embodiments, the domain controller also includes a shared memory between the computing unit and the control unit, and the communication method between the computing unit and the control unit is inter-core communication based on the shared memory between the computing unit and the control unit ( Core to Core Communication, C2CC).
本实施例中,在核间通信中,计算单元和控制单元可将要进行彼此收发的消息或数据存放在共享内存中,由对方在共享内存中进行读取。具体的,控制 单元向计算单元发送消息或数据时,控制单元将消息或数据写入共享内存中,计算单元从共享内存中读取控制单元写入的消息或数据,计算单元向控制单元发送消息或数据时,计算单元将消息或数据写入共享内存中,控制单元从共享内存中读取计算单元写入的消息或数据。In this embodiment, during inter-core communication, the computing unit and the control unit can store the messages or data to be sent and received from each other in the shared memory, and the other party can read them in the shared memory. specific, control When the unit sends a message or data to the computing unit, the control unit writes the message or data into the shared memory. The computing unit reads the message or data written by the control unit from the shared memory. When the computing unit sends a message or data to the control unit, The computing unit writes messages or data into the shared memory, and the control unit reads the messages or data written by the computing unit from the shared memory.
所以,相较于计算单元与控制单元通过交换机和DoIP进行通信,核间通信不占用交换机、控制单元和计算单元的总线带宽,也无需处理以太网的接收中断和发送中断,节约了通信资源。Therefore, compared with the communication between the computing unit and the control unit through switches and DoIP, inter-core communication does not occupy the bus bandwidth of the switch, control unit and computing unit, and does not need to deal with Ethernet receiving interruptions and sending interruptions, saving communication resources.
进一步的,在诊断发起装置为计算单元的情况下,控制单元可通过核间通信接收计算单元发送的诊断请求。从而,在计算单元发起诊断通信的情况下,通过核间通信提高诊断通信的效率,节约通信资源。Further, when the diagnosis initiating device is a computing unit, the control unit may receive the diagnosis request sent by the computing unit through inter-core communication. Therefore, when the computing unit initiates diagnostic communication, the efficiency of diagnostic communication is improved through inter-core communication and communication resources are saved.
在一种可能的实施方式中,共享内存还可设于计算单元中和/或控制单元中,以通过位于计算单元和/或控制单元中的共享内存实现核间通信。In a possible implementation, the shared memory may also be provided in the computing unit and/or the control unit to implement inter-core communication through the shared memory located in the computing unit and/or the control unit.
进一步的,在共享内存设于计算单元中和控制单元中的情况下,计算单元中的共享内存与控制单元中的共享内存通信连接。Further, when the shared memory is provided in the computing unit and the control unit, the shared memory in the computing unit is communicatively connected with the shared memory in the control unit.
在一些实施例中,诊断对象可包括控制单元所在的域控制器和/或通过CAN与控制单元通信的CAN ECU。从而,控制单元既可以执行针对控制单元所在的域控制器的诊断请求,又可以作为诊断发起装置与CAN ECU之间的路由,将诊断请求转发至CAN ECU,以实现对CAN ECU的诊断。In some embodiments, the diagnostic object may include a domain controller where the control unit is located and/or a CAN ECU that communicates with the control unit via CAN. Therefore, the control unit can not only execute diagnostic requests for the domain controller where the control unit is located, but also serve as a route between the diagnostic initiating device and the CAN ECU, forwarding the diagnostic request to the CAN ECU to achieve diagnosis of the CAN ECU.
下面结合图5~图8给出诊断对象为域控制器的实施例:The following is an example in which the diagnostic object is a domain controller with reference to Figures 5 to 8:
图5示出了本申请实施例提供的车辆诊断通信方法的流程示意图二。如图5所示,车辆诊断通信方法包括:Figure 5 shows a schematic flowchart 2 of the vehicle diagnostic communication method provided by the embodiment of the present application. As shown in Figure 5, the vehicle diagnostic communication method includes:
S501、域控制器中的控制单元30接收诊断发起装置10发送的诊断请求。S501. The control unit 30 in the domain controller receives the diagnosis request sent by the diagnosis initiating device 10.
其中,S501的实现原理和技术效果可参照前述实施例,不再赘述。Among them, the implementation principles and technical effects of S501 can be referred to the foregoing embodiments and will not be described again.
S502、控制单元30响应于诊断请求,基于诊断请求中的请求内容确定诊断对象为域控制器。S502. In response to the diagnosis request, the control unit 30 determines that the diagnosis object is the domain controller based on the request content in the diagnosis request.
本实施例中,控制单元30可从诊断请求中获取请求内容,比如,请求内 容为请求获取某个传感器的传感数据、请求获取某个元器件的故障信息,之后,控制单元30可基于请求内容中的目标地址,确定诊断对象。在请求内容中的目标地址指向控制单元30所在的域控制器的情况下,控制单元30可确定诊断对象为控制单元30所在的域控制器。In this embodiment, the control unit 30 may obtain the request content from the diagnosis request, for example, the request content It is simply a request to obtain the sensing data of a certain sensor or the fault information of a certain component. After that, the control unit 30 can determine the diagnosis object based on the target address in the request content. In the case where the target address in the request content points to the domain controller where the control unit 30 is located, the control unit 30 may determine that the diagnostic object is the domain controller where the control unit 30 is located.
S503、控制单元30执行与诊断请求对应的诊断操作。S503. The control unit 30 performs the diagnosis operation corresponding to the diagnosis request.
本实施例中,在诊断对象为控制单元30所在的域控制器的情况下,作为域控制器上由控制单元30处理诊断请求,即由控制单元30执行与诊断请求对应的诊断操作。比如,由控制单元30获取域控制器上传感器的传感数据、域控制器上元器件的故障信息、域控制器上软件的运行日志等。In this embodiment, when the diagnosis object is the domain controller where the control unit 30 is located, the control unit 30 processes the diagnosis request as the domain controller, that is, the control unit 30 performs the diagnosis operation corresponding to the diagnosis request. For example, the control unit 30 obtains sensing data of sensors on the domain controller, fault information of components on the domain controller, running logs of software on the domain controller, etc.
S504、控制单元30根据诊断操作的执行情况,向诊断发起装置10返回诊断请求的响应消息。S504. The control unit 30 returns a response message of the diagnosis request to the diagnosis initiating device 10 according to the execution status of the diagnosis operation.
本实施例中,在诊断对象为控制单元30所在的域控制器的情况下,控制单元30执行与诊断请求对应的诊断操作,并获取诊断操作的执行请求,其中,诊断操作的执行情况可包括如下至少一种:诊断操作未执行完成、诊断操作执行完成、执行诊断操作所获得的诊断数据(比如传感器数据、故障信息等)。在得到诊断操作的执行情况后,控制单元30向诊断发起装置10返回诊断请求的响应消息,该响应消息携带有诊断操作的执行情况,以通过控制单元30直接向诊断发起装置10反馈诊断操作的执行情况。In this embodiment, when the diagnostic object is the domain controller where the control unit 30 is located, the control unit 30 executes the diagnostic operation corresponding to the diagnostic request and obtains the execution request of the diagnostic operation, where the execution status of the diagnostic operation may include At least one of the following: the diagnostic operation is not completed, the diagnostic operation is completed, or the diagnostic data obtained by performing the diagnostic operation (such as sensor data, fault information, etc.). After obtaining the execution status of the diagnostic operation, the control unit 30 returns a response message of the diagnostic request to the diagnosis initiating device 10 . The response message carries the execution status of the diagnostic operation, so that the control unit 30 directly feeds back the status of the diagnostic operation to the diagnosis initiating device 10 . Implementation.
本申请实施例中,域控制器中的控制单元30接收诊断发起装置10发送的诊断请求,在根据诊断请求确定诊断对象为该域控制器的情况下,控制单元30执行诊断请求对应的诊断操作,并将诊断操作的执行情况直接反馈给诊断发起装置10。相较于诊断请求由计算单元转发给控制单元30,诊断操作的执行情况由计算单元转发给诊断发起装置10的方式,本申请实施例有效的减少了诊断通信过程中的消息转发次数,降低了通信延迟,提高了通信效率。In the embodiment of the present application, the control unit 30 in the domain controller receives the diagnosis request sent by the diagnosis initiating device 10. When the diagnosis object is determined to be the domain controller according to the diagnosis request, the control unit 30 performs the diagnosis operation corresponding to the diagnosis request. , and directly feeds back the execution status of the diagnostic operation to the diagnosis initiating device 10 . Compared with the method in which the diagnosis request is forwarded by the computing unit to the control unit 30 and the execution status of the diagnosis operation is forwarded by the computing unit to the diagnosis initiating device 10 , the embodiment of the present application effectively reduces the number of message forwardings during the diagnosis communication process and reduces Communication delay improves communication efficiency.
在诊断对象为控制单元所在的域控制器的情况下,诊断请求可能与域控制器中的计算单元相关。因此,在一些实施例中,如果诊断请求与域控制器中的 计算单元相关,则控制单元与计算单元通过核间通信,执行诊断操作。从而,通过控制单元与计算单元之间的核间通信,提高诊断通信效率,减少诊断通信占用的通信资源。In the case where the diagnostic object is a domain controller where the control unit is located, the diagnostic request may be related to a computing unit in the domain controller. Therefore, in some embodiments, if the diagnostic request is related to If the computing unit is related, the control unit and the computing unit perform diagnostic operations through inter-core communication. Therefore, through inter-core communication between the control unit and the computing unit, the efficiency of diagnostic communication is improved and the communication resources occupied by diagnostic communication are reduced.
诊断通信的作用可包括如下两种:用于车辆的故障诊断、用于车辆的数据升级。因此,在本实施例中,诊断请求与域控制器中的计算单元相关可包括如下至少一种情况:诊断请求用于请求获取计算单元中存储的数据,诊断请求所请求的数据需要经过计算单元运算得到、诊断请求用于请求域控制器进行升级。其中,诊断请求用于请求域控制器进行升级可包括用于请求控制单元和/或计算单元升级。The functions of diagnostic communication can include the following two: for vehicle fault diagnosis and for vehicle data upgrade. Therefore, in this embodiment, the diagnostic request related to the computing unit in the domain controller may include at least one of the following situations: the diagnostic request is used to request to obtain data stored in the computing unit, and the data requested by the diagnostic request needs to go through the computing unit Computed, diagnostic requests are used to request domain controllers for upgrades. Wherein, the diagnostic request used to request the domain controller to upgrade may include requesting the control unit and/or the computing unit to upgrade.
在诊断请求用于请求域控制器进行升级的情况下,域控制器的设备状态可包括如下两种:诊断状态和升级状态。在诊断状态下,域控制器接收来自诊断发起设备的升级数据并进行存储,在升级状态下,域控制器基于来自诊断发起设备的升级数据进行升级。因此,控制单元可通过判断域控制器的设备状态,来采取不同的操作,下面分别通过实施例进行说明。In the case where a diagnostic request is used to request an upgrade of a domain controller, the device status of the domain controller may include the following two types: diagnostic status and upgrade status. In the diagnostic state, the domain controller receives and stores upgrade data from the diagnostic initiating device. In the upgrade state, the domain controller performs upgrades based on the upgrade data from the diagnostic initiating device. Therefore, the control unit can take different operations by determining the device status of the domain controller, which will be described below through embodiments.
其中,域控制器处于诊断状态时,域控制器中的控制单元和计算单元也处于诊断状态,域控制器处于升级状态时,域控制器中的控制单元和计算单元也处于升级状态。Among them, when the domain controller is in the diagnosis state, the control unit and computing unit in the domain controller are also in the diagnosis state. When the domain controller is in the upgrade state, the control unit and computing unit in the domain controller are also in the upgrade state.
图6示出了本申请实施例提供的车辆诊断通信方法的流程示意图三,该方法应用于域控制器中的控制单元,换句话说,本实施例提供的车辆诊断通信方法的执行主体为控制单元。如图6所示,车辆诊断通信方法包括:Figure 6 shows a schematic flowchart 3 of the vehicle diagnostic communication method provided by this embodiment of the present application. This method is applied to the control unit in the domain controller. In other words, the execution subject of the vehicle diagnostic communication method provided by this embodiment is the control unit. unit. As shown in Figure 6, the vehicle diagnostic communication method includes:
S601、接收诊断发起装置发送的诊断请求。S601. Receive the diagnosis request sent by the diagnosis initiating device.
S602、响应于诊断请求,基于诊断请求中的请求内容确定诊断对象为域控制器。S602. In response to the diagnosis request, determine that the diagnosis object is the domain controller based on the request content in the diagnosis request.
其中,S601和S602的实现原理和技术效果可参照前述实施例,不再赘述。Among them, the implementation principles and technical effects of S601 and S602 can be referred to the foregoing embodiments, and will not be described again.
S603、确定诊断请求是否指示域控制器进行升级。S603. Determine whether the diagnostic request instructs the domain controller to upgrade.
本实施例中,控制单元可通过判断诊断请求是否属于升级服务请求,来确 定诊断请求是否指示域控制器进行升级,在控制单元确定诊断请求指示域控制器进行升级的情况下,则执行S604,否则执行S606。In this embodiment, the control unit can determine whether the diagnosis request belongs to an upgrade service request. Determine whether the diagnostic request instructs the domain controller to upgrade. If the control unit determines that the diagnostic request instructs the domain controller to upgrade, S604 is executed; otherwise, S606 is executed.
在一种可能的实现方式中,控制单元可通过判断诊断请求是否为0×11请求、0×34请求、0×36请求、0×37请求或0×38请求,若是,则确定诊断请求指示域控制器进行升级,否则确定诊断请求未指示域控制器进行升级。其中,0×11请求、0×34请求、0×36请求、0×37请求或0×38请求为UDS中的升级服务请求。从而,基于UDS中的这几种升级服务请求,提高判断诊断请求是否属于升级服务请求的准确性。In a possible implementation, the control unit can determine whether the diagnostic request is a 0×11 request, a 0×34 request, a 0×36 request, a 0×37 request or a 0×38 request, and if so, determine the diagnostic request indication. Domain controller to upgrade, otherwise it was determined that the diagnostic request did not direct the domain controller to upgrade. Among them, 0×11 request, 0×34 request, 0×36 request, 0×37 request or 0×38 request are upgrade service requests in UDS. Therefore, based on these types of upgrade service requests in UDS, the accuracy of determining whether a diagnostic request belongs to an upgrade service request is improved.
S604、确定域控制器是否处于诊断状态。S604. Determine whether the domain controller is in a diagnostic state.
本实施例中,控制单元判断域控制器是否处于诊断状态,在域控制器处于诊断状态的情况下,执行S605,否则执行S606。In this embodiment, the control unit determines whether the domain controller is in the diagnostic state. If the domain controller is in the diagnostic state, S605 is executed. Otherwise, S606 is executed.
其中,S603和S604的执行顺序可以先执行S603,也可以先执行S604,还可以同时执行S603和S604,在此不做限制。Among them, the execution order of S603 and S604 can be to execute S603 first, or to execute S604 first, or to execute S603 and S604 at the same time, and there is no restriction here.
在一种可能的实现方式中,域控制器可在启动后默认进入诊断状态。如此,在域控制器启动后,诊断发起设备即可通过发送指示域控制器进行升级的诊断请求,实现对域控制器的升级。In one possible implementation, the domain controller can enter diagnostic state by default upon startup. In this way, after the domain controller is started, the diagnostic initiating device can upgrade the domain controller by sending a diagnostic request instructing the domain controller to upgrade.
S605、通过核间通信,将来自诊断发起装置的第一升级数据发送至计算单元,以辅助计算单元进行升级。S605. Send the first upgrade data from the diagnosis initiating device to the computing unit through inter-core communication to assist the computing unit in upgrading.
其中,第一升级数据中可包括用于控制单元升级的升级数据和/或用于计算单元升级的升级数据。考虑到控制单元主要负责控制,计算单元主要负责数据处理,计算单元的存储能力比控制单元的存储能力更强,因此在域控制器中,可由计算单元对升级数据进行存储和处理。The first upgrade data may include upgrade data used for upgrading the control unit and/or upgrade data used for upgrading the computing unit. Considering that the control unit is mainly responsible for control and the computing unit is mainly responsible for data processing, the storage capacity of the computing unit is stronger than that of the control unit. Therefore, in the domain controller, the upgrade data can be stored and processed by the computing unit.
本实施例中,控制单元在确定诊断请求指示域控制器进行升级且域控制器处于诊断状态的情况下,可接收来自诊断发起装置的第一升级数据,再将第一升级数据发送给计算单元,由计算单元进行存储。在第一升级数据中包含用于计算单元升级的升级数据的情况下,将第一升级数据发送给计算单元,有利于 辅助实现计算单元的升级。In this embodiment, when the control unit determines that the diagnosis request instructs the domain controller to perform an upgrade and the domain controller is in a diagnosis state, the control unit may receive the first upgrade data from the diagnosis initiating device, and then send the first upgrade data to the computing unit. , stored by the computing unit. In the case where the first upgrade data contains upgrade data used for upgrading the computing unit, sending the first upgrade data to the computing unit is beneficial to Assist in upgrading computing units.
S606、执行与诊断请求对应的诊断操作。S606. Execute the diagnosis operation corresponding to the diagnosis request.
本实施例中,在诊断请求未指示域控制器进行升级的情况下,控制单元自身可执行与诊断请求对应的诊断操作,比如,获取传感器的传感数据,在诊断请求指示域控制器进行升级但域控制器处于升级状态(即未处于诊断状态)的情况下,控制单元可基于存储在计算单元中的第一升级数据,执行升级操作,在诊断请求指示域控制器进行升级且域控制器处于诊断状态的情况下,控制器在将第一升级数据传递给计算单元后,可等待域控制器进入升级状态,在域控制器进入升级状态后,基于第一升级数据执行升级操作。In this embodiment, when the diagnostic request does not instruct the domain controller to upgrade, the control unit itself can perform the diagnostic operation corresponding to the diagnostic request, for example, obtain the sensing data of the sensor, and when the diagnostic request instructs the domain controller to upgrade However, when the domain controller is in an upgrade state (that is, not in a diagnostic state), the control unit can perform an upgrade operation based on the first upgrade data stored in the computing unit. When the diagnostic request instructs the domain controller to upgrade and the domain controller When in the diagnostic state, after transmitting the first upgrade data to the computing unit, the controller can wait for the domain controller to enter the upgrade state, and after the domain controller enters the upgrade state, perform an upgrade operation based on the first upgrade data.
S607、根据诊断操作的执行情况,向诊断发起装置返回诊断请求的响应消息。S607. Return a response message of the diagnosis request to the diagnosis initiating device according to the execution status of the diagnosis operation.
其中,S607的实现原理和技术效果可参照前述实施例,不再赘述。Among them, the implementation principles and technical effects of S607 can be referred to the foregoing embodiments and will not be described again.
本申请实施例中,在诊断对象为域控制器、域控制器处于诊断状态且诊断请求用于指示域控制器进行升级的情况下,控制单元通过核间通信将第一升级数据发送给计算单元,从而,通过控制单元和计算单元之间的核间通信,并以控制单元作为升级过程中的路由,实现用于升级域控制器的诊断通信,提高了诊断通信的通信效率,节约了通信资源。In the embodiment of the present application, when the diagnostic object is a domain controller, the domain controller is in a diagnostic state, and the diagnostic request is used to instruct the domain controller to upgrade, the control unit sends the first upgrade data to the computing unit through inter-core communication. , thus, through the inter-core communication between the control unit and the computing unit, and using the control unit as the route in the upgrade process, diagnostic communication for upgrading the domain controller is realized, which improves the communication efficiency of diagnostic communication and saves communication resources. .
在一些实施例,图7示出了在诊断对象为域控制器、域控制器处于诊断状态且诊断通信用于指示域控制器进行升级的情况下诊断通信的流程示意图。如图7所示,诊断通信过程可包括:In some embodiments, FIG. 7 shows a schematic flowchart of diagnostic communication when the diagnostic object is a domain controller, the domain controller is in a diagnostic state, and the diagnostic communication is used to instruct the domain controller to upgrade. As shown in Figure 7, the diagnostic communication process may include:
S701、诊断发起装置10向控制单元30发送诊断请求,诊断请求用于指示域控制器进行升级。S701. The diagnosis initiating device 10 sends a diagnosis request to the control unit 30. The diagnosis request is used to instruct the domain controller to upgrade.
S702、控制单元30向诊断发起装置10返回诊断响应,诊断响应用于向诊断发起装置10指示控制单元30接收到诊断请求。S702. The control unit 30 returns a diagnosis response to the diagnosis initiating device 10. The diagnosis response is used to indicate to the diagnosis initiating device 10 that the control unit 30 has received the diagnosis request.
本实施例中,控制单元30在根据诊断请求确定诊断对象为域控制器且诊断请求用于指示域控制器进行升级的情况下,可向诊断发起装置10返回诊断 响应,以告知诊断发起装置控制单元接收到诊断请求。In this embodiment, when the control unit 30 determines that the diagnosis object is a domain controller according to the diagnosis request and the diagnosis request is used to instruct the domain controller to upgrade, the control unit 30 may return the diagnosis to the diagnosis initiating device 10 Response to inform the diagnostic initiating device that the control unit has received the diagnostic request.
S703、诊断发起装置10响应于诊断响应向控制单元30发送第一消息,第一消息用于向控制单元30指示数据传输开始。S703. The diagnosis initiating device 10 sends a first message to the control unit 30 in response to the diagnosis response. The first message is used to indicate the start of data transmission to the control unit 30.
本实施例中,诊断发起装置10接收到诊断响应后,可响应于诊断响应向控制单元30发送第一消息,第一消息用于告知控制单元30数据传输开始。其中,第一消息还可用于请求控制单元30的数据传输要求,控制单元30的数据传输要求可包括控制单元30所能够接收并解析的数据需满足的格式、控制单元30通过核间通信进行数据传输所能够接受的数据传输速率。In this embodiment, after receiving the diagnosis response, the diagnosis initiating device 10 may send a first message to the control unit 30 in response to the diagnosis response. The first message is used to inform the control unit 30 of the start of data transmission. The first message may also be used to request the data transmission requirements of the control unit 30. The data transmission requirements of the control unit 30 may include the format that the control unit 30 can receive and parse, and the control unit 30 performs data transmission through inter-core communication. The data transfer rate that the transmission can accept.
S704、控制单元30响应于第一消息,向计算单元20发送第二消息,第二消息用于向计算单元20指示数据传输开始。S704. In response to the first message, the control unit 30 sends a second message to the computing unit 20. The second message is used to indicate the start of data transmission to the computing unit 20.
本实施例中,由于升级数据需要传输至计算单元20中进行存储,控制单元30在接收到第一消息后,可向计算单元20发第二消息,以通过第二消息向计算单元20告知数据传输开始,便于计算单元20准备好接收数据。其中,第二消息还可用于请求计算单元20的数据传输要求,计算单元20的数据传输要求可包括计算单元20所能够接收并解析的数据需满足的格式、计算单元20通过核间通信进行数据传输所能够接受的数据传输速率。In this embodiment, since the upgrade data needs to be transmitted to the computing unit 20 for storage, after receiving the first message, the control unit 30 can send a second message to the computing unit 20 to inform the computing unit 20 of the data through the second message. The transmission begins so that the computing unit 20 is ready to receive the data. The second message can also be used to request the data transmission requirements of the computing unit 20. The data transmission requirements of the computing unit 20 may include the format that the data that the computing unit 20 can receive and parse must meet, and the computing unit 20 performs data transmission through inter-core communication. The data transfer rate that the transmission can accept.
S705、计算单元20响应于第二消息,向控制单元30返回第二消息的响应消息,第二消息的响应消息用于指示计算单元30接收到第二消息以及指示计算单元30的数据传输要求。S705. In response to the second message, the computing unit 20 returns a response message of the second message to the control unit 30. The response message of the second message is used to indicate that the computing unit 30 has received the second message and to indicate the data transmission requirement of the computing unit 30.
S706、控制单元30响应于计算单元20返回的第二消息的响应消息,向诊断发起装置10发送第一消息的响应消息,第一消息的响应消息用于指示控制单元30接收到第一消息以及指示控制单元30的数据传输要求。S706. In response to the response message of the second message returned by the computing unit 20, the control unit 30 sends a response message of the first message to the diagnosis initiating device 10. The response message of the first message is used to indicate that the control unit 30 has received the first message and Indicates the data transmission requirements of the control unit 30.
S707、诊断发起装置10响应于第一消息的响应消息,向控制单元30发送第三消息,第三消息中携带有第一升级数据。S707. In response to the response message of the first message, the diagnosis initiating device 10 sends a third message to the control unit 30, where the third message carries the first upgrade data.
本实施例中,诊断发起装置10在接收到第一消息的响应消息之后,便可进行升级数据的传输,因此向控制单元30发送第三消息,在第三消息中携带 第一升级数据。其中,第一升级数据可参照前述实施例,不再赘述。In this embodiment, after receiving the response message of the first message, the diagnosis initiating device 10 can transmit the upgrade data, and therefore sends the third message to the control unit 30, carrying the First upgrade data. For the first upgrade data, reference may be made to the foregoing embodiments, which will not be described again.
S708、控制单元30响应于第三消息,向计算单元20发送第四消息,第四消息中携带有第一升级数据。S708. In response to the third message, the control unit 30 sends a fourth message to the computing unit 20, where the fourth message carries the first upgrade data.
本实施例中,控制单元30接收到第三消息后,可从第三消息中获取第一升级文件,基于核间通信的方式,生成携带第一升级数据的第四消息,并将第四消息通过核间通信的方式,发送给计算单元。In this embodiment, after receiving the third message, the control unit 30 can obtain the first upgrade file from the third message, generate a fourth message carrying the first upgrade data based on inter-core communication, and convert the fourth message to Sent to the computing unit through inter-core communication.
S709、计算单元20接收到第四消息后,向控制单元30返回第四消息的响应消息,第四消息的响应消息用于向控制单元30指示第一升级数据传输完成。S709. After receiving the fourth message, the computing unit 20 returns a response message to the fourth message to the control unit 30. The response message to the fourth message is used to indicate to the control unit 30 that the first upgrade data transmission is completed.
S710、控制单元30响应于计算单元20返回的第四消息的响应消息,向诊断发起装置10发送第三消息的响应消息,第三消息的响应消息用于向诊断发起装置10指示第一升级数据传输完成。S710. In response to the response message of the fourth message returned by the computing unit 20, the control unit 30 sends a response message of the third message to the diagnosis initiating device 10. The response message of the third message is used to indicate the first upgrade data to the diagnosis initiating device 10. Transfer completed.
本实施例中,计算单元20在接收到第四消息后,可从第四消息中获取第一升级数据,并对第一升级数据进行存储。同时,计算单元20可向控制单元30返回第四消息的响应消息,以向控制单元30指示计算单元20已接收到第一升级数据。控制单元30响应于第四消息的响应消息,向诊断发起装置10返回第三消息的响应消息,以向诊断发起装置10指示诊断发起装置10与域控制器之间已完成第一升级数据的传输,即第一升级数据传输成功。In this embodiment, after receiving the fourth message, the computing unit 20 may obtain the first upgrade data from the fourth message and store the first upgrade data. At the same time, the computing unit 20 may return a response message of the fourth message to the control unit 30 to indicate to the control unit 30 that the computing unit 20 has received the first upgrade data. In response to the response message of the fourth message, the control unit 30 returns the response message of the third message to the diagnosis initiating device 10 to indicate to the diagnosis initiating device 10 that the transmission of the first upgrade data between the diagnosis initiating device 10 and the domain controller has been completed. , that is, the first upgrade data transmission is successful.
在一些实施例中,如图7所示,在S710之后,车辆诊断通信方法还包括:S711、诊断发起装置10向控制单元30发送数据校验消息,以请求域控制器对接收到的第一升级数据进行校验,S712、控制单元30响应于来自诊断发起装置10的数据校验消息,向计算单元20发送数据校验消息,以请求计算单元20对第一升级数据进行校验,S713、计算单元20响应于控制单元30发送的数据校验消息,向控制单元30返回数据校验响应,以向控制单元30指示数据校验结果,S714、控制单元20响应于计算单元的数据校验响应,向诊断发起装置10发送数据校验响应,以向诊断发起装置10指示数据校验结果。从而,在完成升级数据的传输后对升级数据进行校验,提高升级数据的准确性和可靠性, 提高通过诊断通信进行域控制器升级的成功率。In some embodiments, as shown in Figure 7, after S710, the vehicle diagnosis communication method also includes: S711. The diagnosis initiating device 10 sends a data verification message to the control unit 30 to request the domain controller to verify the received first The upgrade data is verified. S712. In response to the data verification message from the diagnosis initiating device 10, the control unit 30 sends a data verification message to the computing unit 20 to request the computing unit 20 to verify the first upgrade data. S713. The computing unit 20 responds to the data verification message sent by the control unit 30 and returns a data verification response to the control unit 30 to indicate the data verification result to the control unit 30. S714. The control unit 20 responds to the data verification response of the computing unit. , sending a data verification response to the diagnosis initiating device 10 to indicate the data verification result to the diagnosis initiating device 10 . Therefore, after completing the transmission of the upgrade data, the upgrade data is verified to improve the accuracy and reliability of the upgrade data. Improves the success rate of domain controller upgrades through diagnostic communication.
其中,数据校验结果可为数据校验成功或失败。The data verification result may be data verification success or failure.
其中,控制单元30向诊断发起装置10返回的诊断响应、第一消息的响应消息、第三消息的响应消息、数据校验响应均属于诊断请求的响应消息。Among them, the diagnosis response, the response message of the first message, the response message of the third message, and the data verification response returned by the control unit 30 to the diagnosis initiating device 10 all belong to the response messages of the diagnosis request.
在本申请实施例中,在域控制器处于诊断状态且诊断请求指示域控制器进行升级的情况下,以域控制器中的控制单元30为路由,通过核间通信,将诊断发起装置10发送的指示数据传输开始的消息、携带升级数据的消息、指示数据校验的消息转发至计算单元20,通过核间通信接收计算单元20返回的指示数据传输要求的消息、数据传输完成的消息、指示数据校验结果的消息,将这些消息转发给诊断发起装置10。如此,充分发挥了控制单元30和计算单元20的优势,并利用核间通信,提高了通信效率,减少了通信资源占用。In the embodiment of the present application, when the domain controller is in a diagnostic state and the diagnostic request instructs the domain controller to upgrade, the control unit 30 in the domain controller is used as a route to send the diagnosis initiating device 10 through inter-core communication. Messages indicating the start of data transmission, messages carrying upgrade data, and messages indicating data verification are forwarded to the computing unit 20, and messages indicating data transmission requirements, messages indicating data transmission completion, and instructions returned by the computing unit 20 are received through inter-core communication. Messages of data verification results are forwarded to the diagnosis initiating device 10 . In this way, the advantages of the control unit 30 and the computing unit 20 are fully utilized, and inter-core communication is utilized to improve communication efficiency and reduce communication resource occupation.
在一些实施例中,控制单元在确定诊断请求指示域控制器进行升级且域控制器处于升级状态的情况下,计算单元可通过核间通信,向计算单元发送第二升级数据,控制单元根据第二升级数据进行升级。In some embodiments, when the control unit determines that the diagnostic request indicates that the domain controller is upgraded and the domain controller is in the upgrade state, the computing unit may send the second upgrade data to the computing unit through inter-core communication, and the control unit may 2. Upgrade data to upgrade.
其中,第二升级数据为用于控制单元升级的升级数据。The second upgrade data is upgrade data used for upgrading the control unit.
本实施例中,计算单元可在第一升级数据中包含用于控制单元升级的第二升级数据的情况下,将第二升级数据通过核间通信的方式,发送给控制单元,控制单元接收到第二升级数据后,可根据第二升级数据对控制单元中的固件或者软件进行升级。在第一升级数据还包括用于计算单元升级的第三升级数据的情况下,计算单元可根据第三升级数据,对计算单元中的固件或者软件进行升级。如此,实现域控制器的升级。In this embodiment, when the first upgrade data contains the second upgrade data for the control unit upgrade, the computing unit can send the second upgrade data to the control unit through inter-core communication, and the control unit receives After the second upgrade data, the firmware or software in the control unit can be upgraded according to the second upgrade data. In the case where the first upgrade data also includes third upgrade data for upgrading the computing unit, the computing unit may upgrade the firmware or software in the computing unit according to the third upgrade data. In this way, the domain controller is upgraded.
在一种可能的实现方式中,计算单元还可以通过空中下载技术(Over-the-Air Technology,OTA)获得用于域控制器升级的升级数据。在该升级数据包含第二升级数据的情况下,计算单元可将第二升级数据通过核间通信发送给控制单元。从而,提高了升级数据获取的灵活性。In a possible implementation, the computing unit can also obtain upgrade data for domain controller upgrade through Over-the-Air Technology (OTA). In the case where the upgrade data includes the second upgrade data, the computing unit may send the second upgrade data to the control unit through inter-core communication. Thus, the flexibility of upgrade data acquisition is improved.
在一种可能的实现方式中,域控制器在满足升级触发条件的情况下,进入 升级状态。其中,升级触发条件可包括如下至少一种:来自诊断发起装置的第一升级数据传输完成,和/或,控制单元接收到诊断发起装置的第五消息,第五消息指示控制单元进入升级状态,控制单元接收到计算单元的第六消息,第六消息指示控制单元进入升级状态。In one possible implementation, the domain controller enters the Upgrade status. Wherein, the upgrade triggering condition may include at least one of the following: the first upgrade data transmission from the diagnosis initiating device is completed, and/or the control unit receives a fifth message from the diagnosis initiating device, and the fifth message instructs the control unit to enter the upgrade state, The control unit receives a sixth message from the computing unit, and the sixth message instructs the control unit to enter an upgrade state.
本实现方式中,域控制器可在第一升级数据传输完成的情况下,进入升级状态,以在升级数据传输完成后及时进行升级,和/或,控制单元可在接收到诊断发起装置指示控制单元进入升级状态的第五消息的情况下,控制域控制器进入升级状态,使得诊断发起装置可主动触发域控制器进入升级状态,和/或,控制单元可在接收到计算单元指示控制单元进入升级状态的第六消息的情况下,控制域控制器进入升级状态,使得计算单元也可以主动触发域控制器进入升级状态。In this implementation, the domain controller can enter the upgrade state when the first upgrade data transmission is completed, so as to perform the upgrade in time after the upgrade data transmission is completed, and/or the control unit can control the control after receiving the instruction from the diagnosis initiating device. In the case of the fifth message that the unit enters the upgrade state, the control domain controller enters the upgrade state, so that the diagnosis initiating device can actively trigger the domain controller to enter the upgrade state, and/or, the control unit can receive an instruction from the computing unit to enter the upgrade state. In the case of the sixth message of the upgrade state, the domain controller is controlled to enter the upgrade state, so that the computing unit can also actively trigger the domain controller to enter the upgrade state.
一示例中,第五消息可为重启消息或者复位消息。其中,重启消息指示域控制器重启,复位消息指示域控制器进行复位。控制单元接收到第五消息后可控制域控制器重启或者复位。诊断发起装置可在第一升级数据传输完成后,向控制单元发送第五消息,使得域控制器及时进行升级。In an example, the fifth message may be a restart message or a reset message. Among them, the restart message instructs the domain controller to restart, and the reset message instructs the domain controller to reset. After receiving the fifth message, the control unit can control the domain controller to restart or reset. The diagnosis initiating device may send a fifth message to the control unit after the first upgrade data transmission is completed, so that the domain controller can upgrade in time.
一示例中,计算单元可通过OTA接收到用于域控制器升级的升级数据后,向控制单元发送第六消息,以使得域控制器接收到升级数据后及时进行升级,提高通过诊断通信进行域控制器升级的升级效率。In one example, after receiving the upgrade data for upgrading the domain controller through OTA, the computing unit can send a sixth message to the control unit, so that the domain controller can perform the upgrade in time after receiving the upgrade data, thereby improving domain performance through diagnostic communication. Upgrade efficiency of controller upgrades.
在一些实施例,图8示出了在诊断对象为域控制器、域控制器处于诊断状态且诊断通信用于指示域控制器进行升级的情况下诊断通信的流程示意图。如图8所示,诊断通信过程可包括:In some embodiments, FIG. 8 shows a schematic flowchart of diagnostic communication when the diagnostic object is a domain controller, the domain controller is in a diagnostic state, and the diagnostic communication is used to instruct the domain controller to upgrade. As shown in Figure 8, the diagnostic communication process may include:
S801、控制单元30接收诊断发起装置10发送的第五消息。S801. The control unit 30 receives the fifth message sent by the diagnosis initiating device 10.
S802、控制单元30响应于第五消息,向诊断发起装置10返回第五消息的响应消息,第五消息的响应消息用于指示控制单元30已接收到第五消息。S802. In response to the fifth message, the control unit 30 returns a response message of the fifth message to the diagnosis initiating device 10. The response message of the fifth message is used to indicate that the control unit 30 has received the fifth message.
其中,第五消息可参照前述实施例,不再赘述。For the fifth message, reference may be made to the foregoing embodiments, which will not be described again.
S803、控制单元30响应于第五消息,向计算单元20发送第七消息,第七 消息用于指示计算单元20准备进入升级状态。S803. In response to the fifth message, the control unit 30 sends the seventh message to the computing unit 20. The seventh message The message is used to indicate that the computing unit 20 is ready to enter the upgrade state.
S804、计算单元20响应于第七消息,向控制单元30返回第七消息的响应消息,第七消息的响应消息用于指示计算单元20已接收到第七消息。S804. In response to the seventh message, the computing unit 20 returns a response message of the seventh message to the control unit 30. The response message of the seventh message is used to indicate that the computing unit 20 has received the seventh message.
本实施例中,控制单元30接收到第七消息后,控制单元30和计算单元20均进入升级状态,即域控制器进入升级状态。In this embodiment, after the control unit 30 receives the seventh message, both the control unit 30 and the computing unit 20 enter the upgrade state, that is, the domain controller enters the upgrade state.
S805、计算单元20向控制单元30发送的第八消息,第八消息用于向控制单元30指示数据传输开始。S805. The computing unit 20 sends the eighth message to the control unit 30. The eighth message is used to indicate the start of data transmission to the control unit 30.
本实施例中,在进入升级状态后,由于升级数据存储在计算单元20中,所以计算单元20可在存储的升级数据包含用于控制单元30升级的第二升级数据的情况下,通过核间通信,向控制单元30发送第八消息,以告知控制单元30数据传输开始,即准备进行升级数据的传输。In this embodiment, after entering the upgrade state, since the upgrade data is stored in the computing unit 20 , the computing unit 20 can, when the stored upgrade data includes the second upgrade data for upgrading the control unit 30 , through the inter-core Communication, sending an eighth message to the control unit 30 to inform the control unit 30 of the start of data transmission, that is, preparation for transmission of upgrade data.
其中,第八消息还可用于请求控制单元30的数据传输要求,以便计算单元20按照该数据传输要求向控制单元30发送升级数据,该数据传输要求可参照前述实施例,不再赘述。The eighth message may also be used to request data transmission requirements from the control unit 30 so that the computing unit 20 sends upgrade data to the control unit 30 according to the data transmission requirements. The data transmission requirements may refer to the previous embodiments and will not be described again.
S806、控制单元30响应于第八消息,向计算单元20返回第八消息的响应消息,以将控制单元30的数据传输要求告知计算单元20。S806. In response to the eighth message, the control unit 30 returns a response message of the eighth message to the computing unit 20, so as to inform the computing unit 20 of the data transmission requirement of the control unit 30.
本实施例中,控制单元30接收到第八消息后,可通过核间通信,向计算单元20返回第八消息的响应消息。在第八消息的响应消息中,携带有控制单元30的数据传输要求。In this embodiment, after receiving the eighth message, the control unit 30 may return a response message of the eighth message to the computing unit 20 through inter-core communication. The response message of the eighth message carries the data transmission request of the control unit 30 .
S807、计算单元20响应于第八消息的响应消息,向控制单元30发送第九消息,第九消息中携带有第二升级数据。S807. In response to the response message of the eighth message, the computing unit 20 sends a ninth message to the control unit 30, where the ninth message carries the second upgrade data.
本实施例中,计算单元20在接收到第八消息的响应消息后,可从存储的升级数据中(比如第一升级数据)获取第二升级数据,生成携带第二升级数据的第九消息,并通过核间通信将第九消息发送给控制单元30。In this embodiment, after receiving the response message of the eighth message, the computing unit 20 can obtain the second upgrade data from the stored upgrade data (such as the first upgrade data), and generate the ninth message carrying the second upgrade data, And the ninth message is sent to the control unit 30 through inter-core communication.
S808、控制单元30响应于第九消息,向计算单元20发送第九消息的响应消息,以告知计算单元20第二升级数据传输完成。 S808. In response to the ninth message, the control unit 30 sends a response message of the ninth message to the computing unit 20 to inform the computing unit 20 that the second upgrade data transmission is completed.
S809,控制单元30和计算单元20分别进行升级。S809, the control unit 30 and the computing unit 20 are upgraded respectively.
本实施例中,控制单元30在接收到第二升级数据后,可按照第二升级数据进行升级,计算单元20可按照用于计算单元20升级的第三升级数据进行升级。如此,完成域控制器的升级。In this embodiment, after receiving the second upgrade data, the control unit 30 can upgrade according to the second upgrade data, and the computing unit 20 can upgrade according to the third upgrade data used for upgrading the computing unit 20 . In this way, the upgrade of the domain controller is completed.
在一种可能的实现方式中,计算单元20在接收到第九消息的响应消息后,可响应于第九消息的响应消息,向控制单元30发送数据校验消息,控制单元30响应于数据校验消息,对接收到的第二升级数据进行校验,并根据校验结果,向计算单元20发送数据校验响应。从而,通过数据校验,提高升级状态下计算单元20与控制单元30进行升级数据传输的准确性和可靠性。In a possible implementation, after receiving the response message of the ninth message, the computing unit 20 may send a data verification message to the control unit 30 in response to the response message of the ninth message. The control unit 30 responds to the data verification message. Verify message, verify the received second upgrade data, and send a data verification response to the computing unit 20 according to the verification result. Therefore, through data verification, the accuracy and reliability of upgrade data transmission between the computing unit 20 and the control unit 30 in the upgrade state are improved.
在一种可能的实现方式中,控制单元30进行升级之后,控制单元可30向计算单元20发送升级状态查询消息,以查询计算单元20是否完成升级,计算单元20可根据自身的升级情况,向控制单元30返回升级状态回应消息,以通过升级状态回应消息向控制单元30告知计算单元20是否完成升级。In a possible implementation, after the control unit 30 is upgraded, the control unit 30 may send an upgrade status query message to the computing unit 20 to query whether the computing unit 20 has completed the upgrade. The computing unit 20 may send a query message to the computing unit 20 according to its own upgrade status. The control unit 30 returns the upgrade status response message to inform the control unit 30 whether the computing unit 20 completes the upgrade through the upgrade status response message.
在一种可能的实现方式中,控制单元30在接收到计算单元20的升级状态回应消息后,若根据升级状态回应消息确定计算单元20升级完成,则可向计算单元20发送关机命令,以指示计算单元20关机,计算单元20在接收到关机命令后,若确定当前允许关机,则向控制单元30返回关机响应。从而,在升级完成后,控制单元30和计算单元20自动关机,以确保升级后的控制单元30和计算单元20在重启后便可以按照升级后的固件和/或软件进行运行。In a possible implementation, after receiving the upgrade status response message from the computing unit 20, if the control unit 30 determines that the upgrade of the computing unit 20 is completed according to the upgrade status response message, it may send a shutdown command to the computing unit 20 to indicate The computing unit 20 is shut down. After receiving the shutdown command, the computing unit 20 returns a shutdown response to the control unit 30 if it determines that shutdown is currently allowed. Therefore, after the upgrade is completed, the control unit 30 and the computing unit 20 are automatically shut down to ensure that the upgraded control unit 30 and the computing unit 20 can run according to the upgraded firmware and/or software after restarting.
基于前述实施例,在控制单元与计算单元进行核间通信的过程中,在一些实施例中,通信消息所采用的数据结构包括命令数据结构和诊断数据结构。其中,命令数据结构包括如下至少一个字段:命令字段、响应字段、错误反馈字段、命令数据长度字段、命令数据地址字段,诊断数据结构包括如下至少一个字段:目标节点字段、诊断数据长度字段、诊断数据地址字段。控制单元与计算单元之间进行命令传输的情况下,可采用命令数据结构,控制单元与计算单元之间进行数据(尤其是升级数据)传输的情况下,可采用诊断数据结构,以 提高核间通信中的数据传输效率。Based on the foregoing embodiments, in the process of inter-core communication between the control unit and the computing unit, in some embodiments, the data structure used in the communication message includes a command data structure and a diagnostic data structure. Among them, the command data structure includes at least one of the following fields: command field, response field, error feedback field, command data length field, command data address field, and the diagnosis data structure includes at least one of the following fields: target node field, diagnosis data length field, diagnosis Data address field. In the case of command transmission between the control unit and the computing unit, the command data structure can be used. In the case of data (especially upgrade data) transmission between the control unit and the computing unit, the diagnostic data structure can be used to Improve data transmission efficiency in inter-core communication.
本实施例中,在命令数据结构中:1)命令字段中携带命令类型值,命令类型值反映命令消息对应的执行操作,比如,在控制单元向计算单元发送的命令消息中,命令字段携带的命令类型值为1时,表示控制单元指示计算单元启动,命令字段携带的命令类型值为2时,表示控制单元指示计算单元复位,2)响应字段中携带响应类型值,响应类型值反映响应消息所传递的响应内容,比如,在计算单元向控制单元发送的响应消息中,响应字段携带的响应类型值为1时,表示计算单元正在执行命令消息所指示的执行操作,命令字段携带的命令类型值为2时,表示计算单元已完成命令消息所指示的执行操作,3)错误码字段中携带错误类型值,错误类型值反馈控制单元或计算单元在执行命令消息中的执行操作时所出现的错误,4)命令数据长度字段中携带数据地址的数据长度,该数据地址是指命令消息或响应消息中相关数据的存储地址,5)命令数据地址字段中携带命令消息或响应消息中相关数据的存储地址。从而,基于命令数据结构,控制单元和计算单元可清晰且准确地进行核间通信。In this embodiment, in the command data structure: 1) The command field carries a command type value, and the command type value reflects the execution operation corresponding to the command message. For example, in the command message sent by the control unit to the computing unit, the command field carries When the command type value is 1, it means that the control unit instructs the computing unit to start. When the command type value carried in the command field is 2, it means that the control unit instructs the computing unit to reset. 2) The response field carries a response type value, and the response type value reflects the response message. The response content passed, for example, in the response message sent by the computing unit to the control unit, when the response type value carried in the response field is 1, it means that the computing unit is executing the execution operation indicated by the command message, and the command type carried in the command field When the value is 2, it means that the computing unit has completed the execution operation indicated in the command message. 3) The error code field carries an error type value. The error type value feeds back the error that occurred when the control unit or computing unit executed the execution operation in the command message. Error, 4) The command data length field carries the data length of the data address. The data address refers to the storage address of the relevant data in the command message or response message. 5) The command data address field carries the relevant data in the command message or response message. Storage address. Thus, the control unit and the computing unit can communicate clearly and accurately between cores based on the command data structure.
本实施例中,在诊断数据结构中:1)目标节点字段中携带目标节点的标识,目标节点是指消息所传达的对象,比如,控制单元将消息发送给计算单元,则计算单元为目标节点,2)诊断数据长度字段中携带诊断数据所在的存储地址的数据长度,3)诊断数据地址字段中携带诊断数据所在的存储地址。从而,在核间通信中,基于诊断数据结构,控制单元和计算单元可在共享内存中存储数据,也能够准确知道对方将数据存放在共享内存的何处,提高了核间通信的准确性。In this embodiment, in the diagnostic data structure: 1) The target node field carries the identification of the target node. The target node refers to the object conveyed by the message. For example, if the control unit sends the message to the computing unit, the computing unit is the target node. , 2) The diagnostic data length field carries the data length of the storage address where the diagnostic data is located, 3) The diagnostic data address field carries the storage address where the diagnostic data is located. Therefore, in inter-core communication, based on the diagnostic data structure, the control unit and the computing unit can store data in the shared memory, and can also accurately know where the other party stores the data in the shared memory, improving the accuracy of inter-core communication.
下面结合图9给出诊断对象为CAN ECU的实施例:The following is an example in which the diagnostic object is CAN ECU in conjunction with Figure 9:
图9示出了本申请实施例提供的车辆诊断通信方法的流程示意图四。如图9所示,车辆诊断通信方法包括:Figure 9 shows a schematic flowchart 4 of the vehicle diagnostic communication method provided by the embodiment of the present application. As shown in Figure 9, the vehicle diagnostic communication method includes:
S901、域控制器中的控制单元30接收诊断发起装置10发送的诊断请求。S901. The control unit 30 in the domain controller receives the diagnosis request sent by the diagnosis initiating device 10.
其中,S901的实现原理和技术效果可参照前述实施例,不再赘述。 The implementation principles and technical effects of S901 may be referred to the foregoing embodiments and will not be described again.
S902、控制单元30响应于诊断请求,基于诊断请求中的请求内容确定诊断对象为CAN ECU 60。S902. The control unit 30 responds to the diagnosis request and determines that the diagnosis object is the CAN ECU 60 based on the request content in the diagnosis request.
本实施例中,控制单元30可从诊断请求中获取请求内容,比如,请求内容为请求获取某个传感器的传感数据、请求获取某个元器件的故障信息,之后,控制单元30可基于请求内容中的目标地址,确定诊断对象。在请求内容中的目标地址指向通过CAN与控制单元30连接的CAN ECU 60的情况下,控制单元30可确定诊断对象为CAN ECU 60。In this embodiment, the control unit 30 can obtain the request content from the diagnosis request. For example, the request content is a request to obtain sensing data of a certain sensor or a request to obtain fault information of a certain component. After that, the control unit 30 can obtain the request content based on the request. The target address in the content determines the diagnostic object. In the case where the target address in the request content points to the CAN ECU 60 connected to the control unit 30 through CAN, the control unit 30 may determine that the diagnostic object is the CAN ECU 60.
S903、控制单元30向CAN ECU 60发送诊断请求。S903. The control unit 30 sends a diagnosis request to the CAN ECU 60.
本实施例中,控制单元30在确定诊断对象为CAN ECU 60的情况下,可通过位于控制单元30内的诊断路由模块,将诊断请求转发给CAN ECU 60。In this embodiment, when the control unit 30 determines that the diagnosis object is the CAN ECU 60, it can forward the diagnosis request to the CAN ECU 60 through the diagnosis routing module located in the control unit 30.
具体的,控制单元30可通过诊断路由模块,将诊断请求从以太网报文(如DoIP报文)转换为控制局域网络上的诊断(Diagnostic over Controller Area Network,DoCAN)报文,将转换后的诊断请求发送给CAN ECU 60。Specifically, the control unit 30 can convert the diagnostic request from an Ethernet message (such as a DoIP message) to a diagnostic (Diagnostic over Controller Area Network, DoCAN) message on the control local area network through the diagnostic routing module, and convert the converted The diagnostic request is sent to CAN ECU 60.
S904、控制单元30根据CAN ECU 60的诊断情况,向诊断发起装置10返回诊断请求的响应消息。S904. The control unit 30 returns a response message of the diagnosis request to the diagnosis initiating device 10 according to the diagnosis situation of the CAN ECU 60.
一示例中,控制单元30可在接收到CAN ECU 60返回的响应消息后,向诊断发起装置10发送诊断请求的响应消息。其中,CAN ECU 60在接收到诊断请求后,可通过CAN向控制单元30发送响应消息,控制单元30可通过诊断路由模块,将来自CAN ECU 60的响应消息从DoCAN报文转为以太网报文,再将转换后的响应消息发送给诊断发起装置10。In an example, the control unit 30 may send a response message of the diagnosis request to the diagnosis initiating device 10 after receiving the response message returned by the CAN ECU 60. Among them, after receiving the diagnostic request, the CAN ECU 60 can send a response message to the control unit 30 through CAN, and the control unit 30 can convert the response message from the CAN ECU 60 from the DoCAN message to the Ethernet message through the diagnostic routing module. , and then send the converted response message to the diagnosis initiating device 10 .
又一示例中,控制单元30可在未收到CAN ECU 60返回的响应消息的时长超过预设市场的情况下,向诊断发起装置10发送诊断请求的响应消息,以告知诊断发起装置10再等待一段时间,或者告知诊断发起装置10诊断通信异常。In another example, the control unit 30 may send a response message of the diagnosis request to the diagnosis initiating device 10 to inform the diagnosis initiating device 10 to wait if the response message returned by the CAN ECU 60 is not received for a period exceeding the preset market. for a period of time, or inform the diagnosis initiating device 10 to diagnose communication abnormalities.
本申请实施例中,在诊断对象为通过CAN与控制单元30通信的CAN ECU 60的情况下,控制单元30充当了CAN ECU 60与诊断发起装置10的路由, 将来自诊断发起装置10的诊断请求,转发给CAN ECU 60,还可以基于CAN ECU 60的诊断情况,向诊断发起装置10返回诊断请求的响应消息。相较于计算单元充当路由的情况,本申请实施例有效地减少了诊断通信中的消息转发次数,降低了诊断通信的时延,提高了诊断通信的效率。In the embodiment of the present application, when the diagnosis object is the CAN ECU 60 that communicates with the control unit 30 through CAN, the control unit 30 acts as a route between the CAN ECU 60 and the diagnosis initiating device 10. The diagnosis request from the diagnosis initiating device 10 is forwarded to the CAN ECU 60 , and a response message to the diagnosis request can also be returned to the diagnosis initiating device 10 based on the diagnosis status of the CAN ECU 60 . Compared with the situation where the computing unit acts as a router, the embodiments of the present application effectively reduce the number of message forwardings in diagnostic communication, reduce the delay of diagnostic communication, and improve the efficiency of diagnostic communication.
图10示出了本申请实施例提供的域控制器中的控制单元30与计算单元20进行诊断通信的软件架构示意图。如图10所示,在控制单元30与计算单元20中分别设有共享内存,其中,以控制单元30包括共享内存35和计算单元20包括共享内存24为例。FIG. 10 shows a schematic diagram of the software architecture for diagnostic communication between the control unit 30 and the computing unit 20 in the domain controller provided by the embodiment of the present application. As shown in FIG. 10 , shared memories are provided in the control unit 30 and the computing unit 20 respectively. In this example, the control unit 30 includes the shared memory 35 and the computing unit 20 includes the shared memory 24 .
如图10所示,在诊断通信过程中,外部诊断仪10可通过交换机50向控制单元30发送诊断请求,控制单元30中的多个协议层31接收到该诊断请求后,由路由模块32确定该诊断请求的诊断对象。若诊断对象为控制单元30所在的域控制器,则可由控制单元30中的单片机33执行诊断操作,否则可由CAN通信链路34向其他ECU40发送诊断请求。单片机33在执行诊断操作的过程中,可经控制单元30中的路由模块32和共享内存35,与计算单元20中的共享内存35进行通信,实现控制单元30与计算单元20的核间通信。此外,如图10所示,计算单元20中还设有如下结构:运行时环境(Run-Time Environment,RTE)25和空中下载技术(Over-the-Air Technology,OTA),可通过OTA下载升级数据。控制单元30中还设有如下结构:RTE36和应用层37,可响应于应用层的需求执行相应操作。As shown in FIG. 10 , during the diagnostic communication process, the external diagnostic instrument 10 can send a diagnostic request to the control unit 30 through the switch 50 . After the multiple protocol layers 31 in the control unit 30 receive the diagnostic request, the routing module 32 determines The diagnostic object for this diagnostic request. If the diagnostic object is the domain controller where the control unit 30 is located, the diagnostic operation can be performed by the microcontroller 33 in the control unit 30 , otherwise, a diagnostic request can be sent to other ECUs 40 through the CAN communication link 34 . During the process of performing a diagnostic operation, the microcontroller 33 can communicate with the shared memory 35 in the computing unit 20 via the routing module 32 and the shared memory 35 in the control unit 30 to realize inter-core communication between the control unit 30 and the computing unit 20 . In addition, as shown in Figure 10, the computing unit 20 is also provided with the following structures: Run-Time Environment (RTE) 25 and Over-the-Air Technology (OTA), which can be upgraded through OTA download data. The control unit 30 is also provided with the following structures: RTE 36 and application layer 37, which can perform corresponding operations in response to the requirements of the application layer.
图11示出了本申请实施例提供的车辆诊断通信装置的结构示意图一。如图11所示,在车辆的域控制器中的控制单元一侧,车辆诊断通信装置包括:Figure 11 shows a schematic structural diagram 1 of a vehicle diagnostic communication device provided by an embodiment of the present application. As shown in Figure 11, on the control unit side in the domain controller of the vehicle, the vehicle diagnostic communication device includes:
接收模块1101,用于接收诊断发起装置发送的诊断请求。The receiving module 1101 is configured to receive a diagnosis request sent by a diagnosis initiating device.
确定模块1102,用于响应于诊断请求,基于诊断请求中的请求内容确定诊断对象,其中,诊断对象包括诊断请求所要求诊断或者访问的目标元器件。The determination module 1102 is configured to respond to the diagnosis request and determine the diagnosis object based on the request content in the diagnosis request, where the diagnosis object includes the target component required to be diagnosed or accessed by the diagnosis request.
处理模块1103,用于根据诊断对象的诊断情况,向诊断发起装置返回诊断请求的响应消息。 The processing module 1103 is configured to return a response message of the diagnosis request to the diagnosis initiating device according to the diagnosis status of the diagnosis object.
在一些实施例中,诊断对象包括域控制器,在根据诊断对象的诊断情况,向诊断发起装置返回诊断请求的响应消息的过程中,处理模块1103具体用于:执行与诊断请求对应的诊断操作,根据诊断操作的执行情况,向诊断发起装置返回诊断请求的响应消息。In some embodiments, the diagnosis object includes a domain controller. In the process of returning a response message to the diagnosis request to the diagnosis initiating device according to the diagnosis situation of the diagnosis object, the processing module 1103 is specifically configured to: perform a diagnosis operation corresponding to the diagnosis request. , according to the execution status of the diagnostic operation, return a response message of the diagnostic request to the diagnostic initiating device.
在一些实施例中,域控制器中还包括位于计算单元与控制单元之间的共享内存,计算单元与控制单元的通信方式包括基于计算单元与控制单元之间的共享内存实现的核间通信。在执行与诊断请求对应的诊断操作的过程中,处理模块1103具体用于:在诊断请求与域控制器中的计算单元相关的下,通过与计算单元进行核间通信,执行诊断操作。In some embodiments, the domain controller further includes a shared memory between the computing unit and the control unit, and the communication method between the computing unit and the control unit includes inter-core communication based on the shared memory between the computing unit and the control unit. In the process of executing the diagnostic operation corresponding to the diagnostic request, the processing module 1103 is specifically configured to: when the diagnostic request is related to the computing unit in the domain controller, perform the diagnostic operation through inter-core communication with the computing unit.
在一些实施例中,诊断请求与计算单元相关,包括如下至少一种情况:诊断请求用于请求获取计算单元中存储的数据,诊断请求所请求的数据经计算单元运算得到,诊断请求用于请求域控制器进行升级,其中,诊断请求用于请求域控制器进行升级可包括用于请求控制单元和/或计算单元升级。In some embodiments, the diagnostic request is related to the computing unit, including at least one of the following situations: the diagnostic request is used to request to obtain data stored in the computing unit, the data requested by the diagnostic request is obtained by the computing unit, and the diagnostic request is used to request The domain controller performs an upgrade, wherein the diagnostic request for requesting the domain controller for upgrade may include requesting a control unit and/or computing unit upgrade.
在一些实施例中,在诊断请求与域控制器中的计算单元相关的情况下,通过与计算单元进行核间通信,执行诊断操作的过程中,处理模块1103具体用于:确定诊断请求指示域控制器进行升级,确定域控制器处于诊断状态,通过核间通信,将来自诊断发起装置的第一升级数据发送至计算单元,以辅助计算单元进行升级。In some embodiments, when the diagnostic request is related to a computing unit in a domain controller, during the process of performing a diagnostic operation by performing inter-core communication with the computing unit, the processing module 1103 is specifically configured to: determine the diagnostic request indication domain The controller performs an upgrade, determines that the domain controller is in a diagnosis state, and sends the first upgrade data from the diagnosis initiating device to the computing unit through inter-core communication to assist the computing unit in upgrading.
在一些实施例中,在通过核间通信,将来自诊断发起装置的第一升级数据发送至计算单元,以辅助计算单元进行升级的过程中,处理模块1103具体用于:包括:接收诊断发起装置发送的第一消息,第一消息用于向控制单元指示数据传输开始,响应于第一消息,向计算单元发送第二消息,第二消息用于向计算单元指示数据传输开始,响应于计算单元返回的第二消息的响应消息,向诊断发起装置发送第一消息的响应消息,接收诊断发起装置发送的第三消息,第三消息中携带有第一升级数据,响应于第三消息,向计算单元发送第四消息,第四消息中携带有第一升级数据,响应于计算单元返回的第四消息的响应消 息,向诊断发起装置发送第三消息的响应消息,第四消息的响应消息和第三消息的响应消息用于指示第一升级数据传输完成。In some embodiments, in the process of sending the first upgrade data from the diagnosis initiating device to the computing unit through inter-core communication to assist the computing unit in upgrading, the processing module 1103 is specifically configured to: include: receiving the diagnosis initiating device The first message is sent, the first message is used to indicate the start of data transmission to the control unit, in response to the first message, the second message is sent to the computing unit, the second message is used to indicate the start of data transmission to the computing unit, in response to the computing unit Return the response message of the second message, send the response message of the first message to the diagnosis initiating device, receive the third message sent by the diagnosis initiating device, the third message carries the first upgrade data, and respond to the third message to the computing device. The unit sends a fourth message, the fourth message carries the first upgrade data, and responds to the response message of the fourth message returned by the computing unit. message, sending a response message of the third message to the diagnosis initiating device, where the response message of the fourth message and the response message of the third message are used to indicate that the first upgrade data transmission is completed.
在一些实施例中,在诊断请求与域控制器中的计算单元相关的情况下,通过与计算单元进行核间通信,执行诊断操作的过程中,处理模块1103具体用于:确定诊断请求指示域控制器进行升级,确定域控制器处于升级状态,通过核间通信,接收计算单元发送的第二升级数据,根据第二升级数据进行升级。In some embodiments, when the diagnostic request is related to a computing unit in a domain controller, during the process of performing a diagnostic operation by performing inter-core communication with the computing unit, the processing module 1103 is specifically configured to: determine the diagnostic request indication domain The controller performs an upgrade, determines that the domain controller is in an upgrade state, receives the second upgrade data sent by the computing unit through inter-core communication, and performs the upgrade based on the second upgrade data.
在一些实施例中,域控制器在满足升级触发条件的情况下,进入升级状态,升级触发条件包括如下至少一种:第一升级数据传输完成,和/或,接收到诊断发起装置的第五消息,第五消息指示控制单元进入升级状态,和/或,接收到计算单元的第六消息,第六消息指示控制单元进入升级状态。In some embodiments, the domain controller enters the upgrade state when the upgrade trigger condition is met. The upgrade trigger condition includes at least one of the following: completion of the first upgrade data transmission, and/or receipt of the fifth step of the diagnosis initiating device. message, the fifth message indicates that the control unit enters the upgrade state, and/or a sixth message from the computing unit is received, the sixth message indicates that the control unit enters the upgrade state.
在一些实施例中,在确定域控制器处于升级状态的过程中,处理模块1103具体用于:接收诊断发起装置发送的第五消息,响应于第五消息,向诊断发起装置返回第五消息的响应消息,第五消息的响应消息指示控制单元升级开始,响应于第五消息,向计算单元发送第七消息,第七消息指示计算单元进入升级状态,接收计算单元返回的第七消息的响应消息,第七消息的响应消息指示计算单元升级开始。In some embodiments, during the process of determining that the domain controller is in the upgrade state, the processing module 1103 is specifically configured to: receive the fifth message sent by the diagnosis initiating device, and in response to the fifth message, return the fifth message to the diagnosis initiating device. response message, the response message of the fifth message indicates the start of the upgrade of the control unit, in response to the fifth message, send a seventh message to the computing unit, the seventh message instructs the computing unit to enter the upgrade state, and receive the response message of the seventh message returned by the computing unit , the response message of the seventh message indicates the start of the computing unit upgrade.
在一些实施例中,在通过核间通信,接收计算单元发送的第二升级数据的过程中,处理模块1103具体用于:接收计算单元发送的第八消息,第八消息向控制单元指示数据传输开始,响应于第八消息,向计算单元返回第八消息的响应消息,以将控制单元的数据传输要求告知计算单元,接收计算单元发送的第九消息,第九消息中携带有第二升级数据,响应于第九消息,向计算单元发送第九消息的响应消息,以告知计算单元第二升级数据传输完成。In some embodiments, during the process of receiving the second upgrade data sent by the computing unit through inter-core communication, the processing module 1103 is specifically configured to: receive an eighth message sent by the computing unit, and the eighth message indicates data transmission to the control unit. Start, in response to the eighth message, return the response message of the eighth message to the computing unit to inform the computing unit of the data transmission requirements of the control unit, and receive the ninth message sent by the computing unit, the ninth message carrying the second upgrade data , in response to the ninth message, sending a response message to the ninth message to the computing unit to inform the computing unit that the second upgrade data transmission is completed.
在一些实施例中,在控制单元与计算单元的核间通信中,通信消息所采用的数据结构包括命令数据结构和诊断数据结构,其中,命令数据结构中包括如下至少一个字段:命令字段、响应字段、错误反馈字段、命令数据长度字段、命令数据地址字段,其中,诊断数据结构包括如下至少一个字段:目标节点字 段、诊断数据长度字段、诊断数据地址字段。In some embodiments, in the inter-core communication between the control unit and the computing unit, the data structure used in the communication message includes a command data structure and a diagnostic data structure, wherein the command data structure includes at least one of the following fields: command field, response field, error feedback field, command data length field, command data address field, where the diagnostic data structure includes at least one of the following fields: target node word segment, diagnostic data length field, diagnostic data address field.
在一些实施例中,诊断对象包括通过控制器局域网络CAN与控制单元通信的CAN ECU,在根据诊断对象的诊断情况,向诊断发起装置返回诊断请求的响应消息的过程中,处理模块1103具体用于:向CAN ECU发送诊断请求,获取CAN ECU的诊断情况,根据CAN ECU的诊断情况,向诊断发起装置返回诊断响应。In some embodiments, the diagnosis object includes a CAN ECU that communicates with the control unit through the controller area network CAN. In the process of returning a response message of the diagnosis request to the diagnosis initiating device according to the diagnosis situation of the diagnosis object, the processing module 1103 specifically uses In: Send a diagnosis request to the CAN ECU, obtain the diagnosis status of the CAN ECU, and return a diagnosis response to the diagnosis initiating device according to the diagnosis status of the CAN ECU.
在一些实施例中,诊断发起装置包括如下至少一种:外部设备、车辆中具备联网功能的ECU、域控制器中的计算单元,在诊断发起装置为计算单元的情况下,控制单元接收诊断发起装置发送的诊断请求的过程中,接收模块1101具体用于:通过核间通信接收计算单元发送的针对请求。In some embodiments, the diagnosis initiating device includes at least one of the following: an external device, an ECU with networking capabilities in the vehicle, and a computing unit in the domain controller. When the diagnosis initiating device is a computing unit, the control unit receives the diagnosis initiation. In the process of a diagnosis request sent by the device, the receiving module 1101 is specifically configured to: receive a request sent by the computing unit through inter-core communication.
本申请实施例提供的车辆诊断通信装置能够上述方法实施例中控制单元实现的各个步骤,为避免重复,这里不再赘述。The vehicle diagnostic communication device provided by the embodiment of the present application can perform various steps implemented by the control unit in the above method embodiment. To avoid duplication, they will not be described again here.
图12示出了本申请实施例提供的车辆诊断通信装置的结构示意图二,应用于车辆的域控制器中的计算单元,域控制器中的控制单元与计算单元的通信方式为基于控制单元与计算单元之间的共享内存实现的核间通信。如图12所示,在车辆的域控制器中的计算单元一侧,车辆诊断通信装置包括:Figure 12 shows the second structural diagram of the vehicle diagnostic communication device provided by the embodiment of the present application. It is applied to the computing unit in the domain controller of the vehicle. The communication method between the control unit and the computing unit in the domain controller is based on the control unit and Inter-core communication enabled by shared memory between computing units. As shown in Figure 12, on the side of the computing unit in the domain controller of the vehicle, the vehicle diagnostic communication device includes:
接收模块1201,用于在域控制器处于诊断状态的情况下,通过核间通信接收控制单元发送的第一升级数据,和/或,The receiving module 1201 is configured to receive the first upgrade data sent by the control unit through inter-core communication when the domain controller is in a diagnostic state, and/or,
发送模块1202,用于在域控制器处于升级状态的情况下,通过核间通信向控制单元发送第二升级数据。The sending module 1202 is configured to send the second upgrade data to the control unit through inter-core communication when the domain controller is in an upgrade state.
本申请实施例提供的车辆诊断通信装置能够上述方法实施例中计算单元实现的各个步骤,为避免重复,在此不再赘述。The vehicle diagnostic communication device provided by the embodiment of the present application can perform various steps implemented by the computing unit in the above method embodiment. To avoid duplication, they will not be described again here.
本申请实施例还提供了一种芯片,芯片包括控制单元和/或计算单元,控制单元用于执行前述任一实施例中控制单元执行的步骤,计算单元用于执行前述任一实施例中计算单元执行的步骤,在此不再赘述。Embodiments of the present application also provide a chip. The chip includes a control unit and/or a computing unit. The control unit is used to perform the steps performed by the control unit in any of the foregoing embodiments. The computing unit is used to perform the calculations in any of the foregoing embodiments. The steps executed by the unit will not be described again here.
图13示出了本申请实施例提供的电子设备的硬件结构示意图。如图13所 示,电子设备包括:Figure 13 shows a schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present application. As shown in Figure 13 As shown, electronic equipment includes:
处理器1301以及存储有计算机程序指令的存储器1302。Processor 1301 and memory 1302 storing computer program instructions.
具体地,上述处理器1301可以包括中央处理器(CPU),或者特定集成电路(Application Specific Integrated Circuit,ASIC),或者可以被配置成实施本申请实施例的一个或多个集成电路。Specifically, the above-mentioned processor 1301 may include a central processing unit (CPU), or an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), or may be configured to implement one or more integrated circuits according to the embodiments of the present application.
存储器1302可以包括用于数据或指令的大容量存储器。举例来说而非限制,存储器1302可包括硬盘驱动器(Hard Disk Drive,HDD)、软盘驱动器、闪存、光盘、磁光盘、磁带或通用串行总线(Universal Serial Bus,USB)驱动器或者两个或更多个以上这些的组合。在合适的情况下,存储器1302可包括可移除或不可移除(或固定)的介质。在合适的情况下,存储器1302可在综合网关容灾设备的内部或外部。在特定实施例中,存储器1302是非易失性固态存储器。Memory 1302 may include bulk storage for data or instructions. By way of example, and not limitation, the memory 1302 may include a hard disk drive (HDD), a floppy disk drive, flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a Universal Serial Bus (USB) drive or two or more A combination of many of the above. Storage 1302 may include removable or non-removable (or fixed) media, where appropriate. Where appropriate, the memory 1302 may be internal or external to the integrated gateway disaster recovery device. In certain embodiments, memory 1302 is non-volatile solid-state memory.
在特定实施例中,存储器1302可包括只读存储器(ROM),随机存取存储器(RAM),磁盘存储介质设备,光存储介质设备,闪存设备,电气、光学或其他物理/有形的存储器存储设备。因此,通常,存储器包括一个或多个编码有包括计算机可执行指令的软件的有形(非暂态)计算机可读存储介质(例如,存储器设备),并且当该软件被执行(例如,由一个或多个处理器)时,其可操作来执行参考根据本公开的一方面的方法所描述的操作。In particular embodiments, memory 1302 may include read-only memory (ROM), random access memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical, or other physical/tangible memory storage devices . Thus, generally, memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or multiple processors) operable to perform the operations described with reference to a method according to an aspect of the present disclosure.
处理器1301通过读取并执行存储器1302中存储的计算机程序指令,以实现上述实施例中的任意一种车辆诊断通信方法。The processor 1301 reads and executes the computer program instructions stored in the memory 1302 to implement any of the vehicle diagnostic communication methods in the above embodiments.
在一个示例中,电子设备还可包括通信接口1303和总线1310。其中,如图13所示,处理器1301、存储器1302、通信接口1303通过总线1310连接并完成相互间的通信。In one example, the electronic device may also include a communication interface 1303 and a bus 1310. Among them, as shown in Figure 13, the processor 1301, the memory 1302, and the communication interface 1303 are connected through the bus 1310 and complete communication with each other.
通信接口1303,主要用于实现本申请实施例中各模块、装置、单元和/或设备之间的通信。The communication interface 1303 is mainly used to implement communication between modules, devices, units and/or equipment in the embodiments of this application.
总线1310包括硬件、软件或两者,将车辆诊断通信设备的部件彼此耦接 在一起。举例来说而非限制,总线可包括加速图形端口(AGP)或其他图形总线、增强工业标准架构(EISA)总线、前端总线(FSB)、超传输(HT)互连、工业标准架构(ISA)总线、无限带宽互连、低引脚数(LPC)总线、存储器总线、微信道架构(MCA)总线、外围组件互连(PCI)总线、PCI-Express(PCI-X)总线、串行高级技术附件(SATA)总线、视频电子标准协会局部(VLB)总线或其他合适的总线或者两个或更多个以上这些的组合。在合适的情况下,总线1310可包括一个或多个总线。尽管本申请实施例描述和示出了特定的总线,但本申请考虑任何合适的总线或互连。Bus 1310 includes hardware, software, or both, coupling components of the vehicle diagnostic communication device to each other together. By way of example, and not limitation, the bus may include Accelerated Graphics Port (AGP) or other graphics bus, Enhanced Industry Standard Architecture (EISA) bus, Front Side Bus (FSB), HyperTransport (HT) interconnect, Industry Standard Architecture (ISA) Bus, Infinite Bandwidth Interconnect, Low Pin Count (LPC) Bus, Memory Bus, Micro Channel Architecture (MCA) Bus, Peripheral Component Interconnect (PCI) Bus, PCI-Express (PCI-X) Bus, Serial Advanced Technology Attachment (SATA) bus, Video Electronics Standards Association Local (VLB) bus or other suitable bus or a combination of two or more of these. Where appropriate, bus 1310 may include one or more buses. Although the embodiments of this application describe and illustrate a specific bus, this application contemplates any suitable bus or interconnection.
该电子设备可以基于传感数据执行本申请实施例中的车辆诊断通信方法,从而实现结合图1~图9描述的车辆诊断通信方法和装置。The electronic device can execute the vehicle diagnostic communication method in the embodiment of the present application based on the sensing data, thereby realizing the vehicle diagnostic communication method and device described in conjunction with FIGS. 1 to 9 .
另外,结合上述实施例中的车辆诊断通信方法,本申请实施例可提供一种计算机存储介质来实现。该计算机存储介质上存储有计算机程序指令,该计算机程序指令被处理器执行时实现上述实施例中的任意一种车辆诊断通信方法。In addition, combined with the vehicle diagnostic communication method in the above embodiments, embodiments of the present application may provide a computer storage medium for implementation. Computer program instructions are stored on the computer storage medium. When the computer program instructions are executed by the processor, any one of the vehicle diagnostic communication methods in the above embodiments is implemented.
需要明确的是,本申请并不局限于上文所描述并在图中示出的特定配置和处理。为了简明起见,这里省略了对已知方法的详细描述。在上述实施例中,描述和示出了若干具体的步骤作为示例。但是,本申请的方法过程并不限于所描述和示出的具体步骤,本领域的技术人员可以在领会本申请的精神后,作出各种改变、修改和添加,或者改变步骤之间的顺序。To be clear, this application is not limited to the specific configurations and processes described above and illustrated in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications and additions, or change the order between steps after understanding the spirit of the present application.
以上的结构框图中所示的功能块可以实现为硬件、软件、固件或者它们的组合。当以硬件方式实现时,其可以例如是电子电路、专用集成电路(ASIC)、适当的固件、插件、功能卡等等。当以软件方式实现时,本申请的元素是被用于执行所需任务的程序或者代码段。程序或者代码段可以存储在机器可读介质中,或者通过载波中携带的数据信号在传输介质或者通信链路上传送。“机器可读介质”可以包括能够存储或传输信息的任何介质。机器可读介质的例子包括电子电路、半导体存储器设备、ROM、闪存、可擦除ROM(EROM)、软盘、CD-ROM、光盘、硬盘、光纤介质、射频(RF)链路,等等。代码段可以 经由诸如因特网、内联网等的计算机网络被下载。The functional blocks shown in the above structural block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it may be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, or the like. When implemented in software, elements of the application are programs or code segments that are used to perform the required tasks. The program or code segments may be stored in a machine-readable medium or transmitted over a transmission medium or communications link via a data signal carried in a carrier wave. "Machine-readable medium" may include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, and the like. Code snippets can Downloaded via computer networks such as the Internet, Intranet, etc.
还需要说明的是,本申请中提及的示例性实施例,基于一系列的步骤或者装置描述一些方法或系统。但是,本申请不局限于上述步骤的顺序,也就是说,可以按照实施例中提及的顺序执行步骤,也可以不同于实施例中的顺序,或者若干步骤同时执行。It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, the present application is not limited to the order of the above steps. That is to say, the steps may be performed in the order mentioned in the embodiment, or may be different from the order in the embodiment, or several steps may be performed simultaneously.
上面参考根据本公开的实施例的方法、装置(系统)和计算机程序产品的流程图和/或框图描述了本公开的各方面。应当理解,流程图和/或框图中的每个方框以及流程图和/或框图中各方框的组合可以由计算机程序指令实现。这些计算机程序指令可被提供给通用计算机、专用计算机、或其它可编程数据处理装置的处理器,以产生一种机器,使得经由计算机或其它可编程数据处理装置的处理器执行的这些指令使能对流程图和/或框图的一个或多个方框中指定的功能/动作的实现。这种处理器可以是但不限于是通用处理器、专用处理器、特殊应用处理器或者现场可编程逻辑电路。还可理解,框图和/或流程图中的每个方框以及框图和/或流程图中的方框的组合,也可以由执行指定的功能或动作的专用硬件来实现,或可由专用硬件和计算机指令的组合来实现。Aspects of the present disclosure are described above with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine such that execution of the instructions via the processor of the computer or other programmable data processing apparatus enables Implementation of the functions/actions specified in one or more blocks of a flowchart and/or block diagram. Such a processor may be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It will also be understood that each block in the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can also be implemented by special purpose hardware that performs the specified functions or actions, or can be implemented by special purpose hardware and A combination of computer instructions.
以上,仅为本申请的具体实施方式,所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的系统、模块和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。应理解,本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。 The above are only specific implementations of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the above-described systems, modules and units can be referred to the foregoing method embodiments. The corresponding process will not be described again here. It should be understood that the protection scope of the present application is not limited thereto. Any person familiar with the technical field can easily think of various equivalent modifications or substitutions within the technical scope disclosed in the present application, and these modifications or substitutions should be covered. within the protection scope of this application.

Claims (17)

  1. 一种车辆诊断通信方法,应用于车辆的域控制器中的控制单元30,所述车辆诊断通信方法包括:A vehicle diagnostic communication method, applied to the control unit 30 in the domain controller of the vehicle, the vehicle diagnostic communication method includes:
    S401、接收诊断发起装置10发送的诊断请求,S401. Receive the diagnosis request sent by the diagnosis initiating device 10,
    S402、响应于所述诊断请求,基于所述诊断请求中的请求内容确定诊断对象,其中,诊断对象包括诊断请求所要求诊断或者访问的目标元器件,S402. In response to the diagnosis request, determine a diagnosis object based on the request content in the diagnosis request, where the diagnosis object includes the target component required to be diagnosed or accessed by the diagnosis request,
    S403、根据所述诊断对象的诊断情况,向所述诊断发起装置10返回所述诊断请求的响应消息。S403. Return a response message of the diagnosis request to the diagnosis initiating device 10 according to the diagnosis situation of the diagnosis object.
  2. 根据权利要求1所述的车辆诊断通信方法,其中,所述诊断对象包括所述域控制器,所述根据所述诊断对象的诊断情况,向所述诊断发起装置10返回所述诊断请求的响应消息,包括:The vehicle diagnosis communication method according to claim 1, wherein the diagnosis object includes the domain controller, and the response to the diagnosis request is returned to the diagnosis initiating device 10 according to the diagnosis situation of the diagnosis object. Messages, including:
    执行与所述诊断请求对应的诊断操作,perform a diagnostic operation corresponding to the diagnostic request,
    根据所述诊断操作的执行情况,向所述诊断发起装置10返回所述诊断请求的响应消息。According to the execution status of the diagnosis operation, a response message of the diagnosis request is returned to the diagnosis initiating device 10 .
  3. 根据权利要求2所述的车辆诊断通信方法,其中,所述域控制器中还包括位于计算单元20与所述控制单元30之间的共享内存,所述计算单元20与所述控制单元30的通信方式包括基于所述计算单元20与所述控制单元30之间的共享内存实现的核间通信,The vehicle diagnostic communication method according to claim 2, wherein the domain controller further includes a shared memory between the computing unit 20 and the control unit 30, and the computing unit 20 and the control unit 30 The communication method includes inter-core communication based on the shared memory between the computing unit 20 and the control unit 30,
    所述执行与所述诊断请求对应的诊断操作,包括:The execution of diagnostic operations corresponding to the diagnostic request includes:
    在所述诊断请求与所述计算单元20相关的情况下,通过与所述计算单元20进行核间通信,执行所述诊断操作。In case the diagnostic request is related to the computing unit 20, the diagnostic operation is performed through inter-core communication with the computing unit 20.
  4. 根据权利要求3所述的车辆诊断通信方法,其中,所述诊断请求与所述计算单元20相关,包括如下至少一种情况:The vehicle diagnostic communication method according to claim 3, wherein the diagnostic request is related to the computing unit 20, including at least one of the following situations:
    所述诊断请求用于请求获取所述计算单元20中存储的数据,The diagnosis request is used to request to obtain data stored in the computing unit 20,
    所述诊断请求所请求的数据经所述计算单元20运算得到,The data requested by the diagnosis request are calculated by the calculation unit 20,
    所述诊断请求用于请求所述域控制器进行升级,其中,所述诊断请求用于 请求所述域控制器进行升级可包括用于请求所述控制单元30和/或所述计算单元20升级。The diagnostic request is used to request the domain controller to perform an upgrade, wherein the diagnostic request is used to Requesting the domain controller for an upgrade may include requesting an upgrade of the control unit 30 and/or the computing unit 20 .
  5. 根据权利要求3或4所述的车辆诊断通信方法,其中,所述在所述诊断请求与所述计算单元20相关的情况下,通过与所述计算单元20进行核间通信,执行所述诊断操作,包括:The vehicle diagnostic communication method according to claim 3 or 4, wherein in the case where the diagnostic request is related to the computing unit 20, the diagnosis is performed by performing inter-core communication with the computing unit 20 Operations, including:
    确定所述诊断请求指示所述域控制器进行升级,determining that the diagnostic request instructs the domain controller to perform an upgrade,
    确定所述域控制器处于诊断状态,Determine that the domain controller in question is in a diagnostic state,
    通过核间通信,将来自所述诊断发起装置10的第一升级数据发送至所述计算单元20,以辅助所述计算单元20进行升级。Through inter-core communication, the first upgrade data from the diagnosis initiating device 10 is sent to the computing unit 20 to assist the computing unit 20 in upgrading.
  6. 根据权利要求5所述的车辆诊断通信方法,其中,所述通过核间通信,将来自所述诊断发起装置10的第一升级数据发送至所述计算单元20,以辅助所述计算单元20进行升级,包括:The vehicle diagnostic communication method according to claim 5, wherein the first upgrade data from the diagnosis initiating device 10 is sent to the computing unit 20 through inter-core communication to assist the computing unit 20 in performing Upgrades include:
    接收所述诊断发起装置10发送的第一消息,所述第一消息用于向所述控制单元30指示数据传输开始,receiving a first message sent by the diagnosis initiating device 10, the first message being used to indicate the start of data transmission to the control unit 30,
    响应于所述第一消息,向所述计算单元20发送第二消息,所述第二消息用于向所述计算单元20指示数据传输开始,In response to the first message, sending a second message to the computing unit 20, the second message being used to indicate the start of data transmission to the computing unit 20,
    响应于所述计算单元20返回的所述第二消息的响应消息,向所述诊断发起装置10发送所述第一消息的响应消息,In response to the response message of the second message returned by the computing unit 20, sending the response message of the first message to the diagnosis initiating device 10,
    接收所述诊断发起装置10发送的第三消息,所述第三消息中携带有所述第一升级数据,receiving a third message sent by the diagnosis initiating device 10, where the third message carries the first upgrade data,
    响应于所述第三消息,向所述计算单元20发送第四消息,所述第四消息中携带有所述第一升级数据,In response to the third message, sending a fourth message to the computing unit 20, the fourth message carrying the first upgrade data,
    响应于所述计算单元20返回的所述第四消息的响应消息,向所述诊断发起装置10发送所述第三消息的响应消息,所述第四消息的响应消息和所述第三消息的响应消息用于指示所述第一升级数据传输完成。In response to the response message of the fourth message returned by the computing unit 20, sending the response message of the third message to the diagnosis initiating device 10, the response message of the fourth message and the response message of the third message. The response message is used to indicate that the first upgrade data transmission is completed.
  7. 根据权利要求3所述的车辆诊断通信方法,其中,所述在所述诊断请求与所述域控制器中的计算单元20相关的情况下,通过与所述计算单元20进 行核间通信,执行所述诊断操作,包括:The vehicle diagnostic communication method according to claim 3, wherein in the case where the diagnostic request is related to the computing unit 20 in the domain controller, by communicating with the computing unit 20 Perform inter-core communication and perform the diagnostic operations, including:
    确定所述诊断请求指示所述域控制器进行升级,determining that the diagnostic request instructs the domain controller to perform an upgrade,
    确定所述域控制器处于升级状态,Determine that the domain controller in question is in an upgraded state,
    通过核间通信,接收所述计算单元20发送的第二升级数据,receiving the second upgrade data sent by the computing unit 20 through inter-core communication,
    根据所述第二升级数据进行升级。Upgrade is performed according to the second upgrade data.
  8. 根据权利要求7所述的车辆诊断通信方法,其中,所述域控制器在满足升级触发条件的情况下,进入升级状态,The vehicle diagnostic communication method according to claim 7, wherein the domain controller enters the upgrade state when an upgrade trigger condition is met,
    所述升级触发条件包括如下至少一种:The upgrade triggering conditions include at least one of the following:
    第一升级数据传输完成,The first upgrade data transfer is completed,
    和/或,接收到所述诊断发起装置10的第五消息,所述第五消息指示所述控制单元30进入升级状态,and/or, receiving the fifth message from the diagnosis initiating device 10, the fifth message instructing the control unit 30 to enter the upgrade state,
    和/或,接收到所述计算单元20的第六消息,所述第六消息指示所述控制单元30进入升级状态。And/or, a sixth message from the computing unit 20 is received, the sixth message instructs the control unit 30 to enter the upgrade state.
  9. 根据权利要求7或8所述的车辆诊断通信方法,其中,所述确定所述域控制器处于升级状态,包括:The vehicle diagnostic communication method according to claim 7 or 8, wherein determining that the domain controller is in an upgrade state includes:
    接收所述诊断发起装置10发送的所述第五消息,receiving the fifth message sent by the diagnosis initiating device 10,
    响应于所述第五消息,向所述诊断发起装置10返回所述第五消息的响应消息,In response to the fifth message, returning a response message of the fifth message to the diagnosis initiating device 10,
    响应于所述第五消息,向所述计算单元20发送第七消息,所述第七消息用于指示所述计算单元20准备进入升级状态,In response to the fifth message, sending a seventh message to the computing unit 20, the seventh message being used to indicate that the computing unit 20 is ready to enter the upgrade state,
    接收所述计算单元20返回的所述第七消息的响应消息。The response message of the seventh message returned by the computing unit 20 is received.
  10. 根据权利要求7-9中任一项所述的车辆诊断通信方法,其中,所述通过核间通信,接收所述计算单元20发送的第二升级数据,包括:The vehicle diagnostic communication method according to any one of claims 7-9, wherein receiving the second upgrade data sent by the computing unit 20 through inter-core communication includes:
    接收所述计算单元20发送的第八消息,所述第八消息用于向所述控制单元30指示数据传输开始,receiving an eighth message sent by the computing unit 20, the eighth message being used to indicate the start of data transmission to the control unit 30,
    响应于所述第八消息,向所述计算单元20返回所述第八消息的响应消息,以将所述控制单元30的数据传输要求告知所述计算单元20, In response to the eighth message, a response message of the eighth message is returned to the computing unit 20 to inform the computing unit 20 of the data transmission requirement of the control unit 30,
    接收所述计算单元20发送的第九消息,所述第九消息中携带有所述第二升级数据,receiving the ninth message sent by the computing unit 20, the ninth message carrying the second upgrade data,
    响应于所述第九消息,向所述计算单元20发送所述第九消息的响应消息,以告知所述计算单元20所述第二升级数据传输完成。In response to the ninth message, a response message of the ninth message is sent to the computing unit 20 to inform the computing unit 20 that the second upgrade data transmission is completed.
  11. 根据权利要求3-10中任一项所述的车辆诊断通信方法,其中,在所述控制单元30与所述计算单元20的核间通信中,通信消息所采用的数据结构包括命令数据结构和诊断数据结构,The vehicle diagnostic communication method according to any one of claims 3-10, wherein in the inter-core communication between the control unit 30 and the computing unit 20, the data structure used in the communication message includes a command data structure and diagnostic data structure,
    其中,所述命令数据结构中包括如下至少一个字段:命令字段、响应字段、错误反馈字段、命令数据长度字段、命令数据地址字段,Wherein, the command data structure includes at least one of the following fields: command field, response field, error feedback field, command data length field, and command data address field,
    其中,所述诊断数据结构包括如下至少一个字段:目标节点字段、诊断数据长度字段、诊断数据地址字段。Wherein, the diagnostic data structure includes at least one of the following fields: a target node field, a diagnostic data length field, and a diagnostic data address field.
  12. 根据权利要求1-10中任一项所述的车辆诊断通信方法,其中,所述诊断对象包括通过控制器局域网络CAN与所述控制单元30通信的CANECU,所述根据所述诊断对象的诊断情况,向所述诊断发起装置10返回所述诊断请求的响应消息,包括:The vehicle diagnosis communication method according to any one of claims 1 to 10, wherein the diagnosis object includes a CANECU communicating with the control unit 30 through a controller area network CAN, and the diagnosis according to the diagnosis object In this case, a response message of the diagnosis request is returned to the diagnosis initiating device 10, including:
    向所述CAN ECU发送所述诊断请求,sending said diagnostic request to said CAN ECU,
    获取所述CAN ECU的诊断情况,Get the diagnostic status of the CAN ECU,
    根据所述CAN ECU的诊断情况,向所述诊断发起装置10返回所述诊断响应。According to the diagnosis situation of the CAN ECU, the diagnosis response is returned to the diagnosis initiating device 10.
  13. 根据权利要求1-10中任一项所述的车辆诊断通信方法,其中,所述诊断发起装置10包括如下至少一种:外部设备、所述车辆中具备联网功能的ECU、所述域控制器中的计算单元20,The vehicle diagnostic communication method according to any one of claims 1 to 10, wherein the diagnosis initiating device 10 includes at least one of the following: an external device, an ECU with networking function in the vehicle, the domain controller Computing unit 20 in
    在所述诊断发起装置10为所述计算单元20的情况下,所述接收诊断发起装置10发送的诊断请求,包括:When the diagnosis initiating device 10 is the computing unit 20, receiving the diagnosis request sent by the diagnosis initiating device 10 includes:
    通过核间通信接收所述计算单元20发送的所述诊断请求。The diagnosis request sent by the computing unit 20 is received through inter-core communication.
  14. 一种车辆诊断通信装置,应用于车辆的域控制器中的控制单元30,所述车辆诊断通信装置包括: A vehicle diagnostic communication device, applied to the control unit 30 in the domain controller of the vehicle, the vehicle diagnostic communication device includes:
    接收模块1101,用于接收诊断发起装置10发送的诊断请求,The receiving module 1101 is used to receive the diagnosis request sent by the diagnosis initiating device 10,
    确定模块1102,用于响应于所述诊断请求,基于所述诊断请求中的请求内容确定诊断对象,Determining module 1102, configured to respond to the diagnosis request and determine a diagnosis object based on the request content in the diagnosis request,
    处理模块1103,用于所述控制单元30根据所述诊断对象的诊断情况,向所述诊断发起装置10返回所述诊断请求的响应消息。The processing module 1103 is configured for the control unit 30 to return a response message of the diagnosis request to the diagnosis initiating device 10 according to the diagnosis situation of the diagnosis object.
  15. 一种电子设备,所述电子设备包括:处理器以及存储有计算机程序指令的存储器,An electronic device, the electronic device includes: a processor and a memory storing computer program instructions,
    所述处理器执行所述计算机程序指令时实现如权利要求1-13中任意一项所述的车辆诊断通信方法。When the processor executes the computer program instructions, the vehicle diagnostic communication method according to any one of claims 1-13 is implemented.
  16. 一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现如权利要求1-13中任意一项所述的车辆诊断通信方法。A computer-readable storage medium. Computer program instructions are stored on the computer-readable storage medium. When the computer program instructions are executed by a processor, the vehicle diagnostic communication method according to any one of claims 1-13 is implemented. .
  17. 一种计算机程序产品,所述计算机程序产品中的指令由电子设备的处理器执行时,使得所述电子设备执行如权利要求1-13中任意一项所述的车辆诊断通信方法。 A computer program product. When instructions in the computer program product are executed by a processor of an electronic device, the electronic device causes the electronic device to execute the vehicle diagnostic communication method according to any one of claims 1-13.
PCT/CN2023/109481 2022-08-16 2023-07-27 Vehicle diagnosis communication method and apparatus, and device, medium and program product WO2024037304A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210983254.4 2022-08-16
CN202210983254.4A CN115390546A (en) 2022-08-16 2022-08-16 Vehicle diagnostic communication method, device, equipment and medium

Publications (1)

Publication Number Publication Date
WO2024037304A1 true WO2024037304A1 (en) 2024-02-22

Family

ID=84121228

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/109481 WO2024037304A1 (en) 2022-08-16 2023-07-27 Vehicle diagnosis communication method and apparatus, and device, medium and program product

Country Status (2)

Country Link
CN (1) CN115390546A (en)
WO (1) WO2024037304A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115390546A (en) * 2022-08-16 2022-11-25 北京经纬恒润科技股份有限公司 Vehicle diagnostic communication method, device, equipment and medium
CN115776526A (en) * 2022-11-30 2023-03-10 重庆长安汽车股份有限公司 Vehicle-mounted diagnosis message protocol conversion control method, device, equipment and medium
CN116737475A (en) * 2023-05-29 2023-09-12 中国第一汽车股份有限公司 Chip diagnosis method, device, equipment and storage medium

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20200022674A (en) * 2018-08-23 2020-03-04 현대자동차주식회사 Apparatus for controlling fail-operational of vehicle, and method thereof
CN111255587A (en) * 2018-11-30 2020-06-09 联合汽车电子有限公司 Control method and system for engine oil tank leakage diagnosis
CN112026524A (en) * 2020-09-16 2020-12-04 浙江吉利控股集团有限公司 Fault diagnosis and processing method and system for fuel cell vehicle
CN113093700A (en) * 2021-03-30 2021-07-09 东风汽车集团股份有限公司 Comprehensive fault diagnosis auxiliary system and method based on central gateway
CN113268050A (en) * 2021-05-19 2021-08-17 上海小鹏汽车科技有限公司 Vehicle diagnosis method and device
CN113960978A (en) * 2021-09-29 2022-01-21 岚图汽车科技有限公司 Vehicle diagnosis method, device and storage medium
CN114115178A (en) * 2021-11-10 2022-03-01 沙龙智行科技有限公司 Vehicle radar diagnosis method and system based on domain controller
CN114194212A (en) * 2021-12-16 2022-03-18 广西汽车集团有限公司 Fault diagnosis method, automatic driving domain controller and vehicle
CN114442590A (en) * 2021-12-29 2022-05-06 深圳市元征科技股份有限公司 Vehicle diagnosis method, apparatus, diagnosis communication device, server, and storage medium
US20220204001A1 (en) * 2019-07-30 2022-06-30 Mazda Motor Corporation Vehicle control system
CN115390546A (en) * 2022-08-16 2022-11-25 北京经纬恒润科技股份有限公司 Vehicle diagnostic communication method, device, equipment and medium

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20200022674A (en) * 2018-08-23 2020-03-04 현대자동차주식회사 Apparatus for controlling fail-operational of vehicle, and method thereof
CN111255587A (en) * 2018-11-30 2020-06-09 联合汽车电子有限公司 Control method and system for engine oil tank leakage diagnosis
US20220204001A1 (en) * 2019-07-30 2022-06-30 Mazda Motor Corporation Vehicle control system
CN112026524A (en) * 2020-09-16 2020-12-04 浙江吉利控股集团有限公司 Fault diagnosis and processing method and system for fuel cell vehicle
CN113093700A (en) * 2021-03-30 2021-07-09 东风汽车集团股份有限公司 Comprehensive fault diagnosis auxiliary system and method based on central gateway
CN113268050A (en) * 2021-05-19 2021-08-17 上海小鹏汽车科技有限公司 Vehicle diagnosis method and device
CN113960978A (en) * 2021-09-29 2022-01-21 岚图汽车科技有限公司 Vehicle diagnosis method, device and storage medium
CN114115178A (en) * 2021-11-10 2022-03-01 沙龙智行科技有限公司 Vehicle radar diagnosis method and system based on domain controller
CN114194212A (en) * 2021-12-16 2022-03-18 广西汽车集团有限公司 Fault diagnosis method, automatic driving domain controller and vehicle
CN114442590A (en) * 2021-12-29 2022-05-06 深圳市元征科技股份有限公司 Vehicle diagnosis method, apparatus, diagnosis communication device, server, and storage medium
CN115390546A (en) * 2022-08-16 2022-11-25 北京经纬恒润科技股份有限公司 Vehicle diagnostic communication method, device, equipment and medium

Also Published As

Publication number Publication date
CN115390546A (en) 2022-11-25

Similar Documents

Publication Publication Date Title
WO2024037304A1 (en) Vehicle diagnosis communication method and apparatus, and device, medium and program product
CN111835627B (en) Communication method of vehicle-mounted gateway, vehicle-mounted gateway and intelligent vehicle
JP6172090B2 (en) Relay device
CN107707628B (en) Method and apparatus for transmitting data processing requests
US10432506B2 (en) Data processing method and apparatus
JP5672275B2 (en) Network system
US20210258187A1 (en) Electronic control device, electronic control method, and recording medium
US11231983B2 (en) Fault tolerance processing method, apparatus, and server
CN110597229A (en) Vehicle diagnosis mutual exclusion method and device, vehicle and storage medium
WO2020088278A1 (en) Communication method and apparatus, and related devices
CN112585927A (en) Communication link detection method, device and system and movable platform
CN113791792B (en) Method, device and storage medium for acquiring application call information
CN112202884A (en) Data transmission method for vehicle connection interface device and related equipment
CN105637811A (en) Semantic deduplication
CN117640720A (en) Remote diagnosis channel creation method, vehicle connector and remote diagnosis system
JP2009253464A (en) Gateway device and gateway method
CN112533173B (en) Method for ensuring data integrity to ensure operation safety and device for vehicle-to-external information interaction
CN114326673A (en) Vehicle remote diagnosis method and device, connector and storage medium
CN115032973A (en) Data transmission system, method, device, equipment and medium
CN112673344B (en) Method, device and system for upgrading software
CN110824343A (en) Detection method, device, equipment and medium of communication chip
WO2018082006A1 (en) Control method, control apparatus, and control system
JP2017163344A (en) Communication system
CN114650194B (en) Data communication method, device, electronic equipment and storage medium
JP2020150442A (en) Gateway unit

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23854208

Country of ref document: EP

Kind code of ref document: A1