An autosar-based communication protocol stack failure self-repair system and vehicle

By adding a fault self-healing core layer to the AUTOSAR CP layered architecture, accurate identification and autonomous repair of faults across the entire link are achieved. This solves the problems of one-sided fault monitoring, delayed repair, and low utilization of redundant resources in existing technologies, thereby improving the reliability and real-time performance of vehicle communication.

CN123145145APending Publication Date: 2026-11-20CHINA FAW CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611581677.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-13
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

Existing technologies lack end-to-end multi-dimensional fault monitoring capabilities in the AUTOSAR CP communication protocol stack, making it impossible to achieve autonomous repair, extending fault handling time, and resulting in low utilization of redundant resources. This makes it impossible to meet the hard real-time requirements of key scenarios such as the power domain and chassis domain.

Method used

A new fault self-healing core layer is added to the AUTOSAR CP layered architecture. It is directly connected to the MCAL layer, ECU abstraction layer and service layer through an independent standardized interface, realizing real-time acquisition of fault data and direct issuance of control commands across the entire link. Combined with data fusion perception, hierarchical self-healing and dynamic redundancy management, a closed-loop system for fault self-healing across the entire link is constructed.

Benefits of technology

It achieves accurate identification and autonomous repair of end-to-end faults, reduces fault handling latency, improves communication reliability and redundant resource utilization, and meets the hard real-time requirements of critical scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123145145A_ABST
    Figure CN123145145A_ABST
Patent Text Reader

Abstract

The application provides an AUTOSAR-based communication protocol stack fault self-repair system and a vehicle, relates to the technical field of vehicle-mounted communication, and is characterized in that a fault self-repair core layer is newly arranged between a service layer and an RTE layer in an AUTOSAR CP layered architecture, and a fault awareness unit is arranged in an MCAL layer, an ECU abstraction layer and the service layer respectively, so that real-time collection and independent interface direct transmission of full-link multi-dimensional fault data are realized, and various types of faults can be accurately identified; a data fusion awareness unit in the fault self-repair core layer performs multi-source fusion analysis on the fault data uploaded by each layer, eliminates false positives, determines the fault level and type, and improves the accuracy of fault determination; a hierarchical self-repair unit matches the corresponding hierarchical repair strategy according to the fault level and directly issues a repair instruction to the target hierarchical module, so that hierarchical disposal from local lightweight repair to system-level emergency repair can be autonomously completed without manual intervention, the fault disposal delay is greatly shortened, and the continuity and reliability of vehicle-mounted communication are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of vehicle communication technology, and in particular to an AUTOSAR-based communication protocol stack fault self-healing system and vehicle. Background Technology

[0002] As automotive electronic and electrical architectures evolve towards domain control and centralization, CAN and CAN FD buses have become the mainstream communication methods for core domains such as the body domain and powertrain domain, leading to increasingly stringent requirements for the reliability, real-time performance, and functional safety compliance of communication protocol stacks. AUTOSAR CP, with its hard real-time performance, high stability, and standardized layered architecture, has become a core technology solution for in-vehicle embedded communication systems. However, existing technologies rely on native AUTOSAR modules for fault handling, with only the MCAL layer monitoring underlying hardware faults and the service layer identifying frame data errors through basic CRC checks. This lacks end-to-end, multi-dimensional monitoring capabilities, resulting in fragmented and delayed fault monitoring. Furthermore, existing solutions only provide fault recording and alarm functions, lacking autonomous repair capabilities. Minor anomalies only support message retransmission, while severe faults require manual or external commands to trigger module resets or system restarts, extending fault handling time by several minutes to hours. In addition, redundant resources are left idle for extended periods with fixed configurations, resulting in low utilization. Fault reporting and command issuance require hierarchical forwarding, leading to high processing latency and failing to meet the hard real-time requirements of critical scenarios such as the powertrain and chassis domains. Summary of the Invention

[0003] The purpose of this invention is to provide an AUTOSAR-based communication protocol stack fault self-repair system and vehicle to solve one or more technical problems existing in the prior art, and at least provide a beneficial option or create conditions to achieve autonomous perception, accurate location and hierarchical repair of faults across the entire link, reduce fault handling latency, and improve communication reliability and redundancy resource utilization.

[0004] On the one hand, this application provides a communication protocol stack fault self-healing system based on AUTOSAR, including: The fault self-healing core layer is deployed between the service layer and the RTE layer in the AUTOSAR CP standard layered architecture. The fault self-healing core layer is directly connected to the MCAL layer, ECU abstraction layer and service layer through independent standardized interfaces, and indirectly connected to the application layer through the RTE layer interface. The fault perception unit is set in the MCAL layer, the ECU abstraction layer and the service layer. The fault perception unit is used to collect fault data of the layer in real time and upload it directly to the fault self-healing core layer through an independent standardized interface, so that the fault self-healing core layer can obtain the fault data of the MCAL layer, the ECU abstraction layer and the service layer. The fault self-healing core layer includes a data fusion sensing unit and a hierarchical self-healing unit; The data fusion sensing unit is used to receive fault data uploaded by the MCAL layer, the ECU abstraction layer and the service layer, perform multi-source fusion analysis on the fault data, and then determine the fault level and fault type. The hierarchical self-repair unit is used to match the hierarchical repair strategy according to the fault level, generate repair instructions, and directly send the repair instructions to the corresponding target level module to perform autonomous repair operations.

[0005] Furthermore, the data fusion sensing unit includes a data receiving subunit, a data fusion subunit, and an anomaly detection subunit; The data receiving subunit is used to receive fault data uploaded by the MCAL layer, the ECU abstraction layer and the service layer through three independent standardized interfaces respectively; The data fusion subunit is used to normalize each fault parameter in the fault data to a unified numerical range in order to eliminate the dimensional differences between fault parameters at different levels, and to perform weighted fusion calculation on the normalized multi-source fault data to obtain the fused fault value. The anomaly determination subunit is used to determine the fault level to which the fused fault value belongs based on a preset grading threshold, and to determine the fault type in combination with the fault parameter features in the fault data.

[0006] Furthermore, the fault self-healing core layer also includes a fault precise location unit; The fault precise location unit includes a root cause analysis subunit and a location report generation subunit; The root cause analysis subunit pre-stores the association database of each layer module of AUTOSAR, which is used to trace the source of the fault in reverse through the decision tree root cause analysis model, using the fault level, the fault type and the fault parameters as input, and then locate the specific location and root cause of the fault. The location report generation subunit is used to generate a standardized location report based on the specific location and root cause of the fault. The standardized location report includes the fault level, fault type, fault location and root cause, and transmits the standardized location report to the hierarchical self-repair unit to provide a basis for repair for the hierarchical self-repair unit.

[0007] Furthermore, the fault self-healing core layer also includes a repair verification and feedback unit; The repair verification and feedback unit is used to monitor the operation data of each module in real time during the repair process, adjust the monitoring cycle according to the fault level, and compare the monitoring data with the preset repair success threshold of the corresponding fault level to determine whether the repair is successful. When the repair is determined to be successful, the repair verification and feedback unit releases redundant resources according to the fault level and generates a repair success report; when the repair is determined to be unsuccessful, the repair verification and feedback unit triggers a secondary repair and generates a repair failure report. The repair verification and feedback unit also inputs the fault data, repair strategies and repair results during the repair process into the root cause analysis model, thereby optimizing the parameters of the root cause analysis model.

[0008] Furthermore, the fault self-healing core layer also includes a dynamic redundancy management unit; The dynamic redundancy management unit is used to monitor the operating status of backup links, redundant modules and redundant data in real time, and then determine whether redundant resources are available. The dynamic redundancy management unit is also used to dynamically enable redundant resources according to the fault level: when the fault level is a minor fault, redundant resources are not enabled; when the fault level is a general fault, partial redundant resources are enabled; when the fault level is a severe fault, partial redundant resources are enabled; and when the fault level is a fatal fault, full redundant resources are enabled. The dynamic redundancy management unit is also used to release redundant resources according to the fault level after the repair verification and feedback unit determines that the repair is successful, thereby avoiding the invalid occupation of redundant resources.

[0009] Furthermore, the fault perception unit set in the MCAL layer includes a frame loss monitoring subunit, a bus load monitoring subunit, and a hardware fault monitoring subunit; The frame loss monitoring subunit, the bus load monitoring subunit, and the hardware fault monitoring subunit collect at least one of the following data in real time according to a preset collection cycle: frame loss rate, bus load rate, bus level, and controller operating status of the CAN FD bus. When the monitored data exceeds a preset threshold, the fault perception unit uploads the fault data to the fault self-healing core layer through a standardized interface to trigger the fault self-healing core layer to determine the fault.

[0010] Furthermore, the MCAL layer also includes a redundant control unit; The redundancy control unit includes a link switching subunit and a module redundancy control subunit. The redundancy control unit controls the link switching switch through GPIO pins. Upon receiving the redundancy switching command issued by the fault self-healing core layer, the link switching subunit switches the primary and backup CAN FD links, and the module redundancy control subunit starts or stops the redundant CAN Driver module, thereby providing underlying hardware support for fault repair.

[0011] Furthermore, the fault perception unit set in the ECU abstraction layer includes an interface anomaly monitoring unit; The interface anomaly monitoring unit includes an interface call monitoring subunit and a data forwarding monitoring subunit. The interface call monitoring subunit and the data forwarding monitoring subunit collect data through the interface function call log of the CAN IF module to monitor interface call anomalies and data forwarding anomalies. The interface anomaly monitoring unit counts the interface call success rate and data forwarding latency to determine whether the interface is abnormal. When an interface anomaly is detected, the interface anomaly monitoring unit uploads the anomaly data to the fault self-healing core layer and receives the interface restart command issued by the fault self-healing core layer, and then calls the interface reset function to restart the interface to complete the interface anomaly repair.

[0012] Furthermore, the fault perception unit set in the service layer includes a protocol anomaly monitoring unit; the service layer also includes a data verification and optimization unit; The protocol anomaly monitoring unit includes a protocol timing monitoring subunit and a frame format monitoring subunit. The protocol timing monitoring subunit and the frame format monitoring subunit collect protocol frame transmission timing and frame format data through the protocol processing function of the CAN TP module, and monitor at least one protocol anomaly among timing timeout, frame format error or segmented transmission failure. When a protocol anomaly is detected, the protocol anomaly monitoring unit uploads the abnormal data to the fault self-healing core layer and receives the protocol parameter adjustment instruction issued by the fault self-healing core layer. Then, it calls the protocol parameter setting interface to modify the protocol configuration in order to complete the protocol anomaly repair. The data verification optimization unit includes a CRC verification subunit and an adaptive verification subunit. The CRC verification subunit and the adaptive verification subunit use a dual mechanism of CRC verification and adaptive verification to perform data verification. When the data length is less than or equal to a preset threshold, only the CRC verification subunit is activated to perform CRC verification. When the data length is greater than the preset threshold, the adaptive verification subunit is automatically activated to adjust the verification precision according to the data type. When a verification error occurs, frame retransmission is triggered, and the verification error information is uploaded to the fault self-healing core layer to reduce the data transmission error rate.

