A multi-module fault-tolerant control in-vehicle device CAN instruction analysis method

By constructing an instruction semantic feature library and monitoring network status in real time, combined with LSTM to predict load changes, and dynamically adjusting the CAN bus fault tolerance strategy, the problems of uneven resource allocation and response lag in traditional methods are solved, and efficient and flexible fault-tolerant control of vehicles under high load environments is achieved.

CN120547018BActive Publication Date: 2025-11-07XIANGHE JIANGTUO TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510780470.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-12
Publication Date
2025-11-07
Estimated Expiration
2045-06-12

AI Technical Summary

Technical Problem

Traditional CAN bus fault-tolerant control methods cannot flexibly cope with the fault tolerance requirements of different types of commands under high load and electromagnetic interference environments, resulting in uneven resource allocation and response lag, which affects the real-time performance and safety of the vehicle.

Method used

By constructing an instruction semantic feature library, monitoring network status parameters in real time, dynamically generating comprehensive fault tolerance weights, and combining long short-term memory networks to predict load changes, the fault tolerance strategy can be dynamically adjusted. Urgent instructions are prioritized during high loads, and local topology reconstruction and fault isolation are performed.

Benefits of technology

It improves the accuracy and response speed of command parsing in vehicles under high load and interference environments, ensures the timely processing of critical commands, and enhances the overall responsiveness and safety of the vehicle system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120547018B_ABST
    Figure CN120547018B_ABST
Patent Text Reader

Abstract

The application relates to the field of vehicle CAN communication and discloses a multi-module fault-tolerant control in-vehicle equipment CAN instruction analysis method, which comprises the steps of monitoring a bus state in real time, constructing an instruction semantic feature library, dynamically adjusting a fault-tolerant weight and the like. The method flexibly adjusts a fault-tolerant level by combining an instruction semantic and a network state, automatically optimizes system resource distribution, and thus effectively reduces an instruction misjudgment rate under a high load and an interference environment. Compared with a traditional static redundancy and a fixed threshold method, the dynamic fault-tolerant mechanism of the application can respond in advance when a bus load suddenly increases, preferentially guarantees rapid analysis of key instructions, avoids delay of a traditional passive response through edge scene prediction and preloading of a fault-tolerant mode, and significantly improves real-time performance and safety of the system.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to a multi-module fault-tolerant control in-vehicle device CAN command parsing method, belonging to the technical field of vehicle CAN communication. BACKGROUND

[0002] As a key communication platform in automotive electronic systems, the vehicle CAN bus is widely used in various control devices of vehicles, such as engine control, brake system, and automatic driving modules, etc. Its main function is to realize real-time data transmission and command parsing between control modules to ensure the normal operation of various functions of the vehicle. However, with the increasing intelligence of vehicles, the CAN bus faces more and more complex communication environment and real-time requirements, and the traditional fault-tolerant control method cannot meet the needs of modern vehicles in high load, interference and multi-module collaborative work.

[0003] The prior art usually adopts static redundancy check and fixed threshold error detection mechanism to ensure the reliability of CAN command parsing. These methods set fixed fault-tolerant threshold and error detection standard to deal with error conditions in the network. However, when the network load increases or instantaneous electromagnetic interference occurs, the fixed fault-tolerant mechanism often cannot adapt flexibly, and always uses the same fault-tolerant standard to handle different types of commands. This leads to the fact that some critical commands may be misjudged or delayed in processing under high load and interference environment, thereby affecting the real-time response capability of the vehicle.

[0004] In addition, traditional methods usually only focus on the data integrity of commands in the transmission process and the verification process of commands, while ignoring the semantic differences of commands. For example, brake control commands should have higher fault-tolerant priority, while ordinary air conditioning query commands can be appropriately delayed. Since the prior art fails to dynamically adjust the fault-tolerant strategy according to the type and timeliness of the command, the resource allocation is unreasonable, resulting in waste of bus bandwidth and lag of system response.

[0005] In order to solve the above problems, the industry tries to introduce more complex redundancy mechanisms and hardware backup designs to ensure fault-tolerant capability under high load. However, this method increases hardware cost and response delay, and does not fundamentally solve the contradiction between dynamic load and fault-tolerant demand, and still has the problems of insufficient fault-tolerant capability and uneven resource allocation. Therefore, we need to achieve more efficient and flexible dynamic adjustment in fault-tolerant strategy and resource allocation to better cope with the challenges of future intelligent vehicles. SUMMARY

[0006] The present application provides a multi-module fault-tolerant control in-vehicle device CAN command parsing method, which mainly aims to solve the problems of insufficient fault-tolerant capability and uneven resource allocation, thereby achieving more efficient and flexible dynamic adjustment in fault-tolerant strategy and resource allocation.

[0007] To achieve the above object, the application provides a multi-module fault-tolerant control in-vehicle equipment CAN instruction analysis method, comprising the following steps:

[0008] Real-time monitoring of network state parameters of the CAN bus of the in-vehicle equipment, wherein the network state parameters at least include bus load rate and error frame occurrence rate ;

