High-voltage relay early fault diagnosis method and computer program product

By constructing a hybrid neural network model that combines rule-based feature neural networks and original signal neural networks, and utilizing knowledge distillation technology, the problem of lag in early fault diagnosis of high-voltage relays is solved. This enables dynamic modeling of the operating status of high-voltage relays and accurate early warning of faults, thereby improving the reliability and adaptability of the system.

CN122017548APending Publication Date: 2026-05-12DONGFENG MOTOR CO LTD DONGFENG NISSAN PASSENGER VEHICLE CO
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
DONGFENG MOTOR CO LTD DONGFENG NISSAN PASSENGER VEHICLE CO
Filing Date
2026-02-13
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing high-voltage relay diagnostic methods cannot effectively capture early potential fault characteristics such as slow degradation of switching characteristics and slight changes in contact resistance, resulting in delayed warnings and a lack of adaptive adjustment capabilities under complex operating conditions, which easily leads to false alarms and missed alarms.

Method used

A hybrid neural network model is adopted. By acquiring historical fault data of high-voltage relays and historical data of vehicle bus, a regular feature neural network and a raw signal neural network are constructed. Knowledge distillation technology is used for training. The outputs of the two neural networks are fused to realize dynamic modeling of the operating status of high-voltage relays and early fault warning.

Benefits of technology

It enables accurate identification of early faults in high-voltage relays, improves the accuracy of fault warning and system reliability, reduces the reliance on labeling a large number of early fault samples, and enhances adaptability under complex operating conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122017548A_ABST
    Figure CN122017548A_ABST
Patent Text Reader

Abstract

The invention discloses a high-voltage relay early fault diagnosis method and a computer program product, and the method comprises the steps: obtaining the historical fault data of a high-voltage relay and the historical data of a vehicle bus, carrying out the rule characterization processing of the historical fault data, and obtaining the rule feature data, training by adopting rule feature data and vehicle bus historical data to obtain a hybrid neural network model, obtaining current data of a high-voltage relay and real-time data of a vehicle bus, inputting the current data and the real-time data of the vehicle bus into the hybrid neural network model to obtain a fault early warning signal, and obtaining a fault early warning result by fusing rule features and multi-source bus data. Dynamic modeling of the operation state of the high-voltage relay is achieved, early degradation characteristics such as contact resistance micro change and action delay can be captured, model training and prediction can be completed without labeling of a large number of early fault samples, the defects that early warning is lagged in a traditional threshold method, and machine learning depends on labeled data are overcome, and the accuracy of early warning is improved. And the early fault identification precision and the system reliability are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of high-voltage relays, and in particular to a method for early fault diagnosis of high-voltage relays and a computer program product. Background Technology

[0002] With the development of new energy vehicles, high-voltage relays, as key execution and protection components, directly determine the safety and stability of the vehicle's high-voltage architecture. Currently, diagnostic methods based on rule-based thresholds or traditional machine learning models are commonly used. This involves monitoring the switching time, voltage, and current parameters of the high-voltage relay and comparing them with preset thresholds, or using historical fault data to train a classification model to detect and alarm for obvious faults.

[0003] However, existing rule-based thresholding methods rely on fixed thresholds, failing to capture early potential fault characteristics such as slow degradation of switching characteristics and minute changes in contact resistance, leading to delayed warnings. Furthermore, models based on historical faults depend on training with large amounts of manually labeled data, while early fault data is scarce and difficult to obtain in practice. Existing technologies also lack adaptive adjustment capabilities under complex operating conditions, making them prone to false alarms and missed alarms. Summary of the Invention

[0004] The purpose of this application is to overcome the above-mentioned problems and provide a method for early fault diagnosis of high-voltage relays and a computer program product.

[0005] The technical solution of this application provides a method for early fault diagnosis of high-voltage relays, including:

[0006] Acquire historical fault data of high-voltage relays and historical vehicle bus data related to the historical operating status of high-voltage relays; The historical fault data of the high-voltage relay is subjected to rule-based feature processing to obtain rule-based feature data; A hybrid neural network model is trained using the rule feature data and the vehicle bus historical data; The current data of the high-voltage relay and the real-time data of the vehicle bus are acquired, and the current data of the high-voltage relay and the real-time data of the vehicle bus are input into the hybrid neural network model to obtain a fault warning signal.

[0007] Furthermore, the step of training a hybrid neural network model using the rule feature data and the vehicle bus historical data specifically includes: Construct a rule-based feature neural network and a raw signal neural network; Determine the original bus data based on the vehicle bus historical data; The rule feature data is input into the rule feature neural network for training to obtain the trained rule feature neural network and soft target labels. The original bus data is input into the original signal neural network for training, and knowledge distillation is performed based on the soft target label to obtain the trained original signal neural network. The hybrid neural network model is determined based on the trained rule-feature neural network and the trained original signal neural network.

[0008] Furthermore, determining the original bus data based on the vehicle bus historical data specifically includes: The high-voltage relay fault detection signal in the vehicle bus historical data is selected as the fault list trigger signal; Based on the fault list trigger signal, determine the fault list supplementary signal related to its attributes, category, naming, and feedback relationship; Acquire real vehicle environment signals, and use the fault list trigger signal, the fault list supplement signal, and the real vehicle environment signals as raw bus data.

[0009] Furthermore, the construction of the rule-based feature neural network includes: initializing the gated recurrent unit network and establishing the rule-based feature neural network; The step of inputting the rule feature data into the rule feature neural network for training specifically includes: Perform data preprocessing on the rule feature data; The rule feature neural network is trained using the preprocessed rule feature data; The rule feature data is predicted by the trained rule feature neural network to obtain the rule prediction probability; The rule feature neural network loss is determined based on the predicted probability and the true label of the rule. If the loss of the rule-based feature neural network is less than the preset rule loss, then the training of the rule-based feature neural network is complete, and the rule prediction probability is used as the soft target label.

[0010] Furthermore, the construction of the original signal neural network includes: initializing the convolutional neural network to establish the original signal neural network; The step of inputting the raw bus data into the raw signal neural network for training and performing knowledge distillation based on the soft target label specifically includes: The raw bus data is preprocessed. The original signal neural network is trained using the preprocessed raw bus data; The original bus data is predicted by the trained original signal neural network to obtain the original prediction probability; The distillation loss is determined based on the soft target label and the original predicted probability; The original predicted loss is determined based on the original predicted probability and the original true label. The original signal neural network comprehensive loss is obtained by multiplying the distillation loss by the first preset weight and adding the original predicted loss by the second preset weight. If the overall loss of the original signal neural network is less than a preset original loss threshold, the training of the original signal neural network is complete; otherwise, the parameters of the original signal neural network are adjusted based on the overall loss of the original signal neural network.

[0011] Furthermore, the step of determining the hybrid neural network model based on the trained rule-feature neural network and the trained original signal neural network also includes: The rule feature data with the true labels of the rules are input into the trained rule feature neural network to obtain the confidence score of the rule feature neural network; The raw bus data with the original real labels is input into the trained raw signal neural network to obtain the confidence level of the raw signal neural network. The dynamic fusion weights of the hybrid neural network model are determined based on the confidence scores of the rule-feature neural network and the original signal neural network. The regular feature neural network and the original signal neural network are weighted and fused according to the dynamic fusion weights to obtain a hybrid neural network model.

[0012] Furthermore, before obtaining the hybrid neural network model, the process also includes: Obtain the model accuracy of the hybrid neural network model; If the model accuracy reaches a preset accuracy threshold, the training ends, and the hybrid neural network model is obtained. If the accuracy of the model does not reach the preset accuracy threshold, the regular feature neural network and the original signal neural network will be retrained.

[0013] Furthermore, the rule-based feature processing of the historical fault data of the high-voltage relay specifically includes: Obtain the expected threshold data that corresponds one-to-one with the historical fault data of the high-voltage relay; Based on the one-to-one deviation between the historical fault data of the high-voltage relay and the expected threshold data, rule feature data is generated.

[0014] Furthermore, after obtaining the fault warning signal, the process also includes: The contribution of each input data in the rule feature data and the vehicle bus historical data is obtained according to the hybrid neural network model; If the contribution of the input data is greater than or equal to a preset contribution threshold, then the input data is marked as a key feature; Repair display suggestions are generated based on the key features.

[0015] The technical solution of this application also provides a storage medium that stores computer instructions, which, when executed by a computer, are used to perform a high-voltage relay early fault diagnosis method as described in any of the preceding claims.

