Diagnostic method, device and system of vehicle controller, electronic equipment and vehicle
By allocating the diagnostic addresses of the vehicle controller in two independent addressing intervals, the problem of insufficient traditional diagnostic addresses is solved, and more efficient controller diagnosis is achieved.
Patent Information
- Application Number
- CN202411853142.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2044-12-16
AI Technical Summary
With the expansion of vehicle functions and the increase in the number of controllers, the traditional diagnostic address allocation method leads to insufficient diagnostic addresses of controllers, affecting diagnostic efficiency.
By allocating the request address and the response address in two independent addressing intervals, assigning the request address from the first addressing interval and assigning the response address from the second addressing interval, the configurable number of diagnostic addresses is expanded.
It realizes the expansion of diagnostic addresses in controller diagnostic applications, increases the configurable number of controller diagnostic addresses, supports more controller diagnostics, and improves the diagnostic efficiency of controllers.
Smart Images

Figure CN119645002A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of vehicle technology, and in particular, relates to a diagnosis method, device, system, electronic equipment and vehicle for a vehicle controller. Background Art
[0002] With the rapid development of modern automobile technology, vehicle controller diagnosis has become an indispensable part of automobile maintenance and fault detection. In traditional vehicle architecture, each controller is usually assigned a unique diagnostic address to facilitate identification and communication through the vehicle's diagnostic system.
[0003] In the related art, the diagnostic address includes a request address and a response address, which are allocated in the same predefined address range. However, with the continuous expansion and integration of vehicle functions, the number of controllers has increased dramatically. Due to the limited number of addresses that can be allocated in the address range, the controller diagnostic address is insufficient, which affects the diagnostic efficiency of the controller. Summary of the invention
[0004] The present application aims to solve at least one of the technical problems existing in the prior art. To this end, the present application proposes a vehicle controller diagnosis method, device, system, electronic device and vehicle to increase the configurable number of controller diagnosis addresses and improve the controller diagnosis efficiency.
[0005] In a first aspect, the present application provides a method for diagnosing a vehicle controller, comprising:
[0006] Acquire a diagnostic request message sent by a diagnostic device, wherein the diagnostic request message includes a request address, and the request address is an address allocated from the first addressing interval; the request address is used to identify a target controller that needs to be diagnosed;
[0007] Sending the diagnostic request message to the target controller identified by the request address, obtaining a diagnostic response message returned by the target controller, wherein the diagnostic response message includes a response address, which is an address allocated from the second addressing interval; the response address is used to identify the target controller that sends the diagnostic response message;
[0008] The diagnostic response message is sent to the diagnostic device, so that the diagnostic device diagnoses the target controller identified by the response address according to the diagnostic response message.
[0009] According to the vehicle controller diagnosis method of the present application, by obtaining a diagnostic request message sent by a diagnostic device, the diagnostic request message includes a request address, which is an address allocated from a first addressing interval; the request address is used to identify the target controller that needs to be diagnosed; the diagnostic request message is sent to the target controller identified by the request address, and a diagnostic response message returned by the target controller is obtained, the diagnostic response message includes a response address, which is an address allocated from a second addressing interval; the response address is used to identify the target controller that sends the diagnostic response message; the diagnostic response message is sent to the diagnostic device, so that the diagnostic device diagnoses the target controller identified by the response address according to the diagnostic response message. The embodiment of the present application realizes the expansion of the diagnostic address in the controller diagnosis application by using different addressing intervals to allocate request addresses and response addresses, increases the configurable number of controller diagnostic addresses, thereby being able to support more controller diagnoses and improving the controller's diagnostic efficiency.
[0010] According to one embodiment of the present application, the vehicle includes multiple controllers, each controller is assigned a diagnostic address, the request address in the diagnostic address is an address assigned from the first addressing interval; the response address in the diagnostic address is an address assigned from the second addressing interval; the composition of the request address and response address of the same controller is at least partially the same.
[0011] In this embodiment, by allocating the diagnostic address from two independent addressing intervals, that is, the first addressing interval is used to allocate the request address and the second addressing interval is used to allocate the response address, the configurable number of diagnostic addresses is effectively expanded, and each controller has a unique request address and response address, thereby achieving accurate diagnostic communication between multiple controllers, avoiding address conflicts, and improving diagnostic accuracy.
[0012] According to one embodiment of the present application, the method further includes:
[0013] Determine the addressing mode;
[0014] The first addressing interval and the second addressing interval are divided according to the addressing mode.
[0015] In this embodiment, by dividing the first addressing interval and the second addressing interval according to the addressing mode, application scenarios under various network architectures during the diagnosis process are taken into consideration, thereby improving the compatibility of the diagnosis communication process in different network environments.
[0016] According to an embodiment of the present application, dividing the first addressing interval and the second addressing interval according to the addressing mode includes:
[0017] When the addressing method is to use standard frames for diagnostic addressing, the first addressing interval and the second addressing interval are addressing intervals formed based on the identifier length of the standard frame; wherein the first target bit of each address in the first addressing interval represents a diagnostic request, and the second target bit is used to allocate a request address; and the first target bit of each address in the second addressing interval represents a diagnostic response, and the second target bit is used to allocate a response address.
[0018] In this embodiment, two addressing intervals are constructed by constructing an identifier length based on a standard frame, and the first target bit of each address in the first addressing interval is dedicated to representing a diagnostic request, while the second target bit is used to allocate a specific request address; accordingly, the first target bit of each address in the second addressing interval is used to represent a diagnostic response, and the second target bit is used to allocate a response address, which not only increases the configurable number of diagnostic addresses, but also makes a clear distinction between diagnostic requests and responses, reducing the possibility of address conflicts.
[0019] According to one embodiment of the present application, the method further includes:
[0020] When the addressing method is to use an extended frame for diagnostic addressing, the first addressing interval and the second addressing interval are addressing intervals based on the identifier length of the extended frame; wherein the source address of the first addressing interval is used to allocate a request address, and the source address of the second addressing interval is used to allocate a response address.
[0021] In this embodiment, by forming an addressing interval based on the identifier length of the extended frame, the source address of the first addressing interval is used to assign a request address, and the source address of the second addressing interval is used to assign a response address, so that the diagnostic process can perform diagnostic communications within a wider address space, increasing the configurable number of diagnostic addresses, thereby supporting more controllers and more complex network topologies.
[0022] According to one embodiment of the present application, the method further includes:
[0023] When the addressing method is diagnostic addressing using diagnostic communication through IP protocol, the first addressing interval and the second addressing interval are addressing intervals composed of logical addresses of diagnostic communication through IP protocol; wherein the request address and response address of the same controller are the same.
[0024] In this embodiment, the addressing interval formed by the logical address of the IP protocol through diagnostic communication, the request address and response address of the same controller are the same, so that efficient address allocation and diagnostic communication can be achieved even in the IP protocol environment, which not only increases the configurable number of diagnostic addresses, but also further enhances the compatibility of the diagnostic system.
[0025] According to an embodiment of the present application, the sizes of addressing intervals corresponding to different addressing modes are the same.
[0026] In this embodiment, each addressing mode provides an addressing interval of the same size, so that the diagnostic system is compatible and consistent in different network environments. No matter which addressing mode is selected, the same address capacity can be expected, reducing additional configuration work. In addition, the uniform addressing interval size also improves the scalability of the diagnostic system, which can flexibly adapt to the increase in the number of vehicle controllers and changes in network structure.
[0027] In a second aspect, the present application provides a diagnostic device for a vehicle controller, comprising:
[0028] An acquisition module, used for acquiring a diagnosis request message sent by a diagnosis device, wherein the diagnosis request message includes a request address, and the request address is an address allocated from the first addressing interval; the request address is used for identifying a target controller that needs to be diagnosed;
[0029] a sending module, used for sending the diagnostic request message to the target controller identified by the request address, and obtaining a diagnostic response message returned by the target controller, wherein the diagnostic response message includes a response address, and the response address is an address allocated from the second addressing interval; the response address is used to identify the target controller that sends the diagnostic response message;
[0030] The diagnosis module is used to send the diagnosis response message to the diagnosis device, so that the diagnosis device diagnoses the target controller identified by the response address according to the diagnosis response message.
[0031] According to the diagnostic device of the vehicle controller of the present application, by obtaining the diagnostic request message sent by the diagnostic device, the diagnostic request message includes a request address, which is an address allocated from the first addressing interval; the request address is used to identify the target controller that needs to be diagnosed; the diagnostic request message is sent to the target controller identified by the request address, and the diagnostic response message returned by the target controller is obtained, the diagnostic response message includes a response address, which is an address allocated from the second addressing interval; the response address is used to identify the target controller that sends the diagnostic response message; the diagnostic response message is sent to the diagnostic device, so that the diagnostic device diagnoses the target controller identified by the response address according to the diagnostic response message. The embodiment of the present application realizes the expansion of the diagnostic address in the controller diagnostic application by using different addressing intervals to allocate request addresses and response addresses, and increases the configurable number of controller diagnostic addresses, so as to support more controller diagnoses and improve the controller diagnostic efficiency.
[0032] According to one embodiment of the present application, the device further includes:
[0033] A division module is used to determine an addressing mode; and divide the first addressing interval and the second addressing interval according to the addressing mode.
[0034] In a third aspect, the present application provides a vehicle controller diagnostic system, including: a diagnostic device, a plurality of controllers and a gateway device;
[0035] The gateway device is used to execute the vehicle controller diagnosis method as described in the first aspect above.
[0036] In a fourth aspect, the present application provides an electronic device comprising a processor, wherein the processor is connected to a memory, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the computer program, it implements the diagnostic method of the vehicle controller as described in the first aspect above.
[0037] In a fifth aspect, the present application provides a vehicle, wherein the vehicle includes a diagnostic system for a vehicle controller as described in the third aspect above, or the vehicle includes an electronic device as described in the fourth aspect above.
[0038] In a sixth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the diagnostic method for the vehicle controller as described in the first aspect above is implemented.
[0039] In a seventh aspect, the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the diagnostic method for the vehicle controller as described in the first aspect above.
[0040] In a seventh aspect, the present application provides a computer program product, comprising a computer program, which, when executed by a processor, implements the diagnostic method for a vehicle controller as described in the first aspect above.
[0041] The above one or more technical solutions in the embodiments of the present application have at least one of the following technical effects:
[0042] According to the vehicle controller diagnosis method of the present application, by obtaining a diagnostic request message sent by a diagnostic device, the diagnostic request message includes a request address, which is an address allocated from a first addressing interval; the request address is used to identify the target controller that needs to be diagnosed; the diagnostic request message is sent to the target controller identified by the request address, and a diagnostic response message returned by the target controller is obtained, the diagnostic response message includes a response address, which is an address allocated from a second addressing interval; the response address is used to identify the target controller that sends the diagnostic response message; the diagnostic response message is sent to the diagnostic device, so that the diagnostic device diagnoses the target controller identified by the response address according to the diagnostic response message. The embodiment of the present application realizes the expansion of the diagnostic address in the controller diagnosis application by using different addressing intervals to allocate request addresses and response addresses, increases the configurable number of controller diagnostic addresses, thereby being able to support more controller diagnoses and improving the controller's diagnostic efficiency.
[0043] Furthermore, in some embodiments, by allocating diagnostic addresses from two independent addressing intervals, i.e., the first addressing interval is used to allocate request addresses and the second addressing interval is used to allocate response addresses, the configurable number of diagnostic addresses is effectively expanded, and each controller has a unique request address and response address, thereby achieving accurate diagnostic communication between multiple controllers, avoiding address conflicts, and improving diagnostic accuracy.
[0044] Furthermore, in some embodiments, by dividing the first addressing interval and the second addressing interval according to the addressing method, application scenarios under various network architectures during the diagnosis process are taken into consideration, thereby improving the compatibility of the diagnosis communication process in different network environments.
[0045] Furthermore, in some embodiments, two addressing intervals are constructed by constructing an identifier length based on a standard frame, and the first target bit of each address in the first addressing interval is dedicated to representing a diagnostic request, while the second target bit is used to assign a specific request address; accordingly, the first target bit of each address in the second addressing interval is used to represent a diagnostic response, and the second target bit is used to assign a response address, which not only increases the configurable number of diagnostic addresses, but also makes a clear distinction between diagnostic requests and responses, reducing the possibility of address conflicts.
[0046] Furthermore, in some embodiments, by forming an addressing interval based on the identifier length of an extended frame, the source address of the first addressing interval is used to assign a request address, and the source address of the second addressing interval is used to assign a response address, so that the diagnostic process can perform diagnostic communications within a wider address space, thereby increasing the configurable number of diagnostic addresses and supporting more controllers and more complex network topologies.
[0047] Furthermore, in some embodiments, the addressing interval formed by the logical address of the IP protocol through diagnostic communication, the request address and response address of the same controller are the same, and the lower 8 bits of the logical address are used to represent these addresses, so that even in the IP protocol environment, efficient address allocation and diagnostic communication can be achieved, which not only increases the configurable number of diagnostic addresses, but also further enhances the compatibility of the diagnostic system.
[0048] Furthermore, in some embodiments, each addressing mode provides an addressing interval of the same size, so that the diagnostic system is compatible and consistent in different network environments. No matter which addressing mode is selected, the same address capacity can be expected, reducing additional configuration work. In addition, the uniform addressing interval size also improves the scalability of the diagnostic system, and can flexibly adapt to the increase in the number of vehicle controllers and changes in network structure.
[0049] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0051] Figure 1 is a flow chart of a diagnostic method for a vehicle controller provided in an embodiment of the present application;
[0052] Figure 2 is a schematic diagram of the interaction process between the diagnostic device and the vehicle provided in an embodiment of the present application;
[0053] Figure 3 This is a schematic diagram of mapping and conversion of messages in different network architectures provided by an embodiment of the present application;
[0054] Figure 4 is a schematic diagram of the structure of a diagnostic device for a vehicle controller provided in an embodiment of the present application;
[0055] Figure 5 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0056] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0057] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0058] The following, in conjunction with the accompanying drawings, describes in detail the diagnostic method, device, system, electronic device and vehicle of the vehicle controller provided in the embodiments of the present application through specific embodiments and their application scenarios.
[0059] The vehicle controller diagnosis method may be applied to a terminal, and may be specifically executed by hardware or software in the terminal.
[0060] Optionally, the terminal includes, but is not limited to, a portable communication device such as a mobile phone or tablet computer having a touch-sensitive surface (e.g., a touch screen display and / or a touch pad). It should also be understood that, in some embodiments, the terminal may not be a portable communication device, but a desktop computer having a touch-sensitive surface (e.g., a touch screen display and / or a touch pad). In some embodiments, the terminal may also be an optical receiver, an optical fiber switch, etc. having a processor.
[0061] However, it should be understood that the terminal may include one or more other physical user interface devices such as a physical keyboard, mouse and joystick.
[0062] The diagnostic method for a vehicle controller provided in an embodiment of the present application may be executed by an electronic device or a functional module or functional entity in the electronic device that can implement the diagnostic method for a vehicle controller. The electronic device mentioned in the embodiment of the present application may include but is not limited to a server, an ECU (Electronic Control Unit), an MCU (Microcontroller Unit) or other controllers, etc. The diagnostic method for a vehicle controller provided in an embodiment of the present application is described below using an electronic device as an example of the execution subject.
[0063] like Figure 1 As shown, the diagnostic method of the vehicle controller includes: step 110, step 120 and step 130.
[0064] Step 110: Acquire a diagnosis request message sent by the diagnosis device, where the diagnosis request message includes a request address, which is an address allocated from the first addressing interval; the request address is used to identify a target controller that needs to be diagnosed.
[0065] In the embodiments of the present application, the vehicle controller refers to an electronic control unit (ECU) used to monitor and manage various systems and components of the vehicle. These controllers are usually interconnected through vehicle networks, such as controller area networks (CAN) and local interconnect networks (LIN), to coordinate the functions of various systems to ensure the safety, performance and comfort of the vehicle. A vehicle may contain a variety of controllers, such as an engine controller, a transmission controller, a body controller, a driver assistance controller, a vehicle controller, an air conditioning controller, etc.
[0066] In the embodiment of the present application, the diagnostic device may be a tool that can communicate with the electronic control unit (ECU) of the vehicle to read fault codes, clear fault codes, configure parameters, refresh software, etc. The diagnostic device may be a device based on the OBD (On-Board Diagnostics) standard, or a device based on other diagnostic communication protocols such as UDS (Unified Diagnostic Services). For example, the diagnostic tool may be an OBD-II scanning tool, a professional diagnostic computer, a portable diagnostic tool, a cloud-based diagnostic system, etc.
[0067] In some embodiments, Figure 2As shown, the diagnostic device can be connected to the electronic device through an interface on the vehicle for connecting the diagnostic device and the on-board electronic control unit, such as a data link connector (DLC), an OBD-II interface or other communication interfaces.
[0068] After completing the connection, the diagnostic device can send a diagnostic request message to the electronic device, which can be generated according to the needs of the diagnostic service. The diagnostic request message may include a request address, a service identifier, data parameters, etc. Among them, the service identifier can be used to identify the requested service type, such as reading fault codes, clearing fault codes, etc.; the data parameters can be based on the requested service type and may include additional data parameters. Of course, the diagnostic request message may also include a data identifier, a data payload, etc., which is not limited to this embodiment of the present application.
[0069] In the embodiment of the present application, the request address can be used to identify the target controller that needs to be diagnosed. For example, in a CAN bus, the request address can be a CAN message ID. The addressing interval can be an address range allocated to different controllers in diagnostic communication.
[0070] Step 120, send the diagnostic request message to the target controller identified by the request address, and obtain a diagnostic response message returned by the target controller, wherein the diagnostic response message includes a response address, which is an address allocated from the second addressing interval; the response address is used to identify the target controller that sends the diagnostic response message.
[0071] In the embodiment of the present application, the target controller that needs to be diagnosed this time can be identified according to the request address in the diagnosis request message, and the diagnosis request message is sent to the target controller.
[0072] In some embodiments, Figure 2 As shown, since the diagnostic device and the controller in the vehicle may communicate in different network architectures, after receiving the diagnostic request message, the electronic device can process the diagnostic request message through the gateway and send the diagnostic request message to the target controller.
[0073] Specifically, Figure 3As shown in the figure, taking a frame of diagnostic request message as an example, the diagnostic device and the electronic device can communicate through the IP protocol (Diagnostics over Internet Protocol, DoIP) through Ethernet, and the various controllers in the vehicle communicate through the CAN / FD (CAN with Flexible Data Rate) protocol in the CAN network. After the electronic device receives the diagnostic request message, the gateway can parse the logical address (Target Address, TA) in the diagnostic request message, and then map the logical address to the CAN / FD ID in the CAN message. In this way, the forwarding of the diagnostic request message can be completed.
[0074] After receiving the diagnostic request message, the target controller can process the request according to the request address and service identifier. If the request address matches the request address corresponding to the target controller, the corresponding diagnostic service is executed. After processing the request, the target controller will construct a diagnostic response message. The diagnostic response message may include a response address, a service identifier, diagnostic response data, etc. Among them, according to the requested service type, the diagnostic response data can be specific diagnostic data, such as fault code, vehicle status information, controller status information, etc.
[0075] In the embodiment of the present application, the response address is used to identify the target controller that sends the diagnostic response message. For example, the response address can be the address used by the vehicle controller to identify itself and return the diagnostic response message in the diagnostic communication, so that the diagnostic device can know which controller replied to the request. The response address is usually different from the request address, and the response address and the request address can be allocated from two different addressing intervals.
[0076] In some embodiments, the vehicle includes multiple controllers, each controller is assigned a diagnostic address, the request address in the diagnostic address is an address assigned from a first addressing interval; the response address in the diagnostic address is an address assigned from a second addressing interval; the composition of the request address and response address of the same controller is at least partially the same.
[0077] In this embodiment, the composition of the request address and the response address of the same controller is at least partially the same. For example, the first addressing interval can be 0x700-0x7FF, and the second addressing interval can be 0x600-0x6FF. The upper 3 bits 0x7 of the first addressing interval are used to indicate the diagnostic request, and the upper 3 bits 0x6 of the second addressing interval indicate the diagnostic response. The lower 8 bits 0x00-0xFF of the first addressing interval and the second addressing interval indicate the diagnostic address. In the composition of the request address and the response address of the same controller, the lower 8 bits can be the same. For example, the request address of controller 1 is 0x701, and the response address is 0x601, and the request address of controller 2 is 0x702, and the response address is 0x602.
[0078] In this embodiment, by allocating the diagnostic address from two independent addressing intervals, that is, the first addressing interval is used to allocate the request address and the second addressing interval is used to allocate the response address, the configurable number of diagnostic addresses is effectively expanded, and each controller has a unique request address and response address, thereby achieving accurate diagnostic communication between multiple controllers, avoiding address conflicts, and improving diagnostic accuracy.
[0079] In some embodiments, the response address may be included in the address information of the diagnostic response message, and this address information is an important component of the diagnostic message. For example, in a CAN bus, the address information may be mapped to a CAN message ID.
[0080] Step 130: Send the diagnostic response message to the diagnostic device, so that the diagnostic device diagnoses the target controller identified by the response address according to the diagnostic response message.
[0081] In an embodiment of the present application, after the diagnostic response message is sent to the diagnostic device, the diagnostic device can parse the diagnostic response message and determine which controller the information in the diagnostic response message corresponds to based on the response address. The diagnostic device can parse the service identifier in the diagnostic response message to confirm which type of diagnostic service the controller has executed, and analyze the data fields in the diagnostic response message, such as fault codes, sensor readings, controller status information, etc. If the controller returns a positive response, the diagnostic device will continue the diagnostic process based on the response content; if a negative response is returned, the diagnostic device will determine the reason for the request failure based on the negative response code (NRC), and decide whether to resend the request or take other diagnostic measures.
[0082] According to the vehicle controller diagnosis method of the present application, a diagnostic request message sent by a diagnostic device is obtained, the diagnostic request message includes a request address, and the request address is an address allocated from a first addressing interval; the diagnostic request message is sent to a target controller corresponding to the request address, and a diagnostic response message returned by the target controller is obtained, the diagnostic response message includes a response address, and the response address is an address allocated from a second addressing interval; the diagnostic response message is sent to the diagnostic device, so that the diagnostic device can diagnose the target controller corresponding to the response address according to the diagnostic response message. The embodiment of the present application realizes the expansion of the diagnostic address in the controller diagnosis application by using different addressing intervals to allocate request addresses and response addresses, and increases the configurable number of controller diagnostic addresses, thereby being able to support more controller diagnoses and improving the controller's diagnostic efficiency.
[0083] In some embodiments, the method further comprises:
[0084] Determine the addressing mode;
[0085] The first addressing interval and the second addressing interval are divided according to the addressing mode.
[0086] In this embodiment, different addressing methods are used for addressing in the diagnostic communication process under different network architectures. For example, in CAN, the diagnostic communication process adopts the CAN / FD (CAN with Flexible Data Rate) protocol, and the addressing method may include an 11-bit CAN / FD standard frame addressing method and a 29-bit CAN / FD extended frame addressing method; wherein, the arbitration segment of the CAN / FD standard frame includes an 11-bit basic identifier (Base Identifier), and the arbitration segment of the CAN / FD extended frame includes a 29-bit basic identifier. In Ethernet, the addressing method may be addressing through the diagnostic communication process using the Diagnostics over Internet Protocol (DoIP) protocol.
[0087] In this embodiment, the addressing mode can be determined according to the network architecture of the diagnostic communication process, and then the first addressing interval and the second addressing interval are divided according to the addressing mode. For example, the first addressing interval corresponding to the 11-bit CAN / FD standard frame addressing mode is 0x700-0x7FF, and the corresponding second addressing interval is 0x600-0x6FF; the first addressing interval corresponding to the 29-bit CAN / FD extended frame addressing mode is 0x18DA00F1-0x18DAFFF1, and the corresponding second addressing interval is 0x18DAF100-0x18DAF1FF.
[0088] In this embodiment, by dividing the first addressing interval and the second addressing interval according to the addressing mode, application scenarios under various network architectures in the diagnosis process are taken into consideration, thereby improving the compatibility of the diagnosis communication process in different network environments.
[0089] In some embodiments, dividing the first addressing interval and the second addressing interval according to the addressing mode includes:
[0090] When the addressing method is to use standard frames for diagnostic addressing, the first addressing interval and the second addressing interval are addressing intervals formed based on the identifier length of the standard frame; wherein the first target bit of each address in the first addressing interval represents a diagnostic request, and the second target bit is used to allocate a request address; the first target bit of each address in the second addressing interval represents a diagnostic response, and the second target bit is used to allocate a response address.
[0091] In the CAN / FD protocol, a standard frame is a data frame structure that may include a start bit, an identifier, a control field, a data field, and a CRC (Cyclic Redundancy Check) check. The length of the identifier of a standard frame is 11 bits.
[0092] In this embodiment, the first addressing interval and the second addressing interval can be determined according to the identifier length of the standard frame. Specifically, the address length in the first addressing interval and the second addressing interval can be the same as the identifier length of the standard frame. For example, when the addressing mode is to use an 11-bit CAN / FD standard frame for diagnostic addressing, the first addressing interval can be 0x700 to 0x7FF, and the second addressing interval can be 0x600 to 0x6FF.
[0093] In this embodiment, the upper 3 bits of the address in the first addressing interval may be the same. In this case, the upper 3 bits of the address in the first addressing interval may be determined as the first target bit to indicate the diagnostic request; the lower 8 bits of the address in the first addressing interval may be determined as the second target bit to allocate the request address. The upper 3 bits of the address in the second addressing interval may also be the same. In this case, the upper 3 bits of the address in the second addressing interval may be determined as the first target bit to indicate the diagnostic response; the lower 8 bits of the address in the second addressing interval may be determined as the second target bit to allocate the response address. For example, the upper 3 bits 0x7 of the first addressing interval are used to indicate the diagnostic request, the upper 3 bits 0x6 of the second addressing interval indicate the diagnostic response, and the lower 8 bits 0x00 to 0xFF of the first addressing interval and the second addressing interval indicate the diagnostic address. Through the first addressing interval and the second addressing interval, 256 groups of diagnostic addresses can be configured to meet the number of controllers for 256 vehicle diagnoses.
[0094] In this embodiment, two addressing intervals are constructed by constructing an identifier length based on a standard frame, and the first target bit of each address in the first addressing interval is dedicated to representing a diagnostic request, while the second target bit is used to allocate a specific request address; accordingly, the first target bit of each address in the second addressing interval is used to represent a diagnostic response, and the second target bit is used to allocate a response address, which not only increases the configurable number of diagnostic addresses, but also makes a clear distinction between diagnostic requests and responses, reducing the possibility of address conflicts.
[0095] In some embodiments, the method further comprises:
[0096] When the addressing method is to use extended frames for diagnostic addressing, the first addressing interval and the second addressing interval are addressing intervals based on the identifier length of the extended frame; wherein the source address of the first addressing interval is used to allocate the request address, and the source address of the second addressing interval is used to allocate the response address.
[0097] In the CAN / FD protocol, an extended frame is a data frame structure that adds an extended identifier bit to a standard frame. The identifier length of the extended frame is 29 bits. The source address of the extended frame occupies 8 bits, and the source address range is 0x00 to 0xFF.
[0098] For example, when the addressing mode is to use 29-bit CAN / FD extended frames for diagnostic addressing, the first addressing interval is 0x18DA00F1~0x18DAFFF1, and the second addressing interval is 0x18DAF100~0x18DAF1FF. The request address is assigned by the source address of the first addressing interval, and the response address is assigned by the source address of the second addressing interval. Since the source address interval is the same as the lower 8 bits of the addressing interval corresponding to the addressing mode of using standard frames for diagnostic addressing, both are 0x00~0xFF, the reuse of different addressing modes is unified, and the compatibility of diagnosis under different addressing modes is improved.
[0099] In this embodiment, by forming an addressing interval based on the identifier length of the extended frame, the source address of the first addressing interval is used to assign a request address, and the source address of the second addressing interval is used to assign a response address, so that the diagnostic process can perform diagnostic communications within a wider address space, increasing the configurable number of diagnostic addresses, thereby supporting more controllers and more complex network topologies.
[0100] In some embodiments, the method further comprises:
[0101] When the addressing method is to use diagnostic communication through IP protocol for diagnostic addressing, the first addressing interval and the second addressing interval are addressing intervals composed of logical addresses of diagnostic communication through IP protocol; wherein the request address and response address of the same controller are the same.
[0102] In this embodiment, the logical address of the DoIP is a unique identifier used to identify and distinguish different electronic control units (ECUs) in the vehicle network.
[0103] In this embodiment, during the communication process via Ethernet DoIP, a logical address can be used to uniquely identify a controller, so when using DoIP for diagnostic addressing, the request address and response address of the same controller are the same, so the first addressing interval and the second addressing interval can also be the same, and the first addressing interval and the second addressing interval are addressing intervals composed of logical addresses, and the second target bits of the first addressing interval and the second addressing interval can be used to allocate request addresses or response addresses. For example, the first addressing interval and the second addressing interval can be 0xXX00~0xXXFF, where the lower 8 bits 0x00~0xFF represent the request address or the response address. Since the interval of the logical address is the same as the lower 8 bits of the addressing interval corresponding to the addressing mode of using standard frames for diagnostic addressing, both of which are 0x00~0xFF, the reuse and unification of different addressing modes is achieved, and the compatibility of diagnosis under different addressing modes is improved.
[0104] In this embodiment, the addressing interval formed by the logical address of the IP protocol through diagnostic communication, the request address and response address of the same controller are the same, so that efficient address allocation and diagnostic communication can be achieved even in the IP protocol environment, which not only increases the configurable number of diagnostic addresses, but also further enhances the compatibility of the diagnostic system.
[0105] In some embodiments, the addressing intervals corresponding to different addressing modes have the same size.
[0106] In this embodiment, as shown in the following table, the source address range of the extended frame of CAN / FD is 0x00~0xFF, and the number of source addresses is the same as the number of diagnostic addresses of the standard frame of CAN / FD, that is, the addressing modes of the extended frame and the standard frame of CAN / FD have the same addressing range, and the source address content and the diagnostic address content of the 11-bit addressing mode are reused and unified. The lower 8 bits of the logical address of Ethernet DoIP reuse the lower 8 bits of the address of the standard frame of CAN / FD to achieve the reuse uniformity of ECU diagnostic addresses in different networks. That is, the lower 8 bits of the Ethernet DoIP diagnostic logical address, the lower 8 bits of the diagnostic address of the standard frame of CAN / FD, and the source address of the extended frame of CAN / FD are kept unified.
[0107]
[0108] In this embodiment, each addressing mode provides an addressing interval of the same size, so that the diagnostic system is compatible and consistent in different network environments. No matter which addressing mode is selected, the same address capacity can be expected, reducing additional configuration work. In addition, the uniform addressing interval size also improves the scalability of the diagnostic system, which can flexibly adapt to the increase in the number of vehicle controllers and changes in network structure.
[0109] The vehicle controller diagnostic method provided in the embodiment of the present application can be executed by a vehicle controller diagnostic device. In the embodiment of the present application, the vehicle controller diagnostic method is executed by a vehicle controller diagnostic device as an example to illustrate the vehicle controller diagnostic device provided in the embodiment of the present application.
[0110] An embodiment of the present application also provides a diagnostic device for a vehicle controller.
[0111] like Figure 4 As shown, the diagnostic device of the vehicle controller includes:
[0112] The acquisition module 410 is used to acquire a diagnosis request message sent by the diagnosis device, wherein the diagnosis request message includes a request address, which is an address allocated from the first addressing interval; the request address is used to identify a target controller that needs to be diagnosed;
[0113] The sending module 420 is used to send the diagnostic request message to the target controller identified by the request address, and obtain the diagnostic response message returned by the target controller, wherein the diagnostic response message includes a response address, which is an address allocated from the second addressing interval; the response address is used to identify the target controller to which the diagnostic response message is sent;
[0114] The diagnosis module 430 is used to send the diagnosis response message to the diagnosis device, so that the diagnosis device diagnoses the target controller identified by the response address according to the diagnosis response message.
[0115] According to the diagnostic device of the vehicle controller of the present application, by obtaining the diagnostic request message sent by the diagnostic device, the diagnostic request message includes a request address, which is an address allocated from the first addressing interval; the request address is used to identify the target controller that needs to be diagnosed; the diagnostic request message is sent to the target controller identified by the request address, and a diagnostic response message returned by the target controller is obtained, the diagnostic response message includes a response address, which is an address allocated from the second addressing interval; the response address is used to identify the target controller that sends the diagnostic response message; the diagnostic response message is sent to the diagnostic device, so that the diagnostic device diagnoses the target controller identified by the response address according to the diagnostic response message. The embodiment of the present application realizes the expansion of the diagnostic address in the controller diagnostic application by using different addressing intervals to allocate request addresses and response addresses, increases the configurable number of controller diagnostic addresses, thereby being able to support more controller diagnoses and improving the controller's diagnostic efficiency.
[0116] In some embodiments, the apparatus further comprises:
[0117] The division module is used to determine the addressing mode; and divide the first addressing interval and the second addressing interval according to the addressing mode.
[0118] In some embodiments, the partitioning module is further configured to:
[0119] When the addressing method is to use standard frames for diagnostic addressing, the first addressing interval and the second addressing interval are addressing intervals formed based on the identifier length of the standard frame; wherein the first target bit of each address in the first addressing interval represents a diagnostic request, and the second target bit is used to allocate a request address; the first target bit of each address in the second addressing interval represents a diagnostic response, and the second target bit is used to allocate a response address.
[0120] In some embodiments, the partitioning module is further configured to:
[0121] When the addressing method is to use extended frames for diagnostic addressing, the first addressing interval and the second addressing interval are addressing intervals based on the identifier length of the extended frame; wherein the source address of the first addressing interval is used to allocate the request address, and the source address of the second addressing interval is used to allocate the response address.
[0122] In some embodiments, the partitioning module is further configured to:
[0123] When the addressing method is to use diagnostic communication through IP protocol for diagnostic addressing, the first addressing interval and the second addressing interval are addressing intervals composed of logical addresses of diagnostic communication through IP protocol; wherein the request address and response address of the same controller are the same.
[0124] The diagnostic device of the vehicle controller in the embodiment of the present application can be a terminal, or can be other devices other than a terminal. Exemplarily, the diagnostic device of the vehicle controller can be an on-board electronic device, a mobile Internet device (Mobile Internet Device, MID), a robot, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), an ECU (Electronic Control Unit, electronic control unit), an MCU (Microcontroller Unit, microcontroller unit) or other controllers, etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0125] The diagnostic device of the vehicle controller in the embodiment of the present application may be a device having an operating system. The operating system may be a Microsoft (Windows) operating system, an Android (Android) operating system, an IOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0126] In some embodiments, Figure 5 As shown, an embodiment of the present application also provides an electronic device 500, including a processor 501, the processor 501 is connected to a memory 502, the memory 502 stores a computer program that can be run on the processor 501, and when the program is executed by the processor 501, the various processes of the above-mentioned vehicle controller diagnostic method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0127] It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.
[0128] The embodiment of the present application also provides a vehicle controller diagnostic system, including: a diagnostic device, a plurality of controllers and a gateway device;
[0129] A gateway device is used to execute the diagnostic method of the vehicle controller as described above.
[0130] An embodiment of the present application also provides a vehicle, which includes the diagnostic system of the above-mentioned vehicle controller, or the vehicle includes the above-mentioned electronic device.
[0131] An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various processes of the diagnostic method embodiment of the above-mentioned vehicle controller are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0132] The processor is the processor in the electronic device in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0133] An embodiment of the present application also provides a computer program product, including a computer program, which implements the above-mentioned vehicle controller diagnosis method when executed by a processor.
[0134] The processor is the processor in the electronic device in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0135] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned vehicle controller diagnostic method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0136] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0137] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0138] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0139] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
[0140] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials, or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0141] Although the embodiments of the present application have been shown and described, those skilled in the art will appreciate that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present application, and that the scope of the present application is defined by the claims and their equivalents.
Claims
1. A method for diagnosing a vehicle controller, characterized in that: include: Acquire a diagnosis request message sent by a diagnosis device, wherein the diagnosis request message includes a request address, and the request address is an address allocated from the first addressing interval; The request address is used to identify the target controller that needs to be diagnosed; Sending the diagnostic request message to the target controller identified by the request address, obtaining a diagnostic response message returned by the target controller, wherein the diagnostic response message includes a response address, which is an address allocated from the second addressing interval; the response address is used to identify the target controller that sends the diagnostic response message; The diagnostic response message is sent to the diagnostic device, so that the diagnostic device diagnoses the target controller identified by the response address according to the diagnostic response message.
2. The method according to claim 1, characterized in that The vehicle includes multiple controllers, each controller is assigned a diagnostic address, the request address in the diagnostic address is an address assigned from the first addressing interval; the response address in the diagnostic address is an address assigned from the second addressing interval; the composition of the request address and response address of the same controller is at least partially the same.
3. The method according to claim 1, characterized in that The method further comprises: Determine the addressing mode; The first addressing interval and the second addressing interval are divided according to the addressing mode.
4. The method according to claim 3, characterized in that: The dividing the first addressing interval and the second addressing interval according to the addressing mode includes: When the addressing method is to use standard frames for diagnostic addressing, the first addressing interval and the second addressing interval are addressing intervals formed based on the identifier length of the standard frame; wherein the first target bit of each address in the first addressing interval represents a diagnostic request, and the second target bit is used to allocate a request address; and the first target bit of each address in the second addressing interval represents a diagnostic response, and the second target bit is used to allocate a response address.
5. The method according to claim 3, characterized in that: The method further comprises: When the addressing method is to use an extended frame for diagnostic addressing, the first addressing interval and the second addressing interval are addressing intervals based on the identifier length of the extended frame; wherein the source address of the first addressing interval is used to allocate a request address, and the source address of the second addressing interval is used to allocate a response address.
6. The method according to claim 3, characterized in that The method further comprises: When the addressing method is diagnostic addressing using diagnostic communication through IP protocol, the first addressing interval and the second addressing interval are addressing intervals composed of logical addresses of diagnostic communication through IP protocol; wherein the request address and response address of the same controller are the same.
7. The method according to claim 3, characterized in that The sizes of addressing intervals corresponding to different addressing modes are the same.
8. A diagnostic device for a vehicle controller, characterized in that: include: An acquisition module, used for acquiring a diagnosis request message sent by a diagnosis device, wherein the diagnosis request message includes a request address, and the request address is an address allocated from a first addressing interval; The request address is used to identify the target controller that needs to be diagnosed; a sending module, used for sending the diagnostic request message to the target controller identified by the request address, and obtaining a diagnostic response message returned by the target controller, wherein the diagnostic response message includes a response address, and the response address is an address allocated from the second addressing interval; the response address is used to identify the target controller that sends the diagnostic response message; The diagnosis module is used to send the diagnosis response message to the diagnosis device, so that the diagnosis device diagnoses the target controller identified by the response address according to the diagnosis response message.
9. The device according to claim 8, characterized in that The device also includes: A division module is used to determine an addressing mode; and divide the first addressing interval and the second addressing interval according to the addressing mode.
10. A vehicle controller diagnostic system, characterized in that: include: diagnostic equipment, multiple controllers and gateway devices; The gateway device is used to execute the method according to any one of claims 1-7.
11. An electronic device comprising a processor, wherein the processor is connected to a memory, wherein the memory stores a computer program that can be run on the processor, wherein: When the processor executes the program, the method according to any one of claims 1 to 7 is implemented.
12. A vehicle, characterized in that: The vehicle includes the system as claimed in claim 10, or the vehicle includes the electronic device as claimed in claim 11.
Citation Information
Patent Citations
Methods and devices for providing TFI
CN103931229A
Storage space using method and device, storage medium and electronic device
CN112035379A
Access request processing method, device, equipment, system and storage medium
CN115529292A
Vehicle fault diagnosis method and diagnosis device
CN116560342A
Vehicle diagnosis safety protection method and device, electronic equipment and storage medium
CN117092987A
Cited By
Diagnostic routing configuration method and related device
CN120935008A