Controller development method, controller, diagnosis method and vehicle
By using the same set of software codes and modifying the packet identification flag bits before installation, the problem that multiple ECUs in the same vehicle need to develop software codes separately is solved, and the effect of resource saving and maintenance cost reduction is achieved.
Patent Information
- Application Number
- CN202411580032.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-07
- Publication Date
- 2025-03-21
AI Technical Summary
In the prior art, multiple ECUs with the same function but different message response requirements in the same vehicle need to develop different software codes separately, resulting in waste of development resources and high maintenance costs.
The same set of software code is used to develop multiple controllers with the same functions but different message response requirements. By modifying the message identification flag bits in the controller before installation, each controller corresponds to different message identifications, thereby realizing response to specific messages.
It saves development resources, reduces software maintenance costs, and realizes unified maintenance of multiple controllers with the same functions but different message response requirements.
Smart Images

Figure CN119668596A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of vehicle control technology, and in particular to a controller development method, a controller, a diagnostic method and a vehicle. Background Art
[0002] Currently, most automotive ECU software uses the AUTOSAR (Automotive Open System Architecture) software architecture and its configuration integration tools. The CanTp (Controller Area Network Transmission Protocol) module under the AUTOSAR architecture is closely related to ECU (Electronic Control Unit) diagnosis, and is used to transmit diagnostic data between ECUs. Currently, the CanTp (Controller Area Network Transmission Protocol) module is statically configured, and an ECU can only receive and transmit specific diagnostic message messages with specific message IDs. Therefore, different ECUs are usually developed and tested based on a unique set of software codes.
[0003] However, in a vehicle, there are often different ECUs with the same functions and the same role. For different ECUs with the same functions and the same role in the same vehicle, because ECU can only receive and transmit specific message messages with specific message IDs, different software codes need to be developed separately to develop such ECUs, which not only wastes development resources, but also requires subsequent maintenance of multiple sets of software codes, resulting in high software maintenance costs. Summary of the invention
[0004] Based on this, the present invention provides a controller development method, a controller, a diagnostic method and a vehicle. By adopting the controller development method, multiple controllers with the same functions but different message response requirements in the same vehicle are developed using the same set of software codes. By simply changing the message identification flag in the developed controller before installation so that each controller corresponds to a different message identification flag, the developed controller can respond only to messages with specific message identifications, which can save development resources. In addition, only one set of software codes needs to be maintained subsequently, reducing software maintenance costs.
[0005] In one aspect, the present invention provides a controller development method, the method comprising:
[0006] Using the same set of software codes to develop multiple controllers with the same functions but different message response requirements in the same vehicle, the software codes include a message transceiving code, a message screening code, and a message reading code, the message transceiving code is used to receive a first type message containing a main message identifier and receive at least one second type message containing other message identifiers, the message screening code is used to modify a message whose message identifier conforms to a message identifier flag bit according to a configurable message identifier flag bit to a first type message containing a main message identifier, and send the modified first type message to the message reading code for reading, and the message reading code is used to read the first type message containing the main message identifier;
[0007] After the controller is developed and before being installed, the message identification flag in each controller message screening code is modified according to the message response requirements corresponding to each controller, so that each controller corresponds to a different message identification flag.
[0008] On the other hand, the present invention provides a controller, the controller comprising a message transceiver module, a message screening module and a message reading module, wherein:
[0009] The message transceiver module is used to receive a diagnosis request message sent by the diagnostic instrument, wherein the diagnosis request message is a first type message including a main message identifier or a second type message including other message identifiers;
[0010] The message screening module is used to modify the diagnosis request message whose message identifier conforms to the message identifier flag bit according to the configurable message identifier flag bit into a first type message containing a main message identifier, and send the modified first type message to the message reading module for reading;
[0011] The message reading module is used to read the first type message containing the main message identifier.
[0012] In another aspect, the present invention provides a diagnostic method, applied to the controller as described above, the method comprising:
[0013] Receive the diagnostic request message sent by the diagnostic instrument;
[0014] Determining whether the message identifier carried in the diagnosis request message is a main message identifier that can be read and determining whether the message identifier carried in the diagnosis request message conforms to a preconfigured message identifier flag;
[0015] If the initial message identifier carried in the diagnosis request message is the main message identifier and the initial message identifier conforms to the pre-configured message identifier flag, then reading the diagnosis request message and performing a functional diagnosis based on the diagnosis request message;
[0016] If the initial message identifier carried in the diagnostic request message is not the main message identifier and the initial message identifier conforms to the preconfigured message identifier flag, the initial message identifier carried in the diagnostic request message is modified to the main message identifier, the modified diagnostic request message is read, and functional diagnosis is performed based on the modified diagnostic request message.
[0017] Furthermore, in some embodiments, the method further comprises:
[0018] If the initial message identifier carried in the diagnosis request message does not conform to the pre-configured message identifier flag, the diagnosis request message is discarded.
[0019] Further, in some implementations, if the initial message identifier carried in the diagnostic request message is the main message identifier and the initial message identifier conforms to the preconfigured message identifier flag, then after reading the diagnostic request message and performing functional diagnosis based on the diagnostic request message, it also includes:
[0020] Obtain the diagnostic result message generated based on functional diagnosis;
[0021] The diagnosis result message is sent to the diagnosis instrument.
[0022] Further, in some implementations, if the initial message identifier carried in the diagnostic request message is not the main message identifier and the initial message identifier conforms to the preconfigured message identifier flag, then the initial message identifier carried in the diagnostic request message is modified to the main message identifier, and the modified diagnostic request message is read and functional diagnosis is performed based on the modified diagnostic request message, further comprising:
[0023] Obtain the diagnostic result message generated based on functional diagnosis;
[0024] Modify the main message identifier in the diagnosis result message to the initial message identifier to obtain a modified diagnosis result message;
[0025] The modified diagnosis result message is sent to the diagnostic instrument.
[0026] Furthermore, in some embodiments, the method further comprises:
[0027] receiving a flag switching instruction sent by the diagnostic instrument;
[0028] The message identification flag is switched based on the flag switching instruction.
[0029] On the other hand, the present invention further provides a computer program product having at least one instruction stored thereon, wherein the at least one instruction implements the above method steps when executed by a domain controller.
[0030] On the other hand, the present invention provides a storage medium storing a computer program, wherein the computer program is suitable for being loaded by a processor and executing the above method steps.
[0031] On the other hand, the present invention also provides a vehicle, comprising the above-mentioned controller.
[0032] According to the controller development method provided by the present invention, for multiple controllers with the same functions but different message response requirements in the same vehicle, the same set of software codes are used for development, and the software codes include message receiving and sending codes, message screening codes and message reading codes. The message receiving and sending codes are used to receive a first type of message including a main message identifier and receive at least one second type of message including other message identifiers. The message screening code is used to modify a message whose message identifier conforms to a message identifier flag bit according to a configurable message identifier flag bit to a first type of message including a main message identifier, and send the modified first type of message to the message reading code for reading. The message reading code is used to read the first type of message including the main message identifier. After the development and testing is completed and before installation, the message identifier flag bit in the developed controller is changed according to the message response requirements corresponding to each controller, so that each controller corresponds to a different message identifier flag bit, so that the installed controller only responds to messages with specific message identifiers, which can save development resources, and only one set of software codes needs to be maintained later, reducing software maintenance costs.
[0033] It should be understood that the contents described in the summary of the invention are not intended to limit the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 A flowchart of a controller development method provided by an embodiment of the present invention;
[0035] Figure 2 A schematic diagram of a flow chart of a diagnostic method provided by an embodiment of the present invention;
[0036] Figure 3 An example schematic diagram of modifying a message identifier provided by an embodiment of the present invention;
[0037] Figure 4 A schematic structural diagram of a vehicle controller provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0038] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the specific embodiments of the present invention and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0039] In the description of one or more embodiments of the present invention, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The terms "first", "second", etc. may refer to different or the same objects. Other explicit and implicit definitions may also be included below.
[0040] See also Figure 1 , is a flow chart of a controller development method provided by an embodiment of the present invention. Figure 1 The process shown is described in detail, and the vehicle control method may specifically include the following steps:
[0041] Step S102, using the same set of software codes to develop multiple controllers with the same functions but different message response requirements in the same vehicle, the software codes including a message transceiving code, a message screening code and a message reading code, the message transceiving code is used to receive a first type message including a main message identifier and receive at least one second type message including other message identifiers, the message screening code is used to modify a message whose message identifier conforms to the message identifier flag bit according to a configurable message identifier flag bit to a first type message including a main message identifier, and send the modified first type message to the message reading code for reading, the message reading code is used to read the first type message including the main message identifier;
[0042] Among them, the message transceiving code can receive a first type of message containing a main message identifier and receive at least one second type of message containing other message identifiers, wherein the main message identifier is a message identifier that can be read and parsed by the software code. The message screening code includes a configurable message identifier flag bit, and different message identifier flag bits correspond one-to-one to the message identifier carried in the message that can be received by the message transceiving code. Before installation, the message identifier flag bit in the message screening code can be changed so that the installed ECU only responds to the message corresponding to the message identifier flag bit. The message reading code can only read and parse the first type of message containing the main message identifier.
[0043] The message response requirement means that the controller can only respond to messages with specific message identifiers. After the controller is installed, each controller can respond to messages with unique message identifiers. For example, controller 1 can only respond to messages containing message identifier 0X728, and controller 2 can only respond to messages containing message identifier 0X748.
[0044] It should be noted that the software code function described in step S102 is only used in the message receiving process. Further, in the message sending process, the message reading code is used to send the first type message containing the main message identifier to be sent to the message screening module; if the main message identifier meets the message identifier flag, the message screening module is used to send the first type message containing the main message identifier to be sent to the target device through the message transceiver module; if the main message identifier does not meet the message identifier flag, the message screening module is used to modify the main message identifier in the first type message containing the main message identifier to be sent to other message identifiers that meet the message identifier flag, and then send the modified first type message to the target device through the message transceiver module.
[0045] Step S104, after the controller is developed and before being installed, the message identification flag in each controller message screening code is modified according to the message response requirements corresponding to each controller, so that each controller corresponds to a different message identification flag.
[0046] The message identification flag bit corresponds to the message identification that the controller can respond to. During the message sending and receiving process, the message identification flag bit can screen the message identification carried in the message. When the message identification contained in the message matches the message identification flag bit, the message can be received and read by the controller.
[0047] It should be noted that in vehicles based on the AUTOSAR architecture, the software development of each ECU occurs before the ECU is installed. During the development process, for multiple controllers with the same function but different message response requirements in the same vehicle, the same set of software codes are used for development, and a configurable message identification flag is set in the software code used. Before the ECU is installed, the message identification flag is configured so that the installed ECU only responds to the message with the message identifier corresponding to the message identification flag. For multiple controllers with the same function but different message response requirements in the same vehicle, in the software development stage, the controller development method proposed in this embodiment uses only one set of software codes to develop multiple controllers with the same function but different message response requirements, saving development resources without affecting the use effect of each controller only responding to messages containing specific message identifiers after installation, and subsequent multiple controllers with the same function but different message response requirements only need to maintain one set of software codes, reducing software maintenance costs.
[0048] In one embodiment, the present invention also provides a controller, which includes a message transceiver module, a message screening module and a message reading module, wherein: the message transceiver module is used to receive a diagnostic request message sent by a diagnostic instrument, the diagnostic request message is a first type message including a main message identifier or a second type message including other message identifiers; the message screening module is used to modify the diagnostic request message whose message identifier conforms to the message identifier flag bit according to a configurable message identifier flag bit to a first type message including a main message identifier, and send the modified first type message to the message reading module for reading; the message reading module is used to read the first type message including the main message identifier.
[0049] Among them, the message reading module can only read and analyze the message containing the main message identifier.
[0050] Furthermore, the message reading module is also used to send the diagnosis result message to the message screening module after completing the diagnosis according to the diagnosis request message. The message screening module is also used to modify the main message identifier carried in the diagnosis result message to a message identifier corresponding to the current message identifier flag, and send the diagnosis result message after the message identifier is modified to the diagnostic instrument through the message transceiver module.
[0051] That is, in the message receiving stage, the message transceiver module can receive a first type of message including a main message identifier or a second type of message including other message identifiers. After the message transceiver module receives the diagnosis request message, the message screening module screens the message identifier carried in the diagnosis request message. The message screening module will only send the message that meets the message identifier flag to the message reading module for reading and analysis. If the message identifier carried by the diagnosis request message is the main message identifier and the message identifier flag also corresponds to the main message identifier, the diagnosis request message is directly sent to the message reading module for reading and analysis; if the message identifier carried in the diagnosis request message is not the main message identifier and meets the message identifier flag, the message screening module will modify the message identifier in the diagnosis request message to the main message identifier, and send the modified main message identifier to the message reading module for reading and analysis; if the message identifier carried in the diagnosis request message does not meet the message identifier flag, the message screening module will discard the diagnosis request message.
[0052] The message reading module will send the various diagnostic data parsed from the diagnostic request message to the diagnostic communication module (DCM, Diagnostic Communication Manager), and obtain the returned diagnostic results, generating a diagnostic result message containing the main message identifier. In the message sending stage, the message reading module first sends the diagnostic result message to the message screening module. If the message identification flag currently configured in the message screening module is the main message identifier, the diagnostic result message is directly sent to the diagnostic instrument through the message transceiver module; if the message identification flag currently configured in the message screening module is not the main message identifier, the main message identifier carried in the diagnostic result message needs to be replaced with the message identifier corresponding to the message identification flag, and the modified diagnostic result message is sent to the diagnostic instrument through the message transceiver module.
[0053] In a feasible implementation, in a vehicle based on CAN communication, the above-mentioned message transceiver module and message screening module can be an integrated code module of CAN If in the controller (users can customize and modify it according to needs), and the message reading module can be a CAN Tp transmission protocol module in the controller. The CAN Tp transmission protocol module can only transmit data for messages carrying the main message identifier.
[0054] See also Figure 2 , is a flow chart of a diagnostic method provided by an embodiment of the present invention. Figure 2 The process shown is described in detail, and the vehicle control method may specifically include the following steps.
[0055] Step S202, receiving a diagnosis request message sent by the diagnostic instrument;
[0056] It should be noted that the diagnostic method is applied to the above-mentioned controller. The diagnostic process is that the diagnostic instrument sends a diagnostic request message to the controller, the controller performs fault diagnosis according to the diagnostic request message, and sends a diagnostic result message back to the diagnostic instrument.
[0057] Specifically, the controller receives the diagnostic request message sent by the diagnostic instrument. It can be seen from the above embodiment that the message transceiver module in the controller can receive a first type message containing a main message identifier or a second type message containing other message identifiers. Therefore, the diagnostic request message is one of the first type message or the second type message.
[0058] Step S204, determining whether the message identifier carried in the diagnosis request message is a main message identifier that can be read and determining whether the message identifier carried in the diagnosis request message conforms to a pre-configured message identifier flag;
[0059] Specifically, after receiving the diagnosis request message, it is determined whether the message identifier carried in the diagnosis request message is a main message identifier that can be read and whether the message identifier carried in the diagnosis request message conforms to a preconfigured message identifier flag.
[0060] It is understandable that the message screening module in the controller contains a preconfigured message identification flag. Only if the message identification carried in the diagnosis request message matches the message identification flag, the diagnosis request message can be sent to the message reading module and read and identified by the message reading module.
[0061] Step S206, if the initial message identifier carried in the diagnosis request message is the main message identifier and the initial message identifier meets the pre-configured message identifier flag, then read the diagnosis request message and perform functional diagnosis based on the diagnosis request message;
[0062] Specifically, the message screening module screens the diagnostic request message according to the preconfigured message identification flag. If the initial message identifier carried in the diagnostic request message is the main message identifier and the initial message identifier meets the preconfigured message identification flag, the diagnostic request message is directly sent to the message reading module for reading, and then the controller is functionally diagnosed according to the diagnostic data in the diagnostic request message.
[0063] Step S208, if the initial message identifier carried in the diagnosis request message is not the main message identifier and the initial message identifier meets the pre-configured message identifier flag, the initial message identifier carried in the diagnosis request message is modified to the main message identifier, and the modified diagnosis request message is read and functional diagnosis is performed based on the modified diagnosis request message.
[0064] Specifically, the message screening module screens the diagnostic request message according to the preconfigured message identification flag. If the initial message identification carried in the diagnostic request message is not the main message identification and the initial message identification meets the preconfigured message identification flag, the message screening module first modifies the initial message identification carried in the diagnostic request message to the main message identification, and then sends the modified diagnostic request message to the message reading module for reading, and then performs functional diagnosis of the controller according to the diagnostic data in the diagnostic request message.
[0065] It is not difficult to understand that the initial message identifier carried in the diagnostic request message meets the pre-configured message identifier flag, indicating that the diagnostic request message can be sent to the message reading module for reading. However, since the message reading module can only respond to messages containing the main message identifier, when the message screening module detects that the initial message identifier carried in the diagnostic request message is not the main message identifier and the initial message identifier meets the pre-configured message identifier flag, the initial message identifier carried in the diagnostic request message is modified to the main message identifier, so that the modified diagnostic request message can be read by the message reading module.
[0066] See also Figure 3 , is a schematic diagram of an example of modifying a message identifier provided by an embodiment of the present invention. Figure 3 As shown, the diagram includes a diagnostic instrument 01, a controller 02, a message identification flag 03, a diagnostic request message 11, an initial message identification 0x728 carried in the diagnostic request message 11, a main message identification 0x724, and a modified diagnostic request message 12. The diagnostic instrument 01 sends the diagnostic request message 11 to the controller 02. At this time, the message identification flag 03 corresponding to the controller 02 is 0x728. Since the initial message identification conforms to the message identification flag 03, the initial message identification 0x728 carried in the diagnostic request message 11 is changed to the main message identification 0x724, and the modified diagnostic request message 12 is obtained.
[0067] In a vehicle based on CAN communication, the message transceiver module and the message screening module may be an integrated code module of CAN If in the controller, and the message reading module may be a CAN Tp transmission protocol module in the controller. The CAN Tp transmission protocol module may only transmit data to messages carrying a main message identifier.
[0068] In one embodiment, the above-mentioned diagnosis method further includes: if the initial message identifier carried in the diagnosis request message does not conform to the pre-configured message identifier flag, discarding the diagnosis request message.
[0069] It is not difficult to understand that if the initial message identifier carried in the diagnostic request message does not conform to the pre-configured message identifier flag, it indicates that the diagnostic request message is not a diagnostic request message for the current controller, and the diagnostic request message is discarded without response.
[0070] In one embodiment, after step S206, the method further includes: obtaining a diagnosis result message generated based on the functional diagnosis; and sending the diagnosis result message to the diagnostic instrument.
[0071] Specifically, after performing functional diagnosis based on the diagnostic request message, the message reading module sends the diagnostic result message to the message screening module. If the message identification flag currently configured in the message screening module is the main message identification, the diagnostic result message is directly sent to the diagnostic instrument through the message transceiver module.
[0072] In one embodiment, after step S208, it also includes: obtaining a diagnosis result message generated based on functional diagnosis; modifying the main message identifier in the diagnosis result message to the initial message identifier to obtain a modified diagnosis result message; and sending the modified diagnosis result message to the diagnostic instrument.
[0073] Specifically, after performing functional diagnosis based on the diagnostic request message, the message reading module sends the diagnostic result message to the message screening module. If the message identification flag currently configured in the message screening module is not the main message identifier, the main message identifier carried in the diagnostic result message needs to be replaced with the message identifier corresponding to the message identification flag, and the modified diagnostic result message is sent to the diagnostic instrument through the message transceiver module.
[0074] The message screening module in the controller includes a configurable message identification flag, and the message type that the controller can respond to can be changed by changing the message identification flag. In one embodiment, the controller can receive a flag switching instruction sent by the diagnostic instrument, and switch the message identification flag based on the flag switching instruction to achieve the switching of the message identification flag.
[0075] In one or more embodiments of the present invention, the control development method, controller and diagnostic method proposed in the above embodiments can be used to develop multiple controllers with the same functions but different message response requirements in the same vehicle using the same set of software codes. As long as the message identification flag bits are changed according to the message response requirements corresponding to each controller before installation so that each controller corresponds to a different message identification flag bit, the installed controller can only respond to messages with specific message identifications, which can save development resources. In addition, only one set of software codes needs to be maintained subsequently, reducing the software maintenance cost of the controller.
[0076] In some embodiments, the present invention further provides a computer program product, which may store at least one instruction, and the at least one instruction may be loaded by a domain processor and executed such as the controller development method and the diagnostic method in the above embodiments. The specific execution process may refer to the specific description in the above embodiments, which will not be repeated here.
[0077] The present invention also provides a storage medium, which can store multiple instructions. The instructions are suitable for being loaded by a processor and executing controller development methods and diagnostic methods such as the above-mentioned embodiments. The specific execution process can be found in the specific descriptions of the above-mentioned embodiments, which will not be repeated here.
[0078] In one embodiment, the present invention also provides Figure 4 The schematic diagram of the controller is shown in Figure 1. Figure 4 At the hardware level, the controller includes a processor 21, an internal bus 22, a network interface 23, a memory 24, and a non-volatile memory 25, and may also include hardware required for other services. The vehicle controller can be set in the vehicle, wherein the processor 21 reads the corresponding computer program from the non-volatile memory 25 into the memory and then runs it to implement the above-mentioned diagnostic method.
[0079] In one embodiment, the present invention further provides a vehicle, which may include a controller as described above, so as to implement fault diagnosis of the controller by executing a diagnostic method through the controller.
[0080] Finally, the various embodiments of the present invention are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0081] The above description is only an embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.
Claims
1. A controller development method, comprising: Using the same set of software codes to develop multiple controllers with the same functions but different message response requirements in the same vehicle, the software codes include a message transceiving code, a message screening code and a message reading code, the message transceiving code is used to receive a first type message containing a main message identifier and receive at least one second type message containing other message identifiers, the message screening code is used to modify a message whose message identifier conforms to a message identifier flag bit according to a configurable message identifier flag bit to a first type message containing a main message identifier, and send the modified first type message to the message reading code for reading, the message reading code is used to read the first type message containing the main message identifier; After the controller is developed and before being installed, the message identification flag in each controller message screening code is modified according to the message response requirements corresponding to each controller, so that each controller corresponds to a different message identification flag.
2. A controller, comprising a message transceiver module, a message screening module and a message reading module, wherein: The message transceiver module is used to receive a diagnosis request message sent by the diagnostic instrument, wherein the diagnosis request message is a first type message containing a main message identifier or a second type message containing other message identifiers; The message screening module is used to modify the diagnosis request message whose message identifier conforms to the message identifier flag bit according to the configurable message identifier flag bit into a first type message containing the main message identifier, and send the modified first type message to the message reading module for reading; The message reading module is used to read the first type message containing the main message identifier.
3. A diagnostic method, applied to the controller as claimed in claim 2, the method comprising: Receive the diagnostic request message sent by the diagnostic instrument; Determining whether the message identifier carried in the diagnosis request message is a main message identifier that can be read and determining whether the message identifier carried in the diagnosis request message conforms to a preconfigured message identifier flag; If the initial message identifier carried in the diagnosis request message is the main message identifier and the initial message identifier conforms to the pre-configured message identifier flag, then reading the diagnosis request message and performing a functional diagnosis based on the diagnosis request message; If the initial message identifier carried in the diagnostic request message is not the main message identifier and the initial message identifier conforms to the preconfigured message identifier flag, the initial message identifier carried in the diagnostic request message is modified to the main message identifier, the modified diagnostic request message is read, and functional diagnosis is performed based on the modified diagnostic request message.
4. The method according to claim 3, further comprising: If the initial message identifier carried in the diagnosis request message does not conform to the pre-configured message identifier flag, the diagnosis request message is discarded.
5. The method according to claim 3, if the initial message identifier carried in the diagnostic request message is the main message identifier and the initial message identifier conforms to the pre-configured message identifier flag, then after reading the diagnostic request message and performing functional diagnosis based on the diagnostic request message, further comprising: Obtain the diagnostic result message generated based on functional diagnosis; The diagnosis result message is sent to the diagnosis instrument.
6. The method according to claim 3, if the initial message identifier carried in the diagnostic request message is not the main message identifier and the initial message identifier conforms to the pre-configured message identifier flag, then the initial message identifier carried in the diagnostic request message is modified to the main message identifier, and the modified diagnostic request message is read and functional diagnosis is performed based on the modified diagnostic request message, further comprising: Obtain the diagnostic result message generated based on functional diagnosis; Modify the main message identifier in the diagnosis result message to the initial message identifier to obtain a modified diagnosis result message; The modified diagnosis result message is sent to the diagnostic instrument.
7. The method according to claim 3, further comprising: receiving a flag switching instruction sent by the diagnostic instrument; The message identification flag is switched based on the flag switching instruction.
8. A computer program product having at least one instruction stored thereon, wherein when the at least one instruction is executed by a domain controller, the steps of the method according to any one of claims 3 to 7 are implemented.
9. A storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method according to any one of claims 3 to 7.
10. A vehicle comprising the controller according to claim 2.