[0016] The technical solution of this application also provides an electronic device, including at least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, which enables the at least one processor to perform a high-voltage relay early fault diagnosis method as described above.

[0017] The technical solution of this application also provides a computer program product, including a computer program / instructions, which, when executed by a processor, implements a high-voltage relay early fault diagnosis method as described in any of the preceding claims.

[0018] The above technical solution has the following beneficial effects: This application discloses a method for early fault diagnosis of high-voltage relays, comprising: acquiring historical fault data of high-voltage relays and historical data of vehicle bus; performing regular feature processing on the historical fault data to obtain regular feature data; training a hybrid neural network model using the regular feature data and historical data of vehicle bus; acquiring current data of high-voltage relays and real-time data of vehicle bus, and inputting them into the hybrid neural network model to obtain a fault warning signal. By fusing regular features and multi-source bus data, dynamic modeling of the operating state of high-voltage relays is realized, which can capture early degradation features such as slight changes in contact resistance and action delay. Model training and prediction can be completed without the need for labeling a large number of early fault samples, overcoming the shortcomings of traditional threshold method warning lag and machine learning relying on labeled data, and improving the accuracy of early fault identification and system reliability. Attached Figure Description

[0019] The disclosure of this application will become more readily understood with reference to the accompanying drawings. It should be understood that these drawings are for illustrative purposes only and are not intended to limit the scope of protection of this application. In the drawings: Figure 1 This is a flowchart of a high-voltage relay early fault diagnosis method in one embodiment of this application; Figure 2This is a flowchart of a high-voltage relay early fault diagnosis method according to one of the preferred embodiments of this application; Figure 3 This is a flowchart illustrating the process of training a rule-based feature neural network in one embodiment of this application; Figure 4 This is a flowchart illustrating the process of training a neural network for the original signal in one embodiment of this application; Figure 5 This is a flowchart illustrating the process of determining a hybrid neural network model in one embodiment of this application; Figure 6 This is a flowchart of a software algorithm in one embodiment of this application; Figure 7 This is a flowchart of the software algorithm in a preferred embodiment of this application; Figure 8 This is a schematic diagram of the hardware structure of an electronic device in one embodiment of this application. Detailed Implementation

[0020] The specific embodiments of this application will be further described below with reference to the accompanying drawings.

[0021] It is readily understood that, based on the technical solution of this application, various structural and implementation methods can be interchanged by those skilled in the art without altering the essential spirit of this application. Therefore, the following detailed embodiments and accompanying drawings are merely illustrative examples of the technical solution of this application and should not be considered as the entirety of this application or as limitations or restrictions on the technical solution of the application.

[0022] The directional terms such as up, down, left, right, front, back, front, back, top, and bottom mentioned or possibly used in this specification are defined relative to the structures shown in the accompanying drawings. These are relative concepts and may therefore vary depending on their location and usage. Therefore, these or other directional terms should not be interpreted as restrictive. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0023] In the description of this application, it should be noted that, unless otherwise expressly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to fixed connections, detachable connections, or integral connections; they can refer to mechanical connections or electrical connections; they can refer to direct connections or indirect connections through an intermediate medium; and they can refer to the internal connection between two components. Those skilled in the art can understand the specific meanings of the above in this application according to the specific circumstances.

[0024] like Figure 1The flowchart shown is a process diagram of a high-voltage early fault diagnosis method according to an embodiment of this application, including: S101: Acquire historical fault data of high-voltage relays and historical vehicle bus data related to the historical operating status of high-voltage relays; S102: Perform rule-based feature processing on the historical fault data of high-voltage relays to obtain rule-based feature data; S103: A hybrid neural network model is obtained by training regular feature data and vehicle bus historical data; S104: Obtain the current data of the high-voltage relay and the real-time data of the vehicle bus, and input the current data of the high-voltage relay and the real-time data of the vehicle bus into the hybrid neural network model to obtain the fault warning signal.

[0025] Specifically, in step S101, historical fault data of the high-voltage relay and historical data of the vehicle bus are first acquired. The historical fault data of the high-voltage relay is used to provide samples of known fault modes. The historical data of the vehicle bus is related to the historical operating state of the high-voltage relay. It can be the fault list trigger signal, which is the judgment signal when the high-voltage relay fails. It can also be a related CAN (Controller Area Network) bus signal that has similar attributes, similar categories, similar names, or has a feedback relationship with the fault list trigger signal. By acquiring these two types of data, a complete data foundation is provided for subsequent mixed feature extraction, ensuring that the model can learn the complete evolution law from normal state to fault state.

[0026] In step S102, the historical fault data of the high-voltage relay is processed by rule feature processing to obtain rule feature data. That is, the traditional diagnostic experience is transformed into quantitative features that can be recognized by machine learning. Specifically, the dispersion of parameters such as the switching time and voltage deviation of the high-voltage relay with the expected threshold is calculated to generate continuous feature values ​​between 0 and 1. The original binary judgment is transformed into a continuous quantitative description of the fault degree, so that the subsequent model can identify the gradual degradation process of the high-voltage relay performance and provide the possibility of capturing early weak fault features.

[0027] In step S103, a hybrid neural network model is trained using regular feature data and vehicle bus historical data. Specifically, a dual-path parallel hybrid network model is adopted. First, a regular feature neural network is established, which learns the temporal variation law of regular features based on GRU (Gated Recurrent Unit) network to form a teacher network. Then, an original signal neural network is established, which extracts data related to high-voltage relay faults from the vehicle bus historical data based on CNN (Convolutional Neural Network) network as a student network. Through knowledge distillation, the output of the teacher network is used as a soft target to guide the training of the student network, which effectively reduces the model's dependence on a large amount of early labeled data. Finally, through a weight adjustment algorithm, the two neural networks are merged to output a hybrid neural network model, which significantly improves the model's adaptability under different working conditions.

[0028] In step S104, the current data of the high-voltage relay and the real-time data of the vehicle bus are acquired and input into the hybrid neural network model. By comprehensively analyzing the rule features and the original signal, a quantitative risk score, which is a fault warning signal, is output. This realizes continuous monitoring of the health status of the high-voltage relay and accurate early warning of faults, providing a reliable basis for predictive maintenance.

[0029] This embodiment of a high-voltage relay early fault diagnosis method includes: acquiring historical fault data of the high-voltage relay and historical data of the vehicle bus; performing rule-based feature processing on the historical fault data to obtain rule-based feature data; training a hybrid neural network model using the rule-based feature data and historical data of the vehicle bus; acquiring current data of the high-voltage relay and real-time data of the vehicle bus, and inputting them into the hybrid neural network model to obtain a fault warning signal. By fusing rule-based features and multi-source bus data, dynamic modeling of the high-voltage relay's operating state is achieved, enabling the capture of early degradation features such as slight changes in contact resistance and action delays. Model training and prediction can be completed without the need for labeling a large number of early fault samples, overcoming the shortcomings of traditional threshold method warning lag and machine learning's reliance on labeled data, thus improving the accuracy of early fault identification and system reliability.

[0030] In one embodiment, a hybrid neural network model is trained using rule-based feature data and vehicle bus historical data, specifically including: Construct a rule-based feature neural network and a raw signal neural network; Determine the original bus data based on historical vehicle bus data; The rule feature data is input into the rule feature neural network for training, resulting in the trained rule feature neural network and soft target labels; The original bus data is input into the original signal neural network for training, and knowledge distillation is performed based on the soft target label to obtain the trained original signal neural network. The hybrid neural network model is determined based on the trained rule-feature neural network and the trained original signal neural network.

[0031] In this embodiment, a hybrid neural network model is trained using regular feature data and vehicle bus historical data. First, the original bus data is determined based on the vehicle bus historical data. The regular feature data is then input into the regular feature neural network for training, outputting the prediction results of the regular features and their corresponding soft target labels. These soft target labels reflect the probability distribution information of the regular feature neural network for each feature category, providing guidance for subsequent distillation learning. The original bus data is then input into the original signal neural network for training, and knowledge distillation is performed based on the soft target labels. This allows the original signal neural network to not only focus on the feature differences of the input signal itself during the learning process but also learn the thinking patterns of the regular feature neural network, thereby improving the generalization ability of the original signal neural network in early fault identification. Finally, the hybrid neural network model is determined based on the trained regular feature neural network and the trained original signal neural network, fusing the output results of the two neural networks. Structurally, this achieves synergistic optimization of temporal variations and frequency domain features, simultaneously considering both regular feature data and original bus data, and realizing adaptive weight allocation.