[0009] Constructing an instruction semantic feature library containing instruction operation types and security levels;

[0010] Based on the instruction semantic feature library, logical weights are given to the current CAN instruction to be analyzed , wherein the logical weights represent the importance of the instruction;

[0011] According to the real-time monitored network state parameters, network state weights are dynamically generated , wherein the network state weights reflect the congestion degree and error risk of the current bus environment;

[0012] Using a dynamic weight fusion mechanism, the fusion proportion of the logical weights and the network state weights is adaptively adjusted according to the historical error rate, and the comprehensive fault-tolerant weight of the current CAN instruction to be analyzed is calculated , wherein, , is a first adaptive coefficient, is a second adaptive coefficient, both of which are adaptively adjusted based on the historical error rate and satisfy the constraint condition ;

[0013] Based on the comprehensive fault-tolerant weight , the fault-tolerant level of the current CAN instruction to be analyzed is dynamically determined, and the corresponding instruction analysis operation is performed according to the fault-tolerant level.

[0014] Preferably, it further comprises an edge scenario prediction step, specifically: based on the historical bus load rate data within a preset time window, the load rate trend of the CAN bus in a future preset time period is predicted using a long short-term memory network model; when it is predicted that the bus load rate will exceed a preset threshold, the fault-tolerant level of the CAN instruction related to the preset security level threshold is advanced to a preset level, and the preset security level threshold is used to distinguish high security level instructions from low security level instructions.

[0015] Preferably, the method further comprises a logic topology dynamic reconstruction step, specifically: when it is detected that the number of error instructions sent by any module in the vehicle to the CAN bus continuously exceeds a preset threshold within a preset time, triggering a local logic topology reconstruction, and dynamically switching the forwarding path of the key instructions originally sent by the module to the sending of the preset backup module.

[0016] Preferably, the method further comprises a dynamic adjustment step of priority based on instruction semantics, specifically: identifying the type of the current CAN instruction to be parsed according to the correspondence between the preset instruction type and priority in the instruction semantic feature library; for the CAN instruction identified as a control type instruction, a higher sending priority is given to the CAN instruction identified as a control type instruction in the bus arbitration stage to ensure that it is processed first.

[0017] Preferably, the logic topology dynamic reconstruction step further comprises a fault isolation operation, specifically: after the switching of the module that continuously sends error instructions, temporarily isolating the CAN bus communication of the module to prevent the CAN bus communication of the module from interfering with the normal communication of other modules, and the isolation includes switching the communication path of the module to an independent virtual channel.

[0018] Preferably, the historical error rate refers to the number of cyclic redundancy check errors and bit padding errors counted within a preset sliding time window, used to measure the frequency of errors occurring during data transmission or storage.

[0019] Preferably, in the dynamic weight fusion mechanism, for instructions with a security level higher than a security level threshold, the proportion of the logic weight of the security instruction in the calculation of the comprehensive fault tolerance weight is realized by adjusting the first adaptive coefficient and the second adaptive coefficient , so that the value of the first adaptive coefficient corresponding to the instruction with a security level higher than the security level threshold is greater than the value of the first adaptive coefficient corresponding to the instruction with a security level lower than the security level threshold.

[0020] Preferably, the method further comprises a dynamic preemption mechanism based on instruction timeliness, specifically: presetting timeliness levels for different types of CAN instructions, wherein the timeliness level of the control type instruction is the highest; when an instruction with a timeliness level higher than a preset timeliness level threshold needs to be sent, if the current bus is transmitting an instruction with a timeliness level lower than the preset timeliness level threshold, interrupting the current transmission, preferentially sending the instruction with a timeliness level higher than the preset timeliness level threshold, and subsequently resuming the transmission of the interrupted instruction, and the resuming of the transmission of the interrupted instruction includes reserving breakpoint information.

[0021] Preferably, the interrupting current transmission, preferentially sending the instruction of the time effectiveness level higher than the preset time effectiveness level threshold, and in the subsequent process of resuming the transmission of the interrupted instruction, a non-destructive preemption manner is adopted for processing.

[0022] Preferably, the first adaptive coefficient and the second adaptive coefficient The adjustment strategy is realized based on the following formula: , wherein, is the current error frame occurrence rate, is the preset error frame occurrence rate threshold.

[0023] Compared with the problems in the background art, the beneficial effects of the present application are:

[0024] 1. By introducing the dual weight model of instruction semantics and bus state, the importance of each CAN instruction and the network environment in which it is located are evaluated in real time. Compared with the traditional fault-tolerant scheme which relies on static redundancy and fixed threshold and cannot effectively deal with sudden network congestion or electromagnetic interference, leading to instruction misjudgment under high load, the present application dynamically fuses the instruction semantic weight and the network state weight, so that the system can flexibly adjust the fault-tolerant strategy and automatically optimize the fault-tolerant level on the basis of real-time monitoring of bus load, error frame occurrence rate and other parameters, thereby reducing the instruction misjudgment rate under high load and interference environment.