[0013] On the other hand, this application provides a vehicle equipped with the aforementioned AUTOSAR-based communication protocol stack fault self-healing system.

[0014] The beneficial effects of this invention are as follows: This application provides a communication protocol stack fault self-repair system based on AUTOSAR. By adding a fault self-repair core layer deployed between the service layer and the RTE layer in the AUTOSAR CP layered architecture, and setting fault perception units in the MCAL layer, ECU abstraction layer and service layer respectively, it realizes real-time collection and independent interface direct transmission of multi-dimensional fault data across the entire link. This overcomes the shortcomings of existing technologies such as one-sided fault monitoring and high false alarm rates, and can accurately identify various types of faults such as hardware faults, link faults, interface faults and protocol faults. The data fusion perception unit in the fault self-repair core layer performs multi-source fusion analysis on the fault data uploaded from each layer, eliminates false alarms, and determines the fault level and type, thereby improving the accuracy of fault determination. The hierarchical self-repair unit matches the corresponding hierarchical repair strategy according to the fault level and directly issues repair instructions to the target level module. It can autonomously complete hierarchical handling from local lightweight repair to system-level emergency repair without manual intervention, which greatly shortens the fault handling latency, ensures the continuity and reliability of vehicle communication, and meets the hard real-time requirements of key scenarios such as the power domain and chassis domain.

[0015] Other features and advantages of this application will be set forth in the following description and will be apparent in part from the description or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the description and the accompanying drawings. Attached Figure Description

[0016] The accompanying drawings are provided to further understand the technical solutions of the present invention and constitute a part of the specification. They are used together with the embodiments of the present invention to explain the technical solutions of the present invention, and do not constitute a limitation on the technical solutions of the present invention.

[0017] Figure 1 This is a schematic diagram illustrating the implementation principle of the AUTOSAR-based communication protocol stack fault self-healing system provided in this application. Figure 2 This is a schematic diagram of the implementation principle of the MCAL layer provided in this application; Figure 3 This is a schematic diagram of the implementation principle of the ECU abstraction layer provided in this application; Figure 4 This is a schematic diagram illustrating the implementation principle of the service layer provided in this application; Figure 5 This is a schematic diagram illustrating the implementation principle of the fault perception process in the fault self-healing core layer provided in this application. Figure 6 This is a schematic diagram illustrating the implementation principle of the 5-level fault determination process of the fault self-healing core layer provided in this application; Figure 7 This is a schematic diagram illustrating the implementation principle of the hierarchical self-healing process of the fault self-healing core layer provided in this application; Figure 8 This is a schematic diagram illustrating the implementation principle of the repair verification and feedback process of the fault self-healing core layer provided in this application; Figure 9 This is a schematic diagram illustrating the implementation principle of the dynamic redundancy management process of the fault self-healing core layer provided in this application; Figure 10 This is a schematic diagram illustrating the implementation principle of the status reporting and self-optimization process of the fault self-healing core layer provided in this application. Figure 11 This is a schematic diagram illustrating the implementation principle of the decision tree root cause analysis model provided in this application; Figure 12 This is a schematic diagram of the implementation principle of the RTE layer provided in this application. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0019] The present application will be further described below with reference to the accompanying drawings and specific embodiments. The described embodiments should not be considered as limitations on the present application, and all other embodiments obtained by those skilled in the art without inventive effort are within the scope of protection of the present application.

[0020] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0021] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0022] As automotive electronic and electrical architecture evolves towards domain control and centralization, CAN and CAN FD buses have become the mainstream communication methods for core domains such as the body domain, powertrain domain, and chassis domain. This leads to increasingly stringent requirements for the reliability, real-time performance, and functional safety compliance of communication protocol stacks. AUTOSAR CP, with its hard real-time performance, high stability, and standardized layered architecture, has become a core technology solution for in-vehicle embedded communication systems. Its communication protocol stack adopts a standardized layered design, which can be divided into an application software layer, an RTE layer, a basic software layer, and a microcontroller layer from top to bottom. This achieves effective decoupling between hardware and software, and between application and basic software, and is now widely used in the development of various automotive ECUs.

[0023] However, vehicle communication links are susceptible to electromagnetic interference, connector aging, bus arbitration anomalies, and other factors, leading to various faults such as bit errors, CRC check failures, and bus offline. Traditional AUTOSAR CP protocol stacks can only detect errors and report and discard them through E2E mechanisms, lacking intelligent identification and autonomous recovery capabilities for fault types. A large number of transient errors eventually evolve into functional interruptions, severely weakening the continuity and reliability of communication.

[0024] Most existing technologies are based on the AUTOSAR CP standard layered architecture, without introducing an additional control layer. The core modules of the communication protocol stack mainly include the MCAL layer CAN Driver module, the ECU abstraction layer CAN IF module, the service layer CAN TP and PDUR modules, the RTE layer, and the application layer. Fault handling relies on the native diagnostic event management module DEM, the diagnostic communication management module DCM, and the basic network management module. In the fault monitoring stage, only the MCAL layer CAN Driver monitors low-level hardware faults, such as bus short circuits and controller power failures. The service layer identifies frame data errors through basic CRC checks, and the ECU abstraction layer CAN IF only performs data forwarding and has no dedicated anomaly monitoring function. The fault monitoring dimensions are limited to hardware faults and basic data errors, lacking full-link multi-dimensional monitoring capabilities.

[0025] In the fault reporting stage, abnormal signals detected at the lower level are uploaded to the diagnostic module level by level through the ECU abstraction layer and service layer. The DEM module records fault codes and stores fault logs, but lacks real-time fault fusion analysis capabilities, making it prone to false alarms and missed alarms. In the fault handling stage, the diagnostic module only triggers fault alarms and generates fault codes for external diagnostic equipment to read, without autonomous repair capabilities. For minor anomalies, it only supports message retransmission, and for serious faults, it only supports module reset or whole-machine restart. Although some high-end solutions are equipped with fixed redundant links, manual or external commands are required to trigger switching, lacking dynamic redundancy management capabilities. In terms of interaction logic, the application layer and the basic software layer communicate through the RTE layer. Fault handling commands must be sent down to the lower level level through the RTE layer and service layer, without a direct transmission channel for lower-level control commands, resulting in long fault handling delays.

[0026] Existing technologies have many shortcomings. First, fault monitoring is incomplete and lagging, with a high rate of false negatives and false negatives. Existing technologies only monitor low-level hardware faults and basic data errors, failing to cover hidden faults such as ECU abstraction layer CAN IF interface anomalies, service layer protocol timing anomalies, memory overflows, and instantaneous link congestion. The monitoring dimensions are limited, making it impossible to achieve full-link fault perception across the protocol stack. Furthermore, the fault monitoring functions at each layer in the native architecture are scattered, lacking a multi-source data fusion mechanism, and thus failing to integrate full-link data.

[0027] Secondly, it lacks autonomous fault repair capabilities and relies on manual intervention. Existing technologies only have fault recording and alarm functions and cannot autonomously complete fault location and repair. Recoverable faults such as instantaneous link congestion and temporary interface anomalies still require manual investigation and resolution through external equipment reset or restart. Fault handling time ranges from several minutes to several hours, which seriously affects the continuity of vehicle communication. The native architecture does not have a dedicated fault self-repair core module or a hierarchical repair strategy. The diagnostic module is only responsible for fault storage and does not have the authority to execute repair commands.

[0028] Third, the fault location accuracy is low and troubleshooting is difficult. Existing technologies can only record the general module to which the fault belongs, and cannot accurately locate the root cause and specific location of the fault. For example, it is impossible to distinguish whether the communication failure is caused by abnormal CAN IF interface forwarding, link interference or service layer protocol encapsulation error. The fault troubleshooting is difficult and the repair efficiency is extremely low. Moreover, there is no special fault root cause analysis model. The fault is judged by the abnormal signal of a single module, and the relationship between modules at each layer has not been established.

[0029] Fourth, the redundancy design is rigid and resource utilization is low. Existing redundancy solutions use fixed redundancy configurations, with redundant links and backup modules remaining in standby mode for extended periods. Regardless of whether a fault occurs, they continuously occupy hardware resources, resulting in low redundancy resource utilization. Furthermore, redundancy switching requires manual triggering, leading to excessively long switching latency. This fails to meet the real-time requirements of automotive scenarios and lacks a dynamic redundancy management mechanism, making it impossible to activate redundant resources as needed based on fault level and scenario. Fifth, the interaction logic is unreasonable, resulting in high fault handling latency. In existing technologies, fault reporting and command issuance both require hierarchical transmission. Fault data is uploaded from the MCAL layer through the ECU abstraction layer and service layer to the diagnostic module, and repair commands are then sent down to the underlying layer. This multi-level forwarding leads to generally high fault handling latency, failing to meet the real-time requirements of critical scenarios such as the powertrain and chassis domains.

[0030] In summary, most existing technologies rely on AUTOSAR native modules for fault handling without modifying the original layered architecture. Although they retain standardized interface compatibility, fault handling is highly dependent on external diagnostic equipment and manual intervention. Redundant resources adopt a fixed configuration mode, and the ability to accurately locate faults, perform hierarchical autonomous repair, and dynamically switch redundancies is insufficient to meet the increasingly stringent requirements for reliability, real-time performance, and functional safety of vehicle communication.

[0031] To address the technical problems existing in the prior art, this application proposes a communication protocol stack fault self-healing system based on AUTOSAR. In the AUTOSAR CP standard layered architecture, this application adds a fault self-healing core layer between the service layer and the RTE layer. This core layer is directly connected to the MCAL layer, ECU abstraction layer and service layer through independent standardized interfaces, realizing cross-layer direct transmission of fault data and direct issuance of control commands. Fault perception units are set up in each layer to collect multi-dimensional fault data such as hardware faults, link faults, interface anomalies and protocol anomalies in real time and upload them to the core layer.

[0032] Within the core layer, the data fusion and perception unit normalizes and weights the multi-source fault data from each layer to accurately determine the fault level and type. The fault location unit then traces the fault source back to the source based on the decision tree root cause analysis model and outputs a standardized location report.