[0032] Specifically, soft target labels are not discrete category markers, but rather probability distributions of category predictions output by a trained rule-based feature neural network for input samples. They simultaneously reflect the relative probability and uncertainty information between different fault categories. Compared to hard labels that only contain a single correct category, soft target labels retain the empirical bias and confidence level of the rule-based feature neural network in the judgment process, containing richer diagnostic prior information.

[0033] This embodiment overcomes the limitations of traditional single-model diagnostic methods, which rely on a single source of information and have limited feature representation capabilities, by deeply fusing the regular feature domain with the original signal domain. It introduces a knowledge distillation mechanism, which allows the knowledge of the regular feature neural network to be transferred to the original signal neural network. The original signal neural network can learn the knowledge contained in the regular feature data, thereby reducing the reliance on manually labeled data. The subsequently fused hybrid neural network model has stronger early degradation recognition capabilities and noise resistance, and can maintain high prediction accuracy under different operating environments and vehicle conditions, effectively improving the early fault warning performance of high-voltage relays.

[0034] In one embodiment, determining the original bus data based on vehicle bus historical data specifically includes: The signals used to determine high-voltage relay faults in the historical data of the vehicle bus are selected as the fault list trigger signals. Based on the fault list trigger signals, determine the fault list supplementary signals related to their attributes, categories, naming, and feedback relationships; Acquire real vehicle environment signals, and use the fault list trigger signal, fault list supplement signal, and real vehicle environment signals as raw bus data.

[0035] In this embodiment, the original bus data includes fault list trigger signals, fault list supplementary signals, and real-vehicle environment signals. The original bus data is determined based on historical vehicle bus data, including the precise selection of core signals for high-voltage relay fault diagnosis from the historical data. These serve as fault list trigger signals, providing direct evidence for high-voltage relay fault determination. Subsequently, by analyzing their attributes, categories, naming rules, and command feedback relationships within the vehicle system, a series of fault list supplementary signals are associated and expanded. This enriches the data dimensions, capturing collaborative signals that are indirectly or directly related to the core fault and contain important early warning information. Finally, real-vehicle environment signals are also acquired, including current vehicle speed, mileage, ambient temperature, battery temperature, and door status, providing crucial data for subsequent diagnostic models and offering a more comprehensive reflection of the high-voltage relay's operating status and environment.

[0036] This embodiment acquires fault list trigger signals and related fault list supplementary signals, enabling the system to detect early fault signals that are not identifiable by the core trigger signals and have complex correlations, thus achieving earlier warnings. By introducing real vehicle environmental signals, the adaptability of the diagnostic model under different operating conditions is enhanced, allowing the model to learn and understand the impact of factors such as ambient temperature and vehicle speed on the performance of high-voltage relays. This effectively distinguishes whether performance degradation is related to environmental fluctuations, reducing false alarms and missed alarms in complex scenarios. It provides a stable data foundation for building a highly generalizable diagnostic system that can adapt to different vehicle configurations and user driving habits.

[0037] As an example, if the fault list trigger signal includes the power battery current, the power battery current message is Battery_Pack_Status_Message (battery pack information message). The extended selection signal of the same message, that is, the signal of the same category, is HV_Bus_Current (battery high voltage bus current); the extended selection signal with the same unit or similar semantics, that is, the signal with the same attribute, is Battery_Max_Chg_Current (battery maximum charging current); the extended selection signal with command or feedback relationship is Charge_Current_Req (battery charging current request); and the extended selection signals with similar names are Motor_Current (motor current) and DCDC_Current (DC-DC converter current).

[0038] If the fault list trigger signal includes motor voltage, the motor voltage message is Motor_Status_Info (motor status information message). The extended selection signal of the same message, that is, the signal of the same category, is Motor_Speed ​​(motor speed); the extended selection signal with the same unit or similar semantics, that is, the signal with the same attribute, is DCDC_Input_Voltage (DC-DC converter input voltage); the extended selection signal with command or feedback relationship is Motor_Discharge_Req (motor voltage discharge request); and the extended selection signal with similar names is Motor_DischargeVoltage (motor discharge voltage).

[0039] Specifically, "same attribute" refers to the related signals maintaining consistency in physical quantities, such as having the same unit of measurement, being voltage or current signals. These signals in high-voltage systems originate from the same electrical circuit, adjacent electrical nodes, or are affected by the same control logic. Their changing trends are consistent or strongly correlated in time sequence, thus jointly reflecting the same type of operating state or abnormal characteristics. "Same category" refers to signals belonging to the same type of parameter in terms of electrical function or monitoring object, such as those used to characterize the voltage or current state in a high-voltage circuit. Once the main relay is triggered, fast-charging relays of the same category that are related to it in electrical structure and function will also be included in the analysis scope, and their corresponding voltage or current signals will be included as supplementary signals for subsequent processing.

[0040] Extended selection signals with command or feedback relationships refer to signals in the vehicle control and high-voltage system control logic that have a command-response, control-feedback, or status feedback relationship with the fault list trigger signals. These signals may differ from the trigger signals in terms of physical quantity type, but they directly participate in the same control closed loop in functional logic. For example, they are used to characterize the controller's intention to adjust target voltage, current, or operating state, or to provide feedback on the actual response of the executing components to the command. When a trigger signal malfunctions, the related command or feedback signals typically show synchronous changes or abnormal deviations. Therefore, introducing them as extended selection signals helps to reveal the cause and evolution of the fault from the control link level.

[0041] Similar-named extended selection signals refer to signals whose names contain the same or similar keywords in different control modules, functional units, or messages, and are used to characterize the same or highly related electrical quantities, operating states, or controlled objects. These signals originate from different ECUs or CAN messages, but have consistent or similar meanings in system design semantics. For example, similar names for motor speed include motor voltage, motor current, and motor discharge voltage. When the fault list trigger signal becomes abnormal, similarly named extended selection signals often exhibit similar trends or related characteristics in the time series. Including them helps to enhance the characterization ability of the same fault phenomenon from multiple sources, improving the model's stability and robustness in identifying abnormal patterns.

[0042] In one embodiment, determining a fault list supplement signal related to its attributes, category, naming, and feedback relationship based on the fault list trigger signal further includes: The fault list trigger signal and fault list supplement signal are differentiated according to vehicle model configuration.

[0043] In this embodiment, the fault list trigger signal and fault list supplement signal are differentiated by vehicle model configuration, which can achieve unified format and compatibility of fault data across different vehicle models. Because different vehicle models differ in vehicle bus architecture, CAN message format, signal naming methods, and fault attribute field definitions, the same type of fault may correspond to different CANIDs, signal bit widths, or trigger logic in different vehicle models. Without vehicle model differentiation, this can lead to problems such as incorrect interpretation of fault signals, abnormal fault attribute matching, and even false alarms or missed alarms.

[0044] This embodiment introduces vehicle model configuration differentiation, enabling unified parsing of fault list trigger signals and fault list supplement signals across different vehicle models. This allows for consistent management of fault attributes, fault categories, signal naming, and feedback relationships across different vehicle models, improving the reusability and scalability of fault data across different vehicle platforms. It also enables the same algorithm to adapt to multiple vehicle architectures, significantly reducing deployment costs.

[0045] In another embodiment, constructing a rule-based feature neural network includes: initializing a gated recurrent unit network and establishing a rule-based feature neural network; The rule feature data is input into the rule feature neural network for training, specifically including: Perform data preprocessing on the rule feature data; The rule feature neural network is trained using the preprocessed rule feature data; The rule prediction probability is obtained by predicting the rule feature data through the trained rule feature neural network; The loss of the rule-feature neural network is determined based on the rule-predicted probability and the rule's true label. If the loss of the rule-based feature neural network is less than the preset rule loss, the training of the rule-based feature neural network is complete, and the rule prediction probability is used as the soft target label; otherwise, the parameters of the rule-based feature neural network are adjusted based on the loss of the rule-based feature neural network.