[0025] 2. By introducing the edge scene prediction mechanism, the prediction of bus load rate mutation is realized, and the high-priority fault-tolerant mode is activated in advance. The prediction of future bus load changes is realized by using a time series analysis model (such as LSTM), which can respond before the network load suddenly increases, avoiding the fault-tolerant delay caused by the sudden increase of load in the traditional scheme. In the case of emergency (such as multiple sensors working together in the automatic driving mode), the system can preferentially guarantee the rapid response of critical instructions, such as automatically activating double CRC verification and increasing the priority of instruction retransmission, thereby avoiding the performance degradation caused by the hysteresis of fault-tolerant strategy switching, ensuring that emergency instructions can be analyzed in a timely and accurate manner, and thus improving the overall response capability and safety of the intelligent vehicle system.

[0026] 3. When the vehicle-mounted system fails, local topology adjustment can be automatically performed when the module error lasts for more than a threshold, switching the instruction forwarding path from the main control module to the backup module, so that the vehicle-mounted system can quickly recover to normal working state through software-defined way when a fault occurs, avoiding the high cost and response delay caused by the dependence on hardware backup in traditional redundant design, avoiding the influence of single point failure on the overall performance of the system, and ensuring the high reliability and long-term stability of the vehicle-mounted system.

[0027] 4. By presetting time-effectiveness labels (such as emergency braking instructions, window control instructions, etc.) for CAN instructions, combining semantic time-effectiveness with network resource allocation, the problem of high-priority instructions being blocked by low-priority instructions caused by the "first-come-first-served" mechanism in traditional CAN systems is solved. In particular, when the vehicle-mounted network load is high, the system can prioritize instructions with high time-effectiveness, ensuring that emergency instructions such as brake signals are not delayed due to network congestion, and through a non-destructive preemption mechanism, low-priority instructions can retain their transmission position after being interrupted and resume sending when conditions permit, thereby avoiding repeated transmission and data loss and improving the utilization of bus bandwidth. BRIEF DESCRIPTION OF DRAWINGS

[0028] Figure 1 The overall flowchart of the multi-module fault-tolerant control in-vehicle equipment CAN instruction parsing method of the present application.

[0029] Figure 2 The work flowchart of the time-effectiveness dynamic preemption mechanism of the present application.

[0030] Figure 3 The overall architecture diagram of the intelligent fault-tolerant system of the present application.

[0031] The purpose of the present application, functional features and advantages will be further described with reference to the accompanying drawings. DETAILED DESCRIPTION

[0032] It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application.

[0033] The embodiment of the present application provides a multi-module fault-tolerant control in-vehicle equipment CAN instruction parsing method, comprising the following steps:

[0034] Real-time monitoring of network state parameters of in-vehicle equipment CAN bus, the network state parameters at least include bus load rate And error frame occurrence rate ; The bus load rate L is used to reflect the data flow size on the current CAN bus, which is calculated by the ratio of the amount of effective data transmitted on the bus in unit time to the maximum transmission capacity of the bus; The error frame occurrence rate E is used to measure the error degree of the data transmitted on the bus, which is determined by the ratio of the number of error frames detected in unit time to the total number of frames; Real-time acquisition of these network state parameters provides the basis for subsequent fault-tolerant control;

[0035] An instruction semantic feature library is constructed, which contains instruction operation types and security levels. The instruction operation types cover control instructions of various in-vehicle devices, such as engine speed regulation instructions, brake instructions, and vehicle light control instructions. The security levels are divided according to the influence of the instructions on the vehicle driving safety and system stability, such as high security level instructions (such as brake control instructions, steering control instructions, etc.), medium security level instructions (such as window lifting instructions, air conditioning regulation instructions, etc.), and low security level instructions (such as entertainment system volume regulation instructions, etc.). The instruction semantic feature library provides basic data for subsequent importance evaluation and fault tolerance level determination of CAN instructions.

[0036] Based on the instruction semantic feature library, a logical weight is assigned to the current CAN instruction to be analyzed , which represents the importance of the instruction. The assignment of the logical weight takes into account the security level and operation type of the instruction. Instructions with high security level and critical operation type are assigned a higher logical weight, while instructions with low security level and non-critical operation type are assigned a lower logical weight. For example, the logical weight of the brake control instruction can be set to 0.9, while the logical weight of the entertainment system volume regulation instruction can be set to 0.1.

[0037] According to the real-time monitoring of the network state parameters, a network state weight is dynamically generated , which reflects the congestion degree and error risk of the current bus environment. The calculation formula of the network state weight is: =f(L,E), where f is a function that comprehensively evaluates the bus load rate L and the error frame occurrence rate E. When the bus load rate L is high and the error frame occurrence rate E is large, the network state weight increases, indicating that the current bus environment is poor and the fault tolerance demand is high. Conversely, when the bus load rate L is low and the error frame occurrence rate E is small, the network state weight decreases, indicating that the current bus environment is good and the fault tolerance demand is low.

