Method and apparatus for diagnosing communication link test failure
By generating diagnostic messages and parsing failure status data, and using link mapping files and message authentication codes for verification, the problem of analyzing and locating communication link test failures was solved, achieving efficient and accurate fault diagnosis and improving fault investigation efficiency and diagnostic depth.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGZHOU AUTOMOBILE GROUP CO LTD
- Filing Date
- 2026-04-20
- Publication Date
- 2026-07-17
AI Technical Summary
In existing technologies, there is a lack of effective analysis and localization methods when communication link tests fail, and simulation platforms cannot verify the actual deployment effect, resulting in low efficiency in fault diagnosis.
By generating diagnostic messages and parsing failure status data, the system accurately locates faults using link mapping files, and combines message authentication codes and freshness values for verification. It also automatically generates failure diagnostic reports and displays visualized data to assist in fault location.
It enables efficient and accurate communication link fault diagnosis, improves the efficiency and accuracy of fault investigation, and enhances the intuitiveness of fault location and the depth of diagnosis.
Smart Images

Figure CN122420170A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of vehicle communication technology, and in particular to a diagnostic method and apparatus for communication link test failure. Background Technology
[0002] In related technologies, a unified communication key for the components under test and the calculation of SECOC (Secure Onboard Communication) encryption keys can be used to test whether the sending and receiving components can correctly send and receive secure messages in different test scenarios. In case of failure, the corresponding fault diagnosis code can be read, thereby verifying the integration of vehicle onboard bus secure communication in various components. Alternatively, a vehicle data communication simulation test platform can be constructed, which includes a host computer, a domain control node simulation module, a general node simulation module, and a network load verification module. The host computer sets the parameters and connection relationships of each unit according to a preset vehicle simulation model, and the network load verification module tests the transmission parameters of the network data input and output of the general control unit in the general node simulation module, thereby achieving rapid verification of the new network architecture.
[0003] However, related technologies can only read fault diagnostic codes and lack methods for analyzing and locating test failures. Simulation platforms are limited to simulation testing, lack actual fault diagnosis capabilities, and have not been verified for actual deployment effects, which urgently need improvement. Summary of the Invention
[0004] This application provides a diagnostic method and apparatus for communication link test failure, aiming to improve the problems in related technologies, such as only being able to read fault diagnostic codes and lacking means to analyze and locate test failures, and simulation platforms being limited to simulation testing and lacking actual fault diagnosis capabilities and verification of actual deployment effects.
[0005] The first aspect of this application provides a diagnostic method for communication link test failure, comprising the following steps: when a test failure of at least one communication link of an on-board controller is detected, a diagnostic message for diagnosing the failed communication link is determined based on a link mapping file compiled from the on-board controller; failure status data returned by the on-board controller in response to the diagnostic message is obtained; the failure status data is parsed to generate a failure diagnostic report corresponding to the on-board controller, wherein the failure diagnostic report is used to characterize the status information of failure variables in the failed communication link.
[0006] The above technical solution enables the determination of diagnostic messages for diagnosing failed communication links based on link mapping files when a communication link test failure is detected by the vehicle controller. It also allows the acquisition of failure status data returned in response to these messages, followed by parsing the failure status data to generate a corresponding failure diagnosis report. By accurately locating diagnostic messages and acquiring and parsing failure status data using link mapping files compiled from the vehicle controller, a failure diagnosis report containing failure variable status information can be generated efficiently and accurately, improving the efficiency and accuracy of troubleshooting.
[0007] Optionally, in one embodiment of this application, before detecting the failure of at least one communication link of the vehicle controller, the method further includes: acquiring the received message and the transmitted message of the vehicle controller on the corresponding communication link; and determining that the corresponding communication link test has failed in response to the fact that the received message authentication code in the received message is not equal to the transmitted message authentication code in the transmitted message.
[0008] The above technical solution can determine whether the receive message authentication code in the received message of the vehicle controller on the corresponding communication link is equal to the send message authentication code in the sent message before the communication link test failure is detected. If they are not equal, the corresponding communication link test is determined to have failed. By comparing the receive message authentication code and the send message authentication code of the vehicle controller's communication link to determine the test failure, communication link security anomalies can be quickly and accurately identified, improving the efficiency and accuracy of fault detection.
[0009] Optionally, in one embodiment of this application, before responding to the fact that the receive message authentication code in the received message is not equal to the send message authentication code in the sent message, the method further includes: obtaining the freshness value of the vehicle controller; and determining that the receive message authentication code is not equal to the send message authentication code in response to the freshness value verification failure.
[0010] The above technical solution can determine whether the freshness value of the vehicle controller has failed to be verified before the received message authentication code is not equal to the sent message authentication code. If the verification fails, it can be determined that the received message authentication code is not equal to the sent message authentication code. By verifying the freshness value before comparing the message authentication codes, freshness anomalies caused by replay can be intercepted in advance, invalid comparisons can be avoided, and the accuracy and efficiency of communication link test failure determination can be improved.
[0011] Optionally, in one embodiment of this application, determining the diagnostic message for diagnosing a failed communication link based on the link mapping file compiled from the vehicle controller includes: extracting variable information of the vehicle controller and memory address information corresponding to the variable information from the link mapping file; determining the mapping relationship between the variable information and the memory address information based on the variable information and the memory address information; and generating the diagnostic message according to a preset diagnostic protocol based on the mapping relationship.
[0012] The above technical solution can extract the corresponding variable information and memory address information from the link mapping file, determine the mapping relationship between the variables and addresses, and generate diagnostic messages according to the preset diagnostic protocol. By accurately extracting the variable and its memory address information from the link mapping file and constructing the mapping relationship, and then automatically generating diagnostic messages according to the preset diagnostic protocol based on the relationship, the automation and precise location of fault diagnosis can be achieved, significantly improving diagnostic efficiency and accuracy.
[0013] Optionally, in one embodiment of this application, before determining the diagnostic message for diagnosing a failed communication link, the method further includes: collecting the operating data of the vehicle controller; identifying the session mode and security access level of the vehicle controller based on the operating data; and allowing the generation of the diagnostic message in response to the session mode being the target mode and the security access level being the target level.
[0014] The above technical solution can identify the session mode and security access level of the vehicle controller based on the collected operating data before determining the diagnostic message. If the session mode is the target mode and the security access level is the target level, the corresponding diagnostic message can be generated. By identifying the session mode and security access level through collected operating data, the generation of diagnostic messages is only allowed when the target conditions are met. This can accurately screen effective diagnostic scenarios and improve the accuracy and reliability of diagnostic parameters.
[0015] Optionally, in one embodiment of this application, the method further includes: collecting bus messages of the communication bus in which the vehicle controller is located during the test; parsing the bus messages based on the communication matrix file of the vehicle controller to generate corresponding visualization data, and displaying the visualization data in association with the failure diagnosis report.
[0016] The above technical solution can collect bus messages from the communication bus where the vehicle controller is located during testing, and parse them using a communication matrix file to generate corresponding visual data. This visual data is then linked to and displayed in the failure diagnosis report. By collecting communication bus messages, parsing them based on the communication matrix file to generate visual data, and then linking them to the failure diagnosis report, synchronous traceability analysis of fault phenomena and underlying communication data can be achieved, significantly improving the intuitiveness and diagnostic depth of communication link fault location.
[0017] A second aspect of this application provides a diagnostic device for communication link test failure, comprising: a determining module, configured to determine a diagnostic message for diagnosing the failed communication link based on a link mapping file compiled from the vehicle controller when a test failure of at least one communication link of the vehicle controller is detected; a first acquiring module, configured to acquire failure status data returned by the vehicle controller in response to the diagnostic message; and a first generating module, configured to parse the failure status data and generate a failure diagnostic report corresponding to the vehicle controller, wherein the failure diagnostic report is used to characterize the status information of failure variables in the failed communication link.
[0018] The above technical solution enables the determination of diagnostic messages for diagnosing failed communication links based on link mapping files when a communication link test failure is detected by the vehicle controller. It also allows the acquisition of failure status data returned in response to these messages, followed by parsing the failure status data to generate a corresponding failure diagnosis report. By accurately locating diagnostic messages and acquiring and parsing failure status data using link mapping files compiled from the vehicle controller, a failure diagnosis report containing failure variable status information can be generated efficiently and accurately, improving the efficiency and accuracy of troubleshooting.
[0019] Optionally, in one embodiment of this application, it further includes: a second acquisition module, configured to acquire the received messages and sent messages of the vehicle controller on the corresponding communication link before detecting the test failure of at least one communication link of the vehicle controller; and a first determination module, configured to determine that the test of the corresponding communication link has failed in response to the fact that the received message authentication code in the received message is not equal to the sent message authentication code in the sent message.
[0020] The above technical solution can determine whether the receive message authentication code in the received message of the vehicle controller on the corresponding communication link is equal to the send message authentication code in the sent message before the communication link test failure is detected. If they are not equal, the corresponding communication link test is determined to have failed. By comparing the receive message authentication code and the send message authentication code of the vehicle controller's communication link to determine the test failure, communication link security anomalies can be quickly and accurately identified, improving the efficiency and accuracy of fault detection.
[0021] Optionally, in one embodiment of this application, it further includes: a third acquisition module, configured to acquire the freshness value of the vehicle controller before responding to the fact that the receive message authentication code in the received message is not equal to the send message authentication code in the sent message; and a second determination module, configured to determine that the receive message authentication code is not equal to the send message authentication code in response to the freshness value verification failure.
[0022] The above technical solution can determine whether the freshness value of the vehicle controller has failed to be verified before the received message authentication code is not equal to the sent message authentication code. If the verification fails, it can be determined that the received message authentication code is not equal to the sent message authentication code. By verifying the freshness value before comparing the message authentication codes, freshness anomalies caused by replay can be intercepted in advance, invalid comparisons can be avoided, and the accuracy and efficiency of communication link test failure determination can be improved.
[0023] Optionally, in one embodiment of this application, the determining module includes: an extraction unit, configured to extract variable information of the vehicle controller and memory address information corresponding to the variable information from the link mapping file; a first determining unit, configured to determine the mapping relationship between the variable and the address based on the variable information and the memory address information; and a generating unit, configured to generate the diagnostic message according to a preset diagnostic protocol based on the mapping relationship.
[0024] The above technical solution can extract the corresponding variable information and memory address information from the link mapping file, determine the mapping relationship between the variables and addresses, and generate diagnostic messages according to the preset diagnostic protocol. By accurately extracting the variable and its memory address information from the link mapping file and constructing the mapping relationship, and then automatically generating diagnostic messages according to the preset diagnostic protocol based on the relationship, the automation and precise location of fault diagnosis can be achieved, significantly improving diagnostic efficiency and accuracy.
[0025] Optionally, in one embodiment of this application, it further includes: a first acquisition module, configured to acquire the operating data of the vehicle controller before determining the diagnostic message for diagnosing the failed communication link; an identification module, configured to identify the session mode and security access level of the vehicle controller based on the operating data; and a second generation module, configured to allow the generation of the diagnostic message in response to the session mode being the target mode and the security access level being the target level.
[0026] The above technical solution can identify the session mode and security access level of the vehicle controller based on the collected operating data before determining the diagnostic message. If the session mode is the target mode and the security access level is the target level, the corresponding diagnostic message can be generated. By identifying the session mode and security access level through collected operating data, the generation of diagnostic messages is only allowed when the target conditions are met. This can accurately screen effective diagnostic scenarios and improve the accuracy and reliability of diagnostic parameters.
[0027] Optionally, in one embodiment of this application, it further includes: a second acquisition module, used to acquire bus messages of the communication bus in which the vehicle controller is located during the test; and an association module, used to parse the bus messages based on the communication matrix file of the vehicle controller, generate corresponding visualization data, and associate the visualization data with the failure diagnosis report for display.
[0028] The above technical solution can collect bus messages from the communication bus where the vehicle controller is located during testing, and parse them using a communication matrix file to generate corresponding visual data. This visual data is then linked to and displayed in the failure diagnosis report. By collecting communication bus messages, parsing them based on the communication matrix file to generate visual data, and then linking them to the failure diagnosis report, synchronous traceability analysis of fault phenomena and underlying communication data can be achieved, significantly improving the intuitiveness and diagnostic depth of communication link fault location.
[0029] A third aspect of this application provides an electronic device, including a processor and a memory, wherein the memory is used to store computer programs; and the processor is used to execute the programs stored in the memory to implement the diagnostic method for communication link test failure as described in the above embodiments.
[0030] A fourth aspect of this application provides a vehicle that includes electronic devices as described in the above embodiments.
[0031] A fifth aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method for diagnosing communication link test failure. Attached Figure Description
[0032] Figure 1 This is a flowchart of a diagnostic method for communication link test failure provided in an embodiment of this application; Figure 2 This is a block diagram of a diagnostic system for communication link test failure provided in one embodiment of this application; Figure 3 This is a structural diagram of the diagnostic device for communication link test failure provided in the embodiments of this application; Figure 4 This is a structural diagram of the electronic device provided in the embodiments of this application.
[0033] Figure label: Among them, 201-host computer, 202-vehicle controller, 203-debugging information extraction module, 204-debugging message generation module, 205-message acquisition module, 206-message content parsing module; 10-diagnostic device for communication link test failure; 100-determination module, 200-first acquisition module, 300-first generation module; 20-electronic device; 410-processor, 420-memory. Detailed Implementation
[0034] To make the technical problems, technical solutions, and beneficial effects solved by this application clearer, the following detailed description is provided in conjunction with embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0035] Example 1 This application provides a method for diagnosing communication link test failures. Please refer to [link / reference needed]. Figure 1 This includes the following steps: In step S101, if at least one communication link of the vehicle controller is detected to have failed to test, a diagnostic message for diagnosing the failed communication link is determined based on the link mapping file compiled from the vehicle controller.
[0036] It is understandable that, in this embodiment of the application, with the continuous development of vehicle connectivity, the amount of data transmitted between various vehicle controllers is increasing, and the security of communication information is receiving increasing attention. The CAN (Controller Area Network) bus, widely used for communication between vehicle controllers, has security vulnerabilities due to its plaintext transmission and message broadcast transmission characteristics. SECOC is a security mechanism designed for vehicle network communication in the AUTOSAR (Automotive Open System Architecture) standard, aiming to protect the communication security between vehicle controllers. The secure communication function includes multiple AUTOSAR standard modules, and the secure message information involves the calculation of MAC (Message Authentication Code) values and freshness values. Its verification process involves various scenarios, and a complete test typically takes a long time.
[0037] Furthermore, in the embodiments of this application, the vehicle controller can be understood as a core component in the vehicle electronic control system, responsible for receiving, processing, and sending signals to control various functions of the vehicle; the communication link refers to the channel for data transmission between the vehicle controller and other devices or systems, which may include, but is not limited to, CAN bus, etc., and this application does not impose specific limitations; test failure can be understood as the discovery that the link cannot work properly or that data transmission errors occur during the communication link test; the link mapping file, also known as the memory mapping file, is a text file automatically generated by the compiler or linker after completing the linking of the target program. This file records, in tabular or list form, the memory starting address, occupied space size, belonging object file, and segment attributes of each program symbol (which may include, but is not limited to, global variables, static variables, constants, function entry points, etc., which are not specifically limited in this application) in the final executable image. In the debugging and analysis method of vehicle controller safety communication, the link mapping file provides a static and accurate mapping basis for obtaining the memory addresses of key variables (such as freshness values, message authentication codes, communication status flags, etc., which are not specifically limited in this application). This enables the test system to directly read the variable values at the target address through diagnostic protocols (such as the UDS (Unified Diagnostic Services) diagnostic protocol, which are not specifically limited in this application), thereby achieving on-site data capture and fault location when communication fails.
[0038] In some embodiments of this application, when a test failure of at least one communication link of the vehicle controller is detected, a diagnostic message for diagnosing the failed communication link can be determined based on the link mapping file in the vehicle controller.
[0039] For example, in this embodiment of the application, when the CAN bus communication link test between the vehicle engine control module and the body control module fails, the vehicle controller records frequent error frames on the CAN bus, and the error count continues to rise; at the same time, the bus voltage fluctuates abnormally during some periods, deviating from the normal range. Furthermore, in this embodiment of the application, the corresponding diagnostic message is determined based on the link mapping file.
[0040] It should be noted that in the embodiments of this application, each communication link collects and stores CAN bus messages for subsequent parsing, and the bus messages are saved in binary log recording format or ASC (American Standard Code for Information Interchange) format files. The specific settings can be configured by those skilled in the art according to the actual situation, and this application does not impose any specific limitations.
[0041] Optionally, in one embodiment of this application, before responding to the fact that the receive message authentication code in the received message is not equal to the send message authentication code in the sent message, the method further includes: obtaining the freshness value of the vehicle controller; and determining that the receive message authentication code is not equal to the send message authentication code in response to the freshness value verification failure.
[0042] It is understood that, in the embodiments of this application, sending a message can be understood as a data packet actively transmitted by the vehicle controller, which may include, but is not limited to, control commands, status information or authentication data, etc., and this application does not impose specific limitations; receiving a message can be understood as a data packet received by the vehicle controller from other devices, and its legitimacy needs to be verified; and the freshness value is a security mechanism to prevent replay attacks, which usually uses timestamps, random numbers or incremental sequence numbers to ensure the "timeliness" of each communication.
[0043] In some embodiments, this application embodiment may obtain the freshness value of the vehicle controller before comparing the receive message authentication code in the received message and the send message authentication code in the sent message, and determine that the receive message authentication code is not equal to the send message authentication code if the freshness value verification fails.
[0044] For example, in the embodiments of this application, when verifying the receive message authentication code in the received message and the send message authentication code in the sent message, the corresponding freshness value can be obtained from the freshness value management module. When the freshness value is incorrectly constructed, it is determined that the receive message authentication code is not equal to the send message authentication code, that is, the security message verification fails, the freshness value verification fails, the test fails, and then the corresponding diagnostic fault code is read.
[0045] The freshness value can be calculated based on the reset counter and synchronization counter values in the received synchronization message and the current counter value. It involves various formats and can be set by those skilled in the art according to the actual situation. This application does not impose any specific restrictions.
[0046] The embodiments of this application can verify the freshness value before comparing the message authentication code, which can intercept freshness anomalies caused by replay in advance, avoid invalid comparisons, and improve the accuracy and efficiency of communication link test failure judgment.
[0047] Optionally, in one embodiment of this application, before detecting the failure of at least one communication link of the vehicle controller, the method further includes: obtaining the received message and the sent message of the vehicle controller on the corresponding communication link; and determining that the corresponding communication link test has failed in response to the fact that the received message authentication code in the received message is not equal to the sent message authentication code in the sent message.
[0048] It is understood that, in the embodiments of this application, the receive message authentication code can be understood as the MAC value contained in the received message, which is generated by the sender and appended to the message; the send message authentication code can be understood as the MAC value recalculated by the receiver based on the received message data and the shared key. By comparing the receive message authentication code and the send message authentication code, the receiver can verify whether the message has been tampered with during transmission and whether the message comes from a legitimate sender.
[0049] In some embodiments, before the vehicle controller performs communication link testing and detects that at least one communication link test has failed, it can first obtain the received and sent messages of the vehicle controller on the corresponding communication link, compare the received message authentication code in the received message with the sent message authentication code in the sent message, and then determine that the test of the corresponding communication link has failed if the received message authentication code is not equal to the sent message authentication code.
[0050] For example, embodiments of this application can verify whether the MAC values in the transmitted and received security messages are equal. That is, it can verify whether the MAC value of the message sent by the vehicle controller is equal to the MAC value of the received message calculated in the host computer using the same encryption key, message content, message identifier, and encryption algorithm. If they are equal, the test passes; otherwise, the test fails, and the corresponding diagnostic fault code is read. It can also verify whether the vehicle controller can correctly receive the MAC value of the message sent by the host computer. If it can receive it correctly, the test passes; otherwise, the test fails, and the corresponding diagnostic fault code is read.
[0051] The test scenarios may include, but are not limited to, controller power-on / off, sleep / wake-up, reset, and recovery of the CAN bus after it has been shut down due to a bus shutdown fault. The specific scenarios can be set by those skilled in the art according to the actual situation, and this application does not impose any specific restrictions.
[0052] This application embodiment can determine test failure by comparing the received message authentication code and the sent message authentication code of the vehicle controller communication link, which can quickly and accurately identify communication link security anomalies and improve fault detection efficiency and accuracy.
[0053] Optionally, in one embodiment of this application, determining a diagnostic message for diagnosing a failed communication link based on a link mapping file compiled from the vehicle controller includes: extracting variable information of the vehicle controller and memory address information corresponding to the variable information from the link mapping file; determining the mapping relationship between the variable information and the memory address information based on the variable information and the memory address information; and generating a diagnostic message according to a preset diagnostic protocol based on the mapping relationship.
[0054] It is understood that, in the embodiments of this application, variable information can be understood as the name, type, size, etc. of key variables defined in the program and that need to be monitored, such as SECOC-related variables, such as freshness value, MAC, etc., which are not specifically limited in this application; communication status variables; functional logic variables, etc., which are not specifically limited in this application; memory address information can be understood as the storage location recorded in the link mapping file corresponding to each variable, which can be represented by hexadecimal values for direct addressing by diagnostic messages.
[0055] Furthermore, the variable information and memory address information in the embodiments of this application have a one-to-one correspondence. They can be stored in the form of a mapping table, such as variable name-address pairs, or in other forms for quick subsequent lookup. The specific settings can be configured by those skilled in the art according to the actual situation, and this application does not impose any specific restrictions.
[0056] As one possible implementation, embodiments of this application can obtain the link mapping file generated by the compiled vehicle controller, and extract the corresponding variable information and the memory address information corresponding to each variable from the link mapping file. Then, based on the extracted variable information and memory address information, the mapping relationship between variables and memory addresses is determined, clarifying the addressing location corresponding to each variable. Furthermore, when a communication link test fails, the failed variable to be diagnosed is determined based on the failed communication link, and a corresponding diagnostic message is generated according to a preset diagnostic protocol based on the mapping relationship between variables and memory addresses. The preset diagnostic protocol can be set by those skilled in the art according to actual conditions, and this application does not impose specific limitations.
[0057] For example, embodiments of this application can obtain the link mapping file generated by the vehicle controller during compilation, and extract variable information of SECOC-related variables, communication status variables, and functional logic variables, as well as the memory address information corresponding to each variable, from the link mapping file. Then, based on the extracted variable information and memory address information, a mapping relationship table between variables and memory addresses is established. When the communication link test fails, the failed variable to be diagnosed is determined based on the failed communication link. Based on the mapping relationship table between variables and memory addresses, a structured diagnostic message containing the target memory address is dynamically generated according to the UDS diagnostic protocol for reading real-time status data inside the vehicle controller.
[0058] It should be noted that in this embodiment of the application, when the test fails, the execution of subsequent test cases is suspended and the construction of debug messages is triggered. Based on the test scenario and the message identifier of the test failure, variables such as the status of the safety power distribution unit to be checked, the verification result flag, the communication status, the synchronization counter, the reset counter, and the message counter are obtained. Combined with the mapping relationship, the corresponding memory address is determined. Then, a diagnostic request message is assembled according to the format of reading memory service by address in the UDS diagnostic protocol, sent to the vehicle controller, and a reply response is awaited.
[0059] The embodiments of this application can accurately extract variables and their memory address information from the link mapping file and construct a mapping relationship. Then, based on this relationship, a diagnostic message can be automatically generated according to a preset diagnostic protocol, which can realize the automation and precise location of fault diagnosis, and significantly improve diagnostic efficiency and accuracy.
[0060] Optionally, in one embodiment of this application, before determining the diagnostic message for diagnosing the failed communication link, the method further includes: collecting the operating data of the vehicle controller; identifying the session mode and security access level of the vehicle controller based on the operating data; and allowing the generation of a diagnostic message in response to the session mode being the target mode and the security access level being the target level.
[0061] In some embodiments, this application can comprehensively collect the operational data of the vehicle controller before determining the diagnostic message of a communication link that has failed the test. Based on the collected operational data, the current session mode and corresponding security access level of the vehicle controller can be identified. Only when the session mode of the vehicle controller is the target mode and the security access level reaches the target level can the corresponding diagnostic message be generated. The target mode and target level can be set by those skilled in the art according to actual conditions, and this application does not impose specific limitations.
[0062] For example, in this application embodiment, the controller is developed using the AUTOSAR standard. Before generating diagnostic messages, the vehicle controller must meet the target mode for the session mode and the target level for the security access level.
[0063] This application embodiment can identify session patterns and security access levels by collecting operational data, and allow the generation of diagnostic messages only when the target conditions are met. This can accurately screen effective diagnostic scenarios and improve the accuracy and reliability of diagnostic messages.
[0064] In step S102, the failure status data returned by the vehicle controller in response to the diagnostic message is obtained.
[0065] It is understood that, in the embodiments of this application, the failure status data is a standardized data set used to describe the fault characteristics of the vehicle controller or communication link. It may include, but is not limited to, fault type, severity, occurrence time, environmental conditions, etc., for fault location, cause analysis and repair guidance. This application does not impose specific limitations.
[0066] In some embodiments, this application can send a diagnostic message to the vehicle controller, and then wait for and receive failure status data fed back by the controller in response to the diagnostic message.
[0067] In step S103, the failure status data is parsed to generate a failure diagnosis report corresponding to the vehicle controller. The failure diagnosis report is used to characterize the status information of the failure variables in the failed communication link.
[0068] It is understood that, in the embodiments of this application, the failure diagnosis report may include, but is not limited to, the cause of failure, such as the cause of functional failure, the cause of performance failure, the cause of stability failure, etc., and this application does not impose specific limitations; the severity of the failure, such as no impact, minor, moderate, severe, etc., and this application does not impose specific limitations; failure variables refer to key program variables directly related to the cause of failure during the testing process of the failed communication link, such as the error flag bit that causes MAC verification failure, the value of the freshness value counter mismatch, the status word of the security verification result, etc., and this application does not impose specific limitations.
[0069] Those skilled in the art will understand that the embodiments of this application can parse failure status data and generate a failure diagnosis report corresponding to the vehicle controller. The failure diagnosis report can then display the specific values or operating status of program variables directly related to the failure on the failed communication link at the time of the failure, thereby revealing the root cause of the failure.
[0070] Optionally, in one embodiment of this application, the method further includes: collecting bus messages of the communication bus in which the vehicle controller is located during the test; parsing the bus messages based on the communication matrix file of the vehicle controller to generate corresponding visualization data, and displaying the visualization data in association with the failure diagnosis report.
[0071] It is understood that, in the embodiments of this application, a bus message can be understood as a basic data unit transmitted on an in-vehicle communication bus (such as CAN, etc., which is not specifically limited in this application), recording the communication behavior between controllers. Each bus message may include, but is not limited to, a message identifier, message type, message priority, data field, control information, etc., which is not specifically limited in this application.
[0072] A communication matrix file is a structured file that describes the vehicle network communication protocol. As a "decoding dictionary" for parsing bus messages, it can convert raw binary data into readable physical meaning. Its format can be DBC (DatabaseCAN, CAN database file), but this application does not impose any specific restrictions.
[0073] Visualized data refers to presenting the parsed bus message data in a graphical or tabular format for easy human understanding. This can include, but is not limited to, time-series graphs, message list views, statistical charts, etc., and this application does not impose specific limitations.
[0074] In some embodiments, this application can record all data frames sent and received by the vehicle controller on the bus during the testing process, and the communication matrix file translates the corresponding data into readable physical signals and generates corresponding visualization data. The visualization data is then associated with the failure diagnosis report for easy and rapid fault location.
[0075] For example, the embodiments of this application can collect all bus messages transmitted on the communication bus where the vehicle controller is located during the test, and perform signal analysis on the collected bus messages based on the communication matrix DBC file corresponding to the vehicle controller to obtain visualized data containing signal physical values and message periods. The visualized data is then associated with and stored and synchronously displayed with the failure diagnosis report to intuitively reproduce the bus state when the communication test fails.
[0076] This application embodiment collects communication bus messages and generates visualized data based on the parsing of communication matrix files. This data is then displayed in conjunction with a failure diagnosis report, enabling synchronous tracing and analysis of fault phenomena and underlying communication data. This significantly improves the intuitiveness and diagnostic depth of communication link fault location.
[0077] The following describes the diagnostic system for communication link test failure proposed in this application, using a specific embodiment as an example.
[0078] in, Figure 2 This is a block diagram of a diagnostic system for communication link test failure provided in one embodiment of this application.
[0079] like Figure 2 As shown, the diagnostic system for communication link test failure includes a host computer 201, an on-board controller 202, a debugging information extraction module 203, a debugging message generation module 204, a message acquisition module 205, and a message content parsing module 206.
[0080] The debugging information extraction module 203 is used to extract variable information and corresponding memory address information from the compiled link mapping file, such as xx.map, and determine the mapping relationship between variables and addresses based on the extracted variable information and memory address information.
[0081] The debug message generation module 204 receives the output of the debug information extraction module 203 and collects bus messages in real time. It uses the recorded data as the input of the message content parsing module 206. If the test of at least one communication link of the vehicle controller 202 fails, it suspends the execution of subsequent tests, assembles a diagnostic message according to the format of reading memory service by address in the diagnostic protocol of the UDS diagnostic protocol, sends it to the vehicle controller and waits for a reply response.
[0082] It can be understood that the debug message generation module 204 in this application embodiment dynamically generates structured diagnostic messages based on the UDS diagnostic protocol and mapping relationship, and timely captures key status data when the problem occurs.
[0083] The message acquisition module 205 is used to verify whether the MAC values in the transmitted and received security messages are equal, that is, to verify whether the MAC value of the message sent by the vehicle controller 202 is equal to the MAC value of the message received in the host computer 201; it can also verify whether the vehicle controller 202 can correctly receive the MAC value of the message simulated by the host computer 201, and read the corresponding diagnostic fault code in the event of test failure.
[0084] Furthermore, in this embodiment of the application, when verifying the receive message authentication code in the received message and the send message authentication code in the sent message, the corresponding freshness value can be obtained from the freshness value management module, and when the freshness value is incorrectly constructed, the test is determined to have failed, and the corresponding diagnostic fault code is read.
[0085] The message content parsing module 206 is used to parse the collected CAN messages based on the communication matrix DBC file of the vehicle controller 202, and form time-series visualized data. Then, based on the mapping relationship, it parses the failure status data, generates the corresponding failure diagnosis report, and displays it.
[0086] It can be understood that the message content parsing module 206 in this application embodiment automatically parses the failure status data and associates it with the visualization data for display, supporting rapid fault feature extraction and problem localization.
[0087] In summary, this embodiment of the application can, during the testing of the vehicle controller 202 with SECOC, stop subsequent tests when a test failure occurs, automatically trigger the debug message generation module 204, and wait for a response from the vehicle controller 202. After the debug information is collected, the next test is executed until all tests are completed. Furthermore, after the tests are completed, the collected failure status data is automatically parsed for the communication links that failed, obtaining the key variables and corresponding memory addresses within the vehicle controller 202 at the time of the test failure, and visualizing them for analysis and troubleshooting.
[0088] The diagnostic method for communication link test failure proposed in this application can determine the diagnostic message for diagnosing the failed communication link based on the link mapping file when a communication link test failure of the vehicle controller is detected. It also obtains the failure status data returned in response to the diagnostic message, and then parses the failure status data to generate a corresponding failure diagnostic report. By accurately locating the diagnostic message and obtaining and parsing the failure status data based on the link mapping file compiled by the vehicle controller to generate a failure diagnostic report containing failure variable status information, it can efficiently and accurately diagnose the cause of communication link test failure, improving the efficiency and accuracy of fault diagnosis. This solves the problems in related technologies, such as only being able to read fault diagnostic codes and lacking analysis and location methods for test failures, and simulation platforms being limited to simulation testing and lacking actual fault diagnosis capabilities and verification for actual deployment effects.
[0089] Example 2 This application provides a diagnostic device for communication link test failure. Please refer to... Figure 3 The diagnostic device 10 for communication link test failure includes: a determination module 100, a first acquisition module 200, and a first generation module 300.
[0090] The determination module 100 is used to determine a diagnostic message for diagnosing the failed communication link based on the link mapping file compiled from the vehicle controller when a test failure of at least one communication link of the vehicle controller is detected.
[0091] The first acquisition module 200 is used to acquire failure status data returned by the vehicle controller in response to diagnostic messages.
[0092] The first generation module 300 is used to parse the failure status data and generate a failure diagnosis report corresponding to the vehicle controller. The failure diagnosis report is used to characterize the status information of the failure variables in the failure communication link.
[0093] Optionally, in one embodiment of this application, it further includes: a second acquisition module and a first determination module.
[0094] The second acquisition module is used to acquire the received and transmitted messages of the vehicle controller on the corresponding communication link before detecting the failure of at least one communication link of the vehicle controller.
[0095] The first determination module is used to determine that the corresponding communication link test has failed if the receive message authentication code in the received message is not equal to the send message authentication code in the sent message.
[0096] Optionally, in one embodiment of this application, it further includes: a third acquisition module and a second determination module.
[0097] The third acquisition module is used to acquire the freshness value of the vehicle controller before the receive message authentication code in the received message is not equal to the send message authentication code in the sent message.
[0098] The second determination module is used to determine that the received message authentication code is not equal to the sent message authentication code in response to the failure of freshness value verification.
[0099] Optionally, in one embodiment of this application, the determining module 100 includes: an extraction unit, a first determining unit, and a generating unit.
[0100] The extraction unit is used to extract the variable information of the vehicle controller and the memory address information corresponding to the variable information from the linked mapping file.
[0101] The first determining unit is used to determine the mapping relationship between variables and addresses based on variable information and memory address information.
[0102] The generation unit is used to generate diagnostic messages based on the mapping relationship and according to the preset diagnostic protocol.
[0103] Optionally, in one embodiment of this application, it further includes: a first acquisition module, an identification module, and a second generation module.
[0104] The first acquisition module is used to acquire the operating data of the vehicle controller before determining the diagnostic message used to diagnose the failed communication link.
[0105] The identification module is used to identify the session mode and security access level of the vehicle controller based on operational data.
[0106] The second generation module is used to generate diagnostic messages in response to the session mode being the target mode and the security access level being the target level.
[0107] Optionally, in one embodiment of this application, it further includes: a second acquisition module and an association module.
[0108] The second acquisition module is used to acquire bus messages of the communication bus where the vehicle controller is located during the test.
[0109] The association module is used to parse bus messages based on the communication matrix file of the vehicle controller, generate corresponding visualization data, and associate and display the visualization data with the failure diagnosis report.
[0110] The diagnostic device for communication link test failure proposed in this application can, upon detecting a communication link test failure of the vehicle controller, determine the diagnostic message used to diagnose the failed communication link based on the link mapping file, obtain the failure status data returned in response to the diagnostic message, and then parse the failure status data to generate a corresponding failure diagnostic report. By accurately locating the diagnostic message and obtaining and parsing the failure status data based on the link mapping file compiled and generated by the vehicle controller to generate a failure diagnostic report containing failure variable status information, it can efficiently and accurately diagnose the cause of communication link test failure, improving the efficiency and accuracy of fault diagnosis. This solves the problems in related technologies, such as only being able to read fault diagnostic codes and lacking analysis and location methods for test failures, and simulation platforms being limited to simulation testing and lacking actual fault diagnosis capabilities and verification of actual deployment effects.
[0111] This application also provides an electronic device 20, please refer to... Figure 4 It includes a processor 410 and a memory 420, wherein the memory 410 is used to store computer programs; the processor 420 is used to execute the programs stored in the memory 410 to implement the diagnostic method for communication link test failure described in any embodiment of this application.
[0112] This application also provides a vehicle that includes the electronic equipment described in any embodiment of this application.
[0113] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the diagnostic method for communication link test failure described in any embodiment of this application.
[0114] In this application, "multiple" refers to two or more.
[0115] In this application, unless otherwise expressly defined, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection between two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.
[0116] The terms “first,” “second,” “third,” “fourth,” etc., in this application (if any) are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0117] In this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, in this application, the character " / " generally indicates that the preceding and following related objects have an "or" relationship.
[0118] Unless otherwise specified, all steps in this application may be performed sequentially or randomly. For example, if a method includes steps A and B, it means that the method may include steps A and B performed sequentially, or it may include steps B and A performed sequentially. For example, if a method may also include step C, it means that step C may be added to the method in any order. For example, the method may include steps A, B, and C, or it may include steps A, C, and B, or it may include steps C, A, and B, etc.
[0119] The above are merely preferred embodiments of this application and are not intended to limit this application. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A diagnostic method for communication link test failure, characterized in that, Includes the following steps: If at least one communication link of the vehicle controller is detected to have failed during testing, a diagnostic message for diagnosing the failed communication link is determined based on the link mapping file compiled from the vehicle controller. Obtain the failure status data returned by the vehicle controller in response to the diagnostic message; The failure status data is parsed to generate a failure diagnosis report corresponding to the vehicle controller, wherein the failure diagnosis report is used to characterize the status information of the failure variables in the failure communication link.
2. The method according to claim 1, characterized in that, Before detecting a test failure of at least one communication link of the vehicle controller, the following is also included: Obtain the received and transmitted messages of the vehicle controller on the corresponding communication link; If the Receive Message Authentication Code in the Received Message is not equal to the Send Message Authentication Code in the Send Message, the corresponding communication link test is determined to have failed.
3. The method according to claim 2, characterized in that, Before responding to the fact that the Authentication Message Code (Authentication Code) in the received message is not equal to the Authentication Message Code (Authentication Code) in the sent message, the method further includes: Obtain the freshness value of the vehicle controller; In response to the failure of the freshness value verification, it is determined that the received message authentication code is not equal to the sent message authentication code.
4. The method according to claim 1, characterized in that, The diagnostic message used for diagnosing failed communication links, determined based on the link mapping file compiled from the vehicle controller, includes: Extract the variable information of the vehicle controller and the memory address information corresponding to the variable information from the link mapping file; Based on the variable information and the memory address information, determine the mapping relationship between the variable and the address; Based on the mapping relationship, the diagnostic message is generated according to the preset diagnostic protocol.
5. The method according to claim 1, characterized in that, Before determining the diagnostic message used to diagnose a failed communication link, the following is also included: Collect the operating data of the vehicle controller; Based on the operational data, the session mode and security access level of the vehicle controller are identified; In response to the session mode being the target mode and the security access level being the target level, the generation of the diagnostic message is permitted.
6. The method according to claim 1, characterized in that, Also includes: Collect bus messages from the communication bus where the vehicle controller is located during the test; The bus messages are parsed based on the communication matrix file of the vehicle controller, corresponding visualization data is generated, and the visualization data is associated with and displayed in relation to the failure diagnosis report.
7. A diagnostic device for communication link test failure, characterized in that, include: The determination module is used to determine a diagnostic message for diagnosing the failed communication link based on a link mapping file compiled from the vehicle controller, in the event that a test failure of at least one communication link of the vehicle controller is detected. The first acquisition module is used to acquire the failure status data returned by the vehicle controller in response to the diagnostic message; The first generation module is used to parse the failure status data and generate a failure diagnosis report corresponding to the vehicle controller, wherein the failure diagnosis report is used to characterize the status information of the failure variables in the failure communication link.
8. An electronic device, characterized in that, Including processor and memory, among which, Memory, used to store computer programs; A processor for executing a program stored in memory to implement the diagnostic method for communication link test failure as described in any one of claims 1-6.
9. A vehicle, characterized in that, It includes the electronic device as described in claim 8.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the diagnostic method for communication link test failure as described in any one of claims 1-6.