[0046] In this embodiment, constructing a rule-based feature neural network includes initializing a gated recurrent unit (GRU) network to establish the rule-based feature neural network; inputting rule-based feature data into the rule-based feature neural network for training; firstly, preprocessing the rule-based feature data, such as outlier removal, normalization, and time series segmentation, to ensure the stability of the input data; then training the rule-based feature neural network using the preprocessed rule-based feature data, enabling it to learn the historical operating patterns and potential degradation characteristics of high-voltage relays in the rule-based feature data; after training, using the trained rule-based feature neural network to predict the rule-based feature data, obtaining the rule prediction probability, and calculating the rule prediction result with the rule true label to determine the rule-based feature neural network loss; when the rule-based feature neural network loss is less than the preset rule loss, that is, the rule-based feature neural network loss reaches the preset rule convergence condition, it is determined that the rule-based feature neural network has fully learned, and the rule-based feature neural network training is complete; if the rule-based feature neural network loss does not reach the preset rule loss, iterative training continues until the rule-based feature neural network loss converges to the preset threshold, and then the rule prediction probability is used as the soft target label, thereby ensuring that the model fully learns the historical operating patterns and potential degradation characteristics of high-voltage relays.

[0047] This embodiment introduces a gated recurrent unit (GRU) network, which can effectively capture the temporal changes in the historical fault data of high-voltage relays. It can reflect the trend of parameter changes better than traditional neural networks, and can capture the early abnormal features of high-voltage relays, laying the foundation for knowledge distillation of subsequent hybrid models.

[0048] Specifically, rule-based feature neural networks need to perform rule-based feature processing and data preprocessing on the rule-based feature data so that the network model can focus on learning the key degradation patterns and typical fault evolution laws summarized by humans during the training process, thereby having stronger interpretability and stability.

[0049] The original signal neural network directly uses the original CAN signal collected by the vehicle bus as input. Instead of performing manual rule extraction or feature selection, it retains the temporal structure and multidimensional information of the original signal and automatically completes feature extraction and pattern learning through the convolutional neural network.

[0050] The two neural network models complement each other in terms of feature sources, information representation, and applicable scenarios, providing a reliable foundation for subsequent confidence-based dynamic fusion, thereby improving the overall accuracy and robustness of early fault diagnosis of high-voltage relays.

[0051] In one embodiment, the loss of the rule feature neural network is determined based on the rule prediction probability and the rule's true label, specifically including: The loss of the rule-feature neural network is determined by the following formula: ; Where CrossEntropyLossA is the loss function of the regular feature neural network, and N is the number of samples. Let be the true rule label for the i-th sample. Predict the probability of the i-th sample according to the rules.

[0052] The cross-entropy loss function can effectively measure the prediction error of the regular feature neural network, giving the training process a clear optimization objective. By minimizing this loss, the regular feature neural network can learn key patterns and potential degradation laws in historical data, improving the accuracy of early fault identification in high-voltage relays and laying the foundation for subsequent distillation learning of the original signal neural network and construction of hybrid neural network models.

[0053] In this context, the true label is typically represented using one-hot encoding. This means that each sample's actual class is represented by a vector, with the vector length equal to the number of classes. Positions corresponding to the class are set to 1, and all other positions are 0. Therefore, in cross-entropy calculations, although it is multiplied by the predicted probability, it is not itself a probability distribution, but rather a label identifying the sample's true class. The rule-predicted probability... The probability distribution output by the rule-based feature neural network is used to calculate the cross-entropy loss with the true label. The true label is different from the predicted probability. The true label is a discrete category identifier, while the predicted probability is a probability distribution. The cross-entropy loss function is used to calculate the two, comparing the deterministic distribution of the true label with the probability distribution predicted by the model, thereby quantifying the prediction error. This allows the rule-based feature neural network to learn the potential degradation patterns in historical data through gradient descent.

[0054] In one embodiment, constructing the original signal neural network includes: initializing the convolutional neural network and establishing the original signal neural network; The raw bus data is input into the raw signal neural network for training, and knowledge distillation is performed based on soft target labels, specifically including: Perform data preprocessing on the raw bus data; The original signal neural network is trained using the preprocessed raw bus data; The original bus data is predicted by the trained original signal neural network to obtain the original prediction probability; The distillation loss is determined based on the soft target label and the original predicted probability; The original predicted loss is determined based on the original predicted probability and the original true label. The original signal neural network comprehensive loss is obtained by multiplying the distillation loss by the first preset weight and adding the original predicted loss by the second preset weight. If the overall loss of the original signal neural network is less than the preset original loss threshold, the training of the original signal neural network is complete; otherwise, the parameters of the original signal neural network are adjusted based on the overall loss of the original signal neural network.

[0055] In this embodiment, the construction of the original signal neural network first initializes the convolutional neural network (CNN) to establish the original signal neural network. The original bus data is then input into the original signal neural network for training, and knowledge distillation is performed based on soft target labels. The original bus data is preprocessed, such as through signal denoising, time synchronization, or feature scaling. The preprocessed original bus data is then used to train the original signal neural network, enabling it to learn the mapping relationship from complex original bus data to fault states. The trained original signal neural network predicts the original bus data to obtain the original prediction probability. The soft target labels from the regular feature neural network are then calculated with the original prediction probability to obtain the distillation loss. The predicted original loss is determined based on the original prediction probability and the original true label. The distillation loss is multiplied by a first preset weight, and then multiplied by the predicted original loss by a second preset weight to obtain the comprehensive loss of the original signal neural network. If the comprehensive loss of the original signal neural network is less than a preset original loss threshold, the original signal neural network is considered to have completed training; otherwise, the parameters of the original signal neural network are adjusted based on the comprehensive loss.

[0056] Predictive raw loss refers to the loss formed by constraining the original signal neural network based on the original true labels. Specifically, it measures the degree of deviation between the original predicted probability output by the original signal neural network and the original true labels. By introducing predictive raw loss, the original neural network can maintain its ability to fit the true fault labels throughout the training process, avoiding the bias or accumulated error that can occur when the model relies solely on the soft target labels output by the regular feature neural network.

[0057] Meanwhile, distillation loss is used to characterize the difference in prediction results between the original signal neural network and the regular feature neural network. It is a soft objective constraint that guides the original signal neural network to learn the stable fault discrimination knowledge and implicit correlations extracted from the regular feature neural network. Compared with supervision methods that rely solely on hard labels, soft objective labels can carry information about the relative relationships between categories, enabling the original signal neural network to have better generalization ability in complex working conditions and imbalanced sample scenarios.

[0058] In this context, soft-target labels provide more informative supervisory signals to the original signal neural network during knowledge distillation. Generated by a pre-trained regular feature neural network, these labels do not output a single discrete category but rather represent the model's fine-grained judgment of samples as a probability distribution of each fault category. Compared to hard labels composed solely of true labels, soft-target labels reflect the relative similarity between categories and the flexible changes in decision boundaries, enabling the original signal neural network to learn the discriminative logic and hidden knowledge of the regular feature neural network during training.

[0059] Furthermore, by weighting and fusing the distillation loss and the predicted original loss according to preset weights, a comprehensive loss of the original signal neural network is constructed, allowing the model training to be guided by both real labels and rule knowledge. Specifically, the first preset weight is used to adjust the proportion of rule feature neural network knowledge transfer in the comprehensive loss, and the second preset weight is used to adjust the proportion of real labels in the comprehensive loss. The sum of the two is 1, thus ensuring the numerical scale stability of the comprehensive loss and giving it a clear physical meaning.

[0060] A preset initial loss threshold is used as a criterion for determining the convergence of the original signal neural network training. It measures whether the overall prediction error of the original signal neural network in the current training phase has been reduced to an acceptable range. When the overall loss of the original signal neural network is less than this preset initial loss threshold, it indicates that the model, under the combined effect of real label supervision constraints and rule-based feature knowledge guidance constraints, has basically completed the learning of fault discrimination features, and the prediction results tend to stabilize. Therefore, training can be considered complete. The preset initial loss threshold can be set based on historical training data, sample size, or fault category complexity, or it can be determined through multiple experimental experiences. It only needs to reflect that the original signal neural network has achieved the expected recognition accuracy in the current application scenario. By introducing a preset initial loss threshold as a stopping condition, overtraining or ineffective iterations can be avoided, improving training efficiency and enhancing the model's generalization ability and stability in real-world operating environments.

[0061] This embodiment introduces a knowledge distillation mechanism, using a rule-based feature neural network as the teacher network. The diagnostic experience carried by this network is input into the original signal neural network through soft target labels, guiding the learning direction of the original signal neural network. This significantly reduces the model's dependence on manually labeled data, enabling the original signal neural network to have stronger classification and generalization capabilities when learning the features of the original bus data. The trained original signal neural network not only has the ability to discover faults from massive amounts of original bus data, but its decision logic is also constrained and corrected by the rule-based feature neural network, effectively avoiding overfitting problems in small sample or noisy environments. This improves the accuracy and stability of the original signal neural network in identifying early degradation signals of high-voltage relays, providing a better foundation for the subsequent fusion of hybrid neural network models.