[0038] A dynamic weight fusion mechanism is adopted to adaptively adjust the fusion proportion of the logical weight and the network state weight according to the historical error rate, and the comprehensive fault tolerance weight of the current CAN instruction to be analyzed is calculated , where , is the first adaptive coefficient, is the second adaptive coefficient, which are adaptively adjusted based on the historical error rate and satisfy the constraint condition Historical error rate refers to the number of cyclic redundancy check errors and bit stuffing errors counted within a preset sliding time window, used to measure the frequency of errors occurring during data transmission or storage; by dynamically adjusting the values ​​of α and β, the overall fault tolerance weight is adjusted. It can better reflect the fault tolerance requirements of current instructions in different network environments;

[0039] Based on the aforementioned comprehensive fault tolerance weight The fault tolerance level of the current CAN instruction to be parsed is dynamically determined, and the corresponding instruction parsing operation is performed according to the fault tolerance level; based on the comprehensive fault tolerance weight... The size range is divided into different fault tolerance levels, such as high fault tolerance level ( >0.8), medium fault tolerance level (0.5< ≤0.8) and low fault tolerance level ( (≤0.5). For instructions with high fault tolerance levels, a more stringent fault tolerance strategy is adopted, such as adding redundant checks and using more complex error correction algorithms; for instructions with low fault tolerance levels, a relatively simple fault tolerance strategy is adopted to improve instruction parsing efficiency.

[0040] Preferably, the edge scene prediction step is further included, specifically: based on the historical bus load rate data within a preset time window, the long short-term memory network model is used to predict the load rate trend of the CAN bus in a future preset time period; when it is predicted that the bus load rate will exceed the preset threshold, the fault tolerance level of the CAN command related to the preset safety level threshold is advanced to the preset level, and the preset safety level threshold is used to distinguish between high safety level commands and low safety level commands. In the edge scene prediction part, a long short-term memory (LSTM) model is used to predict the trend of the future bus load rate. LSTM is a special recurrent neural network (RNN) that can effectively capture long-term dependencies when processing time series data. Compared with traditional neural network models, LSTM can solve the problem of easy forgetting of long-term information in the training process of ordinary RNN, and considering that the fluctuations of the load rate of the vehicle CAN bus are often affected by multiple factors such as electromagnetic interference, network congestion, etc., these factors usually have time sequence and dynamic characteristics. Therefore, the LSTM model is selected to predict the trend of the bus load rate in a future period of time. Through historical load rate data, LSTM can effectively capture the change rule of the load rate and predict the future load situation. When the system detects that the load rate may exceed the preset threshold, the LSTM model can respond in advance to improve the fault tolerance level of high-priority commands to ensure that emergency commands (such as brake control commands) can be processed first, thereby ensuring the stability and real-time performance of the system under high load conditions. Here, the application of LSTM not only improves the prediction ability of the vehicle system for load changes, but also avoids the risks caused by delayed response in traditional methods by adjusting the fault tolerance strategy in advance, further improving the response speed and reliability of the system, which are all known to those skilled in the art.

[0041] Preferably, the logic topology dynamic reconstruction step is further included, specifically: when it is detected that any module in the vehicle continuously sends a number of error commands to the CAN bus exceeding a preset threshold within a preset time, a local logic topology reconstruction is triggered, and the forwarding path of the key command originally sent by the module is dynamically switched to be sent by a preset backup module. In addition, the logic topology dynamic reconstruction step further includes a fault isolation operation, which temporarily isolates the CAN bus communication of the module after the module that continuously sends error commands is switched to prevent it from interfering with the normal communication of other modules. The isolation includes switching the communication path of the module to an independent virtual channel. Through logic topology dynamic reconstruction and fault isolation, the influence of the faulty module on the entire system is effectively avoided, and the fault tolerance and reliability of the system are improved.

[0042] Preferably, the method further comprises a priority dynamic adjustment step based on instruction semantics, specifically: according to the preset correspondence between instruction types and priorities in the instruction semantic feature library, the type of the current CAN instruction to be parsed is identified; for the CAN instruction identified as a control type instruction, a higher sending priority is given to it in the bus arbitration stage to ensure that it is processed first. For example, the priorities of emergency control type instructions such as brake control instructions and steering control instructions can be set to the highest, and the priorities of non-emergency control type instructions such as window lifting instructions can be set to be lower. By dynamically adjusting the sending priority of the instruction, the timely transmission and processing of key instructions are ensured, and the real-time performance and response speed of the system are improved.

[0043] Preferably, the logic topology dynamic reconstruction step further comprises a fault isolation operation, specifically: after the module switching of continuously sending error instructions occurs, the CAN bus communication of the module is temporarily isolated to prevent it from interfering with the normal communication of other modules, and the isolation includes switching the communication path of the module to an independent virtual channel.

[0044] Preferably, the historical error rate refers to the number of cyclic redundancy check errors and the number of bit padding errors counted within a preset sliding time window, which is used to measure the frequency of errors occurring during data transmission or storage.

[0045] Preferably, in the dynamic weight fusion mechanism, for instructions with a security level higher than a security level threshold, the proportion of the logic weight in the calculation of the comprehensive fault tolerance weight is realized by adjusting the first adaptive coefficient and the second adaptive coefficient , so that the value of the first adaptive coefficient corresponding to the instruction with a security level higher than the security level threshold is greater than the value of the first adaptive coefficient corresponding to the instruction with a security level lower than the security level threshold.

[0046] Preferably, the method further comprises a dynamic preemption mechanism based on instruction timeliness, specifically: presetting timeliness levels for different types of CAN instructions, wherein the timeliness level of the control type instruction is the highest; when an instruction with a timeliness level higher than a preset timeliness level threshold needs to be sent, if the current bus is transmitting an instruction with a timeliness level lower than the preset timeliness level threshold, the current transmission is interrupted, the instruction with a timeliness level higher than the preset timeliness level threshold is transmitted preferentially, and the transmission of the interrupted instruction is resumed subsequently, and the resumption of the transmission of the interrupted instruction includes retaining breakpoint information.

[0047] Preferably, the current transmission is interrupted, the instruction of the time effectiveness level higher than the preset time effectiveness level threshold is transmitted preferentially, and in the process of resuming the transmission of the interrupted instruction, a non-destructive preemption manner is adopted, that is, after interrupting the low-priority instruction, the interrupt position is recorded, and after the high-priority instruction is transmitted, the interrupted low-priority instruction is continued to be transmitted from the interrupt position. Through the dynamic preemption mechanism based on the instruction time effectiveness, the transmission order of the instruction is further optimized, it is ensured that the instruction with high time effectiveness requirement can be processed in time, and the overall performance of the system is improved.

[0048] Preferably, the adjustment strategy of the first adaptive coefficient and the second adaptive coefficient is implemented based on the following formula: , wherein, is the current error frame occurrence rate, is the preset error frame occurrence rate threshold. When the current error frame occurrence rate is low, the value of a is large, indicating that the logical weight occupies a large proportion in the calculation of the comprehensive fault tolerance weight , and more emphasis is placed on the importance of the instruction itself; when the current error frame occurrence rate is high, the value of a is small, and the value of β is increased accordingly, indicating that the network state weight occupies an increased proportion in the calculation of the comprehensive fault tolerance weight , and more emphasis is placed on the fault tolerance demand of the current network environment. In addition, for the instruction with a security level higher than the security level threshold, the proportion of the logical weight in the calculation of the comprehensive fault tolerance weight is realized by adjusting the first adaptive coefficient a and the second adaptive coefficient β, so that the value of the first adaptive coefficient a corresponding to the instruction with a security level higher than the security level threshold is greater than the value of the first adaptive coefficient a corresponding to the instruction with a security level lower than the security level threshold, thereby further strengthening the fault tolerance protection of the high-security-level instruction.

[0049] Embodiment 1: In the present application, an instruction semantic feature library needs to be constructed first. This library mainly includes the operation types and security levels of the CAN instructions of the in-vehicle devices. These instruction types include control instructions, query instructions, etc., and each instruction is assigned a preliminary logical weight according to the importance of its function. Specifically, control class instructions (such as brake control) will be assigned a higher weight, while query class instructions (such as vehicle window state query) will be assigned a lower weight, as described below.

[0050]

[0051] Wherein the operation type refers to distinguishing control class (with the effect of changing behavior) and query class (only returning information); the security level refers to being divided into high / medium / low according to the influence on driving safety; the logical weight refers to being used for modeling and discriminating the instruction risk level in subsequent algorithms; the example CAN ID refers to the identifier that may appear in the real CAN communication.

[0052] The network state parameters of the CAN bus in the vehicle are monitored in real time, including the bus load rate and the error frame occurrence rate , so as to dynamically adjust the parsing priority of the instruction. The bus load rate represents the percentage of the bandwidth used by the network in the total bandwidth, and the error frame occurrence rate represents the proportion of error frames on the bus.

[0053] The bus load rate , for example, a typical 500kbps CAN bus, frame 1 length: 128bit, frequency: 100frames / s, frame 2 length: 64bit, frequency: 200frames / s, total bandwidth: 500000bit / s, then the total used bandwidth=(128×100)+(64×200)=12800+12800=25600bit / s, bus load rate𝐿L=25600 / 500000=0.0512=5.12%;

[0054] The total frame number is 10000 frames, and the error frame (CRC + bit padding) is 150 frames, so the error frame occurrence rate E=150 / 10000=0.015=1.5%;

[0055] The network state weight is dynamically calculated according to the following formula:

[0056] ,

[0057] Wherein, is a function based on the network state, and the specific form can be:

[0058] ,

[0059] Wherein, is the first adjusted adaptive coefficient, is the second adjusted adaptive coefficient, both of which are adjusted according to the historical error rate to ensure that the change of the network state can directly affect the calculation of the weight.

[0060] The first adjusted adaptive coefficient and the second adjusted adaptive coefficient are automatically adjusted based on historical data, to ensure that the influence of the network state and the semantic weight of the instruction combined.

[0061] If the network state is good, i.e. =0.7, =0.3, then W2=0.7L+0.3E, substituting the above data:

[0062] W2=0.7×0.0512+0.3×0.015=0.03584+0.0045=0.04034;

[0063] In this embodiment, the logic weight and the network state weight The fusion mechanism is dynamic and automatically adjusts the fusion ratio according to the historical error rate, which is calculated by the number of cyclic redundancy check (CRC) errors and bit padding errors.

[0064] The comprehensive fault tolerance weight The specific calculation formula is:

[0065] ,

[0066] wherein, and are the coefficients adjusted according to the historical error rate, and the specific adjustment strategy is as follows:

[0067] ,

[0068] wherein, is the current error frame occurrence rate, is the preset error frame occurrence rate threshold. The adjustment strategy ensures that in high load and high error environment, the system can prioritize the analysis of critical instructions, while responding to false positives in high load situations.

[0069] Specific examples are as follows:

[0070]

[0071] Assume that the semantic weight of an instruction is a high priority instruction:

[0072] =0.9 (for example, brake control instruction), =0.3 (current network state is poor), =0.1

[0073] If the network state is good, i.e.

[0074] , β=0.1, then

[0075] At this time, the system still handles it as a high-priority instruction.

[0076] If the network state is not good, i.e. Ecurr=0.09,

[0077] , β=0.1,

[0078] Although it is semantically important, the system reduces its parsing priority because of network anomalies.

[0079] When the error frame rate is low, the system relies more on W1, i.e. judging the priority according to the instruction semantics;

[0080] When the error frame rate is high, the system reduces its trust in W1 and relies more on the current network state W2;

[0081] This reflects the dynamic adjustment of semantic trust degree; α, β ∈ [0, 1] can be maintained through the cutting mechanism to prevent invalid weight allocation.

[0082] To avoid the lag of fault-tolerant strategies in high-load or burst interference environments, this embodiment introduces an edge scenario prediction function based on a long short-term memory network (LSTM). This function predicts the future load rate trend through historical bus load rate data within a preset time window. When the system predicts that the bus load rate will exceed the preset threshold in the future, the system will advance the fault-tolerant level of high-priority CAN instructions to a preset level to ensure that emergency instructions can be processed first. This function not only avoids the delayed response problem in traditional methods, but also effectively improves the real-time performance and safety of the vehicle-mounted system.

[0083] When it is detected that a module continuously sends error instructions exceeding a preset threshold, the system will trigger local logical topology reconstruction and dynamically switch the forwarding path of the instructions. For example, critical instructions originally sent by the faulty module will be switched to the backup module to avoid system performance degradation. Further, when a fault occurs, the system will temporarily isolate the module through a virtual channel to prevent it from affecting the communication of other modules. This dynamic reconstruction method greatly improves the fault-tolerant capability of the vehicle-mounted system and avoids system crashes caused by hardware failures.

[0084] To cope with the timeliness requirements of different types of instructions, the system also introduces a timeliness dynamic preemption mechanism. This mechanism dynamically adjusts the priority according to the timeliness level of each CAN instruction (such as emergency braking instructions, window control instructions, etc.). When a high-priority instruction needs to be sent, if the current bus is transmitting a low-priority instruction, the current transmission will be interrupted, and the high-priority instruction will be sent first. After the interruption, the low-priority instruction will record the interruption point and continue to send from the interruption point after the high-priority instruction is processed. This preemption mechanism can ensure the rapid response of emergency instructions and maximize the use of vehicle bus bandwidth.

[0085] Embodiment 2: This embodiment aims to further detail the technical solutions of the present application in conjunction with the accompanying drawings.

[0086] Referring to Figure 1 , the figure is a whole flow chart describing the in-vehicle equipment CAN instruction analysis method of the multi-module fault-tolerant control proposed by the present application, the core fault-tolerant control process starts from the step of monitoring the network state in real time, followed by the step of constructing the instruction semantic feature library. Subsequently, the system will generate a logical weight for the CAN instruction, and generate a network state weight according to the network state. These two weights will be used for dynamic weight fusion to calculate the comprehensive fault-tolerant weight, and finally realize the dynamic adjustment of the fault-tolerant level of the CAN instruction. In this process, there are two parallel enhancement mechanisms, which are edge scenario prediction and timeliness dynamic preemption mechanism. In the edge scenario prediction branch, the system will predict the load surge and adjust the fault-tolerant mode, and dynamically reconstruct the logical topology according to the prediction result, which is specifically manifested as switching to the backup module when a module fails. In the timeliness dynamic preemption mechanism branch, the system will preempt according to the priority. Finally, regardless of which branch the processing goes through, the instruction will complete the step of completing the instruction analysis.

[0087] Referring to Figure 2 , the figure details the working flow chart of the timeliness dynamic preemption mechanism. The whole process starts with the generation of a user instruction, which is sent to the CAN bus through the action of sending the instruction to the CAN bus. Subsequently, the CAN bus performs the operation of putting the instruction into the sending queue, putting the instruction into the sending queue. Suppose there is a low-priority instruction waiting to be sent in the queue at this time. When a high-priority instruction needs to be sent, the system will trigger the emergency instruction preemption mechanism. At this time, the high-priority instruction will be sent first, and the low-priority instruction will enter the low-priority instruction waiting state through the action of high-priority instruction priority sending. After the high-priority instruction is sent, the low-priority instruction will continue to send to the CAN bus through the action of low-priority instruction resuming sending. Finally, the CAN bus completes the transmission of all instructions, and informs the user that the instruction sending is complete through the action of completing the instruction transmission.

[0088] Referring to Figure 3 , the figure shows the overall architecture of the intelligent fault-tolerant system proposed by the present application. The system is mainly composed of two core modules: fault-tolerant decision model and intelligent fault-tolerant system, and works collaboratively through a double-weight collaborative mechanism. The fault-tolerant decision model internally contains three key components: logical weight calculation, network weight prediction, and comprehensive weight generation. The intelligent fault-tolerant system contains four key components: + bus load rate monitoring, + error rate statistics, + semantic feature library construction, and + dynamic weight fusion. The fault-tolerant decision model interacts with the intelligent fault-tolerant system through invocation, and together realizes the multi-module fault-tolerant control of the in-vehicle device CAN instruction analysis.

[0089] Example 3: This example adopts a multi-module fault-tolerant control mechanism based on CAN bus, which dynamically adjusts the parsing priority of instructions by monitoring the network state parameters of in-vehicle devices in real time, to cope with challenges such as high load and electromagnetic interference. In this process, the key technical implementation paths include the construction of instruction semantic feature library, real-time weight calculation, historical error rate evaluation, etc.

[0090] First, by monitoring the network state parameters of the in-vehicle device CAN bus in real time, including the bus load rate and the error frame occurrence rate , the congestion degree and error risk of the current network environment are reflected. The calculation method of the network state weight is as follows:

[0091] ,

[0092] wherein, is the bus load rate, indicating the proportion of network bandwidth usage; E is the error frame occurrence rate, indicating the proportion of error frames on the bus. Coefficients and are coefficients that are adaptively adjusted according to historical error rates, and satisfy the condition:

[0093] ,

[0094] Through this formula, we can dynamically calculate the current network state weight according to the changes of the network environment, and then affect the adjustment of the instruction parsing priority. And the logical weight of the instruction is pre-set by the instruction semantic feature library, and the priority and safety level of the instruction type directly determine its corresponding weight. By classifying the instructions, control class instructions (such as brake control) are assigned higher weights, while query class instructions are assigned lower weights.

[0095] Combining the network state weight and the logical weight , the comprehensive fault-tolerant weight The calculation formula is as follows:

[0096] ,

[0097] Wherein, and are adaptive coefficients, representing the relative proportion of network state and instruction importance in weight calculation. Coefficients and will be dynamically adjusted according to historical error rate to ensure that the priority of critical instructions is guaranteed in high load and high error environment.

[0098] To solve the problem that the traditional fault-tolerant mechanism cannot effectively deal with sudden network load, the embodiment introduces an edge scenario prediction function. The long short-term memory network (LSTM) is used to analyze the historical bus load rate, and predict the load change in the future preset time period. When it is predicted that the load rate will exceed the preset threshold, the system will adjust the fault tolerance level of high-priority instructions in advance, so as to ensure that emergency instructions can be parsed in time, and the risk caused by delayed response is avoided. In order to further improve the response ability of the vehicle-mounted network, the time-sensitive dynamic preemption mechanism is added in the embodiment. Different types of CAN instructions are assigned different priorities according to their time-sensitive levels. If the current bus is transmitting low-priority instructions, and high-priority instructions need to be sent, the system will interrupt the current transmission and process high-priority instructions first. The interrupted low-priority instructions will record the interruption position, and continue to send from the interruption position after the high-priority instruction transmission is completed. This mechanism ensures that emergency instructions such as brake signals can be responded quickly, while avoiding the loss of low-priority instructions. And when it is detected that a module continuously sends error instructions exceeding the preset threshold, the system will trigger local logical topology reconstruction, switching the forwarding path of critical instructions from the faulty module to the backup module. In addition, to prevent the faulty module from continuing to affect the communication of other modules, the system will temporarily isolate the faulty module to ensure the normal operation of the vehicle-mounted system, which all belong to the extended embodiments known to those skilled in the art.

[0099] It is obvious to those skilled in the art that the present application is not limited to the details of the above exemplary embodiments, and the present application can be implemented in other specific forms without departing from the spirit or essential characteristics of the present application.

[0100] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application and are not limiting. Although the present application has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present application can be modified or replaced by equivalents without departing from the spirit and scope of the present application.

Claims

1. A multi-module fault-tolerant control in-vehicle device CAN command parsing method, characterized in that, The method comprises the following steps: Real-time monitoring of network status parameters of a CAN bus of in-vehicle equipment, the network status parameters including at least bus load rate and error frame occurrence rate ; constructing an instruction semantic feature library comprising instruction operation types and security levels; assign a logic weight to the current CAN instruction to be parsed based on the instruction semantic feature library , the logic weight representing an importance degree of the instruction According to the network state parameters monitored in real time, network state weights are dynamically generated The network state weights reflect the congestion degree and error risk of the current bus environment. Adopting a dynamic weight fusion mechanism, a fusion proportion of a logic weight and a network state weight is adaptively adjusted according to a historical error rate, and a comprehensive fault-tolerant weight of the current CAN instruction to be parsed is calculated wherein, , is a first adaptive coefficient, is a second adaptive coefficient, both of which are adaptively adjusted based on a historical error rate and satisfy a constraint condition ; based on the integrated fault-tolerant weight dynamically determine a fault-tolerant level of the current CAN instruction to be resolved, and perform a corresponding instruction resolution operation according to the fault-tolerant level.

2. The multi-module fault-tolerant control in-vehicle equipment CAN instruction resolution method according to claim 1, characterized in that, The method further comprises an edge scenario prediction step, specifically: based on historical bus load rate data within a preset time window, a long short-term memory network model is used to predict the load rate trend of the CAN bus in a future preset time period; when it is predicted that the bus load rate will exceed a preset threshold, the fault tolerance level of the CAN instruction related to the preset security level threshold is advanced to a preset level, and the preset security level threshold is used to distinguish between high security level instructions and low security level instructions.

3. The multi-module fault-tolerant control in-vehicle equipment CAN instruction analysis method according to claim 1, characterized in that, The method further comprises a logical topology dynamic reconstruction step, specifically: when it is detected that any module in the vehicle continuously sends a number of error instructions to the CAN bus exceeding a preset threshold within a preset time, a local logical topology reconstruction is triggered, and the forwarding path of the key instruction originally sent by the module is dynamically switched to the backup module.

4. The multi-module fault-tolerant control in-vehicle equipment CAN instruction analysis method according to claim 1, characterized in that, The method further comprises an instruction semantic-based priority dynamic adjustment step, specifically: according to the correspondence between the instruction type and the priority in the instruction semantic feature library, the type of the CAN instruction to be analyzed is identified; for the CAN instruction identified as a control class instruction, a higher sending priority is given to the CAN instruction identified as a control class instruction in the bus arbitration stage to ensure that it is processed first.

5. The multi-module fault-tolerant control in-vehicle equipment CAN instruction resolution method according to claim 3, characterized in that, The logical topology dynamic reconstruction step further comprises a fault isolation operation, specifically: after the module that continuously sends error instructions is switched, the CAN bus communication of the module is temporarily isolated to prevent the CAN bus communication of the module from interfering with the normal communication of other modules, and the isolation includes switching the communication path of the module to an independent virtual channel.

6. The multi-module fault-tolerant control in-vehicle equipment CAN instruction analysis method according to claim 1, characterized in that, The historical error rate refers to the number of cyclic redundancy check errors and bit padding errors counted within a preset sliding time window, which is used to measure the frequency of errors occurring during data transmission or storage.

7. The multi-module fault-tolerant control in-vehicle equipment CAN instruction analysis method according to claim 1, characterized in that, In the dynamic weight fusion mechanism, for instructions with a security level higher than the security level threshold, the proportion of the logical weight of the instructions with the security level higher than the security level threshold in the comprehensive fault tolerance weight calculation is realized by adjusting a first adaptive coefficient and a second adaptive coefficient , so that the value of the first adaptive coefficient corresponding to the instructions with the security level higher than the security level threshold is greater than the value of the first adaptive coefficient corresponding to the instructions with the security level lower than the security level threshold.

8. The multi-module fault-tolerant control in-vehicle equipment CAN instruction analysis method according to claim 1, characterized in that, The method further comprises a dynamic preemption mechanism based on instruction timeliness, specifically: different types of CAN instructions are preset with timeliness levels, and the timeliness level of the control class instruction is the highest; when an instruction with a timeliness level higher than a preset timeliness level threshold needs to be sent, if the current bus is transmitting an instruction with a timeliness level lower than the preset timeliness level threshold, the current transmission is interrupted, the instruction with a timeliness level higher than the preset timeliness level threshold is transmitted first, and the transmission of the interrupted instruction is resumed later, and the resumption of the interrupted instruction transmission includes retaining breakpoint information.

9. The multi-module fault-tolerant control in-vehicle equipment CAN instruction resolution method according to claim 8, characterized in that, In the process of interrupting the current transmission, transmitting the instruction with a timeliness level higher than the preset timeliness level threshold first, and resuming the transmission of the interrupted instruction later, a non-destructive preemption mode is adopted.

10. The multi-module fault-tolerant control in-vehicle equipment CAN instruction analysis method according to claim 1, characterized in that, First adaptive coefficient Second adaptive coefficient The adjustment strategy is based on the following formula: ,in, This represents the current error frame occurrence rate. This is the preset threshold for the error frame occurrence rate.

Citation Information

Patent Citations

  • Vehicle-mounted equipment data transmission and interaction method based on CAN network

    CN119945829A

  • Internet access service optimization method and system for adaptive bandwidth management

    CN120110919A