[0033] The hierarchical self-healing unit then matches the hierarchical repair strategy according to the fault level and directly issues repair instructions to the target level module, realizing autonomous hierarchical handling from local lightweight repair to system-level emergency repair. At the same time, the repair verification and feedback unit ensures the effectiveness of the repair and continuously optimizes the root cause analysis model, and the dynamic redundancy management unit enables and releases redundant resources as needed according to the fault level, maximizing resource utilization. Thus, a full-link fault self-healing closed-loop system integrating perception, location, hierarchical repair, verification and dynamic redundancy control is built, taking into account the compliance, hard real-time and lightweight requirements of AUTOSAR architecture.

[0034] This application provides an AUTOSAR-based communication protocol stack fault self-healing system, which includes the following structure.

[0035] The fault self-healing core layer is deployed between the service layer and the RTE layer in the AUTOSAR CP standard layered architecture. It connects directly to the MCAL layer, ECU abstraction layer, and service layer via independent standardized interfaces, and indirectly connects to the application layer through the RTE layer interface. In the native AUTOSAR CP architecture, the application layer and the basic software layer interact strictly through the RTE layer, resulting in relatively closed relationships between underlying modules and a lack of a unified fault coordination hub. Deploying the fault self-healing core layer between the service layer and the RTE layer allows it to maintain standardized command and information exchange with the application layer via the RTE layer, and directly access all underlying modules such as the service layer, ECU abstraction layer, and MCAL layer, unifying and aggregating fault data across the entire chain. The core layer directly connects to each underlying layer using independent standardized interfaces, allowing fault data to be transmitted upwards without hierarchical forwarding, and repair commands to be directly transmitted downwards to the target module. This eliminates the processing latency caused by multi-level forwarding and meets the hard real-time requirements of critical scenarios such as the power domain and chassis domain. Meanwhile, the core layer and the application layer interact indirectly only through the RTE layer, following the principle in the AUTOSAR specification that the application layer and the basic software layer interact only through the RTE layer. The application layer business logic can be compatible without modification, taking into account both real-time performance and architectural compliance.

[0036] The fault perception unit is located in the MCAL layer, ECU abstraction layer, and service layer. It collects fault data from its respective layer in real time and uploads it directly to the fault self-healing core layer via an independent standardized interface. This expands the monitoring scope from being limited to low-level hardware faults to multi-dimensional perception covering the entire communication protocol stack. Each layer's fault perception unit focuses on fault data at the hardware and link level, interface interaction level, and protocol transmission level, respectively, capturing previously difficult-to-detect hidden faults and achieving full-link, multi-type fault coverage. Data from each layer is directly uploaded to the core layer via an independent standardized interface, shortening fault detection latency and avoiding information distortion and delays that may result from multi-level transmission. This provides timely and complete raw data for subsequent fault fusion analysis and repair decisions.

[0037] The core layer of fault self-healing includes a data fusion sensing unit and a hierarchical self-healing unit. The data fusion sensing unit and the hierarchical self-healing unit have clearly defined functions: the former centrally processes and analyzes multi-source fault data from various layers, while the latter implements hierarchical handling based on the analysis results.

[0038] The data fusion sensing unit receives fault data uploaded from the MCAL layer, ECU abstraction layer, and service layer. It performs multi-source fusion analysis on the fault data to determine the fault level and type. The data collected by each fault sensing unit comes from different sources and has different dimensions. Abnormal signals from a single source are often insufficient to accurately reflect the true fault state and may even produce false alarms due to environmental interference. The data fusion sensing unit normalizes the parameters uploaded from each layer to a unified numerical range, eliminating dimensional differences. Then, it uses a weighted fusion algorithm to comprehensively calculate the multi-source data, accurately determining the fault level and type, eliminating false alarms, and integrating scattered information, making the fault determination results more objective and accurate.

[0039] The hierarchical self-repair unit matches a hierarchical repair strategy based on the fault level, generates repair commands, and directly sends these commands to the corresponding target-level modules to execute autonomous repair operations. The hierarchical self-repair unit matches the corresponding repair strategy based on the determined fault level, employing differentiated methods ranging from localized lightweight repair to system-wide emergency repair for different levels. This avoids resource waste caused by over-repair and prevents fault escalation due to insufficient repair. The repair commands are sent directly to the target-level modules by this unit, eliminating the need for forwarding at each level, thus shortening the latency from fault determination to repair execution. This enables the system to autonomously handle recoverable faults within milliseconds, freeing it from dependence on manual intervention and external diagnostic equipment.

[0040] In some embodiments of this application, the data fusion sensing unit is internally divided into three sub-modules: a data receiving sub-unit, a data fusion sub-unit, and an anomaly determination sub-unit.

[0041] The data receiving subunit receives fault data uploaded from the MCAL layer, ECU abstraction layer, and service layer through three independent standardized interfaces. Each of the three independent interfaces corresponds to a different underlying fault perception unit, separating fault data from different levels to avoid mutual interference and mixing between data from different sources. This also facilitates the core layer to perform separate verification and traceability of data from a single level.

[0042] The data fusion subunit normalizes the fault parameters in the fault data to a unified numerical range, eliminating dimensional differences between fault parameters at different levels. It then performs weighted fusion calculations on the normalized multi-source fault data to obtain a fused fault value. Since parameters such as the frame loss rate collected by the MCAL layer, the data forwarding latency collected by the ECU abstraction layer, and the timing timeout collected by the service layer belong to different dimensions and value ranges, direct comprehensive calculations would not yield valid conclusions. The data fusion subunit maps various heterogeneous parameters to a unified numerical range through normalization, and then assigns differentiated weights to data at different levels for weighted fusion calculations. This reflects the contribution of fault signals at each level to the overall fault state, resulting in a fused fault value that comprehensively characterizes the severity of the system fault.

[0043] The anomaly determination subunit is used to determine the fault level of the fused fault value based on a preset grading threshold, and to determine the fault type by combining the fault parameter characteristics in the fault data. On the one hand, the preset grading threshold divides the fused fault value into several fault level intervals, quantifying the severity of the fault and providing a direct basis for the differentiated matching of subsequent graded repair strategies. On the other hand, it determines the fault type by combining specific parameter characteristics in the fault data, identifying the fault category from features such as frame loss rate, interface call failure rate, and timing timeout, so that the system not only knows the severity of the fault, but also understands its nature.

[0044] In some embodiments of this application, the fault self-healing core layer also includes a fault precise location unit.

[0045] The fault precise location unit receives the fault level and type output by the data fusion and perception unit. Through root cause tracing, it elevates fault cognition from simply knowing what happened to understanding the source of the fault. This unit solves the problem that existing technologies can only record the general module to which the fault belongs, but cannot accurately locate the specific location and root cause of the fault, leading to difficulties in troubleshooting and low repair efficiency. It reduces fault location time from hours to milliseconds.

[0046] The root cause analysis subunit pre-stores a database of relationships between modules at each layer of AUTOSAR. Using fault level, fault type, and fault parameters as input, it traces the fault source backward through a decision tree root cause analysis model to pinpoint the specific location and root cause of the fault. In the vehicle communication link, modules at different levels are interdependent and interconnected. The same fault symptom may originate from different underlying root causes. For example, communication failure may be caused by a CAN IF interface forwarding anomaly, or by link interference or service layer protocol encapsulation errors. The root cause analysis subunit uses a decision tree model to make step-by-step, multi-dimensional judgments on fault level, fault type, and specific fault parameters, tracing back along the decision branches to gradually attribute ambiguous fault symptoms to the precise fault location and root cause.

[0047] The fault location report generation subunit generates a standardized fault location report based on the specific location and root cause of the fault. This standardized report includes the fault level, fault type, fault location, and root cause, and is transmitted to the hierarchical self-healing unit to provide a basis for repair. The standardized fault location report can also be easily uploaded to the application layer via the RTE layer for the upper layer to monitor the fault handling status, and can be temporarily stored in the fault log to accumulate data for historical tracing and subsequent optimization of the root cause analysis model.

[0048] In some embodiments of this application, the fault self-healing core layer also includes a repair verification and feedback unit.

[0049] The repair verification and feedback unit assumes the responsibility of monitoring the status after the hierarchical self-repair unit executes repair commands. In vehicular communication scenarios, if repair is only executed without verification, incomplete repairs often lead to recurring faults or even more serious outages. This unit monitors the operational data of each module layer in real time during the repair process and dynamically adjusts the monitoring cycle according to the fault level, intensively monitoring severe faults and appropriately relaxing monitoring for minor faults. By comparing the monitoring data with the preset repair success threshold for the corresponding fault level, it objectively determines whether the repair is successful, ensuring the complete closed-loop fault handling.

[0050] When a repair is deemed successful, the repair verification and feedback unit releases redundant resources based on the fault level and generates a repair success report. Redundant resources are not permanently occupied; instead, they are rolled back in stages based on the severity of the fault after repair: for minor or general faults, redundant resources are completely released and the system returns to standby mode after successful repair; for severe faults, core redundant resources are retained and released only after monitoring confirms no abnormalities; for fatal faults, full redundancy is retained until manual confirmation. The repair success report records information such as the repair method and repair level, and is uploaded to the application layer through the RTE layer, allowing the upper layer to monitor the fault handling status in real time. When a repair is deemed unsuccessful, a secondary repair is triggered, generating a repair failure report to ensure that the fault is not shelved due to a single repair failure. The repair failure report accurately records the reason for the failure, providing a basis for subsequent analysis and manual intervention.

[0051] The repair verification and feedback unit also inputs fault data, repair strategies, and repair results during the repair process into the root cause analysis model to optimize its parameters. Each complete data chain generated during fault handling is fed back into the root cause analysis model as training material, enabling the model to continuously correct decision tree parameters, calibrate positioning accuracy, and optimize the matching logic of repair strategies. With accumulated operating time, the system's fault identification and repair capabilities will become increasingly accurate, enabling it to more precisely locate root causes, select more appropriate repair methods, and gradually adapt to the ever-changing vehicle communication environment.

[0052] In some embodiments of this application, the fault self-healing core layer also includes a dynamic redundancy management unit.

[0053] The Dynamic Redundancy Management Unit (DLL) addresses the issues of fixed configuration, long standby times, and low utilization of redundant resources in existing technologies. In traditional solutions, redundant links and backup modules continuously occupy hardware resources regardless of whether a fault occurs, resulting in resource waste and difficulty in meeting the real-time requirements of automotive applications due to the need for manual triggering during switching. The DLL integrates redundant resources into a unified management system, closely linking them with fault diagnosis, tiered repair, and repair verification, enabling on-demand activation, tiered release, and flexible configuration of redundant resources.