[0062] In one embodiment, the distillation loss is determined based on the soft target label and the original predicted probability, specifically including: Distillation loss is determined by the following formula: ; in, For distillation loss, P is the probability distribution of the soft target label, Q is the original predicted probability distribution, and x is the class in the probability distribution; The smoothness of the probability distribution can also be adjusted by introducing a temperature parameter T, as shown in the following formula: ; in, For the smoothed distillation loss, T represents the distillation loss, and T is the temperature parameter.

[0063] This embodiment introduces the KLD divergence (KL formula) to calculate distillation loss. The KLD formula is used to evaluate the similarity between the probability distribution of the model output and the actual data distribution, providing a precise mathematical method to measure the difference between the two probability distributions. It can effectively quantify the similarity between the student network and the teacher network, providing a reliable optimization target for the knowledge distillation process. Subsequently, the temperature parameter T is used to control the degree of knowledge transfer, achieving a balance between maintaining the main classification information and mining the correlation between categories, thereby improving the generalization ability of the student network and laying a solid foundation for the subsequent construction of a hybrid diagnostic model.

[0064] In one embodiment, the neural network comprehensive loss of the original signal is determined based on the original predicted probability and the original true label, specifically including: The predicted original loss is determined by the following formula: ; Where CrossEntropyLossB is the original prediction loss, and M is the number of samples. Let be the original true label of the i-th sample. Let be the original predicted probability of the i-th sample.

[0065] The cross-entropy loss function can effectively measure the prediction error of the original signal neural network, that is, the prediction loss, so that the training process has a clear optimization goal. It can effectively measure the difference between the predicted probability distribution of the original signal neural network and the true label distribution, ensuring that the model learns accurate fault classification ability, and laying the foundation for the subsequent comprehensive loss calculation of the original signal neural network.

[0066] The true label is usually represented by one-hot encoding, where each sample's actual class is represented by a vector with a length equal to the number of classes. The corresponding class position is 1, and the remaining positions are 0. Therefore, in cross-entropy calculation, although it is multiplied by the predicted probability, it is not itself a probability distribution, but rather a label identifying the sample's true class. The original predicted probability... The probability distribution output by the original signal neural network is used to calculate the cross-entropy loss with the true label. The true label is different from the predicted probability. The true label is a discrete category identifier, while the predicted probability is a probability distribution. The cross-entropy loss function is used to calculate the two, comparing the deterministic distribution of the true label with the probability distribution predicted by the model, thereby quantifying the prediction error. This allows the original signal neural network to learn the potential degradation patterns in historical data through gradient descent.

[0067] In one embodiment, the sum of the distillation loss multiplied by a first preset weight and the predicted original loss multiplied by a second preset weight is used to obtain the neural network comprehensive loss of the original signal, specifically including: ; Wherein, CrossEntropyLossB is the combined loss of the original signal and the neural network. As the first preset weight, For distillation losses, As the second preset weight, To predict the original loss; The first preset weight plus the second preset weight equals 1.

[0068] This embodiment constructs a weighted comprehensive loss function, combining distillation loss and cross-entropy loss in a weighted manner to ensure the effectiveness of knowledge transfer while maintaining consistency with the true labels, thus making the model training process more stable. By setting the sum of the first and second preset weights to 1, the relative weights of the two loss terms are ensured to have clear physical meaning. The first preset weight represents the relativity of knowledge distillation in the total loss, and the second preset weight represents the relativity of supervised learning, enhancing the model's sensitivity to the distribution of real data and improving the adaptability of the original signal neural network in complex operating environments.

[0069] Among them, distillation loss It is used to measure the difference between the prediction results of the original signal neural network and the output results of the regular feature neural network. Specifically, it is expressed as the deviation between the original prediction probability output by the original signal neural network and the regular prediction probability output by the regular feature neural network. The regular prediction probability output by the regular feature neural network is the soft target label, which is used to guide the original signal neural network to move closer to the fault discrimination knowledge already learned by the regular feature neural network.

[0070] Predicting the original loss It is the prediction loss of the original signal neural network, used to measure the deviation between the original predicted probability output by the original signal neural network and the original true label. Specifically, it is the deviation between the original predicted probability and the original true label. It can be achieved by calculating the cross-entropy loss between the original predicted probability and the original true label, so as to constrain the original signal neural network's ability to fit the real data.

[0071] In another embodiment, determining the hybrid neural network model based on the trained rule-feature neural network and the trained original signal neural network further includes: The rule feature data with the true labels of the rules are input into the trained rule feature neural network to obtain the confidence score of the rule feature neural network; The raw bus data with the original real labels is input into the trained raw signal neural network to obtain the confidence level of the raw signal neural network. The dynamic fusion weights of the hybrid neural network model are determined based on the confidence scores of the rule-feature neural network and the original signal neural network. The regular feature neural network and the original signal neural network are weighted and fused according to the dynamic fusion weights to obtain a hybrid neural network model.

[0072] In this embodiment, a hybrid neural network model is determined based on the trained rule feature neural network and the trained original signal neural network. First, labeled rule feature data is input into the trained rule feature neural network to obtain its output confidence level. Simultaneously, labeled original bus data is input into the trained original signal neural network to obtain its confidence level. Then, based on the confidence evaluation results of the two neural networks, the dynamic fusion weights of the hybrid neural network model are calculated using a preset weight allocation algorithm. Finally, the rule feature neural network and the original signal neural network are weighted and fused according to the dynamic fusion weights to obtain the final hybrid neural network model.

[0073] Specifically, a dynamic fusion parameter W can be introduced for fusion output, as shown in the following formula.

[0074] ; in, The output of the hybrid neural network model. These are dynamic fusion parameters, which are less than 1 and greater than 0. This is the output of the regular feature neural network. This is the output of the original signal neural network.

[0075] This embodiment introduces a confidence-based dynamic weight fusion mechanism, enabling the hybrid model to evaluate the reliability of each neural network under different operating conditions. When a neural network has a high confidence level in its prediction results, it will receive a larger weight in the final decision, thereby significantly improving the accuracy of the diagnostic results. This fusion mechanism enhances the model's environmental adaptability and robustness. Under complex and changing operating conditions, the system can automatically adjust its dependency strategy, leveraging both the stable performance of the rule-feature neural network under typical operating conditions and the capabilities of the original signal neural network under abnormal operating conditions, effectively improving the system's prediction accuracy.

[0076] The ground truth label for each rule feature data is used to identify the actual category. In binary classification scenarios, it is typically represented by 0 / 1 to indicate normal and fault states, and in multi-class classification scenarios, it can be represented by one-hot encoding. The ground truth label serves not only as the basis for calculating the cross-entropy loss during the training of the rule feature neural network, but also as an evaluation of the confidence level of the rule feature neural network in a hybrid neural network model, thus reflecting the reliability of the neural network's prediction results for the input data.

[0077] The original ground truth labels are used to identify the actual category of each piece of raw bus data. In binary classification scenarios, they are typically represented by 0 / 1 to indicate normal and fault states, and in multi-class classification scenarios, they can be represented by one-hot encoding. The original ground truth labels are used to calculate the cross-entropy loss during the training of the original signal neural network, and also to evaluate the confidence level of the original signal neural network in the hybrid neural network model, measuring the reliability of its prediction results.

[0078] For a rule-based feature neural network, the confidence score is calculated by inputting the rule-based feature data into the trained rule-based feature neural network and taking the probability value of the category indicated by the true label of the rule in its output prediction probability distribution. This confidence score represents the degree of credibility of the rule-based feature neural network in judging the category of the sample.

[0079] For the original signal neural network, the confidence score is obtained by inputting the original bus data into the trained original signal neural network and taking the probability value of the predicted probability distribution of its output corresponding to the category indicated by the original true label as the confidence score, which reflects the credibility of the original signal neural network's prediction result for the sample.

[0080] In another embodiment, before obtaining the hybrid neural network model, the following steps are also included: Obtain the model accuracy of the hybrid neural network model; If the model accuracy reaches the preset accuracy threshold, the training ends and a hybrid neural network model is obtained. If the model accuracy does not reach the preset accuracy threshold, the regular feature neural network and the original signal neural network will be retrained.

