New energy vehicle remote diagnosis method and system based on cloud computing

Through the remote diagnosis method of new energy vehicles based on cloud computing, data preprocessing and cloud computing technology combined with dynamic fault tree analysis, the problem of troubleshooting of new energy vehicles is solved, and efficient and accurate fault identification and remote repair are achieved, reducing the problem of failure diagnosis and reduction of Repair cost and time.

CN118331239BActive Publication Date: 2024-11-05LIAONING PROVINCIAL COLLEGE OF COMM
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202410547432.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-06
Publication Date
2024-11-05
Estimated Expiration
2044-05-06

Smart Images

  • Figure CN118331239B_ABST
    Figure CN118331239B_ABST
Patent Text Reader

Abstract

The present invention provides a remote diagnosis method and system for new energy vehicles based on cloud computing, which belongs to the field of data analysis technology. First, the new energy vehicle data is collected and transmitted to the cloud server; after receiving the operation data sent by the vehicle terminal, data preprocessing and feature extraction are performed to obtain preprocessed data; then the preprocessed data is batch processed and analyzed by cloud computing to obtain fault detection results; for the identified new energy vehicle fault results, the cloud server uses dynamic fault tree analysis to locate the fault and obtain the fault diagnosis result; finally, the fault diagnosis result is pushed and remotely controlled. The present invention realizes efficient fault detection, precise positioning, remote diagnosis and remote repair of some faults through real-time data collection, cloud intelligent analysis, fault information push and remote control, significantly improves the fault handling efficiency, and enhances the convenience of use and after-sales service quality of new energy vehicles.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of data analysis, and in particular relates to a remote diagnosis method and system for new energy vehicles based on cloud computing. Background Art

[0002] With the rapid development of the new energy vehicle industry, the trend of vehicle intelligence and networking is becoming increasingly obvious. However, the complex electrical architecture, highly integrated electronic control system and unique power system characteristics of new energy vehicles make fault diagnosis and maintenance face many challenges. Traditional fault detection methods often rely on the subjective perception of car owners, regular maintenance inspections and on-site repairs. This model has problems such as delayed response, inaccurate diagnosis and high maintenance costs. In particular, traditional methods are unable to capture some hidden faults, early signs of faults, and understand the inherent laws of fault occurrence under specific working conditions.

[0003] Although the existing remote diagnosis technology for new energy vehicles has made some progress, it still has limitations in data processing efficiency, fault location accuracy, and remote repair capabilities. The security and real-time requirements of data transmission are high, and the rapid processing and in-depth analysis of massive data require powerful computing power and advanced algorithm support. In addition, the unique failure modes of new energy vehicles (such as battery management system (BMS) abnormalities, motor control problems, etc.) require advanced fault models to identify. Therefore, it is urgent to develop a remote diagnosis method for new energy vehicles. Summary of the invention

[0004] Based on the above technical problems, the present invention provides a remote diagnosis method and system for new energy vehicles based on cloud computing, which realizes remote diagnosis and remote repair of some faults through real-time data collection, efficient data processing, intelligent analysis and precise fault location, so as to significantly improve fault handling efficiency and reduce maintenance costs and time.

[0005] The present invention provides a new energy vehicle remote diagnosis method based on cloud computing, the method comprising:

[0006] Step S1: Collect new energy vehicle data and transmit it to the cloud server;

[0007] Step S2: After receiving the operation data sent by the vehicle terminal, data preprocessing and feature extraction are performed to obtain preprocessed data, which specifically includes:

[0008] Data reception and storage, including:

[0009] The on-board terminal sends the operating data of the new energy vehicle to the cloud server via wireless communication;

[0010] The cloud server receives data through a preset communication protocol using encryption and compression technology;

[0011] The received data is decrypted, decompressed, and stored in a large-scale distributed storage system on the cloud platform and is structured;

[0012] Data preprocessing and feature engineering, including:

[0013] Clean the stored data and process missing values ​​and outliers;

[0014] Use the maximum information coefficient to calculate the correlation between each feature and the fault label, and select the features with correlation higher than the threshold as input;

[0015] Calculate the envelope entropy of the multi-component signal; perform Hilbert transform on each component signal to obtain the instantaneous phase and frequency, calculate the negative entropy of the instantaneous frequency, and take the average value as the envelope entropy;

[0016] Features are selected based on the maximum information coefficient and optimized using variational mode decomposition;

[0017] Step S3: perform cloud computing batch processing and analysis on the pre-processed data to obtain fault detection results;

[0018] Step S4: For the identified new energy vehicle fault results, the cloud server uses dynamic fault tree analysis to locate the fault and obtain the fault diagnosis result;

[0019] Step S5: Push the fault diagnosis result and perform remote control.

[0020] The present invention also provides a new energy vehicle remote diagnosis system based on cloud computing, the system comprising:

[0021] Data acquisition module, used to collect new energy vehicle data and transmit it to the cloud server;

[0022] The data processing module is used to perform data preprocessing and feature extraction after receiving the operation data sent by the vehicle terminal to obtain preprocessed data, specifically including:

[0023] The receiving and storing submodule is used for data receiving and storing, and specifically includes:

[0024] The on-board terminal sends the operating data of the new energy vehicle to the cloud server via wireless communication;

[0025] The cloud server receives data through a preset communication protocol using encryption and compression technology;

[0026] The received data is decrypted, decompressed, and stored in a large-scale distributed storage system on the cloud platform and is structured;

[0027] Feature extraction submodule, used for data preprocessing and feature engineering, including:

[0028] Clean the stored data and process missing values ​​and outliers;

[0029] Use the maximum information coefficient to calculate the correlation between each feature and the fault label, and select the features with correlation higher than the threshold as input;

[0030] Calculate the envelope entropy of the multi-component signal; perform Hilbert transform on each component signal to obtain the instantaneous phase and frequency, calculate the negative entropy of the instantaneous frequency, and take the average value as the envelope entropy;

[0031] Features are selected based on the maximum information coefficient and optimized using variational mode decomposition;

[0032] The data analysis module is used to perform cloud computing batch processing and analysis on the pre-processed data to obtain fault detection results;

[0033] The fault diagnosis module is used to locate the faults of the identified new energy vehicles using dynamic fault tree analysis on the cloud server to obtain the fault diagnosis results;

[0034] The push control module is used to push the fault diagnosis results and perform remote control.

[0035] Compared with the prior art, the present invention has the following beneficial effects:

[0036] Based on the powerful data processing capability and advanced fault detection model of cloud computing, the present invention can identify various faults of new energy vehicles in real time and accurately, realize system-level fault analysis through dynamic fault tree analysis, accurately locate the source of fault, and significantly improve the accuracy and positioning efficiency of fault detection; through real-time data transmission, cloud-based intelligent analysis and remote control functions, the present invention can remotely diagnose and repair some faults, including software updates, parameter adjustments, fault isolation and other operations, without the need for users to go to the maintenance site, greatly improving the convenience and efficiency of fault handling. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 This is a flow chart of the new energy vehicle remote diagnosis method based on cloud computing of the present invention;

[0038] Figure 2 This is a structural diagram of the new energy vehicle remote diagnosis system based on cloud computing of the present invention. DETAILED DESCRIPTION

[0039] The present invention is further described below in conjunction with specific implementation cases and drawings, but the present invention is not limited to these embodiments.

[0040] Example 1

[0041] like Figure 1 As shown, the present invention discloses a remote diagnosis method for new energy vehicles based on cloud computing, the method comprising:

[0042] Step S1: Collect new energy vehicle data and transmit it to the cloud server.

[0043] Step S2: After receiving the operation data sent by the vehicle-mounted terminal, data preprocessing and feature extraction are performed to obtain preprocessed data.

[0044] Step S3: perform cloud computing batch processing and analysis on the pre-processed data to obtain fault detection results.

[0045] Step S4: For the identified new energy vehicle fault results, the cloud server uses dynamic fault tree analysis to locate the fault and obtain the fault diagnosis result.

[0046] Step S5: Push the fault diagnosis result and perform remote control.

[0047] The following is a detailed discussion of each step:

[0048] Step S1: Collect new energy vehicle data and transmit it to the cloud server.

[0049] Step S1 specifically includes:

[0050] New energy vehicle data includes power system data, electrical system data, environment and driving data, sensor and actuator data, and fault event records.

[0051] Powertrain data, including:

[0052] The battery management system (BMS) continuously monitors the key parameters of the battery pack, and collects data including: battery voltage (the voltage of each single cell, used to evaluate the battery charge and discharge status and health status); battery current (the current flowing into or out of the battery pack, reflecting the energy flow during the charge and discharge process); battery temperature (the overall temperature of the single cell or battery pack, used to prevent performance degradation or safety risks caused by overheating or overcooling); SOC (State of Charge) is the ratio of the remaining battery power to its total capacity, which is an indicator for evaluating the vehicle's range.