[0054] The Dynamic Redundancy Management Unit (RDBMU) monitors the operational status of backup links, redundant modules, and redundant data in real time to determine the availability of redundant resources. If redundant resources remain in standby mode without real-time monitoring, situations may arise where redundant links fail or backup modules are damaged without the system's knowledge. Only when the redundant resources are truly needed will their inoperability be discovered, directly leading to failed fault repair. This unit, by configuring a monitoring period and continuously tracking the communication status of backup links, the operational status of redundant modules, and the integrity of redundant data, can promptly detect anomalies in redundant resources. It then alerts the application layer and updates redundancy configuration parameters through the RTE layer, ensuring that redundant resources are always reliably ready.

[0055] The dynamic redundancy management unit also dynamically activates redundant resources based on the fault level: no redundant resources are activated for minor faults, partial redundant resources are activated for general faults, partial redundant resources are activated for severe faults, and full redundant resources are activated for catastrophic faults. As the fault level increases, the system progressively increases redundancy investment, from activating partial backup sub-links and redundant sub-modules, to activating core redundant links and modules, until a catastrophic fault is detected, all redundant links, redundant modules, and redundant data are activated, switching to emergency communication mode, retaining only core safety communication functions such as power, braking, and steering. This progressively increasing activation strategy ensures that each redundant resource plays its role at the appropriate time, guaranteeing continuous and reliable communication in critical fault scenarios while avoiding unnecessary consumption of redundant resources.

[0056] After the repair verification and feedback unit determines that the repair is successful, the dynamic redundancy management unit releases redundant resources in stages according to the fault level to avoid unnecessary occupation of redundant resources. Successful repair means the fault has been eliminated; continuing to occupy redundant resources for an extended period would result in unnecessary waste. This unit implements a differentiated release strategy based on the fault level: for minor or general faults, redundant resources are immediately and completely released after successful repair, returning to standby mode; for severe faults, core redundant resources are retained until monitoring confirms no abnormalities before release; for fatal faults, full redundancy is continuously retained until manual confirmation. This tiered release and tiered activation form a closed loop, ensuring that redundant resources promptly step in to guarantee communication during faults and are promptly released and returned to standby mode after the fault is eliminated.

[0057] In some embodiments of this application, the fault perception unit set in the MCAL layer includes a frame loss monitoring subunit, a bus load monitoring subunit, and a hardware fault monitoring subunit.

[0058] The MCAL layer fault detection unit is directly connected to the internal registers of the CAN Driver module, capturing firsthand evidence of faults from the lowest level of the communication link. Compared to the limitations of existing technologies where the MCAL layer can only passively monitor extreme hardware faults such as bus short circuits and controller power failures, the fault detection unit in this application enhances the underlying monitoring capability from a coarse hardware status judgment to a refined quantitative perception of communication quality and link health by subdividing monitoring dimensions and refining collection parameters. It can capture previously difficult-to-detect hidden faults such as signal interference and transient congestion.

[0059] The frame loss monitoring subunit is used to collect the frame loss rate of the CAN FD bus in real time. Frame loss is often a direct indication of link interference, arbitration anomalies, or bandwidth congestion. Continuous monitoring of the frame loss rate can promptly capture the trend of communication quality degradation. The bus load monitoring subunit is used to collect the bus load rate. An excessively high load rate often indicates that the link is about to enter a saturation or even congestion state, and is an important indicator for identifying instantaneous congestion and assessing communication bottlenecks. The hardware fault monitoring subunit is used to collect bus level and controller operating status to identify underlying hardware faults such as controller power failure and bus short circuits, providing a criterion for the system to distinguish between physical damage at the hardware level and soft anomalies at the communication level. The three subunits monitor the underlying communication link from three dimensions: data integrity, channel occupancy, and hardware physical status, respectively, providing multi-angle, cross-verifiable underlying data for full-link fault identification.

[0060] The frame loss monitoring subunit, bus load monitoring subunit, and hardware fault monitoring subunit collect data in real time according to a preset acquisition cycle. When the monitored data exceeds a preset threshold, the fault perception unit uploads the fault data to the fault self-healing core layer through a standardized interface, triggering the fault self-healing core layer to determine the fault. The preset acquisition cycle ensures that the underlying monitoring maintains a continuous and regular operating rhythm, guaranteeing both the real-time and continuous nature of fault data while avoiding resource consumption caused by excessive acquisition through reasonable cycle configuration. The threshold-triggered reporting method enables accurate filtering of valid fault data. The system only actively uploads data to the core layer when the monitored parameters exceed the preset threshold, rather than indiscriminately reporting all normal operating data. This reduces the processing burden on the core layer and avoids invalid communication under normal conditions.

[0061] In some embodiments of this application, the MCAL layer is further provided with a redundant control unit, which includes a link switching subunit and a module redundancy control subunit, and controls the link switching switch through GPIO pins.

[0062] In existing technologies, switching redundant links often requires manual or external command triggering, resulting in long switching delays and passive operation, making it difficult to adapt to the hard real-time requirements of automotive scenarios. The redundant control unit, through direct interface with the fault self-healing core layer, realizes automated and command-based scheduling of redundant resources, enabling the underlying hardware to have the ability to respond instantly to the control commands of the core layer.

[0063] The redundant control unit controls the link switching switch via GPIO pins and reserves two CAN controller interfaces: the main controller CAN0 and the backup controller CAN1. GPIO pins, as general-purpose control ports for the microcontroller to control the hardware switches, enable precise control of the switching switch with extremely low overhead, ensuring both the immediacy of the switching action and maintaining the versatility and ease of implementation of the solution. The reserved dual-CAN controller architecture provides physical support for the coexistence of primary and backup links, allowing the primary and backup links to be ready in parallel at the hardware level and to quickly switch over when needed, without requiring on-site configuration.

[0064] Upon receiving the redundancy switching command from the fault self-healing core layer, the link switching subunit switches the primary and backup CAN FD links, while the module redundancy control subunit starts or stops the redundant CAN Driver module. The link switching subunit focuses on communication channel-level switching; when the primary link cannot communicate normally due to interference, congestion, or hardware damage, it promptly switches the transmit / receive channel to the backup link, ensuring communication continuity is not interrupted by the failure of a single link. The module redundancy control subunit focuses on hardware module-level scheduling, supplementing or replacing failed driver capabilities by starting redundant CAN Driver modules, or stopping redundant modules to save resources when redundancy is not needed. The two subunits work together to implement core layer redundancy scheduling decisions at both the link channel and hardware module levels, enabling the system to flexibly choose different redundancy methods such as link switching, module start / stop, or a combination of both when facing different levels of faults.

[0065] In some embodiments of this application, the fault perception unit set in the ECU abstraction layer includes an interface anomaly monitoring unit.

[0066] In existing technologies, the CAN IF module of the ECU abstraction layer only performs data forwarding and interface adaptation, lacking dedicated anomaly monitoring capabilities. This leaves latent faults such as interface call failures, call timeouts, data forwarding delays, and data loss undetected for extended periods. These interface-level soft anomalies are precisely the common potential causes of communication failures. The interface anomaly monitoring unit, through deep correlation with the CAN IF module's interface functions and function call logs, continuously and granularly tracks the interface layer's operational status, enabling the system to detect and address latent interface-level faults early.

[0067] The interface anomaly monitoring unit is internally divided into an interface call monitoring subunit and a data forwarding monitoring subunit. The interface call monitoring subunit collects data through interface function call logs to monitor call anomalies of the CAN IF module interface, such as call failures and timeouts, reflecting the interface's availability status from the perspective of whether the interface was successfully activated. The data forwarding monitoring subunit tracks the data flow between interfaces through call logs, monitoring data forwarding anomalies, such as data delays and data loss, reflecting the interface's transmission quality from the perspective of whether data was delivered completely and promptly.

[0068] The interface anomaly monitoring unit statistically analyzes the interface call success rate and data forwarding latency to determine whether the interface is abnormal. The interface call success rate, measured by the ratio of successful calls to total calls, reflects the interface's reliability at the call level. Data forwarding latency, measured by the difference between forwarding completion time and reception time, reflects the interface's timeliness at the transmission level. These two metrics characterize the interface's operational quality from the perspectives of reliability and real-time performance, respectively. By comparing real-time statistical results with preset anomaly detection criteria, the unit objectively and quantitatively determines whether the interface is in an abnormal state, making interface anomaly identification more accurate and reproducible.

[0069] When an interface anomaly is detected, the interface anomaly monitoring unit uploads the anomaly data to the fault self-healing core layer and receives an interface restart command from the core layer. It then calls the interface reset function to restart the interface, thus completing the interface anomaly repair. The anomaly data includes information such as the anomaly type and occurrence time, and is uploaded to the core layer through a standardized interface, providing data input from the ECU abstraction layer dimension for the core layer's multi-source fusion analysis. The interface anomaly monitoring unit receives the interface restart command from the core layer, calls the interface reset function to perform a restart operation on the anomaly interface, and autonomously completes the interface anomaly repair. For recoverable soft faults such as interface call failures and data forwarding anomalies, the system can automatically reset the interface and restore normal operation without manual intervention.

[0070] In some embodiments of this application, the fault perception unit set in the service layer includes a protocol anomaly monitoring unit, and the service layer also sets a data verification and optimization unit.

[0071] The protocol anomaly monitoring unit focuses on anomaly identification during the protocol processing of the CAN TP module. Addressing the shortcomings of existing technologies in monitoring implicit faults at the protocol level, such as protocol timing and frame format, it collects protocol frame transmission timing and frame format data through direct association with the protocol processing functions of the CAN TP module. This enables real-time monitoring of the protocol layer's operating status, allowing the system to promptly capture previously difficult-to-detect protocol anomalies such as timing timeouts, frame format errors, and segmented transmission failures.

[0072] The protocol anomaly monitoring unit is internally divided into a protocol timing monitoring subunit and a frame format monitoring subunit. The protocol timing monitoring subunit monitors the transmission and reception timing of protocol frames to identify timing-level anomalies such as timeouts. These anomalies often reflect improper protocol interaction rhythms or transmission channel problems. The frame format monitoring subunit monitors the frame header and trailer formats to identify structural anomalies such as frame format errors. These anomalies often originate from encapsulation process errors or data corruption. These two subunits monitor the protocol processing from both timing and format dimensions, forming a comprehensive awareness of the CAN TP protocol layer's operational status.