[0081] In this embodiment, before obtaining the hybrid neural network model, it is necessary to perform a performance evaluation on the currently trained hybrid neural network model to obtain the model accuracy. The model accuracy can be determined comprehensively through indicators such as the prediction accuracy of the validation set. Then, it is determined whether the model accuracy has reached a preset accuracy threshold. If the model accuracy reaches the preset accuracy threshold, the model training is considered complete, and the final hybrid neural network model is output. If the model accuracy does not reach the preset accuracy threshold, the joint training of the regular feature neural network and the original signal neural network is carried out again. The model performance is improved by adjusting network parameters, optimizing training strategies, etc., and optimizing the feature extraction and fusion weight allocation process until the model performance meets the requirements.

[0082] This embodiment introduces a model accuracy detection and feedback training mechanism to form a closed-loop optimized model training process, effectively preventing underfitting or overfitting problems and ensuring that the hybrid neural network model has high generalization performance and diagnostic reliability under different operating conditions. By judging the model accuracy after each iteration and retraining as needed, the structure and parameters of each neural network can be dynamically adjusted to improve the performance and stability of the hybrid neural network model and enhance the accuracy of early fault identification in high-voltage relays.

[0083] In another embodiment, the historical fault data of the high-voltage relay is subjected to rule-based feature processing, specifically including: Obtain the expected threshold data that corresponds one-to-one with the historical fault data of the high-voltage relay; Based on the one-to-one correspondence between historical fault data of high-voltage relays and expected threshold data, rule-based feature data is generated.

[0084] In this embodiment, the historical fault data of the high-voltage relay is subjected to rule-based feature processing. First, expected threshold data corresponding one-to-one with the historical fault data of the high-voltage relay is obtained. Specifically, the historical fault data of the high-voltage relay can be the switching time of the high-voltage relay, the voltage of the high-voltage relay, the discharge voltage of the high-voltage relay, the power-on voltage of the high-voltage relay, and the control voltage of the high-voltage relay. The switching time of the high-voltage relay is the time of the change of the switching state of the high-voltage relay; the voltage of the high-voltage relay is the actual voltage before the change of the switching state of the high-voltage relay; the discharge voltage of the high-voltage relay is the actual voltage after the change of the switching state of the high-voltage relay during discharge; the power-on voltage of the high-voltage relay is the actual voltage after the change of the switching state of the high-voltage relay during power-on; and the control voltage of the high-voltage relay is the actual control voltage after the change of the switching state of the high-voltage relay.

[0085] By comparing the switching time of the high-voltage relay with a time threshold, the deviations of the actual voltage before and after the switching state change, the deviations of the actual voltage drop during discharge, the deviations of the actual voltage increment during power-on, and the deviations of the actual control voltage after the switching state change are all normalized and transformed into continuous feature values ​​between 0 and 1. This processing method transforms the original binary judgment into a continuous quantitative description of the fault degree, enabling the model to identify the gradual degradation process of the high-voltage relay performance and providing the possibility of capturing early, subtle fault characteristics. By acquiring expected threshold data that corresponds one-to-one with historical fault data of the high-voltage relay, and determining these threshold data based on the performance parameters of the high-voltage relay under normal conditions, regular feature data is generated based on the one-to-one deviation between the historical fault data and the expected threshold data. This involves normalizing these deviation values ​​to transform them into continuous feature values ​​between 0 and 1, ultimately generating regular feature data. This regular feature data reflects the degree of deviation of the current state of the high-voltage relay from its normal operating state, providing regularized and quantified input features for subsequent model learning.

[0086] This embodiment establishes a correspondence between historical fault data of high-voltage relays and their corresponding expected threshold data, ensuring the accuracy and traceability of the feature generation process. Each historical fault data of high-voltage relays can find its corresponding normal benchmark, providing stable feature input for subsequent model training. Furthermore, the continuous feature transformation method based on deviation values ​​can delicately describe the degree of performance degradation of high-voltage relays, transforming the originally discrete threshold judgment into a continuous abnormality assessment, significantly improving the sensitivity of early fault detection and laying a solid foundation for the stable training of subsequent hybrid neural network models.

[0087] In another embodiment, after receiving the fault warning signal, the method further includes: The contribution of each input data in the rule feature data and vehicle bus historical data is obtained based on the hybrid neural network model; If the contribution of the input data is greater than or equal to the preset contribution threshold, then the input data is marked as a key feature; Repair suggestions are generated based on key features.

[0088] After obtaining the fault warning signal, this embodiment also performs interpretability analysis on the input data based on the contribution of each input data in the rule feature data and vehicle bus historical data obtained by the hybrid neural network model. The SHAP (SHapley Additive exPlanations) model can be used, which is a model interpretability method based on Shapley values ​​in game theory, used to quantify the contribution of each feature to the prediction results of the machine learning model.

[0089] When the contribution of a certain feature is greater than or equal to a preset contribution threshold, the feature is marked as a key feature. Then, corresponding maintenance display suggestions are generated based on the key features. The maintenance display suggestions can be used for maintenance advice or to display reminders to vehicle owners, providing clear operation guidance for vehicle owners and maintenance personnel.

[0090] This embodiment introduces feature contribution analysis and key feature labeling, enabling the model to not only predict early faults but also explain the source of prediction results, achieving interpretable output. This helps identify key parameters that significantly impact the health of high-voltage relays, such as abnormal temperature rise, current fluctuations, or engagement delays, assisting engineers or maintenance personnel in quickly locating problems. Simultaneously, by generating maintenance display suggestions, the system can provide real-time alerts on potential hazard locations or recommended maintenance items on the vehicle's interface, reducing manual diagnostic time, improving operational efficiency and vehicle safety, thereby achieving a closed-loop fault management process.

[0091] As shown in the figure, a flowchart of a high-voltage relay early fault diagnosis method in one preferred embodiment of this application includes: S201: Obtain historical fault data of the high-voltage relay and historical vehicle bus data related to the historical operating status of the high-voltage relay; S202: Obtain the expected threshold data that corresponds one-to-one with the historical fault data of the high-voltage relay; S203: Generate rule-based feature data based on the one-to-one correspondence between historical fault data of high-voltage relays and expected threshold data; S204: Select the high-voltage relay fault judgment signal from the vehicle bus historical data as the fault list trigger signal; S205: Determine the fault list supplementary signals related to their attributes, categories, naming, and feedback relationships based on the fault list trigger signals; S206: Acquire real vehicle environment signals and use the fault list trigger signal, fault list supplement signal and real vehicle environment signals as raw bus data; S207: Input the regular feature data into the regular feature neural network for training to obtain the trained regular feature neural network and soft target labels; S208: Input the raw bus data into the raw signal neural network for training, and perform knowledge distillation based on the soft target label to obtain the trained raw signal neural network; S209: Determine the hybrid neural network model based on the trained rule feature neural network and the trained original signal neural network; S210: Obtain the current data of the high-voltage relay and the real-time data of the vehicle bus, and input the current data of the high-voltage relay and the real-time data of the vehicle bus into the hybrid neural network model to obtain the fault warning signal; S211: Obtain the contribution of each input data in the rule feature data and vehicle bus historical data based on the hybrid neural network model; S212: If the contribution of the input data is greater than or equal to the preset contribution threshold, then the input data is marked as a key feature; S213: Generate maintenance display suggestions based on key features.

[0092] like Figure 3 As shown, a flowchart of the training process for a rule-based feature neural network in one embodiment of this application includes: S301: Initialize the gated recurrent unit network and establish a regular feature neural network; S302: Perform data preprocessing on the rule feature data; S303: Train the rule feature neural network using the rule feature data after data preprocessing; S304: The rule feature data is predicted by the trained rule feature neural network to obtain the rule prediction probability; S305: Determine the rule feature neural network loss based on the rule prediction probability and the rule's true label; S306: If the loss of the rule feature neural network is less than the preset rule loss, the training of the rule feature neural network is complete, and the rule prediction probability is used as the soft target label; otherwise, the parameters of the rule feature neural network are adjusted based on the loss of the rule feature neural network.

[0093] like Figure 4 As shown, a flowchart of the process for training a neural network for an original signal in one embodiment of this application includes: S401: Initialize the convolutional neural network and establish the original signal neural network; S402: Perform data preprocessing on the raw bus data; S403: Train the original signal neural network using the preprocessed raw bus data; S404: The original bus data is predicted by the trained original signal neural network to obtain the original prediction probability; S405: Determine the distillation loss based on the soft target label and the original predicted probability; S406: Determine the original predicted loss based on the original predicted probability and the original true label; S407: Multiply the distillation loss by the first preset weight and add the sum of the predicted original loss multiplied by the second preset weight to obtain the original signal neural network comprehensive loss; S408: If the overall loss of the original signal neural network is less than the preset original loss threshold, the training of the original signal neural network is complete; otherwise, the parameters of the original signal neural network are adjusted based on the overall loss of the original signal neural network.

