Real vehicle bus error frame positioning method and device, equipment and storage medium
By obtaining diagnostic service requests and register encapsulation mapping, using functional addressing to identify and read error counter value sets, combined with polling cycle change analysis, accurately locate the fault source of the real vehicle bus error frame, solving the problems of complex operation and inefficiency in the existing technology, and achieving efficient and accurate fault diagnosis.
Patent Information
- Application Number
- CN202510588721.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-08
- Publication Date
- 2025-07-25
AI Technical Summary
The prior art is complex and inefficient when positioning the error frame of the real vehicle CAN bus, making it difficult to accurately locate the fault source, especially in multi-ECU node network segments, and there are risks of hardware equipment dependence and manual operation.
By obtaining diagnostic service requests and register encapsulation mapping, the target register error timer is identified using functional addressing, the target error counter value set is read, the fault analysis is triggered to locate the bus error frame, the diagnostic protocol stack configuration identification and secure access level limit read error counter value, and the fault type is determined based on the polling cycle change information.
Improve troubleshooting efficiency, reduce manual complexity and hardware equipment dependence, accurately distinguish ECU failure from bus physical layer failure, reduce costs and improve the safety and reliability of the diagnostic process.
Smart Images

Figure CN120378284A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of automotive electronics and in-vehicle network communication, and particularly to a method, device, equipment and storage medium for real vehicle bus error frame localization. Background Art
[0002] In an in-vehicle CAN bus, when an ECU detects a communication error, it will notify other nodes on the bus of the error in the form of sending an error frame, so that corresponding measures can be taken. A small number of error frames may have a significant impact on communication quality, such as causing data transmission delay, loss of key signals, etc., thus affecting the performance and driving experience of the vehicle; and once error frames appear frequently or accumulate in large quantities, the bus load increases sharply, the communication efficiency drops significantly, which may cause communication interruption or loss of key data, and in severe cases, it may lead to abnormal functions of the vehicle's electronic control system, threatening driving safety. And it is difficult to locate the problem of error frames appearing in the real vehicle CAN bus. It is necessary not only to conduct investigations from the physical level of the bus, but more often to accurately locate the faulty node that generates the error frame in a network segment with multiple ECU nodes. Therefore, how to quickly and accurately locate and diagnose the error frame fault node in the real vehicle CAN bus is an essential task.
[0003] Currently, the existing approach is to sequentially check the harness short circuit, terminal resistance, CAN output level, etc., and real-time monitor the error frame ID and type of the bus, initially lock the source range of the abnormal message, use the elimination method to isolate the ECU nodes in sequence, and synchronously monitor the bus communication status. When the error frame disappears and the bus communication returns to normal after a certain node is isolated, it can be determined that this node is the fault source.
[0004] However, the existing approach is not only complex in operation and low in troubleshooting efficiency, but also difficult to accurately locate the error frame fault source, such as whether it is a bus physical fault or an ECU node fault. The troubleshooting efficiency is low, and it is necessary to coordinate test equipment resources such as multimeters and oscilloscopes. Repeatedly and alternately using them to troubleshoot problems is not only cumbersome in operation, but also low in efficiency. And linear troubleshooting of each ECU needs to repeat processes such as isolation, detection, and reset multiple times. If there are many bus ECUs, it is not friendly to working hours and labor costs, and the positioning is inaccurate and cannot handle coupled faults. If node A is abnormal and causes node B to report an error, simply removing A may not directly reflect the problem of node B. Depending on manual operation, there is a risk that incorrect unplugging may damage the connector or cause new faults. Therefore, how to efficiently and accurately locate the real vehicle bus error frame has become an urgent problem to be solved.
[0005] The above content is only used to assist in understanding the technical solution of the present application, and does not represent an admission that the above content is prior art. Summary of the Invention
[0006] The main purpose of this application is to provide a method, device, equipment and storage medium for locating real vehicle bus error frames, aiming to solve the technical problem of how to efficiently and accurately locate real vehicle bus error frames.
[0007] To achieve the above object, this application proposes a method for efficiently and accurately locating real vehicle bus error frames. The method includes:
[0008] Obtain a diagnostic service request and a register encapsulation mapping;
[0009] Based on the diagnostic service request, perform functional addressing to identify the target register error timer, and access the register encapsulation mapping to read the target register mapping value, and determine the target error counter value set and the target received error counter value set;
[0010] Based on the target error counter value set and the target received error counter value set, trigger a fault analysis to locate the real vehicle bus error frame, determine the bus error frame detection result, and complete the real vehicle bus error frame location based on the bus error frame detection result.
[0011] In one embodiment, the step of obtaining the diagnostic service request and the register encapsulation mapping includes:
[0012] Obtain a diagnostic instruction and physical register information;
[0013] Based on the diagnostic instruction, identify the target data identifier, and trigger the diagnostic service corresponding to the target data identifier to determine the diagnostic service request;
[0014] Based on the physical register information, perform a memory address redirection and map the target register value to determine the register encapsulation mapping. The register encapsulation mapping includes a register bit field and a register access permission.
[0015] In one embodiment, the step of performing functional addressing based on the diagnostic service request to identify the target register error timer, accessing the register encapsulation mapping to read the target register mapping value, and determining the target error counter value set and the target received error counter value set includes:
[0016] Obtain a diagnostic protocol stack configuration identifier;
[0017] Based on the diagnostic service request and the diagnostic protocol stack configuration identifier, perform functional addressing to identify the target register error timer, and limit the reading of the abnormal authorization error timer to determine the target register error timer identifier;
[0018] Based on the target register error timer identifier, access the register encapsulation mapping to read the target register mapping value, and determine the target error counter value set and the target received error counter value set.
[0019] In one embodiment, the steps of identifying a target register error timer by functional addressing based on the diagnostic service request and the diagnostic protocol stack configuration identifier, and restricting the read exception authorization error timer to determine the target register error timer identifier include:
[0020] Obtain security access level restriction information;
[0021] Based on the diagnostic service request, perform functional addressing to identify the target register corresponding to the diagnostic protocol stack configuration identifier, and determine the routine working condition information;
[0022] Based on the routine working condition information and the security access level restriction information, restrict the read exception authorization error timer to obtain the target register error timer identifier.
[0023] In one embodiment, the steps of accessing the register encapsulation mapping based on the target register error timer identifier to read the target register mapping value, and determining the target error counter value set and the target received error counter value set include:
[0024] Obtain the polling period;
[0025] Based on the polling period and the target register error timer identifier, access the register encapsulation mapping to determine the target mapped register identifier;
[0026] Read the target register mapping value corresponding to the target mapped register identifier to obtain the target error counter value set and the target received error counter value set.
[0027] In one embodiment, the steps of triggering a fault analysis to locate the in-vehicle bus error frame based on the target error counter value set and the target received error counter value set, and determining the bus error frame detection result include:
[0028] Based on the target error counter value set and the target received error counter value set, detect the change in the target register value for the corresponding polling period to determine the polling period change information;
[0029] Based on the target error counter value set and the polling period change information, trigger a fault analysis to locate the in-vehicle bus error frame to obtain the bus error frame detection result.
[0030] In one embodiment, the steps of triggering a fault analysis to locate the in-vehicle bus error frame based on the target error counter value set and the polling period change information, and determining the bus error frame detection result include:
[0031] Obtain the target passive error limit value;
[0032] When the target error counter value set is greater than the target passive error limit value and the polling cycle change information indicates that the error counter value is continuously increasing, the bus error frame detection result is that a local transmission failure causes the bus to generate an error frame;
[0033] When the polling cycle change information indicates that the received error counter value is continuously increasing and the error counter value remains unchanged, the bus error frame detection result is that a bus physical layer failure causes the bus to generate an error frame.
[0034] In addition, to achieve the above object, the present application also proposes a vehicle-mounted bus error frame positioning device, which includes:
[0035] An acquisition module, configured to acquire a diagnostic service request and a register encapsulation mapping;
[0036] A processing module, configured to perform function addressing based on the diagnostic service request to identify a target register error timer, access the register encapsulation mapping to read a target register mapping value, and determine a target error counter value set and a target received error counter value set;
[0037] An execution module, configured to trigger a failure analysis to locate a vehicle-mounted bus error frame based on the target error counter value set and the target received error counter value set, determine a bus error frame detection result, and complete the positioning of the vehicle-mounted bus error frame based on the bus error frame detection result.
[0038] In addition, to achieve the above object, the present application also proposes a vehicle-mounted bus error frame positioning device, which includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the vehicle-mounted bus error frame positioning method as described above.
[0039] In addition, to achieve the above object, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium, and when the computer program is executed by a processor, the steps of the vehicle-mounted bus error frame positioning method as described above are implemented.
[0040] One or more technical solutions proposed by the present application have at least the following technical effects:
[0041] A method for locating a bus error frame in a real vehicle proposed in this embodiment obtains a diagnostic service request and a register encapsulation mapping; performs function addressing based on the diagnostic service request to identify a target register error timer, accesses the register encapsulation mapping to read a target register mapping value, determines a target error counter value set and a target received error counter value set; triggers a fault analysis based on the target error counter value set and the target received error counter value set to locate the bus error frame in the real vehicle, determines a bus error frame detection result, and completes the location of the bus error frame in the real vehicle based on the bus error frame detection result. By obtaining the diagnostic service request and the register encapsulation mapping, this application uses function addressing to identify the target register error timer and read its mapping value, obtains the error counter value set to trigger a fault analysis, accurately locates the fault source of the bus error frame in the real vehicle, significantly improves the efficiency of fault troubleshooting, reduces the complexity and uncertainty of manual troubleshooting, accurately distinguishes between local ECU faults and bus physical layer faults, avoids misjudgment, reduces the dependence on hardware devices, reduces the troubleshooting cost, improves the safety and reliability of the diagnostic process at the same time, avoids new faults caused by improper manual operations, and realizes simple, efficient and accurate fault diagnosis. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] The drawings here are incorporated into the specification and form a part of this specification, showing embodiments consistent with this application, and are used together with the specification to explain the principles of this application.
[0043] To more clearly illustrate the technical solutions in the embodiments of this application or in the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, other drawings can also be obtained based on these drawings without creative efforts.
[0044] Figure 1 It is a schematic flowchart provided for Embodiment 1 of the method for locating a bus error frame in a real vehicle according to this application;
[0045] Figure 2 It is a schematic flowchart provided for Embodiment 2 of the method for locating a bus error frame in a real vehicle according to this application;
[0046] Figure 3 It is a schematic brief flowchart of the method for locating a bus error frame in a real vehicle provided for the embodiments of this application;
[0047] Figure 4 It is a schematic module structure diagram of the device for locating a bus error frame in a real vehicle according to the embodiments of this application;
[0048] Figure 5 It is a schematic device structure diagram of the hardware operating environment involved in the method for locating a bus error frame in a real vehicle according to the embodiments of this application.
[0049] The implementation, functional features and advantages of this application will be further described in conjunction with embodiments with reference to the accompanying drawings. Detailed implementation manners
[0050] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of this application and are not used to limit this application.
[0051] To better understand the technical solutions of this application, the following will be described in detail in conjunction with the drawings of the specification and specific implementation manners.
[0052] The main solution of the embodiment of this application is: obtaining a diagnostic service request and a register encapsulation mapping; performing functional addressing based on the diagnostic service request to identify a target register error timer, accessing the register encapsulation mapping to read the target register mapping value, and determining a target error counter value set and a target received error counter value set; triggering fault analysis to locate the in-vehicle bus error frame based on the target error counter value set and the target received error counter value set, determining the bus error frame detection result, and completing the in-vehicle bus error frame location based on the bus error frame detection result.
[0053] In this embodiment, for the convenience of description, the following will be described with the in-vehicle bus error frame location device as the execution subject.
[0054] Since the prior art is not only complex in operation and low in troubleshooting efficiency, but also difficult to accurately locate the fault source of the error frame, such as whether it is a bus physical fault or an ECU node fault, the troubleshooting efficiency is low, and it is necessary to coordinate test equipment resources such as multimeters and oscilloscopes. Repeatedly using them alternately to troubleshoot problems is not only cumbersome in operation but also low in efficiency. And linear troubleshooting of each ECU requires repeating processes such as isolation, detection, and reset multiple times. If there are many bus ECUs, it is not friendly to working hours and labor costs, and the location is inaccurate and cannot handle coupled faults. If node A is abnormal and causes node B to report an error, simply removing A may not directly reflect the problem of node B. Dependent on manual operation, there is a risk that incorrect unplugging may damage the connector or cause new faults.
[0055] This application provides a solution: obtaining a diagnostic service request and a register encapsulation mapping; performing functional addressing based on the diagnostic service request to identify a target register error timer, accessing the register encapsulation mapping to read the target register mapping value, and determining a target error counter value set and a target received error counter value set; triggering fault analysis to locate the in-vehicle bus error frame based on the target error counter value set and the target received error counter value set, determining the bus error frame detection result, and completing the in-vehicle bus error frame location based on the bus error frame detection result.
[0056] As can be seen from the above embodiments, the present application obtains a diagnostic service request and a register encapsulation mapping, uses functional addressing to identify the target register error timer and reads its mapping value, obtains an error counter value set to trigger a fault analysis, accurately locates the fault source of the in-vehicle bus error frame, significantly improves the efficiency of fault troubleshooting, reduces the complexity and uncertainty of manual troubleshooting, accurately distinguishes between local ECU faults and bus physical layer faults, avoids misjudgment, reduces the dependence on hardware devices, reduces the troubleshooting cost, and at the same time improves the safety and reliability of the diagnostic process, avoids new faults caused by improper manual operations, and realizes simple, efficient and accurate fault diagnosis.
[0057] Based on this, an embodiment of the present application provides a method for locating an in-vehicle bus error frame, referring to Figure 1 , Figure 1 which is a schematic flowchart of the first embodiment of the method for locating an in-vehicle bus error frame of the present application.
[0058] In this embodiment, the method for locating an in-vehicle bus error frame includes steps S10 to S30:
[0059] Step S10, obtaining a diagnostic service request and a register encapsulation mapping;
[0060] It should be noted that the diagnostic service request is a request message generated by triggering a specific diagnostic function inside the electronic control unit, and the register encapsulation mapping is an encapsulation structure interface obtained by mapping physical register information to a software-accessible virtual address space.
[0061] It can be understood that the transmit error counter and receive error counter of the ECU are implemented by the CAN controller hardware, such as an independent CAN IP core or a CAN module integrated in the MCU. Their values are generally stored in the dedicated registers of the CAN controller, and external test equipment cannot directly read the register error counter values. Therefore, the ECU application layer software needs to access the underlying CAN controller registers of the hardware, that is, read the TEC and REC values in real time through the register encapsulation mapping.
[0062] For easy understanding, taking the obtaining of the diagnostic service request and the register encapsulation mapping as an example for illustration, where the information acquisition device is an information acquisition module and the storage device is a memory.
[0063] The information acquisition module obtains a diagnostic instruction and physical register information, identifies a target data identifier based on the diagnostic instruction, triggers the diagnostic service corresponding to the target data identifier, and determines a diagnostic service request. That is, according to the standardized diagnostic communication protocol, the diagnostic service and the data identifier DID are defined, the corresponding diagnostic service is developed in the ECU software, and the diagnostic service request is obtained. Based on the physical register information, memory address redirection is performed, and the target register value is mapped to determine the register encapsulation mapping. The register encapsulation mapping includes the register bit field and the register access permission. That is, through memory address redirection, the physical register of the CAN controller is mapped to the virtual address control that can be accessed by the software, such as mapping the TEC or REC, to ensure real-time access. The CAN_ErrorCounters structure is defined, which can include the bit fields and access permission control of the TEC and REC to provide a type-safe and hardware-abstracted CAN error counter access interface, and the register encapsulation mapping is obtained, which can include the transmit and receive error counters, support bit field operations and access permission control, and is suitable for embedded system development. Subsequent processing is performed based on the diagnostic service request and the register encapsulation mapping.
[0064] In a feasible implementation manner, step S10 may include steps A11 to A13:
[0065] Step A11, obtaining a diagnostic instruction and physical register information;
[0066] It should be noted that the diagnostic instruction is a specific command for triggering the internal diagnostic function of the electronic control unit, and the physical register information is the detailed data of the internal hardware register of the electronic control unit.
[0067] It can be understood that the diagnostic instruction is sent in a standardized format, which may include a diagnostic service code and service parameters, specifying the diagnostic operation to be performed, such as reading the value of a specific register or executing a specific diagnostic routine. Through the diagnostic instruction, an external diagnostic device can communicate with the ECU to obtain the internal state information of the ECU or perform a fault detection.
[0068] In addition, it should be noted that the physical register information stores the detailed state information during the operation of the ECU, such as the values of the transmit error counter and the receive error counter, which can represent the operation state of the ECU at the hardware level and is stored at a specific memory address, and needs to be read through a specific access method, such as memory mapping reading.
[0069] Step A12, identifying a target data identifier based on the diagnostic instruction, triggering the diagnostic service corresponding to the target data identifier, and determining a diagnostic service request;
[0070] It can be understood that the diagnostic service request can identify the target data identifier, activate the corresponding diagnostic service, and accurately point to the object and function to be diagnosed. It can include the target data identifier and service type, so as to accurately trigger specific service functions inside the ECU, such as reading the value of the error counter or executing a specific diagnostic routine.
[0071] Step A13: Based on the physical register information, perform memory address redirection, map the target register value, and determine the register encapsulation mapping. The register encapsulation mapping includes register bit fields and register access permissions.
[0072] It can be understood that the register encapsulation mapping is implemented through memory address redirection, provides a type-safe access interface for software, and at the same time, through security access mechanisms such as critical section protection, to prevent multitasking competition, ensure secure access to the CAN error counter in a multitasking or interrupt environment, avoid data competition, thereby maintaining data consistency in a multitasking environment, avoiding data errors caused by multitasking competition, and at the same time optimizing hardware access efficiency. Supporting shadow register caching can reduce direct operations on registers and achieve an 80% reduction in direct hardware access.
[0073] Step S20: Based on the diagnostic service request, perform function addressing to identify the target register error timer, and access the register encapsulation mapping to read the target register mapping value, and determine the target error counter value set and the target receive error counter value set;
[0074] It should be noted that the target error counter value set is a set of values of the transmit error counter inside the ECU, and the target receive error counter value set is a set of values of the receive error counter inside the ECU.
[0075] For ease of understanding, taking the determination of the target error counter value set and the target receive error counter value set as an example for illustration, where the information acquisition device is the information acquisition module, the storage device is the memory, and the processing device is the processing module.
[0076] The information collection module obtains the diagnostic protocol stack configuration identifier. To enable an external diagnostic device to simultaneously read the error timer values of all ECUs in the CAN bus, a diagnostic protocol stack configuration identifier DID is designed, such as 0x0102. Based on the diagnostic service request and the diagnostic protocol stack configuration identifier, functional addressing is performed to identify the target register error timer, and the reading of the abnormal authorization error timer is restricted to determine the target register error timer identifier. That is, the diagnostic protocol stack configuration identifier DID is used to support the functional addressing broadcast request. Through the functional addressing mechanism, an external diagnostic device is allowed to send a broadcast request to the entire CAN bus network. Among them, the functional addressing broadcast request is a special diagnostic communication method that allows a diagnostic device to send a request to the entire network. All ECUs on the bus will receive and process this broadcast request, and then return the corresponding target register error timer identifier according to the content of the request. To meet the security requirements and prevent unauthorized reading of the error counter, the 0x27 security access level Level 1 can be bound in the 0x22 service corresponding to the diagnostic service request to implement the control of reading TEC and REC in the 0x31 service routine. For example, access is only allowed when the routine is enabled. The request format is 31 01 01 02, and at this time, the routine access is enabled. The request format is 31 02 01 02, and at this time, the routine access is disabled. Its response format is 71 01 / 02 01 02.
[0077] Based on the target register error timer identifier, access the register encapsulation mapping to read the target register mapping value, and determine the target error counter value set and the target received error counter value set. That is, to enable an external diagnostic device to read the TEC and REC values inside the ECU, it can be accessed through the UDS protocol of the $22 diagnostic service and the corresponding DID. The UDS protocol is a standardized diagnostic communication protocol widely used in automotive electronic systems, which defines a series of diagnostic services and data interaction formats, enabling diagnostic tools from different manufacturers to communicate with the vehicle's ECU. The $22 diagnostic service in the UDS protocol is used to read specific data inside the ECU. Among them, the supported UDS service can be the 0x22 diagnostic service. By defining a specific DID, such as 0x0102, the values of TEC and REC are associated with this DID. When the external diagnostic device receives the target register error timer identifier, at this time, read the values of TEC and REC. By sending a $22 diagnostic service request and specifying the DID as 0x0102, request the ECU to return the current TEC and REC values. After receiving this request, the ECU will read the values of the target error counter value set TEC and the target received error counter value set REC from its internal mapping register or cache, and return these values to the diagnostic device in a standardized response format, which is 62 01 02[TEC][REC]. For example, 62 01 02 12 05 means TEC = 0x12 and REC = 0x05. Perform subsequent processing based on the target error counter value set and the target received error counter value set.
[0078] Step S30, trigger the failure analysis to locate the in-vehicle bus error frame based on the target error counter value set and the target received error counter value set, determine the bus error frame detection result, and complete the in-vehicle bus error frame location based on the bus error frame detection result.
[0079] It should be noted that the bus error frame detection result is the fault type result determined by the change trend of the target error counter value set or the target received error counter value set detected within the polling period.
[0080] For easy understanding, take the determination of the bus error frame detection result as an example to illustrate. Among them, the information collection device is the information collection module, the storage device is the memory, and the execution device is the execution module.
[0081] Detect the change of the target register value in the corresponding polling period based on the target error counter value set and the target received error counter value set, and determine the polling period change information;
[0082] The information collection module obtains the target error counter value set and the target received error counter value set, and obtains the target passive error limit value, such as 127. When the target error counter value set is greater than the target passive error limit value and the polling cycle change information indicates that the error counter value is continuously increasing, the bus error frame detection result is that a local transmission failure of the bus causes the bus to generate an error frame. That is, an external diagnostic device is used to read the current values of TEC and REC of each ECU in the bus in a functional addressing manner at a cycle of 10 ms for fault analysis. When it is monitored that the target error counter value set TEC of a certain ECU is > 127, which is regarded as a passive error state, and the polling cycle change information indicates that the error counter value is continuously increasing, it is determined that a local transmission failure of this ECU causes the bus to generate an error frame. Among them, the logical relationship can be expressed as:
[0083] if (TEC > 127) and (TEC is continuously increasing)
[0084] Fault source = local ECU
[0085] When the polling cycle change information indicates that the received error counter value is continuously increasing and the error counter value remains unchanged, the bus error frame detection result is that a bus physical layer fault causes the bus to generate an error frame. That is, when it is monitored that the polling cycle change information of a certain ECU indicates that the received error counter value REC is continuously increasing while the error counter value TEC remains unchanged, it is determined that a bus physical layer fault causes the bus to generate an error frame, such as a damaged terminal resistor. Among them, the logical relationship can be expressed as:
[0086] else if (REC is continuously increasing) and (TEC has no change)
[0087] Fault source = bus physical layer
[0088] In a feasible implementation manner, step S30 may include steps B11 to B12:
[0089] Step B11, detecting the change of the target register value of the corresponding polling cycle based on the target error counter value set and the target received error counter value set, and determining the polling cycle change information;
[0090] It should be noted that the polling cycle change information is the change situation of the target error counter value set and the target received error counter value set obtained within the set polling cycle.
[0091] It can be understood that the polling cycle change information can characterize the numerical change trend of the error counter in consecutive polling cycles, such as whether it is continuously increasing, whether it remains unchanged, or whether there is a periodic fluctuation, which is the dynamic change of the bus communication state, so as to identify potential faults.
[0092] Step B12: Trigger the fault analysis to locate the in-vehicle bus error frame based on the target error counter value set and the polling period change information, and obtain the bus error frame detection result.
[0093] It can be understood that the bus error frame detection result can characterize the change trend of the error counter within a specific polling period, that is, whether the error counter value continues to increase or exceeds the preset passive error limit value, thereby indicating the nature of the fault. For example, whether the fault is caused by a local ECU transmission fault or a bus physical layer fault.
[0094] In a feasible implementation manner, step B12 may include steps C11 to C13:
[0095] Step C11: Obtain the target passive error limit value.
[0096] It should be noted that the target passive error limit value is a threshold set for determining whether the ECU enters the passive error state.
[0097] It can be understood that when the transmission error counter value of the ECU exceeds this limit value, it indicates that the ECU has detected too many errors and has entered the passive error state. At this time, it will not be able to send data normally, affecting the quality and stability of bus communication.
[0098] Step C12: When the target error counter value set is greater than the target passive error limit value and the polling period change information indicates that the error counter value continues to increase, the bus error frame detection result is that a local transmission fault causes the bus to generate an error frame.
[0099] It can be understood that when the transmission error counter TEC value of the ECU exceeds the preset target passive error limit value and the TEC value continues to increase in consecutive polling periods, it indicates that the ECU frequently detects errors when sending data and the error situation is deteriorating, that is, there is a fault in the local transmission function of the ECU, resulting in the bus generating an error frame.
[0100] Step C13: When the polling period change information indicates that the receive error counter value continues to increase and the error counter value remains unchanged, the bus error frame detection result is that a bus physical layer fault causes the bus to generate an error frame.
[0101] It can be understood that when the receive error counter REC value of the ECU continues to increase while the transmission error counter TEC value remains unchanged, it indicates that the ECU frequently detects errors when receiving data but does not detect obvious errors when sending data, that is, it can be determined that there is a fault in the bus physical layer, such as damaged terminal resistance, resulting in error frames during data transmission.
[0102] A method for locating real vehicle bus error frames proposed in this embodiment obtains a diagnostic service request and a register encapsulation mapping; based on the diagnostic service request, performs function addressing to identify a target register error timer, accesses the register encapsulation mapping to read the target register mapping value, and determines a target error counter value set and a target received error counter value set; based on the target error counter value set and the target received error counter value set, triggers a fault analysis to locate the real vehicle bus error frame, determines the bus error frame detection result, and completes the location of the real vehicle bus error frame based on the bus error frame detection result. This solves the technical problem of how to efficiently and accurately locate real vehicle bus error frames. Compared with the prior art, this application obtains a diagnostic service request and a register encapsulation mapping, uses function addressing to identify a target register error timer and read its mapping value, and triggers a fault analysis to accurately locate the fault source of the real vehicle bus error frame, improving the efficiency of fault troubleshooting. By obtaining the error counter values and changes through specific diagnostic instructions and performing simple analysis, it replaces the traditional complex device detection test method, making fault troubleshooting more efficient and convenient, reducing the troubleshooting cost, and directly performing fault diagnosis and analysis at the ECU software level, which can more accurately locate the root cause of the fault.
[0103] Based on the first embodiment of this application, in the second embodiment of this application, for the same or similar content as the above-mentioned embodiment one, reference can be made to the above introduction and will not be repeated hereinafter.
[0104] In this embodiment, referring to Figure 2 , Figure 2 is a schematic flowchart provided for the second embodiment of the real vehicle bus error frame location method of this application. Step S20 specifically includes steps S21 to S23:
[0105] Step S21, obtain a diagnostic protocol stack configuration identifier;
[0106] It should be noted that the diagnostic protocol stack configuration identifier is an identifier for defining and identifying specific codes or parameters of a diagnostic service request.
[0107] It can be understood that the diagnostic protocol stack configuration identifier is used in in-vehicle network communication to specify the target object and function addressing method of a diagnostic instruction. For example, in the UDS protocol, the diagnostic protocol stack configuration identifier can be a specific DID, which represents the register or data type to be read or operated on. By configuring this identifier, access and control of the error counters of different ECUs can be achieved.
[0108] For ease of understanding, taking the acquisition of the diagnostic protocol stack configuration identifier as an example for illustration, where the information acquisition device is an information acquisition module, the storage device is a memory, and the processing device is a processing module.
[0109] The information acquisition module obtains the diagnostic protocol stack configuration identifier. That is, to enable an external diagnostic device to simultaneously read the error timer values of all ECUs in the CAN bus, a diagnostic protocol stack configuration identifier DID is designed, such as 0x0102, to obtain the diagnostic protocol stack configuration identifier, and subsequent processing is performed based on the diagnostic protocol stack configuration identifier.
[0110] Step S22: Based on the diagnostic service request and the diagnostic protocol stack configuration identifier, perform functional addressing to identify the target register error timer, and restrict the reading of the abnormal authorization error timer to determine the target register error timer identifier.
[0111] It should be noted that the target register error timer identifier is a specific code or address used to uniquely identify the error timer in a specific ECU.
[0112] For easy understanding, taking the determination of the target register error timer identifier as an example for illustration, where the information acquisition device is the information acquisition module, the storage device is the memory, and the processing device is the processing module.
[0113] The information acquisition module obtains the security access level limit information. That is, in the 0x22 service, the 0x27 security access level Level 1 is bound. Based on the diagnostic service request, perform functional addressing to identify the target register corresponding to the diagnostic protocol stack configuration identifier, and determine the routine working condition information. That is, use the 0x31 service routine to control the reading of TEC and REC. Based on the routine working condition information and the security access level limit information, restrict the reading of the abnormal authorization error timer to obtain the target register error timer identifier. That is, access is only allowed when the routine is enabled, and access is not allowed when the routine is not enabled. The request format is 31 0101 02, and at this time, the routine access is enabled. The request format is 31 02 01 02, and at this time, the routine access is disabled. Its response format is 7101 / 02 01 02, so as to obtain the target register error timer identifier, and subsequent processing is performed based on the target register error timer identifier.
[0114] In a feasible implementation manner, step S22 may include steps D11 to D13:
[0115] Step D11: Obtain the security access level limit information.
[0116] It should be noted that the security access level limit information is a set of rules and parameters used to control the access permissions to the internal registers or data of the ECU.
[0117] It can be understood that the security access level restriction information may include access privilege levels, authentication keys, and access control lists, which are used to enable authorized diagnostic tools or systems to access specific registers or perform specific diagnostic operations. This can be achieved through secure sessions and seed or key mechanisms to ensure the security of diagnostic operations.
[0118] Step D12, perform function addressing based on the diagnostic service request to identify the target register corresponding to the diagnostic protocol stack configuration identifier, and determine the routine working condition information.
[0119] It should be noted that the routine working condition information is the status and related information of a specific diagnostic routine running inside the ECU during the diagnostic process.
[0120] It can be understood that the routine working condition information can characterize the specific working state of the ECU when performing diagnostic tasks, including the start state, execution progress, completion status of the diagnostic routine, and abnormal situations detected during the execution process. For example, when a diagnostic service request triggers a specific diagnostic routine, identifying the routine working condition information can indicate whether the routine has been successfully started, is running, or has detected an error.
[0121] Step D13, restrict the reading of the abnormal authorization error timer based on the routine working condition information and the security access level restriction information to obtain the target register error timer identifier.
[0122] It can be understood that the target register error timer identifier is generated using the diagnostic protocol stack configuration identifier and the function addressing mechanism, clearly pointing to a specific error timer in all ECUs. Combining with the security access level restriction information, it enables authorized diagnostic requests to access the corresponding error timer and prevents unauthorized reading of the error counter.
[0123] Step S23, access the register encapsulation mapping based on the target register error timer identifier to read the target register mapping value, and determine the target error counter value set and the target received error counter value set.
[0124] It can be understood that the target error counter value set TEC is used to record the number of errors detected by the ECU when sending data, and is used to evaluate whether the ECU sending function is normal. Among them, the TEC value is stored in the hardware register of the ECU and can be accessed by software through the register encapsulation mapping. The target received error counter value set REC is used to record the number of errors detected by the ECU when receiving data, so as to evaluate whether the ECU receiving function is normal. Among them, the REC value is also stored in the hardware register of the ECU and can be accessed by software through the register encapsulation mapping.
[0125] For ease of understanding, taking the determination of the target error counter value set and the target received error counter value set as an example for illustration, where the information collection device is the information collection module, the storage device is the memory, and the processing device is the processing module.
[0126] The information collection module obtains a polling period, such as a 10 ms period, and accesses the register encapsulation mapping based on the polling period and the target register error timer identifier to determine the target mapped register identifier. That is, by defining a specific target register error timer identifier DID, such as 0x0102, the values of TEC and REC are associated with this DID. When an external diagnostic device receives the target register error timer identifier, it reads the values of TEC and REC using the polling period. By sending a $22 diagnostic service request and specifying the DID as 0x0102, the polling request causes the ECU to return the current values of TEC and REC. Read the target register mapped value corresponding to the target mapped register identifier to obtain the target error counter value set and the target received error counter value set. That is, after the ECU receives this request, it reads the values of the target error counter value set TEC and the target received error counter value set REC from its internal mapped register or cache and returns these values to the diagnostic device in a standardized response format, which is 62 01 02 [TEC] [REC]. For example, 62 01 02 12 05 means TEC = 0x12 and REC = 0x05.
[0127] In a feasible implementation manner, step S23 may include steps E11 to E13:
[0128] Step E11, obtain the polling period;
[0129] It should be noted that the polling period is the time interval for the system to periodically check and read the target register mapped value in the in-vehicle bus error frame positioning method.
[0130] It can be understood that the polling period is used to define the frequency of the system's periodic monitoring of the ECU error counter. For example, the polling period can be set to read the value of the error counter every 10 milliseconds to capture the changes in the error counter in a timely manner.
[0131] Step E12, access the register encapsulation mapping based on the polling period and the target register error timer identifier to determine the target mapped register identifier;
[0132] It should be noted that the target mapped register identifier is an identifier used to uniquely identify and locate a specific register in the register encapsulation mapping.
[0133] It can be understood that the target mapping register identifier can point to the specific location storing the error counter value, so as to accurately access and read the mapping value of the target register, distinguish different error counters, and obtain the real-time data of the error counters.
[0134] Step E13: Read the target register mapping value corresponding to the target mapping register identifier to obtain a target error counter value set and a target received error counter value set.
[0135] It can be understood that the ECU software abstracts the target error counter value set TEC and the target received error counter value set REC registers of the CAN controller into variables that can be safely accessed through memory mapping technology, provides a diagnostic interface based on the UDS protocol, accurately locates the cause of the fault by monitoring the change of the error counter in real time and combining time series analysis.
[0136] A method for locating real vehicle bus error frames proposed in this embodiment obtains a diagnostic protocol stack configuration identifier; performs functional addressing based on the diagnostic service request and the diagnostic protocol stack configuration identifier to identify the target register error timer, and restricts the reading of the abnormal authorization error timer to determine the target register error timer identifier; accesses the register encapsulation mapping based on the target register error timer identifier to read the target register mapping value, and determines the target error counter value set and the target received error counter value set. This solves the technical problem of how to efficiently and accurately locate real vehicle bus error frames. Compared with the prior art, this application obtains the diagnostic protocol stack configuration identifier, combines the diagnostic service request for functional addressing, accurately identifies the target register error timer, and at the same time restricts unauthorized access to ensure data security. By reading the target register mapping value through the register encapsulation mapping, the error counter value set is determined, realizing fast and accurate fault diagnosis. Through the precise positioning and secure access mechanism at the software level, the security and reliability of the diagnostic process are improved, avoiding misjudgment and new fault risks caused by improper manual operation, improving the diagnostic efficiency, enhancing the system security, optimizing resource allocation, and improving the overall performance.
[0137] Exemplarily, to help understand the implementation process of the real vehicle bus error frame location method obtained by combining the above Embodiment 1, please refer to Figure 3 , Figure 3 A brief flow schematic diagram of a method for locating real vehicle bus error frames is provided. Specifically:
[0138] When an error frame appears on the CAN bus, after starting the access process, it is determined whether the secure access is passed. Otherwise, access to the TEC and REC is prohibited. After the secure access is passed, the mapped values of the TEC and REC in the storage register are read within the polling period to obtain the current TEC and REC values of each ECU, and the obtained TEC and REC values are compared. When the TEC is greater than the target passive error limit value of 127 and the TEC continues to increase, it is determined that there is a local fault in the ECU. When the REC continues to increase and the TEC remains unchanged, it is determined that there is a fault in the physical layer of the bus. Refer to Embodiment 1 to obtain the diagnostic service request and the register encapsulation mapping; based on the diagnostic service request, perform functional addressing to identify the target register error timer, and access the register encapsulation mapping to read the target register mapped value to determine the target error counter value set and the target received error counter value set; based on the target error counter value set and the target received error counter value set, trigger fault analysis to locate the in-vehicle bus error frame, determine the bus error frame detection result, and complete the in-vehicle bus error frame location based on the bus error frame detection result. Refer to Embodiment 2 to obtain the diagnostic protocol stack configuration identifier; based on the diagnostic service request and the diagnostic protocol stack configuration identifier, perform functional addressing to identify the target register error timer, and limit the reading of the exception authorization error timer to determine the target register error timer identifier; based on the target register error timer identifier, access the register encapsulation mapping to read the target register mapped value to determine the target error counter value set and the target received error counter value set.
[0139] It should be noted that the above examples are only for understanding the present application and do not constitute a limitation on the method for locating the in-vehicle bus error frame of the present application. Based on this technical concept, more forms of simple transformations are within the protection scope of the present application.
[0140] The present application also provides an in-vehicle bus error frame location device, please refer to Figure 4 , the in-vehicle bus error frame location device includes:
[0141] An acquisition module 10, configured to acquire a diagnostic service request and a register encapsulation mapping;
[0142] A processing module 20, configured to perform functional addressing based on the diagnostic service request to identify a target register error timer, and access the register encapsulation mapping to read the target register mapped value to determine a target error counter value set and a target received error counter value set;
[0143] An execution module 30, configured to trigger fault analysis to locate the in-vehicle bus error frame based on the target error counter value set and the target received error counter value set, determine the bus error frame detection result, and complete the in-vehicle bus error frame location based on the bus error frame detection result.
[0144] The obtaining module 10 is further configured to obtain a diagnostic instruction and physical register information;
[0145] Based on the diagnostic instruction, identify a target data identifier, trigger a diagnostic service corresponding to the target data identifier, and determine a diagnostic service request;
[0146] Based on the physical register information, perform memory address redirection, map a target register value, and determine a register encapsulation mapping, where the register encapsulation mapping includes a register bit field and register access permissions.
[0147] The processing module 20 is further configured to obtain a diagnostic protocol stack configuration identifier;
[0148] Based on the diagnostic service request and the diagnostic protocol stack configuration identifier, perform function addressing to identify a target register error timer, and limit the reading of an exception authorization error timer to determine a target register error timer identifier;
[0149] Based on the target register error timer identifier, access the register encapsulation mapping to read a target register mapping value, and determine a target error counter value set and a target received error counter value set.
[0150] The processing module 20 is further configured to obtain security access level limit information;
[0151] Based on the diagnostic service request, perform function addressing to identify a target register corresponding to the diagnostic protocol stack configuration identifier, and determine routine working condition information;
[0152] Based on the routine working condition information and the security access level limit information, limit the reading of an exception authorization error timer to obtain a target register error timer identifier.
[0153] The processing module 20 is further configured to obtain a polling period;
[0154] Based on the polling period and the target register error timer identifier, access the register encapsulation mapping to determine a target mapped register identifier;
[0155] Read a target register mapping value corresponding to the target mapped register identifier to obtain a target error counter value set and a target received error counter value set.
[0156] The execution module 30 is further configured to detect a change in the target register value during a corresponding polling period based on the target error counter value set and the target received error counter value set, and determine polling period change information;
[0157] Based on the target error counter value set and the polling period change information, trigger a fault analysis to locate a real vehicle bus error frame, and obtain a bus error frame detection result.
[0158] The execution module 30 is further configured to obtain a target passive error limit value;
[0159] When the target error counter value set is greater than the target passive error limit value and the polling period change information indicates that the error counter value continuously increases, the bus error frame detection result is that a local transmission failure causes an error frame to be generated on the bus;
[0160] When the polling period change information indicates that the received error counter value continuously increases and the error counter value remains unchanged, the bus error frame detection result is that a bus physical layer failure causes an error frame to be generated on the bus.
[0161] The in-vehicle bus error frame positioning device provided by this application adopts the in-vehicle bus error frame positioning method in the above embodiment, and can solve the technical problem of how to efficiently and accurately perform in-vehicle bus error frame positioning. Compared with the prior art, the beneficial effects of the in-vehicle bus error frame positioning device provided by this application are the same as those of the in-vehicle bus error frame positioning method provided by the above embodiment, and other technical features in the in-vehicle bus error frame positioning device are the same as the features disclosed in the method of the above embodiment, and will not be elaborated here.
[0162] This application provides an in-vehicle bus error frame positioning device, and the in-vehicle bus error frame positioning device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the in-vehicle bus error frame positioning method in the first embodiment above.
[0163] Next, refer to Figure 5 , which shows a schematic structural diagram of an in-vehicle bus error frame positioning device suitable for implementing the embodiments of this application. The in-vehicle bus error frame positioning device in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistant), PADs (Portable Application Description: tablet computers), PMPs (Portable Media Player: portable multimedia players), in-vehicle terminals (such as in-vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The in-vehicle bus error frame positioning device shown is only an example and should not impose any limitations on the functions and usage scopes of the embodiments of this application.
[0164] As Figure 5As shown, the in-vehicle bus error frame positioning device may include a processing device 1001 (such as a central processing unit, a graphics processing unit, etc.), which may perform various appropriate actions and processes according to a program stored in a ROM (Read Only Memory) 1002 or a program loaded from a storage device 1003 into a RAM (Random Access Memory) 1004. In the RAM 1004, various programs and data required for the operation of the in-vehicle bus error frame positioning device are also stored. The processing device 1001, the ROM 1002, and the RAM 1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems may be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 may allow the in-vehicle bus error frame positioning device to communicate with other devices wirelessly or wiredly to exchange data. Although the figure shows an in-vehicle bus error frame positioning device having various systems, it should be understood that it is not required to implement or have all the shown systems. More or fewer systems may be alternatively implemented or had.
[0165] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart may be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program codes for executing the method shown in the flowchart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication device, or installed from the storage device 1003, or installed from the ROM 1002. When the computer program is executed by the processing device 1001, the above functions defined in the method of the embodiments disclosed in the present application are executed.
[0166] The in-vehicle bus error frame positioning device provided by the present application adopts the in-vehicle bus error frame positioning method in the above embodiments, and can solve the technical problem of how to efficiently and accurately perform in-vehicle bus error frame positioning. Compared with the prior art, the beneficial effects of the in-vehicle bus error frame positioning device provided by the present application are the same as those of the in-vehicle bus error frame positioning method provided by the above embodiments, and other technical features in the in-vehicle bus error frame positioning device are the same as those disclosed in the method of the previous embodiment, and will not be elaborated here.
[0167] It should be understood that each part disclosed in this application can be implemented by hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in a suitable manner in any one or more embodiments or examples.
[0168] As described above, the above are only specific embodiments of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art within the technical scope disclosed in this application can easily think of changes or substitutions, which should all be covered within the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.
[0169] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., computer programs) stored thereon, and the computer-readable program instructions are used to execute the real vehicle bus error frame localization method in the above embodiments.
[0170] The computer-readable storage medium provided by this application can be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination of the above. More specific examples of the computer-readable storage medium may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM) or flash memory, optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this embodiment, the computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or combined with an instruction execution system, device, or device. The program code contained on the computer-readable storage medium can be transmitted by any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0171] The above computer-readable storage medium can be included in the real vehicle bus error frame localization device; it can also exist separately without being assembled into the real vehicle bus error frame localization device.
[0172] The above computer-readable storage medium carries one or more programs, which, when executed by the in-vehicle bus error frame positioning device, cause the in-vehicle bus error frame positioning device to: obtain a diagnostic service request and a register encapsulation mapping; perform functional addressing based on the diagnostic service request to identify a target register error timer, access the register encapsulation mapping to read the target register mapping value, determine a target error counter value set and a target received error counter value set; trigger fault analysis to locate the in-vehicle bus error frame based on the target error counter value set and the target received error counter value set, determine the bus error frame detection result, and complete the in-vehicle bus error frame positioning based on the bus error frame detection result.
[0173] Computer program code for performing the operations of this application can be written in one or more programming languages or combinations thereof. The programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, executed as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, by using an Internet service provider to connect through the Internet).
[0174] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code that contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0175] The modules involved in the embodiments of this application can be implemented in software or in hardware. Among them, the name of the module does not constitute a limitation on the unit itself in some cases.
[0176] The readable storage medium provided in this application is a computer-readable storage medium. The computer-readable storage medium stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned real vehicle bus error frame positioning method, which can solve the technical problem of how to efficiently and accurately perform real vehicle bus error frame positioning. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the real vehicle bus error frame positioning method provided in the above embodiments, and will not be elaborated here.
[0177] The above are only some embodiments of this application, and thus do not limit the patent scope of this application. Any equivalent structural transformation made under the technical concept of this application by using the content of the specification and drawings of this application, or direct / indirect application in other related technical fields, is included in the patent protection scope of this application.
Claims
1. A method for locating a bus error frame of a real vehicle, characterized in that, The method described above includes: Obtaining a diagnostic service request and a register encapsulation mapping; Based on the diagnostic service request, performing functional addressing to identify a target register error timer, accessing the register encapsulation mapping to read the target register mapping value, and determining a target error counter value set and a target received error counter value set; Based on the target error counter value set and the target received error counter value set, triggering a fault analysis to locate an in-vehicle bus error frame, determining a bus error frame detection result, and completing the location of the in-vehicle bus error frame based on the bus error frame detection result.
2. The method according to claim 1, characterized in that, The step of obtaining a diagnostic service request and a register encapsulation mapping includes: Obtaining a diagnostic instruction and physical register information; Based on the diagnostic instruction, identifying a target data identifier and triggering the diagnostic service corresponding to the target data identifier to determine a diagnostic service request; Based on the physical register information, performing a memory address redirection and mapping a target register value to determine a register encapsulation mapping, where the register encapsulation mapping includes a register bit field and a register access permission.
3. The method according to claim 1, wherein The step of, based on the diagnostic service request, performing functional addressing to identify a target register error timer, accessing the register encapsulation mapping to read the target register mapping value, and determining a target error counter value set and a target received error counter value set includes: Obtaining a diagnostic protocol stack configuration identifier; Based on the diagnostic service request and the diagnostic protocol stack configuration identifier, performing functional addressing to identify a target register error timer and restricting the reading of an abnormal authorization error timer to determine a target register error timer identifier; Based on the target register error timer identifier, accessing the register encapsulation mapping to read the target register mapping value and determining a target error counter value set and a target received error counter value set.
4. The method according to claim 3, wherein The step of, based on the diagnostic service request and the diagnostic protocol stack configuration identifier, performing functional addressing to identify a target register error timer and restricting the reading of an abnormal authorization error timer to determine a target register error timer identifier includes: Obtaining security access level restriction information; Based on the diagnostic service request, performing functional addressing to identify the target register corresponding to the diagnostic protocol stack configuration identifier to determine routine working condition information; Based on the routine working condition information and the security access level restriction information, restricting the reading of an abnormal authorization error timer to obtain a target register error timer identifier.
5. The method according to claim 3, wherein The step of, based on the target register error timer identifier, accessing the register encapsulation mapping to read the target register mapping value and determining a target error counter value set and a target received error counter value set includes: Obtaining a polling period; Based on the polling period and the target register error timer identifier, accessing the register encapsulation mapping to determine a target mapped register identifier; Reading the target register mapping value corresponding to the target mapped register identifier to obtain a target error counter value set and a target received error counter value set.
6. The method according to claim 1, characterized in that, The step of, based on the target error counter value set and the target received error counter value set, triggering a fault analysis to locate an in-vehicle bus error frame and determining a bus error frame detection result includes: Detect the numerical change of the target register in the corresponding polling period based on the target error counter value set and the target received error counter value set, and determine the polling period change information; Trigger the fault analysis to locate the in-vehicle bus error frame based on the target error counter value set and the polling period change information, and obtain the bus error frame detection result.
7. The method according to claim 6, wherein The step of triggering the fault analysis to locate the in-vehicle bus error frame based on the target error counter value set and the polling period change information and obtaining the bus error frame detection result includes: Obtain the target passive error limit value; When the target error counter value set is greater than the target passive error limit value and the polling period change information is that the error counter value continuously increases, the bus error frame detection result is that the local transmission failure causes the bus to generate an error frame; When the polling period change information is that the received error counter value continuously increases and the error counter value remains unchanged, the bus error frame detection result is that the bus physical layer failure causes the bus to generate an error frame.
8. A real vehicle bus error frame positioning device, characterized in that, The device includes: An acquisition module, configured to acquire a diagnostic service request and a register encapsulation mapping; A processing module, configured to perform functional addressing based on the diagnostic service request to identify the target register error timer, access the register encapsulation mapping to read the target register mapping value, and determine the target error counter value set and the target received error counter value set; An execution module, configured to trigger the fault analysis to locate the in-vehicle bus error frame based on the target error counter value set and the target received error counter value set, determine the bus error frame detection result, and complete the in-vehicle bus error frame location based on the bus error frame detection result.
9. A real vehicle bus error frame positioning device, characterized in that, The device includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, where the computer program is configured to implement the steps of the in-vehicle bus error frame location method according to any one of claims 1 to 7.
10. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the in-vehicle bus error frame location method according to any one of claims 1 to 7.