[0073] When a protocol anomaly is detected, the protocol anomaly monitoring unit uploads the abnormal data to the fault self-healing core layer and receives protocol parameter adjustment instructions from the core layer. It then calls the protocol parameter setting interface to modify the protocol configuration, thus completing the protocol anomaly repair. The abnormal data is uploaded to the core layer through a standardized interface, providing data input at the service layer level for the core layer's multi-source fusion analysis. The protocol anomaly monitoring unit receives protocol parameter adjustment instructions from the core layer, such as adjusting the retransmission count, and modifies the protocol configuration by calling the protocol parameter setting interface, achieving autonomous repair of protocol anomalies. For recoverable protocol layer faults such as timing timeouts and segmented transmission failures, the system can automatically adjust protocol parameters to restore normal communication without manual intervention.

[0074] The data verification optimization unit comprises a CRC check subunit and an adaptive check subunit, employing a dual mechanism of CRC and adaptive check for data verification. Existing verification mechanisms often use a fixed-strength check method, which either results in insufficient check strength leading to a high bit error rate or excessive check strength causing resource waste. The data verification optimization unit introduces a dual mechanism combining CRC and adaptive check to achieve dynamic matching of check strength and data characteristics: when the data length is less than or equal to a preset threshold, only the CRC check subunit is activated to perform basic CRC check, meeting the verification requirements with low resource overhead; when the data length exceeds the preset threshold, the adaptive check subunit is automatically activated, dynamically adjusting the check precision according to the data type, ensuring the transmission integrity of long data with stronger check strength. This on-demand switching verification strategy effectively reduces the bit error rate while avoiding unnecessary resource consumption.

[0075] When a verification error occurs, the data verification optimization unit triggers frame retransmission and uploads the verification error information to the fault self-healing core layer to reduce the data transmission error rate. Once a verification error is identified, the system immediately triggers frame retransmission to correct the erroneous data in a timely manner, preventing the error information from spreading in the communication link. Simultaneously, the verification error information is uploaded to the core layer and participates in multi-source fusion analysis as part of the service layer's fault perception data. This allows the core layer to grasp the dynamic changes in data transmission quality, providing a basis for judging the link health status and assessing whether higher-level repair measures such as redundant switching are needed.

[0076] In some embodiments of this application, reference is made to Figure 1 The overall architecture adds a fault self-healing core layer to the standard AUTOSAR CP layered architecture, forming a six-layer structure from top to bottom: application layer, RTE layer, fault self-healing core layer, service layer, ECU abstraction layer and MCAL layer.

[0077] The application layer contains application software components and is fully compatible with the existing AUTOSAR CP application layer, requiring no modification. The main function of the application layer is to issue configuration commands such as redundancy policies and fault level thresholds, and to receive fault information and repair status feedback. It interacts indirectly with the fault self-healing core layer through the RTE layer and does not directly participate in the fault handling process.

[0078] The RTE layer undergoes minor adaptations to the existing architecture, adding a standardized bidirectional communication interface to facilitate the relay of commands and information between the application layer and the fault self-healing core layer. Application layer configuration commands are sent to the fault self-healing core layer via the RTE layer, while the fault self-healing core layer reports fault information and repair status back to the application layer via the RTE layer. Simultaneously, the RTE layer retains the original interaction interfaces of each layer to ensure compatibility with the existing architecture. The interaction interfaces between the fault self-healing core layer and the service layer, ECU abstraction layer, and MCAL layer are all internal BSW interfaces, directly defined between the core layer and the corresponding underlying modules, without requiring relay through the RTE layer, thus ensuring real-time fault handling.

[0079] The fault self-healing core layer comprises five functional units: a fault fusion perception unit, a fault precise location unit, a hierarchical self-healing unit, a repair verification and feedback unit, and a dynamic redundancy management unit. These units are connected via an internal bus and sequentially follow the order of data fusion perception, precise location, hierarchical repair, repair verification, and dynamic redundancy to complete the entire fault handling process. The core layer establishes a bidirectional interactive relationship with the underlying layers for issuing configuration and diagnostic commands, and reporting faults and statuses. Specifically, the interaction with the MCAL layer involves uploading hardware and driver fault data, as well as redundancy switching and hardware control command issuance; the interaction with the ECU abstraction layer involves uploading interface anomaly data and issuing interface repair commands; and the interaction with the service layer involves uploading protocol fault data and issuing repair commands.

[0080] The service layer is built upon the existing AUTOSAR CP service layer, retaining the original service modules, including the CAN TP module, PDUR module, and NM module. On top of this, a protocol anomaly monitoring unit and a data verification optimization unit are added. It connects directly to the fault self-healing core layer, uploading protocol fault data to the core layer and receiving and executing repair commands issued by the core layer. The service layer interacts with the ECU abstraction layer through the standard AUTOSAR interface, calling the ECU abstraction layer to complete low-level communication functions.

[0081] The ECU abstraction layer is built upon the existing AUTOSAR CP ECU abstraction layer, retaining the original abstraction modules, including the CAN IF module and the IO abstraction module. A new interface anomaly monitoring unit is added, directly connected to the fault self-healing core layer. This unit uploads interface anomaly data to the core layer and receives and executes interface repair commands from the core layer. The ECU abstraction layer interacts with the MCAL layer through the standard AUTOSAR interface, calling the MCAL layer to complete underlying driver functions.

[0082] The MCAL layer is built on the existing AUTOSAR CP MCAL layer, retaining the original modules, including the CAN Driver module, GPIO Driver module and clock module. On this basis, a fault perception unit and a redundancy control unit are added, which are directly connected to the fault self-healing core layer. It uploads fault data at the hardware and driver levels to the core layer, receives and executes redundancy switching and hardware control commands issued by the core layer, and completes low-level execution actions such as primary and backup link switching and redundant module start and stop.

[0083] Based on the above architecture, the system's self-healing process during operation is as follows: Each layer's fault perception unit collects fault data from its respective layer, including hardware and link fault data from the MCAL layer, interface anomaly data from the ECU abstraction layer, and protocol fault data from the service layer, and uploads it directly to the fault self-healing core layer via an independent standardized interface. The data fusion perception unit in the fault self-healing core layer normalizes and weightedly fuses the multi-source fault data uploaded from each layer to determine the fault level and type. The fault precision location unit traces the fault source backward based on a decision tree root cause analysis model to pinpoint the specific location and root cause of the fault. The hierarchical self-healing unit matches the corresponding hierarchical repair strategy according to the fault level, generates repair instructions, and directly sends them to the corresponding target-level module for autonomous repair. The repair verification and feedback unit monitors the repair effect in real time, determines whether the repair is successful, and provides feedback on the status. The dynamic redundancy management unit dynamically enables and releases redundant resources according to the fault level, ensuring the on-demand utilization of redundant resources.

[0084] In some embodiments of this application, reference is made to Figure 2 The MCAL layer is the underlying module that directly interacts with the vehicle hardware. It is responsible for detecting hardware and link failures and performing redundant execution. It is based on the CAN Driver module. The core functions of the CAN Driver module include CAN controller driving, bus data transmission and reception, and hardware initialization. These functions are fully retained and compatible with the AUTOSAR CP standard to ensure compatibility with existing hardware.

[0085] The fault perception unit consists of a frame loss monitoring subunit, a bus load monitoring subunit, and a hardware fault monitoring subunit. It is directly connected to the internal registers of the CAN Driver module and uses an interrupt-triggered method to collect data, including real-time data on the CANFD bus frame loss rate, bus load rate, bus level, and controller operating status. Specifically, the fault perception unit is configured with a 50-millisecond acquisition period. The frame loss rate is calculated by statistically analyzing the difference between the number of transmitted and received frames per unit time; the bus load rate is calculated by statistically analyzing the percentage of bus occupancy time; and hardware faults are identified by reading the fault flag bit in the CAN controller status register. When the monitored data exceeds a preset threshold, the fault perception unit uploads the fault data to the fault self-healing core layer via the standardized interface CAN_IF_TX_FF.

[0086] The redundancy control unit consists of a link switching subunit and a module redundancy control subunit. It is directly connected to the CAN Driver module and GPIO Driver module, receiving control commands from the fault self-healing core layer and executing redundant link switching and the startup and shutdown of redundant hardware modules. The redundancy control unit reserves two CAN controller interfaces: CAN0 is the primary controller, and CAN1 is the backup controller. The link switching switch is controlled via GPIO pins. When a redundancy switching command is received from the core layer (0x01 to start the backup link, 0x02 to switch back to the primary link), the redundancy control unit immediately outputs a control signal through the GPIO Driver to switch the link transmit / receive channels, simultaneously starting or stopping the redundant CAN Driver module.

[0087] A bidirectional interactive relationship is established between the MCAL layer and the fault self-healing core layer. In the uplink direction, the fault perception unit directly uploads the collected hardware and link fault data to the fault self-healing core layer via a standardized interface, providing underlying data input for multi-source fusion analysis and fault determination. In the downlink direction, the redundancy control unit receives redundancy switching and hardware control commands from the core layer, and executes link switching and module start / stop actions by outputting control signals through the GPIO Driver. When the core layer determines that redundant resources need to be enabled, the link switching subunit immediately switches the transmit / receive channels of the primary and backup CAN FD links, and the module redundancy control subunit simultaneously starts the redundant CAN Driver module. When fault repair is completed and the core layer determines that redundant resources no longer need to be used, it issues a command to switch back to the primary link. The redundancy control unit switches the link back to the primary channel and shuts down the redundant module, returning the redundant resources to standby mode.

[0088] In some embodiments of this application, reference is made to Figure 3 The ECU abstraction layer is responsible for interface adaptation between the MCAL layer and the service layer, with a core focus on anomaly monitoring and repair of the CAN IF module. The core functions of the CAN IF module include data forwarding, interface adaptation, and protocol conversion, which are fully preserved to ensure normal data interaction between the MCAL layer and the service layer.

[0089] The interface anomaly monitoring unit consists of an interface call monitoring subunit and a data forwarding monitoring subunit. It is directly associated with the CAN IF module's interface functions CanIf_Transmit and CanIf_Receive, collecting data through function call logs. The interface call monitoring subunit monitors for anomalies in the CAN IF interface calls, such as call failures and timeouts; the data forwarding monitoring subunit monitors for anomalies in data forwarding, such as data delays and data loss.

[0090] The interface anomaly monitoring unit is configured with a monitoring cycle and performs cyclical monitoring of the CAN IF module's operational status according to a preset cycle. During monitoring, the interface call monitoring subunit and the data forwarding monitoring subunit collect data in parallel. After summarizing the monitoring results, two indicators are calculated: interface call success rate and data forwarding latency. The interface call success rate is calculated as the ratio of successful calls to the total number of calls, and the data forwarding latency is calculated as the difference between the forwarding completion time and the reception time. These two indicators are input into the anomaly judgment stage and compared with preset anomaly judgment conditions. If the judgment is negative, meaning the interface is operating normally, the monitoring cycle trigger node is returned to enter the next round of monitoring; if the judgment is positive, meaning the interface has an anomaly, an anomaly data packet containing the anomaly type and occurrence time is generated.