[0053] The motor controller (MCU) is responsible for monitoring the operating status of the motor and collecting data including: motor speed (reflecting the vehicle's driving speed and power output level); motor torque (characterizing the force applied by the motor when driving or braking); and motor efficiency (calculating the energy conversion efficiency of the motor under specific operating conditions, which helps optimize energy use).

[0054] Electrical system data, including:

[0055] The body control module (BCM) and other related ECUs (such as the charging system controller) are monitored and the collected data include: the voltage of key nodes of each circuit (including high-voltage systems, such as batteries and motors; low-voltage systems, such as 12V batteries) to ensure that the system voltage is within a safe range; the current of each circuit (measured by current sensors to monitor power consumption and detect short circuits or overloads); insulation resistance (detecting the insulation performance between the high-voltage system and the body to prevent the risk of leakage); fault codes (recording the fault indication codes (DTCs) generated during the self-diagnosis of the electronic control system. These codes correspond to specific fault types to facilitate troubleshooting).

[0056] Environmental and driving data, including:

[0057] The vehicle communication module (T-Box) combines a GPS receiver, an inertial navigation unit (IMU) and various environmental sensors to collect data including: vehicle speed (indirectly calculated through wheel speed sensors or motor speed, reflecting the real-time driving speed of the vehicle); mileage (accumulated vehicle driving distance, as a basis for maintenance reminders and vehicle service life assessment); geographic location (determine the precise position of the vehicle in the global coordinate system through GPS signals, supporting functions such as navigation and remote monitoring); ambient temperature and humidity (measured by external environmental sensors, affecting battery performance, air conditioning system operation and passenger comfort); driving mode (recording the current driving mode of the vehicle, such as economy, sports, snow, etc., affecting the power management strategy and vehicle response characteristics).

[0058] Sensor and actuator data, including:

[0059] Various sensors (such as pressure, temperature, and position sensors) convert physical signals into electrical signals, which are received and interpreted by the corresponding ECU. The collected data include: pressure sensors monitor brake fluid pressure, tire pressure, etc. to ensure braking efficiency and driving safety; temperature sensors not only monitor battery and motor temperatures, but also pay attention to the temperatures of coolant and air-conditioning outlets; position sensors such as door switch position, gear lever position, steering wheel angle, etc. reflect the vehicle's operating status.

[0060] The working status data of actuators (such as electric power steering, brake assist, and air conditioning system) are usually collected by their respective control modules. The collected data include: the motor torque and power assist level of the electric power steering system to evaluate the steering system performance; the braking force request, actual braking force, regenerative braking status, etc. of the brake assist system to ensure the braking effect and energy recovery efficiency; the compressor status, blower speed, in-vehicle temperature setting value and actual value of the air conditioning system to adjust the in-vehicle environment.

[0061] Fault event records, including:

[0062] The on-board diagnostic system (OBD-II) monitors the operating status of the vehicle's electronic control system in real time. Once an abnormality or fault is detected, it will immediately record: real-time fault codes ((DTCs)), which are coded according to international standards and identify specific fault types); the time when the fault occurred (accurately recording the time when the fault first occurred, which helps to trace the source of the problem); related parameters (including vehicle status data (such as vehicle speed, battery voltage, etc.) when the fault occurred, which is used to assist in fault analysis).

[0063] The vehicle terminal software is responsible for controlling the data collection process, including:

[0064] Different collection frequencies are set according to the importance of different parameters; for example, key parameters such as battery temperature and voltage may need to be collected at a high frequency, while information such as vehicle speed can be collected at a low frequency.

[0065] Convert the collected data into CAN bus protocol format for transmission and processing.

[0066] Perform preliminary processing on the collected data, such as filtering and outlier detection, to improve data quality.

[0067] In this embodiment, the trigger conditions for data collection can be periodic collection (collecting data at preset time intervals, such as every second, every minute, or every hour); event triggering (triggering data collection when a specific event occurs, such as battery temperature is too high, motor overload, etc.); on-demand collection (triggering data collection through remote commands or diagnostic tools, such as when performing specific fault diagnosis).

[0068] The vehicle terminal (central processing unit that integrates the data collection functions of the above modules) packages all the collected operating data, encrypts and compresses them according to the preset protocol (MQTT, HTTP) through the pre-installed wireless communication module (such as 4G / 5G, Wi-Fi, V2X, etc.), and then sends them to the cloud server. The data transmission can be:

[0069] Real-time transmission, sending data immediately when abnormal conditions or important events are detected, ensuring a fast response.

[0070] Periodic transmission: aggregated data is sent regularly at set time intervals (such as every minute, every hour, or every day) for daily monitoring and data analysis.

[0071] Step S2: After receiving the operation data sent by the vehicle-mounted terminal, data preprocessing and feature extraction are performed to obtain preprocessed data.

[0072] Step S2 specifically includes:

[0073] Data reception and storage, including:

[0074] The on-board terminal sends the operating data of new energy vehicles to the cloud server through wireless communication (such as 4G / 5G, Wi-Fi, V2X, etc.) regularly or on demand; the data includes multi-source information such as power system, electrical system, environment and driving, sensor and actuator data, fault event records, etc.

[0075] The cloud server receives data through preset communication protocols (such as MQTT, HTTP) and uses encryption and compression technology to ensure the security and efficiency of data transmission.

[0076] The received data is decrypted and decompressed, and then stored in the large-scale distributed storage system of the cloud platform, and is structured according to the predefined data model. Distributed file systems (HDFS) or cloud databases (Amazon S3) can be used for large-scale data storage.

[0077] Data preprocessing and feature engineering, including:

[0078] Clean the stored raw data, process missing values ​​and outliers, and ensure data quality.

[0079] The maximum information coefficient MIC (Maximal Information Coefficient) is used to calculate the correlation between each feature and the fault label, and the features with correlation higher than the threshold (such as 0.6) are selected as input. The specific implementation method is as follows:

[0080] The libraries and modules required to implement the program are imported, including NumPy, MINE (for calculating the maximum information coefficient), SciPy (signal processing tool), and VMD (variational mode decomposition library), expressed as import numpy as np, fromminepy.MINE import MINE, from scipy.signal import hilbert, and from vmdpy importVMD.

[0081] Define the information coefficient calculation function (mic), mic(x,y) This function calculates the maximum information coefficient (MIC) between the input variables x and y; MIC is a nonlinear correlation measure suitable for detecting any type of (including nonlinear, non-monotonic) relationship. Use the MINE class in the minepy library to calculate MIC. The steps are as follows:

[0082] By creating a MINE object m, calling m.compute_score(x,y) to calculate the MIC score between x and y; returning the calculated MIC value, the value is between 0 (no relationship) and 1 (complete correlation), expressed as defmic(x,y): m = MINE(); m.compute_score(x,y); return m.mic().

[0083] Define the feature selection function (feature_selection_mic), feature_selection_mic(data, mic_features) function selects features based on the maximum information coefficient (MIC). Given data containing data and a list of candidate features mic_features, the function selects features whose MIC correlation with the target variable (the last column by default) is greater than 0.6. The steps are as follows:

[0084] For each feature in the mic_features list, use the mic() function to calculate its MIC value with the target variable and store these values ​​in the correlations list; use list comprehension to iterate over zip(mic_features,correlations), and for each feature-correlation pair, if the correlation is greater than 0.6, add the feature name to the selected_features list; return the selected_features list containing the names of highly correlated features, represented as def feature_selection_mic(data,mic_features): correlations = [mic(data[feature],data["target"])for feature in mic_features]; selected_features = [feature forfeature,corr in zip(mic_features,correlations) if corr>0.6]; return selected_features.

[0085] Calculate the envelope entropy of the multi-component signal imfs (composed of IMFs); perform Hilbert transform on each IMF to obtain the instantaneous phase and frequency, calculate the negative entropy of the instantaneous frequency, and take the average value as the envelope entropy. The specific implementation method is as follows:

[0086] Define the envelope entropy function (envelope_entropy). The envelope_entropy(imfs) function calculates the envelope entropy of a multi-component signal imfs (composed of intrinsic mode functions (IMFs)). Perform a Hilbert transform on each IMF to obtain the instantaneous phase and frequency. Calculate the negative entropy of the instantaneous frequency and take the average value as the envelope entropy. The envelope entropy reflects the complexity of the signal and is usually used to analyze the characteristics of nonlinear systems. The steps are as follows:

[0087] Traverse each IMF in imfs, apply Hilbert transform (hilbert()) to each IMF to obtain the analytical signal of the IMF; calculate the instantaneous phase of the analytical signal (np.angle()), and use np.unwrap() to remove the phase jump (i.e., unwrap phase); calculate the instantaneous frequency, calculate the negative entropy based on the instantaneous frequency, and add the result to the entropy list; return the mean of the entropy list as the envelope entropy, expressed as defenvelope_entropy(imfs): entropy = []; for imfin imfs: analytic_signal = hilbert(imf); instantaneous_phase = np.unwrap(np.angle(analytic_signal)) instantaneous_frequency = np.diff(instantaneous_phase) / (2.0×np.pi); entropy.ap pend(-np.sum(instantaneous_frequency×np.log(instantaneous_frequency))); return rn np.mean(entropy).

[0088] Based on the maximum information coefficient, features are selected and optimized using variational mode decomposition (VMD). First, feature selection is performed, then the fitness function is defined to calculate the envelope entropy, and the genetic algorithm is used for parameter optimization (finding the best α and K values); finally, VMD decomposition is performed using the optimal parameters and the decomposed IMFs and optimal parameters are returned. The specific implementation method is as follows:

[0089] Define the optimization function (amo_vmd). The amo_vmd(data, mic_features) function combines the maximum information coefficient (MIC) feature selection and variational mode decomposition (VMD) for optimization. The steps are as follows:

[0090] The feature selection function is called to select features with correlation with the target variable higher than the threshold according to MIC, which is expressed as selected_features=feature_selection_mic(data, mic_features).

[0091] Define the fitness function, create a function named objective_function, accept VMD parameters params (including α and K), use the selected features to perform VMD decomposition to obtain imfs; then calculate the envelope entropy of these imfs and return the entropy value; the lower the envelope entropy, the lower the complexity of the decomposed imfs, which is usually regarded as a better decomposition result, and returns the envelope entropy of the imfs obtained after VMD decomposition based on the selected features, expressed as def objective_function(params):alpha,K=params;u,u_hat,omega=VMD(selected_features,alpha,K,tau=0,DC=0,init=1,tol=1e-7);imfs=uT;entropy=envelope_entropy(imfs);return entropy.

[0092] The basic parameters of the genetic algorithm are set, including the population size (i.e., the number of individuals considered simultaneously (VMD parameter combination)), the number of iterations (i.e., the number of generations run by GA), the mutation rate, and the crossover rate, expressed as population_size=50; num_generations=100; mutation_rate=0.1; and crossover_rate=0.9.

[0093] Initialize the population and generate a random initial population, which contains multiple (α, K) combinations. Each individual consists of two parameters (α, K), and the parameter values ​​are uniformly distributed within a given range, expressed as population = np.random.uniform (low = [1000, 6], high = [5000, 12], size = (population_size, 2)).

[0094] Genetic algorithm optimization, set the initial best score (infinity) and the best parameters to empty, and perform a specified number of generations of genetic algorithm cycles, expressed as best_score = float ('inf'); best_params = None; for_in range (num_generations), for each generation:

[0095] For each individual in the current population (i.e., the (α, K) combination, that is, a set of VMD parameters), the fitness function objective_function is called to calculate its fitness (envelope entropy), expressed as scores = np.array([objective_function(individual)for individual in population]).

[0096] Find the individual with the lowest fitness (smallest envelope entropy) in the current generation, and compare its fitness with the current optimal fitness; if the new fitness is lower (i.e., the envelope entropy is smaller), update the global optimal fitness and the optimal individual (VMD parameter), expressed as best_gen_idx = np.argmin(scores); ifscores[best_gen_idx] <best_score:best_score=scores[best_gen_idx];best_params=population[best_gen_idx]。

[0097] Generate the next generation population through selection, crossover and mutation operations, sort by fitness, and select the individuals in the top half of the fitness ranking to enter the next generation population, represented by selected_idx = np.argsort(scores)[:population_size / / 2]; selected_population = population[selected_idx]; Generate new individuals (offspring) equal to the number of selected individuals as part of the next generation population; Each offspring undergoes a single-point crossover by randomly selecting two parent individuals, and may undergo mutation; Finally, the selected individuals and the generated offspring are merged into a new population, represented by offspring_population = []; for_in range(population_size / / 2): parents = selected_population[np.random.choice(len(selected_population),2,replace=False)]; crossover_point = np.random.randint(1,le n(parents[0]));offspring=np.concatenate([parents[0][:crossover_point],parents[1][crossover_point:]]);if np.random.rand() <mutation_rate:mutation_idx=np.ran dom.randint(len(offspring));offspring[mutation_idx]=np.random.uniform(low=1000,high=5000)if mutation_idx==0else np.random.randint(6,12);offspring_population.append(offspring);population=np.vstack([selected_population,offsp ring_population])。

[0098] Apply the optimal parameters for VMD decomposition, and use the optimal VMD parameters found in the genetic algorithm optimization process to perform VMD decomposition on the selected features to obtain an array of intrinsic mode functions (IMFs), represented by alpha, K = best_params; u, u_hat, omega = VMD(selected_features, alpha, K, tau = 0, DC = 0, init = 1, tol = 1e-7); imfs = uT.

[0099] Return the result, including the optimal parameters, the decomposed IMFs array, and the fitness (envelope entropy) of the global best individual, expressed as return imfs,best_params.

[0100] Step S3: perform cloud computing batch processing and analysis on the pre-processed data to obtain fault detection results.

[0101] Step S3 specifically includes:

[0102] Data is processed in batches, using cloud computing technology for distributed parallel processing, dividing the pre-processed data into multiple batches, and using the elastic computing resources of the cloud platform for calculations, including:

[0103] Perform necessary data cleaning (remove invalid values ​​and outliers), standardization, and encoding (convert categorical data into numerical form) to improve data quality and make it more suitable for model training.

[0104] Divide the preprocessed data into multiple smaller batches; each batch contains a certain number of data samples, and the size can be reasonably set based on factors such as computing resources, model complexity, and memory limitations; batch processing can reduce the memory required for a single calculation, while allowing the model to update parameters at each iteration and gradually approach the optimal solution using optimization algorithms such as gradient descent.

[0105] Choose big data processing services provided by appropriate cloud service providers (such as AWS and Google Cloud), such as AWS EMR and Google Cloud Dataproct. These services are based on distributed computing frameworks such as Hadoop and Spark, and can flexibly allocate and manage computing resources to achieve parallel data processing; AWS EMR provides managed Hadoop, Spark and other cluster services, which can quickly deploy, manage and expand data processing workloads; Google Cloud Dataproc also provides support for Hadoop and Spark, making it easy to quickly create, manage and destroy temporary or persistent big data clusters in the Google Cloud environment.

[0106] Submit data processing tasks on the cloud platform, distribute data batch jobs to multiple nodes in the cluster for parallel execution; each node independently processes one or more data batches, and synchronizes results and updates status through efficient communication protocols (such as Hadoop's MapReduce and Spark's RDD / DAG mechanism); this parallel processing method greatly accelerates the data processing speed, allowing large-scale data to be calculated within an acceptable time.

[0107] Model training and optimization: for each batch of data, a new energy vehicle fault detection model (BLSTNet-CBAM) is built and optimized. During the model training process, the MLAES (Meta-Learning Adaptive Estimation Strategy) optimizer is used to adaptively adjust the learning rate to improve the generalization ability of the model on different batches of data. The specific process of model construction, training and optimization is implemented by the build_and_optimize_model function, which includes:

[0108] Construct a convolutional neural network model including attention mechanism and bidirectional LSTM layer to process the features of a single IMF. The specific implementation is as follows:

[0109] The required libraries and modules are imported, including Keras and Tensorflow, expressed as from tensorflowimport keras and from tensorflow.keras import layers.

[0110] This function defines a function named blstnet_cbam, whose parameter is imf_shape, which represents the shape of the input IMF data; IMF is the intrinsic mode function obtained by VMD decomposition; this function builds a neural network model based on the BLSTNet-CBAM structure for new energy vehicle fault detection, expressed as defblstnet_cbam(imf_shape):.

[0111] First, define an input layer (Input), whose shape is specified by the passed imf_shape parameter; this input layer receives the preprocessed and feature-extracted IMF data as the input of the model, expressed as input_tensor = layers.Input (shape = imf_shape).

[0112] Next, a 1D convolutional layer (Conv1D) is constructed; this layer has 64 filters, and the kernel size (kernel_size) of each filter is 3 time steps; the activation function uses selu, an adaptive activation function, which helps to avoid the gradient vanishing problem and promotes sparse expression within the network, expressed as x = layers.Conv1D(filters = 64, kernel_size = 3, activation = "selu") (input_tensor).

[0113] After the convolutional layer, add a bidirectional long short-term memory network (Bidirectional wrapped LSTM); bidirectional LSTM can consider the previous and next context information of the sequence data at the same time; here, the number of LSTM units is set to 64, and return_sequences=True is used to let the LSTM layer return the complete sequence output so that subsequent layers can continue to process the time series features, expressed as x=layers.Bidirectional(layers.LSTM(64,return_sequences=True))(x).

[0114] Next, we apply the attention mechanism (Attention layer); the Self-Attention mechanism used here allows the model to pay attention to information at other positions in the sequence while processing the current input; the input of this layer is the output of the previous layer (bidirectional LSTM), which means that the model will automatically generate attention weights on the same sequence, represented by x = layers.Attention()([x,x]).

[0115] A 1D convolutional layer is used again, this time with 128 filters and the same kernel size of 3 time steps; this helps to further extract local time series features, and is nonlinearly transformed by the selu activation function, represented as x = layers.Conv1D(filters = 128, kernel_size = 3, activation = "selu")(x).

[0116] Next, global average pooling (GlobalAveragePooling1D) is applied. This layer averages the output of each filter along the time axis to obtain a fixed-length feature vector. This can convert variable-length sequence data into a fixed-length feature representation, which is convenient for subsequent fully connected layer processing, expressed as x = layers.GlobalAveragePooling1D()(x).

[0117] Then add a fully connected layer (Dense) with 32 neurons, and the activation function is still selu. The fully connected layer is used to deeply fuse the previously extracted features and map them to a low-dimensional space, expressed as x = layers.Dense (32, activation = "selu") (x).

[0118] Finally, a keras.Model object is created and returned, connecting the input layer (input_tensor) with the last layer (x), completing the definition of the entire BLSTNet-CBAM model, expressed as return keras.Model(input_tensor,x).

[0119] In this embodiment, the blstnet_cbam function defines a deep learning model that combines 1D convolution, bidirectional LSTM, attention mechanism, and fully connected layer. The model can capture the spatiotemporal characteristics and self-dependence in IMF data for new energy vehicle fault detection tasks.

[0120] Use the MLAES optimizer to perform adaptive learning rate adjustment. The specific implementation is as follows:

[0121] To get the number and range of all trainable parameters in the model, follow these steps:

[0122] This function defines a function called get_model_parameters, whose parameter is model, which represents a built Keras neural network model; this function is designed to calculate the total number of parameters of a specific type of layer in the model and set a default value range for these parameters, expressed as def get_model_parameters(model).

[0123] Initialize the variable num_params to 0, which is used to accumulate the total number of parameters of the specified type of layers in the model, expressed as num_params=0; initialize the empty list param_ranges to store the parameter value range of each specified type of layer, expressed as param_ranges=[].

[0124] Iterate over all layers in a given model, expressed as for layer in model.layers:, for each layer, check whether the current layer is of type Dense (fully connected layer) or Conv1D (1-dimensional convolutional layer). These two layers usually contain trainable weights (kernel) and bias (bias) parameters, expressed as ifisinstance(layer,(layers.Dense,layers.Conv1D)): If the current layer is of type Dense or Conv1D, the number of elements of the weight (kernel) and bias (bias) parameters of the layer is accumulated to num_params, and the shape.num_elements() method returns the total number of all elements in the tensor (that is, the weight or bias matrix), that is, the total number of parameters of the layer, expressed as num_params += layer.kernel.shape.num_elements() + layer.bias.shape.num_elements(); For each Dense or Conv1D layer found, add a default parameter value range [-1,1] to the param_ranges list; This indicates that the values ​​of all parameters of these layers should be between the default parameter value ranges during initialization or optimization.

[0125] Define the MLAES optimizer. The steps are as follows:

[0126] Define a class named MLAESOptimizer to implement the MLAES-based optimizer, represented by classMLAESOptimizer:.

[0127] The constructor __init__ initializes the MLAESOptimizer object and receives the following parameters:

[0128] Initial learning rate initial_lr, used to initialize the individual learning rate; learning rate decay rate learning_rate_decay, used to update the decay coefficient when the individual learning rate; meta learning rate meta_lr, used to update the step size when the individual learning rate; meta batch size meta_batch_size, indicating the number of individuals used in each optimization; initialize two empty lists, the list population (population) storing individuals (i.e. learning rate vectors) and the list adaptive_learning_rates storing the current adaptive learning rate, indicating def__init__(self, initial_lr, learning_rate_decay, meta_lr, meta_batch_size); self.initial_lr = initial_lr; self.learning_rate_decay = learning_rate_decay; self.meta_lr = meta_lr; self.meta_batch_size = meta_batch_size; self.population = []; self.adaptive_learning_rates = [].

[0129] A given model is used to initialize the population of individuals (learning rate vectors), and the sample_initial_population function is implemented. The number of parameters of the model is obtained through the get_model_parameters function, expressed as def sample_initial_population(self, model): num_params, _ = get_model_parameters(model); A population containing a random learning rate vector is generated according to initial_lr and meta_batch_size, and the initial learning rate is stored in adaptive_learning_rates, expressed as self.population = [np.random.normal(scale = self.initial_lr, size = num_params) for_in range(self.meta_batch_size)]; self.adaptive_learning_rates = [self.initial_lr for_in range(self.meta_batch_size)].

[0130] Update the learning rate of the individual according to the gradient information. The update_adaptive_learning_rates function implements it, traverses the gradients corresponding to all individuals (that is, traverses the gradients (model parameter gradient list)), and updates the learning rate of each individual (learning rate vector) as follows:

[0131] Decay the existing learning rate according to learning_rate_decay, and adjust it according to the gradient value (grad) multiplied by the meta-learning rate; the updated learning rate is stored back to the corresponding position of the adaptive_learning_rates list, expressed as def update_adaptive_learning_rates(self,model,gradients): for i,grad in enumerate(gradients): self.adaptive_learning_rates[i] = self.adaptive_learning_rates[i] × (1-self.learning_rate_decay) + self.meta_lr × grad.

[0132] Apply gradients to model parameters according to the updated learning rate. The apply_gradients function is implemented as follows:

[0133] Traverse all layers of the model and operate on the Dense and Conv1D layers, expressed as updates = []; for i, layer in enumerate(model.layers): if isinstance(layer, (layers.Dense, layers.Conv1D)):.

[0134] Get the current layer weights and corresponding gradients, expressed as weights = K.batch_get_value(layer.weights); use the zip function to package the corresponding elements of weights, gradients, and adaptive learning rates together, and calculate the updated weight values ​​according to the learning rate and gradient, expressed as new_weights = [w+lr×gfor w,g,lr in zip(weights,grads,self.adaptive_learning_rates)]; add the new weight value list to the updates list, expressed as updates.append(K.batch_set_value(layer.weights,new_weights)); execute K.get_session().run(updates) to apply the updated weights to the model.

[0135] To implement the MLAES optimization process, the optimize function is implemented as follows:

[0136] Call sample_initial_population to generate the initial population, expressed as defoptimize(self,model,X_train,y_train,X_val,y_val,epochs,batch_size):self.sample_initial_population(model).

[0137] For each training epoch:

[0138] Ⅰ. Generate batch data for training and validation sets, expressed as for epoch in range(epochs):train_batches=make_batches(X_train,y_train,batch_size);val_batches=make_batches(X_val,y_val,batch_size).

[0139] Ⅱ. Traverse the training batch and validation batch, expressed as for train_batch,val_batch inzip(train_batches,val_batches):inputs_train,targets_train=train_batch;inputs_val,targets_val=val_batch:

[0140] Use tf.GradientTape to record the forward propagation process of the model on the training batch and the validation batch, expressed as with tf.GradientTape(persistent=True)as tape:.

[0141] Calculate the prediction and loss of the model on the training data and validation data, expressed as predictions_train = model(inputs_train, training = True); predictions_val = model(inputs_val, training = False); train_loss = categorical_crossentropy(targets_train, predictions_train); val_loss = categorical_crossentropy(targets_val, predictions_val).

[0142] Compute the gradient of the validation loss with respect to the model’s trainable variables, expressed as gradients = tape.gradient(val_loss,model.trainable_variables).

[0143] Call update_adaptive_learning_rates to update the adaptive learning rate, expressed as self.update_adaptive_learning_rates(model, gradients).

[0144] Call apply_gradients to apply the adaptive learning rate to adjust the model parameters, expressed as self.apply_gradients(model, gradients).

[0145] Delete the tf.GradientTape context manager to release resources, expressed as del tape.

[0146] In this embodiment, the get_model_parameters function is used to obtain the total number of parameters and parameter ranges of the Dense and Conv1D layers in a given Keras model; the MLAESOptimizer class implements an optimizer based on the multi-layer adaptive evolution strategy (MLAES) for adjusting the parameters of the deep learning model; dynamic optimization of the model parameters is achieved by sampling the initial learning rate vector, updating the adaptive learning rate according to the gradient, and applying the adaptive learning rate to adjust the model parameters.

[0147] The specific process of model construction, training and optimization is implemented by the build_and_optimize_model function, expressed as defbuild_and_optimize_model(input_shape,num_classes,num_mic_features,data,**mlaes_kwargs). The specific implementation method is as follows:

[0148] Define the preprocessing function, preprocess_data(data, target_col = 'target'), and preprocess the data, including splitting the training set and the test set, and standardizing the feature values. The specific implementation method is as follows:

[0149] Separate the features (all columns except the target column target_col) and the target variable from the input data frame data, expressed as X = data.drop(target_col,axis=1); y = data[target_col].

[0150] Use the train_test_split function to randomly divide the features and target variables into 80% (training set) and 20% (test set), expressed as X_train, X_test, y_train, y_test = train_test_split (X, y, test_size = 0.2, random_state = 42).

[0151] Create a StandardScaler object and fit the scaler with the training set data, expressed as scaler = StandardScaler().

[0152] The training set feature X_train and the test set feature X_test are standardized respectively, which is expressed as X_train=scaler.fit_transform(X_train); X_test=scaler.transform(X_test).

[0153] Returns the preprocessed training set features, test set features and their corresponding target variables, expressed as return X_train,X_test,y_train,y_test.

[0154] The preprocess_data function is called to preprocess the input raw data to obtain the training set X_train, the test set X_test and their corresponding labels y_train and y_test, which are expressed as X_train, X_test, y_train, y_test = preprocess_data (data); the train_test_split function is used to further divide the validation set from the training set, retaining 20% ​​of the data as validation data, and setting the random seed to 42 to ensure that the results are reproducible, which is expressed as X_train, X_val, y_train, y_val = train_test_split (X_train, y_train, test_size = 0.2, random_state = 42); all column names (micro-vibration features) except the labels in the raw data are extracted and stored in the mic_features list, which is expressed as mic_features = data.columns[:-1].tolist().

[0155] Define two input layers, one for receiving input features (shape is input_shape), and the other for receiving micro-vibration features (shape is (num_mic_features,)), expressed as input_tensor = layers.Input(shape = input_shape); mic_features_input = layers.Input(shape = (num_mic_features,)); Call the amo_vmd function to perform adaptive multimodal decomposition (AMO-VMD) on the input features in the training set to obtain each IMF component, expressed as imfs = amo_vmd(X_train, mic_features); For each IMF component, use the blstnet_cbam function to build a BLSTNet-CBAM network structure, and add the output to the features list, the features list is initially empty, expressed as features = []; for imf in imfs:imf_shape = imf.shape[1:]; features.append(blstnet_cbam(imf_shape)(imf)); Merge all IMF feature outputs through the layers.Concatenate() layer, represented as x = layers.Concatenate()(features); Add a fully connected layer (Dense) with an activation function of "selu" and an output dimension of 128, represented as x = layers.Dense(128, activation = "selu")(x); Add a final output layer (Dense) with an activation function of "softmax" and an output dimension of num_classes, indicating the number of categories of fault problems, represented as outputs = layers.Dense(num_classes, activation = "softmax")(x); Build a complete Keras model and connect the input layer to the output layer, model = keras.Model([input_tensor, mic_features_input], outputs).

[0156] MLAES optimization, use the mlaes_kwargs parameter to create an MLAESOptimizer instance, expressed as optimizer = MLAESOptimizer(**mlaes_kwargs); use the MLAES strategy to optimize the model, the input parameters include: the constructed model, training set data, training set labels, validation set data, validation set labels, training rounds, set to 100 and batch size, set to 64, expressed as optimizer.optimize(model,X_train,y_train,X_val,y_val,epochs=100,batch_size=64).

[0157] Return model and test data. The function returns the MLAES-optimized model and the retained test data (X_test and y_test) for subsequent model evaluation or prediction on new data, expressed as return model, X_test, y_test.

[0158] In this embodiment, the build_and_optimize_model function first preprocesses the input data, including dividing it into training set, validation set and test set; then builds a multimodal fusion deep learning model, which uses the IMF components and micro-vibration features obtained by adaptive multimodal decomposition (AMO-VMD) as input, extracts features through the BLSTNet-CBAM network structure, and classifies through the fully connected layer; finally, uses MLAESOptimizer to optimize the model using multi-layer adaptive evolution strategy (MLAES), and returns the trained model and retained test data after optimization.

[0159] In this embodiment, the fault detection results include battery system fault, motor system fault, electrical system fault, abnormal environment and driving data, and sensor actuator fault. Battery system faults include abnormal battery voltage (single cell voltage exceeds the normal range, which is too high or too low, affecting the battery charging and discharging state and health status), abnormal battery current (abnormal current flowing into or out of the battery pack, reflecting energy flow problems during charging and discharging, involving overcurrent, undercurrent or current fluctuation), abnormal battery temperature (single cell or battery pack temperature is too high or too low, resulting in performance degradation, shortened life or safety risks), abnormal SOC (abnormal ratio of battery remaining power to total capacity, affecting the accuracy of mileage estimation, and related to battery charge state monitoring errors); motor system faults include abnormal motor speed (reflecting unstable motor operation or inconsistent with expectations), abnormal motor torque (motor output torque does not meet requirements during driving or braking, affecting vehicle power response or braking performance), and low motor efficiency (under specific working conditions, the motor energy conversion efficiency is significantly lower than expected, due to increased internal motor losses, cooling system failures, or control system problems); electrical system faults include circuit voltage Abnormalities (the voltage of key nodes of the high-voltage system (such as batteries, motors) or the low-voltage system (such as 12V batteries) exceeds the safe range, resulting in limited system functions or equipment damage), abnormal circuit current (abnormal power consumption, short circuit or overload, caused by line faults, excessive loads or failure of protection devices), decreased insulation resistance (the insulation performance between the high-voltage system and the vehicle body is reduced, indicating the risk of leakage, affecting safety and electrical equipment performance); abnormalities in environmental and driving data include abnormal vehicle speed (reflecting that the vehicle's driving speed is inconsistent with the actual driving intention, involving transmission system, braking system or speed sensor failure), odometer error (the accumulated driving distance is inconsistent with the actual distance, resulting in inaccurate maintenance reminders, which may also be related to odometer failure); sensor failures include pressure sensor failure (monitoring data such as brake fluid pressure and tire pressure are abnormal, affecting braking performance and driving safety), temperature sensor failure (temperature monitoring data at batteries, motors, coolants, air-conditioning outlets, etc. are inaccurate, resulting in untimely or excessive system protection actions), and position sensor failure (reading errors such as door switch position, shift lever position, steering wheel angle, etc., affecting vehicle control logic judgment and driver information feedback).

[0160] Step S4: For the identified new energy vehicle fault results, the cloud server uses dynamic fault tree analysis to locate the fault and obtain the fault diagnosis result.

[0161] Step S4 specifically includes:

[0162] Establish a dynamic fault tree DFT, including:

[0163] Top-level events (TE),define the five identified fault types as top-level events,,i.e., battery system fault, motor system fault, electrical system fault,,abnormal environment and driving data, and sensor actuator fault.

[0164] Intermediate events (IE), based on the specific fault type provided, build corresponding intermediate events for each top-level event; for example, for battery system faults, intermediate events include battery voltage abnormality, battery current abnormality, battery temperature abnormality, and SOC abnormality; similarly, define corresponding intermediate events for other top-level events.

[0165] Basic events (BE) further refine intermediate events and list the specific causes that may cause these faults; for example, for the intermediate event of abnormal battery voltage, basic events may include single cell voltage too high, single cell voltage too low, battery management system (BMS) voltage measurement error, etc.

[0166] Logic gates (LG), according to the logical relationship between faults, use logic gates such as AND gates (AND), OR gates (OR), and NOT gates (NOT) to connect basic events and intermediate events; for example, the intermediate event of abnormal battery voltage may be the AND gate result of the single cell voltage being too high and the single cell voltage being too low.

[0167] Define dynamic properties, including:

[0168] Time attributes, adding time attributes to basic events and logic gates, such as fault duration, fault interval, etc.; these attributes reflect the change of fault status over time and are the core elements of the dynamic fault tree (DFT).

[0169] Quantitative analysis, including:

[0170] Probability assignment, assigning dynamic probability models to basic events; these models can be constructed based on historical fault data, equipment reliability data, expert experience, etc., and taking into account the characteristics of fault evolution over time, the dynamic probability of basic events (BE) is expressed as:

[0171] Set the basic time BE i The probability of occurrence at time t is P DFT (BE i , t), is represented by a dynamic probability model f(t; θ i ) description, t is the time variable; θ i is related to the basic event BE i Related dynamic parameters (such as failure rate, recovery rate, etc.); f(t; θ i ) is a dynamic probability model that describes the evolution of faults over time, which can be exponential distribution, Weibull distribution, etc.

[0172] The dynamic conditional probability of logic gate (LG) is expressed as:

[0173] If the logic gate is connected to the basic event BE i and intermediate events IE j , then the conditional probability of the logic gate at time t is P DFT (IE j |BE i , t) = g(t; θ ij ), IE j is an intermediate event; θ ij is related to the basic event BE i and intermediate events IE j Dynamic parameters related to the logical relationship between g(t; θ i ) is a dynamic model that describes how the conditional probability of logic gates changes over time.

[0174] Minimum cut set (CS), calculates the minimum fault combination (basic event set) that causes each top-level event to occur, that is, the minimum cut set; in DFT, the minimum cut set not only considers the logical relationship, but also the time attribute; the probability of the minimum cut set is the BE it contains i The product of the probability of elementary events occurring simultaneously within a specific time window is expressed as:

[0175]

[0176] Where Πi∈CS j Indicates CS j All basic events in BE i Perform multiplication.

[0177] Fault probability calculation: Using the dynamic fault tree structure and the dynamic probability model of basic events, the probability of occurrence of each top-level event (identified fault) within a specific time window is calculated; the fault probability is the sum of the minimum cut set probabilities that lead to the top-level event, expressed as:

[0178]

[0179] Where Σj represents all the top events TE k The minimum cut set CS j Perform the summation.

[0180] Fault source identification, including:

[0181] Minimum cut set screening and sorting, first, based on all the calculated minimum cut sets and their corresponding probabilities, sort them from high to low according to the probability value; these minimum cut sets are sets composed of a series of basic events, each of which can independently trigger the occurrence of top-level fault events; the purpose of sorting is to quickly focus on those event combinations that are most likely to cause faults.

[0182] Basic event analysis and association: analyze each basic event in the high-probability minimum cut set to clarify its specific meaning in the new energy vehicle system; involve specific components (such as battery cells, motor controllers, etc.), system functions (such as battery management systems, charging control strategies, etc.), external factors (such as ambient temperature, driving modes, etc.) or human operations (such as improper maintenance, misoperation, etc.); at the same time, identify the logical relationships between these basic events, such as cause-and-effect relationships, parallel relationships, conditional relationships, etc., in order to understand how they work together to cause failures.

[0183] Fault source identification and attribution: Based on the analysis results of basic events, the most likely fault source is identified; this usually includes the following situations:

[0184] Component failure: If the basic event points to a specific component, such as internal short circuit in a battery cell, failure of the motor cooling system, etc., the source of the failure may be quality problems, aging, wear or damage of the component itself.

[0185] System design defects: If the basic events reflect problems at the system design level, such as imperfect battery management system (BMS) algorithm leading to poor battery balancing effect, unreasonable thermal management system design causing overheating risk, etc., the source of the fault may be design defects or insufficient algorithm optimization.

[0186] Improper operation. If the basic event involves human factors, such as failure to correctly follow the operating procedures during maintenance, excessive discharge by the driver causing battery damage, etc., the source of the fault may be insufficient operator skills, inadequate training or unclear procedures.

[0187] Fault path analysis, including:

[0188] Time attribute annotation: In a dynamic fault tree (DFT), time attributes are added to each basic event or intermediate event, such as the latent period (the period when the fault occurs but is not detected), the activation period (the period when the fault begins to affect the system but has not yet caused a fault event), and the manifestation period (the period when the fault event actually occurs); these attributes are derived based on historical data, empirical knowledge, experimental tests, or simulations.

[0189] Dynamic probability tracking uses the DFT model to track the dynamic probability of each basic event in the high-probability minimum cut set over time; including changes in parameters such as the probability of occurrence, detection probability, duration, and impact range of the event; by analyzing these dynamic probabilities, the evolution process of the fault from occurrence to manifestation is revealed.

[0190] Fault path description, based on time attributes and dynamic probability, depicts the complete path of the fault from its initial occurrence to its final manifestation. The path usually includes the following stages:

[0191] Fault origin, the first occurrence of one or more basic events, marks the beginning of the fault.

[0192] Fault propagation, the initial fault event may trigger other related events, forming a fault chain that gradually spreads to the entire system.

[0193] Fault Detection,At certain nodes, faults may be detected by system monitoring or,diagnosis functions, triggering alarms or taking temporary countermeasures.

[0194] Fault manifestation: When faults accumulate to a certain extent or reach specific trigger conditions, they eventually lead to the occurrence of top-level fault events, which manifest as obvious fault phenomena or system failure.

[0195] The triggering conditions and internal laws are revealed. By analyzing the fault path, the internal laws of fault occurrence are revealed. For example, faults are more likely to occur under specific operating conditions (such as extreme temperatures, high-load operation, etc.), or faults are closely related to specific operating behaviors (such as frequent sudden acceleration, long-term high-speed driving, etc.); at the same time, the key conditions that trigger the fault are identified to provide a basis for the formulation of preventive measures.

[0196] Step S5: Push the fault diagnosis result and perform remote control.

[0197] Step S5 specifically includes:

[0198] The cloud server encapsulates the detailed fault information obtained from the diagnosis into a data packet, including fault codes (DTCs), fault description (clearly explaining the fault phenomenon and potential impact), fault location (accurate to the subsystem or component where the fault is located), and recommended repair measures (including temporary countermeasures and long-term solutions); this information is transmitted back to the dedicated diagnostic instrument used by the on-board terminal and service station via a secure and reliable wireless communication link (such as 4G / 5G, Wi-Fi, V2X, etc.).

[0199] The on-board display screen is an important interface for interaction between the driver and the vehicle. After receiving the fault information, it will present the fault prompt in a user-friendly manner. The prompt not only contains the basic situation of the fault (such as fault code, brief description), but also provides emergency handling suggestions to help the driver take temporary measures when necessary to ensure driving safety or slow down the deterioration of the fault. By viewing the information on the screen, the driver can have an intuitive and clear understanding of the current vehicle status and prepare for subsequent maintenance arrangements.

[0200] Maintenance personnel use a dedicated diagnostic instrument to connect to the cloud server to obtain more detailed technical fault data pushed by the cloud; this data may include detailed fault logs, system parameter records when the fault occurs, and in-depth diagnostic reports related to the fault; with this information, maintenance personnel can accurately locate the root cause of the fault, prepare the necessary maintenance tools and spare parts in advance, and even customize targeted maintenance plans, thereby greatly improving maintenance efficiency and reducing vehicle downtime.

[0201] In response to software-level failures or performance optimization needs, the cloud server has the ability to push firmware or software update packages; after receiving the update command, the on-board terminal automatically performs an online upgrade without the driver having to go to a service station; the entire upgrade process is carried out in the background to ensure that it does not affect the normal use of the vehicle; after the update is completed, the performance of the on-board system is improved, software failures are repaired, or new functions are enabled.

[0202] For non-hardware failures caused by improper control strategies, the cloud server can remotely send instructions to dynamically adjust the parameter settings of related controllers. For example, when it detects that an unreasonable motor control strategy has increased energy consumption, the cloud will reconfigure the parameters of the motor controller (MCU), optimize power management, and restore vehicle performance to normal levels. This remote parameter adjustment not only saves time for manual on-site debugging, but also reduces the potential risk of failure caused by improper parameter settings.

[0203] When encountering a major fault that may cause safety risks, such as when the battery management system detects a serious battery abnormality, the cloud server will quickly issue a command to instruct the on-board terminal to perform a fault isolation operation; after receiving the command, the on-board terminal will immediately limit the function of the problematic component, such as cutting off the connection between the abnormal battery cell and the battery pack, to avoid the spread of the fault and ensure that the vehicle can still safely drive to the nearest service station for repair under limited conditions.

[0204] For minor faults or temporary countermeasures that the driver can handle on his own, the on-board terminal will display an operation guide based on cloud instructions to guide the driver to follow the steps; for example, when encountering a minor system abnormality, the terminal may prompt the driver to restart the on-board system to clear the temporary fault; in extreme weather or special road conditions, the terminal may suggest that the driver switch to a specific driving mode (such as economy mode, snow mode) to adapt to environmental changes and optimize vehicle performance; such emergency operation guidance not only enhances the driver's self-coping ability, but also reduces the pressure on after-sales service to a certain extent and improves the availability of the vehicle.

[0205] Example 2

[0206] like Figure 2 As shown, the present invention discloses a new energy vehicle remote diagnosis system based on cloud computing, and the system includes:

[0207] The data acquisition module 10 is used to collect new energy vehicle data and transmit it to the cloud server.

[0208] The data processing module 20 is used to perform data preprocessing and feature extraction after receiving the operation data sent by the vehicle terminal to obtain preprocessed data, which specifically includes:

[0209] The receiving and storing submodule is used for data receiving and storing, and specifically includes:

[0210] The on-board terminal sends the operating data of the new energy vehicle to the cloud server via wireless communication.

[0211] The cloud server receives data through a preset communication protocol using encryption and compression technology.

[0212] The received data is decrypted, decompressed, and stored in a large-scale distributed storage system on the cloud platform in a structured manner.

[0213] Feature extraction submodule, used for data preprocessing and feature engineering, including:

[0214] Clean the stored data and process missing values ​​and outliers.

[0215] The maximum information coefficient is used to calculate the correlation between each feature and the fault label, and the features with correlation higher than the threshold are selected as input.

[0216] Calculate the envelope entropy of the multi-component signal; perform Hilbert transform on each component signal to obtain the instantaneous phase and frequency, calculate the negative entropy of the instantaneous frequency, and take the average value as the envelope entropy.

[0217] Features are selected based on the maximum information coefficient and optimized using variational mode decomposition.

[0218] The data analysis module 30 is used to perform cloud computing batch processing and analysis on the pre-processed data to obtain fault detection results.

[0219] The fault diagnosis module 40 is used to locate the fault of the identified new energy vehicle by using dynamic fault tree analysis on the cloud server to obtain the fault diagnosis result.

[0220] The push control module 50 is used to push the fault diagnosis results and perform remote control.

[0221] As an optional implementation, the present invention selects features based on the maximum information coefficient and uses variational mode decomposition for optimization, specifically including:

[0222] Call the feature selection function to select features whose correlation with the target variable is higher than the threshold based on the maximum information coefficient.

[0223] Define a fitness function, accept variational mode decomposition (VMD) parameters params; the parameters params include α and K, use the selected features to perform VMD decomposition, and obtain a multi-component signal imfs; then calculate the envelope entropy of imfs and return the entropy value.

[0224] Set the population size, number of iterations, mutation rate, and crossover rate.

[0225] Initialize the population and generate a random initial population containing multiple (α, K) combinations. Each individual consists of two parameters α and K.

[0226] Set the initial optimal score to infinity and the optimal parameters to empty, and perform a genetic algorithm cycle. For each generation:

[0227] Call the fitness function for each individual in the current population and calculate its fitness.

[0228] Find the individual with the lowest fitness in the current generation and compare its fitness with the current optimal fitness; if the new fitness is lower, update the global optimal fitness and the optimal individual.

[0229] The next generation population is generated through selection, crossover and mutation operations. The individuals ranked in the top half of the fitness are selected to enter the next generation population by sorting by fitness; new individuals equal to the number of selected individuals are generated as part of the next generation population; each offspring undergoes single-point crossover by randomly selecting two parent individuals; the selected individuals and the generated offspring are merged into a new population.

[0230] Apply the optimal parameters for VMD decomposition. The optimal VMD parameters found in the genetic algorithm optimization process are used to perform VMD decomposition on the selected features and an array of intrinsic mode functions (IMFs) is obtained.

[0231] Returns the optimal parameters, the decomposed IMFs array, and the fitness of the global best individual.

[0232] As an optional implementation, the data analysis module 30 of the present invention specifically includes:

[0233] The batch processing submodule is used to perform distributed parallel processing using cloud computing technology, divide the pre-processed data into multiple batches, and use the elastic computing resources of the cloud platform for calculation.

[0234] The model detection submodule is used to build a new energy vehicle fault detection model for each batch of data; during the model training process, the meta-learning adaptive estimation strategy is used to adaptively adjust the learning rate.

[0235] As an optional implementation mode, the present invention constructs a new energy vehicle fault detection model, which specifically includes:

[0236] Define an input layer; the input layer receives the preprocessed and feature-extracted IMF data as the model input; construct a one-dimensional convolution layer; the convolution layer has 64 filters, and the kernel size of each filter is 3 time steps; the activation function uses selu; after the convolution layer, add a bidirectional long short-term memory network; the bidirectional LSTM considers the previous and next contextual information of the sequence data; set the number of LSTM units to 64; apply a self-attention mechanism layer, the input of which is the output of the previous layer; use a one-dimensional convolution layer, the convolution layer has 128 filters and a kernel size of 3 time steps; apply global average pooling; add a fully connected layer with 32 neurons and the activation function is selu.

[0237] As an optional implementation mode, the meta-learning adaptive estimation strategy of the present invention specifically includes:

[0238] Get the number and range of all trainable parameters in the model.

[0239] Define the MLAES optimizer, including:

[0240] Define an MLAESOptimizer class to implement an MLAES-based optimizer.

[0241] The constructor __init__ initializes the MLAESOptimizer object and receives the following parameters:

[0242] Initial learning rate initial_lr; learning rate decay rate learning_rate_decay; meta learning rate meta_lr; meta batch size meta_batch_size.

[0243] Initialize two empty lists, the population list that stores the learning rate vector and the adaptive_learning_rates list that stores the current adaptive learning rate.

[0244] Based on the number of parameters of the model, use initial_lr and meta_batch_size to generate a population of random learning rate vectors and store the initial learning rate in adaptive_learning_rates.

[0245] Traverse the gradients corresponding to all individuals, decay the existing learning rate of each learning rate vector according to the learning rate decay rate learning_rate_decay, and adjust it according to the gradient value grad multiplied by the meta-learning rate; store the updated learning rate back to the corresponding position of the adaptive_learning_rates list.

[0246] Apply gradients to the model parameters according to the updated learning rate.

[0247] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A remote diagnosis method for new energy vehicles based on cloud computing, characterized in that: The method comprises: Step S1: Collect new energy vehicle data and transmit it to the cloud server; Step S2: After receiving the operation data sent by the vehicle terminal, data preprocessing and feature extraction are performed to obtain preprocessed data, which specifically includes: Data reception and storage, including: The on-board terminal sends the operating data of the new energy vehicle to the cloud server via wireless communication; The cloud server receives data through a preset communication protocol using encryption and compression technology; The received data is decrypted, decompressed, and stored in a large-scale distributed storage system on the cloud platform and is structured; Data preprocessing and feature engineering, including: Clean the stored data and process missing values ​​and outliers; Use the maximum information coefficient to calculate the correlation between each feature and the fault label, and select the features with correlation higher than the threshold as input; Calculate the envelope entropy of the multi-component signal; perform Hilbert transform on each component signal to obtain the instantaneous phase and frequency, calculate the negative entropy of the instantaneous frequency, and take the average value as the envelope entropy; Features are selected based on the maximum information coefficient and optimized using variational mode decomposition, including: Call the feature selection function to select features with a correlation higher than the threshold value with the target variable based on the maximum information coefficient; Define a fitness function, accept variational mode decomposition VMD parameters params; the parameters params include α and K, use the selected features to perform VMD decomposition, and obtain a multi-component signal imfs; then calculate the envelope entropy of imfs and return the entropy value; Set the population size, number of iterations, mutation rate, and crossover rate; Initialize the population and generate a random initial population, which contains multiple (α, K) combinations. Each individual consists of two parameters α and K. Set the initial optimal score to infinity and the optimal parameters to empty, and perform a genetic algorithm cycle. For each generation: Call the fitness function for each individual in the current population and calculate its fitness; Find the individual with the lowest fitness in the current generation and compare its fitness with the current optimal fitness; if the new fitness is lower, update the global optimal fitness and the optimal individual; Generate the next generation population through selection, crossover and mutation operations, sort by fitness, and select the top half of the individuals to enter the next generation population; generate new individuals equal to the number of selected individuals as part of the next generation population; each offspring is crossovered by randomly selecting two parent individuals; the selected individuals and the generated offspring are merged into a new population; Apply the optimal parameters for VMD decomposition, use the optimal VMD parameters found in the genetic algorithm optimization process to perform VMD decomposition on the selected features and obtain the intrinsic mode function IMFs array; Return the optimal parameters, the decomposed IMFs array and the fitness of the global best individual; Step S3: Perform cloud computing batch processing and analysis on the pre-processed data to obtain fault detection results, specifically including: Cloud computing technology is used for distributed parallel processing, the pre-processed data is divided into multiple batches, and the elastic computing resources of the cloud platform are used for calculation; For each batch of data, a new energy vehicle fault detection model is built; during the model training process, a meta-learning adaptive estimation strategy is used to adaptively adjust the learning rate; The meta-learning adaptive estimation strategy specifically includes: Get the number and range of all trainable parameters in the model; Define the MLAES optimizer, including: Define an MLAESOptimizer class to implement an MLAES-based optimizer; The constructor __init__ initializes the MLAESOptimizer object and receives the following parameters: Initial learning rate initial_lr; learning rate decay rate learning_rate_decay; meta learning rate meta_lr; meta batch size meta_batch_size; Initialize two empty lists, the list population that stores the learning rate vector and the list adaptive_learning_rates that stores the current adaptive learning rate; Based on the number of parameters of the model, use initial_lr and meta_batch_size to generate a population of random learning rate vectors and store the initial learning rate in adaptive_learning_rates; Traverse the gradients corresponding to all individuals, decay the existing learning rate of each learning rate vector according to the learning rate decay rate learning_rate_decay, and adjust it according to the gradient value grad multiplied by the meta-learning rate; store the updated learning rate back to the corresponding position of the adaptive_learning_rates list; Apply gradients to model parameters according to the updated learning rate; Step S4: For the identified new energy vehicle fault results, the cloud server uses dynamic fault tree analysis to locate the fault and obtain the fault diagnosis result; Establish a dynamic fault tree DFT, including: Define the identified fault results as the top-level event TE, wherein the identified fault results include battery system fault, motor system fault, electrical system fault, abnormal environment and driving data, and sensor actuator fault; construct an intermediate event IE for the top-level event TE based on the identified fault results; refine the intermediate event IE and list the causes of the faults; use logic gates to connect the basic event BE and the intermediate event IE according to the logical relationship between the faults; Define dynamic properties, including: Add time attributes to basic events BE and logic gates LG; Quantitative analysis, including: Assign a dynamic probability model to the basic event BE. The dynamic probability of the basic event BE is expressed as: Basic Events In time The probability of occurrence is , is the time variable; Is with the basic event Related dynamic parameters; It is a dynamic probability model that describes the evolution of faults over time; The dynamic probability of logic gate LG is expressed as: Logic gate connection basic events and intermediate events , at time The conditional probability of the logic gate is , is an intermediate event; Is with the basic event and intermediate events The logical relationship between dynamic parameters; It is a dynamic model that describes the change of conditional probability of logic gates over time; Calculate the minimum fault combination that causes each top-level event to occur, the minimum fault combination is the minimum cut set CS; in DFT, the probability of the minimum cut set is the probability of the minimum cut set it contains The product of the probability of basic events occurring simultaneously within the time window is expressed as: ; In the formula, Express All basic events in Perform multiplication; The dynamic fault tree structure and the dynamic probability model of basic events are used to calculate the probability of occurrence of each top-level event within the time window; the failure probability is the sum of the minimum cut set probabilities that lead to the top-level event, expressed as: ; In the formula, Represents all top-level events that lead to The minimum cut set Perform summation; Fault source identification, including: According to all the calculated minimum cut sets and their corresponding probabilities, they are sorted from high to low according to the probability value; each basic event in the high-probability minimum cut set is analyzed; Based on the analysis results of basic events, identify the source of the fault; Step S5: Push the fault diagnosis result and perform remote control.

2. The remote diagnosis method for new energy vehicles based on cloud computing according to claim 1 is characterized in that: The construction of the new energy vehicle fault detection model specifically includes: Define an input layer; the input layer receives the preprocessed and feature-extracted IMF data as the model input; construct a one-dimensional convolution layer; the convolution layer has 64 filters, and the kernel size of each filter is 3 time steps; the activation function uses selu; after the convolution layer, add a bidirectional long short-term memory network; the bidirectional LSTM considers the previous and next contextual information of the sequence data; set the number of LSTM units to 64; apply a self-attention mechanism layer, the input of which is the output of the previous layer; use a one-dimensional convolution layer, the convolution layer has 128 filters and a kernel size of 3 time steps; apply global average pooling; add a fully connected layer with 32 neurons and the activation function is selu.

3. The new energy vehicle remote diagnosis system based on cloud computing is characterized by: The system comprises: Data acquisition module, used to collect new energy vehicle data and transmit it to the cloud server; The data processing module is used to perform data preprocessing and feature extraction after receiving the operation data sent by the vehicle terminal to obtain preprocessed data, specifically including: The receiving and storing submodule is used for data receiving and storing, and specifically includes: The on-board terminal sends the operating data of the new energy vehicle to the cloud server via wireless communication; The cloud server receives data through a preset communication protocol using encryption and compression technology; The received data is decrypted, decompressed, and stored in a large-scale distributed storage system on the cloud platform and is structured; Feature extraction submodule, used for data preprocessing and feature engineering, including: Clean the stored data and process missing values ​​and outliers; Use the maximum information coefficient to calculate the correlation between each feature and the fault label, and select the features with correlation higher than the threshold as input; Calculate the envelope entropy of the multi-component signal; perform Hilbert transform on each component signal to obtain the instantaneous phase and frequency, calculate the negative entropy of the instantaneous frequency, and take the average value as the envelope entropy; Features are selected based on the maximum information coefficient and optimized using variational mode decomposition, including: Call the feature selection function to select features with a correlation higher than the threshold value with the target variable based on the maximum information coefficient; Define a fitness function, accept variational mode decomposition VMD parameters params; the parameters params include α and K, use the selected features to perform VMD decomposition, and obtain a multi-component signal imfs; then calculate the envelope entropy of imfs and return the entropy value; Set the population size, number of iterations, mutation rate, and crossover rate; Initialize the population and generate a random initial population, which contains multiple (α, K) combinations. Each individual consists of two parameters α and K. Set the initial optimal score to infinity and the optimal parameters to empty, and perform a genetic algorithm cycle. For each generation: Call the fitness function for each individual in the current population and calculate its fitness; Find the individual with the lowest fitness in the current generation and compare its fitness with the current optimal fitness; if the new fitness is lower, update the global optimal fitness and the optimal individual; Generate the next generation population through selection, crossover and mutation operations, sort by fitness, and select the top half of the individuals to enter the next generation population; generate new individuals equal to the number of selected individuals as part of the next generation population; each offspring is randomly selected from two parent individuals for single-point crossover; the selected individuals and generated offspring are merged into a new population; Apply the optimal parameters for VMD decomposition, use the optimal VMD parameters found in the genetic algorithm optimization process to perform VMD decomposition on the selected features and obtain the intrinsic mode function IMFs array; Return the optimal parameters, the decomposed IMFs array and the fitness of the global best individual; The data analysis module is used to perform cloud computing batch processing and analysis on the pre-processed data to obtain fault detection results, including: The batch processing submodule is used to perform distributed parallel processing using cloud computing technology, divide the pre-processed data into multiple batches, and use the elastic computing resources of the cloud platform for calculation; The model detection submodule is used to build a new energy vehicle fault detection model for each batch of data; during the model training process, the meta-learning adaptive estimation strategy is used to adaptively adjust the learning rate; The meta-learning adaptive estimation strategy specifically includes: Get the number and range of all trainable parameters in the model; Define the MLAES optimizer, including: Define an MLAESOptimizer class to implement an MLAES-based optimizer; The constructor __init__ initializes the MLAESOptimizer object and receives the following parameters: Initial learning rate initial_lr; learning rate decay rate learning_rate_decay; meta learning rate meta_lr; meta batch size meta_batch_size; Initialize two empty lists, the list population that stores the learning rate vector and the list adaptive_learning_rates that stores the current adaptive learning rate; Based on the number of parameters of the model, use initial_lr and meta_batch_size to generate a population of random learning rate vectors and store the initial learning rate in adaptive_learning_rates; Traverse the gradients corresponding to all individuals, decay the existing learning rate of each learning rate vector according to the learning rate decay rate learning_rate_decay, and adjust it according to the gradient value grad multiplied by the meta-learning rate; store the updated learning rate back to the corresponding position of the adaptive_learning_rates list; Apply gradients to model parameters according to the updated learning rate; The fault diagnosis module is used to locate the faults of the identified new energy vehicles using dynamic fault tree analysis on the cloud server to obtain the fault diagnosis results; Establish a dynamic fault tree DFT, including: Define the identified fault results as the top-level event TE, wherein the identified fault results include battery system fault, motor system fault, electrical system fault, abnormal environment and driving data, and sensor actuator fault; construct an intermediate event IE for the top-level event TE based on the identified fault results; refine the intermediate event IE and list the causes of the faults; use logic gates to connect the basic event BE and the intermediate event IE according to the logical relationship between the faults; Define dynamic properties, including: Add time attributes to basic events BE and logic gates LG; Quantitative analysis, including: Assign a dynamic probability model to the basic event BE. The dynamic probability of the basic event BE is expressed as: Basic Events In time The probability of occurrence is , is the time variable; Is with the basic event Related dynamic parameters; It is a dynamic probability model that describes the evolution of faults over time; The dynamic probability of logic gate LG is expressed as: Logic gate connection basic events and intermediate events , at time The conditional probability of the logic gate is , is an intermediate event; Is with the basic event and intermediate events The logical relationship between dynamic parameters; It is a dynamic model that describes the change of conditional probability of logic gates over time; Calculate the minimum fault combination that causes each top-level event to occur, the minimum fault combination is the minimum cut set CS; in DFT, the probability of the minimum cut set is the probability of the minimum cut set it contains The product of the probability of basic events occurring simultaneously within the time window is expressed as: ; In the formula, Express All basic events in Perform multiplication; The dynamic fault tree structure and the dynamic probability model of basic events are used to calculate the probability of occurrence of each top-level event within the time window; the failure probability is the sum of the minimum cut set probabilities that lead to the top-level event, expressed as: ; In the formula, Represents all top-level events that lead to The minimum cut set Perform summation; Fault source identification, including: According to all the calculated minimum cut sets and their corresponding probabilities, they are sorted from high to low according to the probability value; each basic event in the high-probability minimum cut set is analyzed; Based on the analysis results of basic events, identify the source of the fault; The push control module is used to push the fault diagnosis results and perform remote control.

4. The cloud computing-based new energy vehicle remote diagnosis system according to claim 3 is characterized in that: The construction of the new energy vehicle fault detection model specifically includes: Define an input layer; the input layer receives the preprocessed and feature-extracted IMF data as the model input; construct a one-dimensional convolution layer; the convolution layer has 64 filters, and the kernel size of each filter is 3 time steps; the activation function uses selu; after the convolution layer, add a bidirectional long short-term memory network; the bidirectional LSTM considers the previous and next contextual information of the sequence data; set the number of LSTM units to 64; apply a self-attention mechanism layer, the input of which is the output of the previous layer; use a one-dimensional convolution layer, the convolution layer has 128 filters and a kernel size of 3 time steps; apply global average pooling; add a fully connected layer with 32 neurons and the activation function is selu.

Citation Information

Patent Citations

  • OBDS long-distance fault diagnosis and recovery system based on cloud computation

    CN104133467A

  • Vehicle fault intelligent diagnosis system and method

    CN116880454A

  • Network abnormal state monitoring and diagnosing method based on AI cloudization

    CN117857375A

  • Special vehicle propulsion power device bearing fault diagnosis method

    CN117972504A

  • Remote diagnosis method and apparatus, and electronic device and storage medium

    WO2023125852A1