[0094] like Figure 5 As shown, in one embodiment of this application, a flowchart of the process for determining a hybrid neural network model includes: S501: Input the rule feature data with the true rule labels into the trained rule feature neural network to obtain the confidence score of the rule feature neural network; S502: Input the raw bus data with the original real labels into the trained raw signal neural network to obtain the confidence level of the raw signal neural network; S503: Determine the dynamic fusion weights of the hybrid neural network model based on the confidence scores of the rule-feature neural network and the original signal neural network; S504: The regular feature neural network and the original signal neural network are weighted and fused according to the dynamic fusion weights to obtain a hybrid neural network model; S505: Obtain the model accuracy of the hybrid neural network model; S506: If the model accuracy reaches the preset accuracy threshold, the training ends and a hybrid neural network model is obtained.

[0095] like Figure 6 As shown, a software algorithm flowchart in one embodiment of this application includes: S601: Raw signal input; S602: Feature extraction; S603: Training using a hybrid learning framework; S604: Output hybrid learning prediction model; S605: Adaptive dynamic weight adjustment; S606: Early Failure Risk Scoring Mechanism.

[0096] In step S601, the system receives multi-source raw data from the vehicle's CAN (Controller Area Network) bus, including historical fault data of the high-voltage relay, fault list trigger signals directly related to the working state of the high-voltage relay, and fault list supplementary signals associated with attributes, categories, naming, and feedback relationships. It also includes real vehicle environment signals such as vehicle speed, ambient temperature, and battery temperature, providing a complete and three-dimensional data foundation for subsequent analysis.

[0097] In step S602, the input raw signal is processed in a dual-path manner: on the one hand, based on predefined rules, the discreteness of parameters such as high voltage relay switching time and voltage deviation with the expected threshold is calculated to generate continuous feature values ​​between 0 and 1; on the other hand, feature signals related to high voltage relay fault diagnosis are screened from the raw bus data to form a feature dataset.

[0098] The S603 adopts a dual-network parallel architecture. The rule feature neural network learns the temporal variation of rule features based on the GRU (Gated Recurrent Unit) network to form the teacher network. The original signal neural network is based on the CNN (Convolutional Neural Network) network. Under the guidance of the soft target labels output by the teacher network, it learns deep features through the knowledge distillation mechanism, realizing the effective integration of experience and data-driven approaches.

[0099] The S604 integrates and trains two neural networks to form a hybrid prediction model with multi-dimensional analysis capabilities. Through a dynamic weight fusion mechanism, it can adaptively balance the contributions of rule features and original signals in diagnostic decision-making, providing core algorithmic support for diagnosis.

[0100] In S605, the weight ratio of the rule feature neural network and the original signal neural network in the final decision is dynamically adjusted based on the confidence level of each neural network's output. By introducing a dynamic fusion parameter W, the weighted fusion of the outputs of the two neural networks is achieved, ensuring optimal model performance under different operating environments.

[0101] S606 transforms diagnostic results into quantified risk scores, enabling continuous monitoring of the health status of high-voltage relays and accurate early warning of faults. The output based on these risk scores provides a reliable basis for predictive maintenance and supports subsequent feature contribution analysis and maintenance recommendation generation.

[0102] like Figure 7 As shown, the software algorithm flowchart in a preferred embodiment of this application specifically includes: First, in step S701, historical data is collected, including the original historical CAN data of the vehicle when it is powered on and off normally, which is the vehicle bus historical data related to the operating status of the high-voltage relay; and the original historical CAN data of the vehicle high-voltage relay failure, which is the high-voltage relay historical failure data. Then, the CAN signal and characteristic CANID are extracted by library tools such as python-can or cantools, and the structure, scaling factor, offset and other information of CAN information are defined according to the DBC file.

[0103] Python-can is a Python library for CAN bus communication, used to read, write, listen to, and send CAN (Controller Area Network) messages in Python.

[0104] A DBC (DataBase CAN) file is a file format used to define the message format in CAN bus communication. It is mainly used to interpret the meaning of CAN messages. A specific CAN channel DBC file refers to a DBC file specifically configured for a particular CAN channel. In other words, this DBC file is only applicable to the data parsing of a certain channel and cannot parse other channels. This ensures that the parsed signals correspond one-to-one with the physical quantities of that channel in the vehicle, avoiding misinterpretation problems caused by inconsistent signal formats between different channels. Through the above data parsing, an accurate data foundation is provided for subsequent rule feature extraction and other processes.

[0105] Next, feature filtering is performed in step S702, where the historical data includes vehicle bus historical data, that is... Figure 7 The original CAN signals include fault list trigger signals, fault list supplementary signals that are extended based on the fault list trigger signals through correlations such as attributes and categories, and test environment signals; while rule features refer to the quantification of knowledge, such as converting the difference between the current and the threshold, the difference between the timing after the current switch command is triggered and the threshold, into continuous numerical features, which are then input into the model.

[0106] In the hybrid learning framework, a dual-path parallel network structure is used for training: Figure 7 In this context, the rule feature subnet refers to the rule feature neural network, and the original signal subnet refers to the original signal neural network. In step S703A, the rule feature neural network undergoes data preprocessing. In step S704A, the Adam optimizer is used to initialize and adjust the parameters of the GRU (Gated Recurrent Unit) network. In step S705A, the rule feature data is fed into the GRU network for training, resulting in the predicted probability of the rule feature data being obtained in step S706A. Then, in step S707A, the rule prediction probability, Prules, is compared with the true label Ytrue to calculate the rule feature neural network loss Lrules. Figure 7 The comparison of the true labels in the rule-based feature neural network refers to this process, which involves calculating the rule prediction probability Prules and the true rule label Ytrue. The rule-based feature neural network is considered complete only when its loss is less than the preset rule loss, and the rule prediction probability is used as the soft target label. Otherwise, the parameters of the rule-based feature neural network are adjusted based on its loss.

[0107] While training the regular feature neural network, the original signal neural network is also trained. First, in step S703B, the original bus data, that is, the filtered historical original CAN signal, is preprocessed. Then, in step S704B, the Adam optimizer is used to initialize and adjust the parameters of the lightweight CNN (convolutional neural network). Then, in step S705B, the lightweight CNN (convolutional neural network) is used to extract frequency domain features from the original bus data. Thus, in step S706B, the original prediction probability of the original signal neural network is obtained. In step S707B, it is calculated with the soft target label of the regular feature neural network to obtain the original prediction probability Psignals. Figure 7 The comparison of the true label of the original signal neural network refers to calculating the original predicted probability and the original true label Ytrue to determine the original predicted loss. Based on the knowledge distillation mechanism, collaborative training is carried out under the guidance of the soft target output of the rule feature neural network. The effect of distillation learning and supervised learning is balanced by dynamically adjusting the loss function. In step S708, the distillation loss is multiplied by the first preset weight and the original predicted loss is multiplied by the second preset weight to obtain the comprehensive loss of the original signal neural network. The training of the original signal neural network is completed when the comprehensive loss of the original signal neural network is less than the preset original loss threshold. Otherwise, the parameters of the original signal neural network are adjusted based on the comprehensive loss of the original signal neural network.

[0108] The dual-network parallel training architecture enables the system to fully learn the judgment logic of expert rules and mine potential fault modes from the raw data. Finally, in step S710, a unified hybrid learning prediction model is formed through an adaptive weight fusion mechanism. By using labeled rule feature data and labeled raw bus data, the confidence scores of the rule feature neural network and the raw signal neural network are obtained. The dynamic fusion weight, W, is dynamically adjusted according to the magnitude of the two confidence scores. Thus, the rule feature neural network and the raw signal neural network are weighted and fused according to the dynamic fusion weight to obtain the hybrid neural network model.

[0109] Before step S711, the accuracy of the hybrid neural network model is checked. If the model accuracy reaches the preset accuracy threshold, the training ends and the hybrid neural network model is obtained. If the model accuracy does not reach the preset accuracy threshold, the regular feature neural network and the original signal neural network are trained again.