[0091] After generating the abnormal data packet, the interface anomaly monitoring unit uploads the abnormal data to the fault self-repair core layer via the standardized interface CanIf_Error_Report, awaiting processing instructions from the core layer. The fault self-repair core layer incorporates the interface anomaly data into multi-source fusion analysis and, based on the judgment results, issues an interface restart instruction to the ECU abstraction layer. Upon receiving the instruction, the interface anomaly monitoring unit parses the instruction content and calls the CanIf_Reset function to execute the interface reset operation. After the reset is completed, the system verifies the interface status to confirm whether the reset was successful. If the reset is successful, the interface returns to normal working state, generating a successful repair status; if the reset fails, a failed repair status is generated. Regardless of success or failure, the verification result is fed back to the fault self-repair core layer through the RTE layer, allowing the core layer to monitor the handling of the interface repair. If the reset is successful, the core layer updates the fault log and releases relevant resources; if the reset fails, the core layer can trigger a secondary repair or record the reason for failure for subsequent manual intervention.

[0092] In some embodiments of this application, reference is made to Figure 4 The service layer is responsible for the encapsulation, decapsulation, and transmission management of the vehicle communication protocol, focusing on protocol anomaly monitoring and data verification optimization for modules such as CAN TP and PDUR. The core functions of the CAN TP module include protocol frame encapsulation and decapsulation, and segmented transmission, while the core function of the PDUR module is data routing. These functions are fully preserved to ensure the normal operation of the communication protocol.

[0093] After system startup, the CAN TP and PDUR modules are initialized first, followed by the triggering of the protocol processing function, which performs two monitoring processes in parallel: protocol timing monitoring and frame format monitoring. The protocol anomaly monitoring unit consists of a protocol timing monitoring subunit and a frame format monitoring subunit, directly linked to the CAN TP module's protocol processing function. The protocol timing monitoring subunit identifies timing-level anomalies such as timeouts by monitoring the transmission and reception timing of protocol frames; the frame format monitoring subunit identifies structural anomalies such as frame format errors and segmentation transmission failures by monitoring the frame header and trailer formats. In the anomaly determination phase, the system configures timing monitoring thresholds and determines whether the protocol is abnormal by monitoring the transmission and reception timing of protocol frames and the frame header and trailer formats. If the determination is negative, indicating normal protocol operation, the system returns to the protocol processing function to trigger the next round of monitoring; if the determination is positive, indicating a protocol anomaly, an anomaly data packet containing the protocol type and anomaly code is generated.

[0094] After generating an abnormal data packet, the protocol anomaly monitoring unit uploads the abnormal data to the fault self-healing core layer via the standardized interface Tp_Error_Report, awaiting processing instructions from the core layer. The fault self-healing core layer incorporates the protocol anomaly data into multi-source fusion analysis and, based on the judgment results, issues protocol parameter adjustment instructions to the service layer, such as adjusting the retransmission count. Upon receiving the instructions, the protocol anomaly monitoring unit parses the instructions, calls the Tp_SetParameter interface to modify the protocol configuration, and completes the protocol anomaly repair. After repair, the system verifies the effective status of the protocol configuration to confirm whether the modification was successful. If the verification result is yes, the repair is successful, and a success status is generated; if the verification result is no, the repair fails, and a failure status is generated. Regardless of success or failure, the verification result is fed back to the fault self-healing core layer so that the core layer can monitor the handling of the protocol repair.

[0095] Under normal protocol conditions, the system synchronously executes the CAN TP frame data reception and transmission process. The data verification optimization unit consists of a CRC check subunit and an adaptive check subunit, which are connected in series with the frame verification function of the CAN TP module, employing a dual mechanism of CRC8 check and adaptive check for data verification. During the verification execution phase, the system first determines whether the data length is less than or equal to 64 bytes. If the data length is less than or equal to 64 bytes, only the CRC check subunit is activated to perform CRC8 check; if the data length is greater than 64 bytes, the adaptive check subunit is automatically activated, dynamically adjusting the verification precision according to the data type. After verification, the system determines whether the verification passes. If the verification passes, normal forwarding is performed; if the verification fails, frame retransmission is immediately triggered to correct the erroneous data, and the verification error information is uploaded to the fault self-healing core layer as part of the service layer fault perception data for multi-source fusion analysis.

[0096] In some embodiments of this application, reference is made to Figures 5 to 11 The fault self-healing core layer adopts an on-demand loading mode, meaning that only basic monitoring functions are activated during normal operation, and full functionality is loaded when a fault occurs. The core layer includes five functional units: a fault fusion perception unit, a fault precise location unit, a hierarchical self-healing unit, a repair verification and feedback unit, and a dynamic redundancy management unit.

[0097] After system startup, the fault self-healing core layer first completes initialization and starts basic monitoring functions. The data receiving subunit of the fault fusion perception unit receives fault data uploaded from the MCAL layer, ECU abstraction layer, and service layer through three independent standardized interfaces. The data format is unified as fault type plus fault parameters plus occurrence time plus the module to which it belongs. Subsequently, the data fusion subunit normalizes the original fault parameters of each layer, mapping parameters with different dimensions such as frame loss rate, forwarding delay, and timing timeout to a unified numerical range of 0 to 1. The frame loss rate is calculated as the ratio of the actual frame loss rate to 100%, the forwarding delay is calculated as the ratio of the actual delay to 1000 milliseconds, and the timing timeout is calculated as the ratio of the actual timeout to 1000 milliseconds, eliminating the dimensional differences between parameters at different levels.

[0098] After normalization, the data fusion subunit uses a weighted fusion algorithm to comprehensively calculate the multi-source data. Weights of 0.5, 0.3, and 0.2 are assigned to the data from the MCAL layer, ECU abstraction layer, and service layer, respectively. The normalized fault values ​​from each layer are summed according to their weights to obtain the fused fault value. The fused fault value ranges from 0 to 1, comprehensively representing the severity of the overall system fault. The anomaly determination subunit determines the fault level of the fused fault value based on a preset 5-level fault threshold. A fused fault value less than 0.2 is considered normal or no fault; greater than or equal to 0.2 and less than 0.4 is considered a minor fault; greater than or equal to 0.4 and less than 0.6 is considered a general fault; greater than or equal to 0.6 and less than 0.8 is considered a severe fault; and greater than or equal to 0.8 is considered a fatal fault. Simultaneously, the anomaly determination subunit combines parameter characteristics in the fault data to determine the fault type, identifying hardware faults, link faults, interface faults, and protocol faults from features such as frame loss rate, interface call failure rate, and timing timeout time.

[0099] The root cause analysis subunit of the fault precise location unit pre-stores the association database of each layer of AUTOSAR modules, and uses a decision tree root cause analysis model to trace back the fused fault data. The decision tree model first determines the fault level. If there is no fault, the system is directly determined to be operating normally and terminates. If it is a minor, general, severe, or fatal fault, it enters the fault type determination stage, distinguishing between four categories: link fault, hardware fault, interface fault, and protocol fault. Each category corresponds to different link parameter analysis dimensions. Link fault analysis includes frame loss rate and bus load, hardware fault analysis includes controller status register flags, interface fault analysis includes call failure rate and initialization status, and protocol fault analysis includes forwarding delay, timing timeout, and verification error rate.

[0100] Subsequently, the decision tree model comprehensively determines the root cause of the fault. For link faults coupled with high packet loss rates, the root cause is determined to be physical link instability or electromagnetic interference. For link faults coupled with high bus loads, the root cause is determined to be network congestion requiring optimized scheduling strategies. For hardware faults coupled with register anomalies, the root cause is determined to be MCU hardware damage or peripheral clock configuration errors. For interface faults coupled with initialization failures, the root cause is determined to be invalid configuration parameters or failed resource requests. For protocol faults coupled with severe timeouts, the root cause is determined to be communication protocol stack deadlock or frame period configuration errors. For other combinations that cannot be clearly determined, further manual analysis based on specific engineering practices is suggested. The location report generation subunit generates a standardized location report containing fault level, fault type, specific fault location and root cause, and occurrence time based on the location results. This report is transmitted to the hierarchical self-healing unit, temporarily stored in the fault log, and can be uploaded to the application layer via the RTE layer.

[0101] The hierarchical self-repair unit consists of a repair strategy selection subunit, an instruction generation subunit, and an instruction issuance subunit. It receives the location report output by the fault precision location unit and matches the corresponding hierarchical repair strategy according to the fault level. For normal or fault-free states, the system requires no repair; each module maintains its normal operating mode, and the fault fusion perception unit continuously collects operational data without issuing any instructions. For minor faults, the system performs localized lightweight repair, generating frame retransmission, verification re-execution, and interface lightweight refresh instructions, which are directly issued to the service layer CAN TP module, the MCAL layer CAN Driver module, and the ECU abstraction layer CAN IF module for execution. For general faults, the system performs module-level repair combined with local redundancy switching, generating instructions for local redundant link startup, redundant submodule startup, main link unblocking, and protocol parameter fine-tuning. These instructions are issued to the MCAL layer redundant control unit, the ECU abstraction layer CAN IF module, and the service layer CAN TP module, starting the backup sublink and redundant CAN IF submodule, clearing the main link cache and fine-tuning the transmission rate, and adjusting parameters such as the protocol retransmission count.

[0102] For severe faults, the system performs system-level repair combined with partial redundancy activation and function degradation, generating commands for partial redundancy startup, emergency communication sub-mode startup, non-core function shutdown, and hardware module reset. These commands are then sent to the MCAL layer, ECU abstraction layer, and service layer. Core redundant links and modules are activated, non-core communication functions such as in-vehicle entertainment and window control are disabled, and faulty hardware modules are reset and switched to emergency communication sub-mode. For fatal faults, the system performs full redundancy startup combined with system-level emergency repair and emergency alarms, generating commands for full redundancy startup, emergency communication main mode startup, core function keep-alive, and vehicle alarm triggering. These commands are sent to the MCAL layer, ECU abstraction layer, and service layer, activating all redundant links, redundant modules, and redundant data. The system switches to emergency communication main mode, retaining only core safety communication functions such as power, braking, and steering. Simultaneously, emergency alarm commands are sent to the application layer and vehicle instrument cluster via the RTE layer. All repair commands are directly sent from the command sending subunit to the corresponding target-level modules for execution, without the need for hierarchical forwarding.

[0103] The repair verification and feedback unit consists of a verification monitoring subunit, a result judgment subunit, and a status feedback subunit. After repair is initiated, the verification monitoring subunit receives real-time operational data uploaded by modules at each layer, including frame loss rate, interface call success rate, link load, and timing timeout, and dynamically adjusts the monitoring cycle according to the fault level. The result judgment subunit compares the monitored data with the preset repair success threshold for the corresponding fault level. If the monitored data reaches the corresponding threshold within the repair timeout period, the repair is considered successful; if the threshold is not reached after the repair timeout period, the repair is considered a failure, triggering a secondary repair. For fatal faults, if the secondary repair still fails, all redundant resources are maintained and continuous alarms are issued, awaiting manual intervention.

[0104] The status feedback subunit generates a corresponding repair report based on the judgment result. Upon successful repair, a report is generated containing information on repair success, fault level, and repair method. Redundant resources are released according to the fault level: minor and general faults completely release redundant resources and restore standby state; severe faults release non-core redundant resources while retaining core redundancy; and fatal faults retain all redundant resources until manual confirmation. The fault log is also updated. Upon repair failure, a report is generated containing information on repair failure, fault level, and failure reason, and the failure reason is recorded. All reports are uploaded to the application layer via the RTE layer interface, allowing the application layer to monitor the fault handling status.

[0105] The dynamic redundancy management unit consists of a redundancy resource monitoring subunit and a redundancy policy control subunit. It is directly connected to the redundancy modules in the MCAL layer, ECU abstraction layer, and service layer, and pre-stores redundancy resource configuration parameters for five levels of fault adaptation. The redundancy resource monitoring subunit configures a basic monitoring cycle and dynamically adjusts it according to the fault level. It receives real-time redundancy resource operation data uploaded from each layer, including backup link communication status, redundancy module working status, and redundancy data integrity, to determine the availability of redundancy resources. If a redundancy resource fails, it immediately alerts the application layer through the RTE layer and updates the redundancy configuration parameters.

[0106] The redundancy strategy management subunit, based on instructions from the hierarchical self-healing unit, activates redundant resources as needed according to fault level. Under normal or fault-free conditions, all redundant resources are in low-power standby mode, not occupying system resources. Redundant resources are not activated for minor faults; partial redundant resources, including backup sub-links and redundant sub-modules, are activated for general faults; some redundant resources, including core redundant links and modules, are activated for severe faults; and all redundant resources are activated for fatal faults. After successful repair, the redundancy strategy management subunit releases redundant resources according to fault level. Minor and general faults are immediately and completely released and return to standby mode after successful repair. For severe faults, core redundant resources are retained after successful repair until no abnormalities are detected before release. For fatal faults, all redundant resources are retained after successful repair until manual confirmation. Furthermore, the redundancy strategy management subunit supports flexible configuration of redundant resource types, including link, module, and data redundancy. It can adjust the redundancy activation strategy for each fault level according to automotive scenario requirements, such as power domain and body domain, adapting to MCUs of different resource scales, and supports dynamic expansion and configuration updates of redundant resources.

[0107] After the above repair process is completed, the system enters the status reporting and self-optimization phase. The repair status and results are uploaded to the application layer through the RTE layer, and the fault log is updated simultaneously. Subsequently, the system inputs the fault level, fault data, repair strategy, and repair results during the repair process into the root cause analysis model, updates the decision tree parameters, and optimizes the hierarchical repair strategy, so that the model continuously corrects the matching logic between the positioning accuracy and the repair strategy.

[0108] In some embodiments of this application, reference is made to Figure 12 The RTE layer retains the original interaction interfaces of each layer and adds a standardized bidirectional communication interface, RTE_SelfHealing_Interface, for the relay of commands and information between the application layer and the fault self-healing core layer. This interface adopts the AUTOSAR standard interface format, requiring no modification to the core functions of the RTE layer and ensuring compatibility with the existing AUTOSAR CP system.

[0109] In the downlink process of command issuance, configuration commands such as redundancy policies and fault level thresholds issued by the application layer are first transmitted to the RTE layer through the existing interface of the RTE layer, and then forwarded to the fault self-healing core layer by the newly added interface. The fault self-healing core layer receives and stores these configuration commands, and then enters the forwarding delay judgment stage. If the forwarding delay meets the preset requirements, it is determined that the issuance was successful; if the forwarding delay does not meet the requirements, a timeout alarm is triggered, prompting the system to check for abnormalities in the command transmission path.

[0110] In the uplink status reporting process, the fault information and repair status report generated by the fault self-healing core layer are first uploaded to the RTE layer through a new interface, and then forwarded to the application layer by the existing interface of the RTE layer. The application layer receives and reports the fault information and repair status, and then enters the forwarding latency judgment stage. If the forwarding latency meets the preset requirements, the reporting is considered successful; if the forwarding latency does not meet the requirements, a timeout alarm is triggered.

[0111] In the entire interaction logic design, the fault self-healing core layer does not communicate directly with the application layer. All interactions are relayed through the RTE layer, strictly following the core specification of the AUTOSAR architecture that the application layer and the basic software layer only interact through the RTE layer. This eliminates the need to modify the application layer business logic and reduces the cost of system upgrades and migrations.

[0112] In some embodiments of this application, an AUTOSAR-based communication protocol stack fault self-healing method is provided, which includes the following steps.

[0113] Step S100: In the AUTOSAR CP standard layered architecture, a fault self-healing core layer is deployed between the service layer and the RTE layer. The fault self-healing core layer is directly connected to the MCAL layer, ECU abstraction layer and service layer through independent standardized interfaces, and indirectly connected to the application layer through the RTE layer interface.

[0114] In step S100, the fault self-healing core layer is positioned between the service layer and the RTE layer. This allows it to maintain AUTOSAR-compliant instruction and information exchange with the application layer via the RTE layer, and directly access all underlying functional modules such as the service layer, ECU abstraction layer, and MCAL layer. This breaks the existing technology's fragmented fault information and lack of a unified coordination center. The core layer is directly connected to each underlying layer using independent standardized interfaces, providing a channel for the rapid uploading of fault data and the direct issuance of repair instructions, eliminating the processing delay caused by hierarchical forwarding. It strictly interacts indirectly with the application layer through the RTE layer, ensuring the system's compliance with the AUTOSAR architecture.

[0115] In step S200, the fault perception units set up by the MCAL layer, ECU abstraction layer and service layer respectively collect the fault data of their respective layers in real time, and upload it directly to the fault self-repair core layer through an independent standardized interface, so that the fault self-repair core layer can obtain the fault data of each layer.

[0116] In step S200, the fault monitoring capability is expanded from the previous single dimension of low-level hardware faults to a multi-dimensional perception system covering the entire communication protocol stack. Each layer of fault perception unit focuses on fault data at the hardware and link level, interface interaction level, and protocol transmission level, respectively, capturing previously difficult-to-detect hidden faults. Data from each layer is directly uploaded to the core layer through independent standardized interfaces, eliminating the inefficient path of hierarchical forwarding, shortening fault detection latency, and ensuring that the core layer obtains timely, complete, and reliable raw fault data as soon as possible.

[0117] In step S300, the fault self-healing core layer receives fault data uploaded from each layer, performs multi-source fusion analysis on the fault data, and then determines the fault level and fault type.

[0118] In step S300, because the data collected by each fault perception unit comes from different sources and has different dimensions, abnormal signals from a single source are often insufficient to accurately reflect the true fault state, and may even produce false alarms due to environmental interference. The core layer eliminates the dimensional differences between fault parameters at each layer through normalization processing, and then uses a weighted fusion algorithm to comprehensively calculate the multi-source data, thereby accurately determining the fault level and fault type, eliminating false alarms, and integrating scattered information to make the fault determination results more objective and accurate.

[0119] Step S400: Based on the fault level, a graded repair strategy is matched to generate a repair instruction, which is then directly sent to the corresponding target level module to perform an autonomous repair operation.

[0120] In step S400, the core layer matches the corresponding repair strategy based on the determined fault level. Differentiated approaches, ranging from localized lightweight repair to system-level emergency repair, are adopted for different levels to avoid resource waste caused by over-repair and to prevent fault escalation due to insufficient repair. Repair commands are directly issued from the core layer to the target level module, eliminating the need for forwarding at each level. This shortens the latency from fault determination to repair execution, enabling the system to autonomously handle recoverable faults within milliseconds. This eliminates reliance on manual intervention and external diagnostic equipment, ensuring the continuity and reliability of vehicle communication in complex electromagnetic environments.

[0121] Furthermore, this application provides a vehicle equipped with the aforementioned AUTOSAR-based communication protocol stack fault self-healing system.

[0122] In summary, the AUTOSAR-based communication protocol stack fault self-healing system provided in this application has the following technical effects.

[0123] This application proposes a technical solution involving the layered deployment of multi-dimensional fault perception units, uniformly scheduled by a fault self-healing core layer. Since each layer of fault perception units can collect multi-type fault data (hardware, links, interfaces, protocols, etc.) in real time and upload it directly to the core layer through independent standardized interfaces, the multi-source data, after normalization and weighted fusion analysis, accurately determines the fault level and type. Therefore, the system can cover all hidden faults across the entire link, identify anomalies in advance, and prevent fault escalation, thus improving the comprehensiveness and accuracy of fault monitoring. Simultaneously, because the fault self-healing core layer automatically matches graded repair strategies based on fault levels and directly issues repair instructions to the target level modules, a complete closed loop of perception, location, graded repair, and verification is constructed. This allows for autonomous handling of recoverable faults without manual intervention, ensuring communication continuity and complying with ISO 26262 functional safety requirements.

[0124] Because the fault location unit traces the fault source backward based on the decision tree root cause analysis model, it can locate the fault from a general module to a specific location and root cause. Therefore, fault troubleshooting time is reduced from hours to milliseconds, significantly improving repair efficiency. Furthermore, because the repair verification and feedback unit continuously feeds repair data back to the root cause analysis model, the system's location and repair accuracy improves with accumulated operational experience. The dynamic redundancy management unit activates and releases redundant resources as needed based on fault levels. Redundant resources operate in low-power standby mode under normal conditions, quickly switch in during faults, and are released promptly after repair. Therefore, the utilization rate of redundant resources is significantly higher than in a fixed redundancy mode. At the same time, the redundant resource monitoring mechanism avoids the risk of redundancy failure, enhancing the system's fault tolerance.