[0110] In subsequent step S712, the trained hybrid neural network model is used to combine the current data of the high-voltage relay and the real-time data of the vehicle bus, which is... Figure 7The real-time data of the vehicle's high-voltage relay fault CAN and the real-time raw data of the vehicle's power-on / off CAN are fed into a hybrid neural network model to obtain fault warning signals. In step S713, the risk level is displayed based on the fault warning signals. In step S714, the contribution of each feature can be extracted using the interpretability analysis tool SHAP. If the contribution of the input data is greater than the preset contribution threshold, it is marked as a key feature. Repair display suggestions are generated based on the key features to provide clear guidance for repair decisions, thus realizing a complete closed loop from data acquisition to diagnostic suggestions.

[0111] Embodiments of this application also provide a storage medium that stores computer instructions, which, when executed by a computer, are used to perform a high-voltage relay early fault diagnosis method as described in any of the preceding embodiments.

[0112] Figure 8 An electronic device according to this application is shown, comprising: At least one processor 801; and, A memory 802 is communicatively connected to at least one processor 801; wherein, The memory 802 stores instructions that can be executed by at least one processor 801, which enables the at least one processor 801 to perform all the steps of a high-voltage relay early fault diagnosis method in any of the foregoing method embodiments.

[0113] Figure 8 Taking the 801 processor as an example: The electronic device may also include an input device 803 and an output device 804.

[0114] The processor 801, memory 802, input device 803 and output device 804 can be connected by a bus or other means. The figure shows an example of connection by bus.

[0115] The memory 802, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as the program instructions / modules corresponding to a high-voltage relay early fault diagnosis method in this application embodiment, for example, Figure 1-7 The method flow is shown. The processor 801 executes various functional applications and data processing by running non-volatile software programs, instructions, and modules stored in the memory 802, thereby realizing a high-voltage relay early fault diagnosis method in the above embodiment.

[0116] The memory 802 may include a program storage area and a data storage area. The program storage area may store an operating system and an application program required for at least one function. The data storage area may store data created based on the use of a high-voltage relay early fault diagnosis method. Furthermore, the memory 802 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 802 may optionally include memory remotely located relative to the processor 801, and these remote memories may be connected via a network to the apparatus performing a high-voltage relay early fault diagnosis method. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0117] The input device 803 can receive user clicks and generate signal inputs related to user settings and function control of the real-time zone dimming method of the vehicle lighting system. The output device 804 may include a display device such as a display screen.

[0118] One or more modules are stored in memory 802, and when run by one or more processors 801, a high-voltage relay early fault diagnosis method in any of the above method embodiments is executed.

[0119] Embodiments of this application also provide a computer program product, including a computer program / instructions that, when executed by a processor, implement a high-voltage relay early fault diagnosis method as described in any of the preceding embodiments.

[0120] As needed, the above technical solutions can be combined to achieve the best technical effect.

[0121] The above are merely the principles and preferred embodiments of this application. It should be noted that, for those skilled in the art, implementation methods obtained by appropriately combining the technical solutions disclosed in different embodiments are also included within the technical scope of this invention. Based on the principles of this application, several other modifications can also be made, which should also be considered within the protection scope of this application.

Claims

1. A method for early fault diagnosis of a high-voltage relay, characterized in that, include: Acquire historical fault data of high-voltage relays and historical vehicle bus data related to the historical operating status of high-voltage relays; The historical fault data of the high-voltage relay is subjected to rule-based feature processing to obtain rule-based feature data; A hybrid neural network model is trained using the rule feature data and the vehicle bus historical data; The current data of the high-voltage relay and the real-time data of the vehicle bus are acquired, and the current data of the high-voltage relay and the real-time data of the vehicle bus are input into the hybrid neural network model to obtain a fault warning signal.

2. The method for early fault diagnosis of a high-voltage relay according to claim 1, characterized in that, The process of training a hybrid neural network model using the rule feature data and the vehicle bus historical data specifically includes: Construct a rule-based feature neural network and a raw signal neural network; Determine the original bus data based on the vehicle bus historical data; The rule feature data is input into the rule feature neural network for training to obtain the trained rule feature neural network and soft target labels. The original bus data is input into the original signal neural network for training, and knowledge distillation is performed based on the soft target label to obtain the trained original signal neural network. The hybrid neural network model is determined based on the trained rule-feature neural network and the trained original signal neural network.

3. The method for early fault diagnosis of a high-voltage relay according to claim 2, characterized in that, The step of determining the original bus data based on the vehicle bus historical data specifically includes: The high-voltage relay fault detection signal in the vehicle bus historical data is selected as the fault list trigger signal; Based on the fault list trigger signal, determine the fault list supplementary signal related to its attributes, category, naming, and feedback relationship; Acquire real vehicle environment signals, and use the fault list trigger signal, the fault list supplement signal, and the real vehicle environment signals as raw bus data.

4. The method for early fault diagnosis of a high-voltage relay according to claim 2, characterized in that, The construction of the rule-based feature neural network includes: initializing the gated recurrent unit network and establishing the rule-based feature neural network; The step of inputting the rule feature data into the rule feature neural network for training specifically includes: Perform data preprocessing on the rule feature data; The rule feature neural network is trained using the preprocessed rule feature data; The rule feature data is predicted by the trained rule feature neural network to obtain the rule prediction probability; The rule feature neural network loss is determined based on the predicted probability and the true label of the rule. If the loss of the rule-based feature neural network is less than the preset rule loss, the training of the rule-based feature neural network is complete, and the rule prediction probability is used as the soft target label; otherwise, the parameters of the rule-based feature neural network are adjusted based on the loss of the rule-based feature neural network.

5. The method for early fault diagnosis of a high-voltage relay according to claim 2, characterized in that, The construction of the original signal neural network includes: initializing the convolutional neural network and establishing the original signal neural network; The step of inputting the raw bus data into the raw signal neural network for training and performing knowledge distillation based on the soft target label specifically includes: The raw bus data is preprocessed. The original signal neural network is trained using the preprocessed raw bus data; The original bus data is predicted by the trained original signal neural network to obtain the original prediction probability; The distillation loss is determined based on the soft target label and the original predicted probability; The original predicted loss is determined based on the original predicted probability and the original true label. The original signal neural network comprehensive loss is obtained by multiplying the distillation loss by the first preset weight and adding the original predicted loss by the second preset weight. If the overall loss of the original signal neural network is less than a preset original loss threshold, the training of the original signal neural network is complete; otherwise, the parameters of the original signal neural network are adjusted based on the overall loss of the original signal neural network.

6. The method for early fault diagnosis of a high-voltage relay according to claim 2, characterized in that, The step of determining the hybrid neural network model based on the trained rule-feature neural network and the trained original signal neural network further includes: The rule feature data with the true labels of the rules are input into the trained rule feature neural network to obtain the confidence score of the rule feature neural network; The raw bus data with the original real labels is input into the trained raw signal neural network to obtain the confidence level of the raw signal neural network. The dynamic fusion weights of the hybrid neural network model are determined based on the confidence scores of the rule-feature neural network and the original signal neural network. The regular feature neural network and the original signal neural network are weighted and fused according to the dynamic fusion weights to obtain a hybrid neural network model.

7. The method for early fault diagnosis of a high-voltage relay according to claim 6, characterized in that, Before obtaining the hybrid neural network model, the process also includes: Obtain the model accuracy of the hybrid neural network model; If the model accuracy reaches a preset accuracy threshold, the training ends, and the hybrid neural network model is obtained. If the accuracy of the model does not reach the preset accuracy threshold, the regular feature neural network and the original signal neural network will be retrained.

8. The method for early fault diagnosis of a high-voltage relay according to claim 1, characterized in that, The rule-based feature processing of the historical fault data of the high-voltage relay specifically includes: Obtain the expected threshold data that corresponds one-to-one with the historical fault data of the high-voltage relay; Based on the one-to-one deviation between the historical fault data of the high-voltage relay and the expected threshold data, rule feature data is generated.

9. The method for early fault diagnosis of a high-voltage relay according to claim 1, characterized in that, After receiving the fault warning signal, the process also includes: The contribution of each input data in the rule feature data and the vehicle bus historical data is obtained according to the hybrid neural network model; If the contribution of the input data is greater than a preset contribution threshold, then the input data is marked as a key feature; Repair display suggestions are generated based on the key features.

10. A computer program product, comprising a computer program / instructions, characterized in that, When the computer program / instruction is executed by the processor, it implements a method for early fault diagnosis of a high-voltage relay as described in any one of claims 1-9.