[0125] Because fault data is uploaded directly and repair instructions are sent directly, the multi-level latency caused by forwarding at each level is avoided. At the same time, the core layer adopts an on-demand loading mode and dynamic resource allocation, reducing the overall memory usage. Therefore, the system meets the requirements of hard real-time while taking into account lightweight design and AUTOSAR architecture compliance. Moreover, it can be seamlessly compatible with the existing software ecosystem without modifying the application layer business logic. The technical solution has good scalability and long-term iteration capability.

[0126] It should be noted that in all specific embodiments of this application, when processing data related to user identity or characteristics, such as user information, user behavior data, user historical data, and user location information, user permission or consent is obtained first. Furthermore, the collection, use, and processing of this data comply with relevant laws, regulations, and standards of the relevant countries and regions. In addition, when embodiments of this application require access to sensitive personal information of users, separate permission or consent from the user is obtained through pop-ups or redirects to confirmation pages. Only after obtaining the user's separate permission or consent is the necessary user-related data for the proper functioning of the embodiments of this application obtained.

[0127] In some alternative embodiments, the functions / operations mentioned in the block diagrams may not occur in the order shown in the operation diagrams. For example, depending on the functions / operations involved, two consecutively shown blocks may actually be executed substantially simultaneously, or the blocks may sometimes be executed in reverse order. Furthermore, the embodiments presented and described in the flowcharts of this application are provided by way of example to provide a more comprehensive understanding of the technology. The disclosed methods are not limited to the operations and logic flows presented herein. Alternative embodiments are contemplated in which the order of various operations is changed and sub-operations described as part of a larger operation are executed independently.

[0128] Furthermore, although this application is described in the context of functional modules, it should be understood that, unless otherwise stated, one or more of the functions and / or features may be integrated into a single physical device and / or software module, or one or more functions and / or features may be implemented in a separate physical device or software module. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding this application. Rather, given the properties, functions, and internal relationships of the various functional modules in the apparatus disclosed herein, the actual implementation of the module will be understood within the scope of ordinary skill of an engineer. Therefore, those skilled in the art can implement the application set forth in the claims using ordinary skill. It is also understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of this application, which is determined by the full scope of the appended claims and their equivalents.

[0129] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several programs to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0130] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequential list of executable programs for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, a program execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can retrieve and execute a program from or in conjunction with such a program execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can mean any means that can contain, store, communicate, propagate, or transmit a program for use by or in conjunction with a program execution system, apparatus, or device.

[0131] More specific examples (a non-exhaustive list) of computer-readable media include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which programs can be printed, because programs can be obtained electronically, for example, by optically scanning the paper or other media, followed by editing, interpreting, or, if necessary, processing in a suitable manner, and then stored in computer memory.

[0132] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable program execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0133] In the foregoing description of this specification, the reference to terms such as "one embodiment / implementation," "another embodiment / implementation," or "certain embodiments / implementations," etc., indicates that a specific feature, structure, material, or characteristic described in connection with an embodiment or example is included in an embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0134] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.

[0135] The above is a detailed description of the preferred embodiments of the present invention. However, the present invention is not limited to the embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention. All such equivalent modifications or substitutions are included within the scope defined by the claims of the present invention.

Claims

1. A communication protocol stack fault self-healing system based on AUTOSAR, characterized in that, include: The fault self-healing core layer is deployed between the service layer and the RTE layer in the AUTOSAR CP standard layered architecture. The fault self-healing core layer is directly connected to the MCAL layer, ECU abstraction layer and service layer through independent standardized interfaces, and indirectly connected to the application layer through the RTE layer interface. The fault perception unit is set in the MCAL layer, the ECU abstraction layer and the service layer. The fault perception unit is used to collect fault data of the layer in real time and upload it directly to the fault self-healing core layer through an independent standardized interface, so that the fault self-healing core layer can obtain the fault data of the MCAL layer, the ECU abstraction layer and the service layer. The fault self-healing core layer includes a data fusion sensing unit and a hierarchical self-healing unit; The data fusion sensing unit is used to receive fault data uploaded by the MCAL layer, the ECU abstraction layer and the service layer, perform multi-source fusion analysis on the fault data, and then determine the fault level and fault type. The hierarchical self-repair unit is used to match the hierarchical repair strategy according to the fault level, generate repair instructions, and directly send the repair instructions to the corresponding target level module to perform autonomous repair operations.

2. The AUTOSAR-based communication protocol stack fault self-healing system according to claim 1, characterized in that, The data fusion sensing unit includes a data receiving subunit, a data fusion subunit, and an anomaly detection subunit; The data receiving subunit is used to receive fault data uploaded by the MCAL layer, the ECU abstraction layer and the service layer through three independent standardized interfaces respectively; The data fusion subunit is used to normalize each fault parameter in the fault data to a unified numerical range in order to eliminate the dimensional differences between fault parameters at different levels, and to perform weighted fusion calculation on the normalized multi-source fault data to obtain the fused fault value. The anomaly determination subunit is used to determine the fault level to which the fused fault value belongs based on a preset grading threshold, and to determine the fault type in combination with the fault parameter features in the fault data.

3. The AUTOSAR-based communication protocol stack fault self-healing system according to claim 1, characterized in that, The fault self-healing core layer also includes a fault precise location unit; The fault precise location unit includes a root cause analysis subunit and a location report generation subunit; The root cause analysis subunit pre-stores the association database of each layer module of AUTOSAR, which is used to trace the source of the fault in reverse through the decision tree root cause analysis model, using the fault level, the fault type and the fault parameters as input, and then locate the specific location and root cause of the fault. The location report generation subunit is used to generate a standardized location report based on the specific location and root cause of the fault. The standardized location report includes the fault level, fault type, fault location and root cause, and transmits the standardized location report to the hierarchical self-repair unit to provide a basis for repair for the hierarchical self-repair unit.

4. The AUTOSAR-based communication protocol stack fault self-healing system according to claim 1, characterized in that, The fault self-healing core layer also includes a repair verification and feedback unit; The repair verification and feedback unit is used to monitor the operation data of each module in real time during the repair process, adjust the monitoring cycle according to the fault level, and compare the monitoring data with the preset repair success threshold of the corresponding fault level to determine whether the repair is successful. When the repair is determined to be successful, the repair verification and feedback unit releases redundant resources according to the fault level and generates a repair success report; When the repair fails, the repair verification and feedback unit triggers a secondary repair and generates a repair failure report; The repair verification and feedback unit also inputs the fault data, repair strategies and repair results during the repair process into the root cause analysis model, thereby optimizing the parameters of the root cause analysis model.

5. The AUTOSAR-based communication protocol stack fault self-healing system according to claim 1, characterized in that, The fault self-healing core layer also includes a dynamic redundancy management unit; The dynamic redundancy management unit is used to monitor the operating status of backup links, redundant modules and redundant data in real time, and then determine whether redundant resources are available. The dynamic redundancy management unit is also used to dynamically enable redundant resources according to the fault level: when the fault level is a minor fault, redundant resources are not enabled; when the fault level is a general fault, partial redundant resources are enabled; when the fault level is a severe fault, partial redundant resources are enabled; and when the fault level is a fatal fault, full redundant resources are enabled. The dynamic redundancy management unit is also used to release redundant resources according to the fault level after the repair verification and feedback unit determines that the repair is successful, thereby avoiding the invalid occupation of redundant resources.

6. The AUTOSAR-based communication protocol stack fault self-healing system according to claim 1, characterized in that, The fault perception unit set in the MCAL layer includes a frame loss monitoring subunit, a bus load monitoring subunit, and a hardware fault monitoring subunit. The frame loss monitoring subunit, the bus load monitoring subunit, and the hardware fault monitoring subunit collect at least one of the following data in real time according to a preset collection cycle: frame loss rate, bus load rate, bus level, and controller operating status of the CAN FD bus. When the monitored data exceeds a preset threshold, the fault perception unit uploads the fault data to the fault self-healing core layer through a standardized interface to trigger the fault self-healing core layer to determine the fault.

7. The AUTOSAR-based communication protocol stack fault self-healing system according to claim 1, characterized in that, The MCAL layer also includes redundant control units; The redundancy control unit includes a link switching subunit and a module redundancy control subunit. The redundancy control unit controls the link switching switch through GPIO pins. Upon receiving the redundancy switching command issued by the fault self-healing core layer, the link switching subunit switches the primary and backup CAN FD links, and the module redundancy control subunit starts or stops the redundant CAN Driver module, thereby providing underlying hardware support for fault repair.

8. The AUTOSAR-based communication protocol stack fault self-healing system according to claim 1, characterized in that, The fault perception unit set in the ECU abstraction layer includes an interface anomaly monitoring unit; The interface anomaly monitoring unit includes an interface call monitoring subunit and a data forwarding monitoring subunit. The interface call monitoring subunit and the data forwarding monitoring subunit collect data through the interface function call log of the CAN IF module to monitor interface call anomalies and data forwarding anomalies. The interface anomaly monitoring unit counts the interface call success rate and data forwarding latency to determine whether the interface is abnormal. When an interface anomaly is detected, the interface anomaly monitoring unit uploads the anomaly data to the fault self-healing core layer and receives the interface restart command issued by the fault self-healing core layer, and then calls the interface reset function to restart the interface to complete the interface anomaly repair.

9. The AUTOSAR-based communication protocol stack fault self-healing system according to claim 1, characterized in that, The fault perception unit set up in the service layer includes a protocol anomaly monitoring unit; the service layer also sets up a data verification and optimization unit; The protocol anomaly monitoring unit includes a protocol timing monitoring subunit and a frame format monitoring subunit. The protocol timing monitoring subunit and the frame format monitoring subunit collect protocol frame transmission timing and frame format data through the protocol processing function of the CAN TP module, and monitor at least one protocol anomaly among timing timeout, frame format error or segmented transmission failure. When a protocol anomaly is detected, the protocol anomaly monitoring unit uploads the abnormal data to the fault self-healing core layer and receives the protocol parameter adjustment instruction issued by the fault self-healing core layer. Then, it calls the protocol parameter setting interface to modify the protocol configuration in order to complete the protocol anomaly repair. The data verification optimization unit includes a CRC verification subunit and an adaptive verification subunit. The CRC verification subunit and the adaptive verification subunit use a dual mechanism of CRC verification and adaptive verification to perform data verification. When the data length is less than or equal to a preset threshold, only the CRC verification subunit is activated to perform CRC verification. When the data length is greater than the preset threshold, the adaptive verification subunit is automatically activated to adjust the verification precision according to the data type. When a verification error occurs, frame retransmission is triggered, and the verification error information is uploaded to the fault self-healing core layer to reduce the data transmission error rate.

10. A vehicle, characterized in that, The vehicle is equipped with an AUTOSAR-based communication protocol stack fault self-healing system as described in any one of claims 1 to 9.