Vehicle fault prediction method, device, electronic device and storage medium
By obtaining vehicle parameter data for segmentation and sampling, training samples are generated, and the convolution-pooling layer and particle swarm algorithm are used to train the vehicle fault state prediction model, which solves the complexity and accuracy problems of high-temperature battery fault diagnosis in the existing technology. , achieving accurate fault prediction and high-temperature fault diagnosis.
Patent Information
- Application Number
- CN202410806298.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-21
- Publication Date
- 2024-10-08
- Estimated Expiration
- 2044-06-21
AI Technical Summary
Existing battery high-temperature fault diagnosis technology relies on external equipment and interface converters, which increases system complexity and cost, and characteristic data at a single moment cannot fully reflect the battery status, affecting diagnostic accuracy.
By obtaining vehicle parameter data, segmenting and sampling are performed to generate training samples, and the convolution-pooling layer and particle swarm algorithm are used to train the vehicle fault state prediction model. The weights are used to adjust the samples to improve the number of high-temperature fault data and the prediction accuracy of the model. .
It achieves accurate vehicle fault prediction, reduces system complexity and cost, improves the accuracy of high-temperature fault diagnosis, and solves the problem of data imbalance.
Smart Images

Figure CN118378164B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle diagnosis technology, and in particular to a vehicle fault prediction method, device, electronic device and computer-readable storage medium. Background Art
[0002] At present, the existing technologies for battery high temperature fault diagnosis have some common defects: first, the reliance on external devices and interface converters increases the system complexity and cost. Second, some methods only use characteristic data at a single moment for diagnosis, which cannot fully reflect the changes in battery status, thus affecting the diagnosis accuracy. Summary of the invention
[0003] The purpose of the embodiments of the present application is to provide a vehicle fault prediction method, device, electronic device and computer-readable storage medium, which can accurately predict vehicle faults based on continuously acquired vehicle parameter data.
[0004] In a first aspect, an embodiment of the present application provides a vehicle fault prediction method, comprising:
[0005] Get car parameter data;
[0006] Segmenting the automobile parameter data according to preset time intervals to obtain multiple sub-data sets;
[0007] Sampling each sub-data set according to a preset sampling frequency to obtain a plurality of sampling samples;
[0008] Generate training samples according to the multiple sampling samples;
[0009] Training a vehicle fault state prediction model according to the training samples to obtain a trained vehicle fault state prediction model;
[0010] The trained vehicle fault state prediction model is used to predict the vehicle fault state.
[0011] In the above implementation process, the vehicle parameter data is obtained; the vehicle parameter data is segmented according to a preset time interval to obtain multiple sub-data sets; each sub-data set is sampled according to a preset sampling frequency to obtain multiple sampling samples; and training samples are generated based on the multiple sampling samples. Continuous measurement results are obtained through sampling and segmentation operations, and the vehicle fault state prediction model is trained based on the continuous measurement results, so that the trained vehicle fault state prediction model can accurately predict the vehicle fault state.
[0012] Furthermore, generating training samples according to the multiple sampling samples includes:
[0013] Obtaining a weight of each fault sampling sample according to the distances between the plurality of sampling samples, wherein the weight is used to characterize the reliability of the sampling sample;
[0014] Determine the number of training samples required to be generated for each fault sample according to the weight corresponding to each fault sampling sample;
[0015] Determine a first number of target adjustment samples corresponding to each faulty sample in the plurality of samples;
[0016] Each fault sampling sample is adjusted according to the target adjustment sample corresponding to each fault sampling sample to obtain a training sample.
[0017] In the above implementation process, because in actual situations, the battery is usually in normal working state, resulting in less high temperature fault data. This serious data imbalance problem makes it difficult for the fault diagnosis model to fully learn the characteristics of high temperature faults, which ultimately affects the accuracy of high temperature fault diagnosis prediction. Through the above method, the high temperature fault data can be expanded to further improve the prediction accuracy of the vehicle fault state prediction model.
[0018] Furthermore, obtaining the weight of each fault sampling sample according to the distance between the multiple sampling samples includes:
[0019] The weight of each fault sampling sample is obtained according to the following formula:
[0020] ;
[0021] ;
[0022] ;
[0023] in, For the The first fault sampling sample Dimensional data;
[0024] For the The first sample Dimensional data;
[0025] is the dimension of the sampled data;
[0026] For the The sum of the distances between a fault sampling sample and other sampling samples;
[0027] For the Fault sampling samples;
[0028] For the Samples of samples;
[0029] is the number of samples;
[0030] No. The weight of each fault sampling sample.
[0031] In the above implementation process, the above formula takes into account multiple dimensional data of all sampling samples and accurately calculates the weights of all fault sampling samples.
[0032] Further, the determining of a first number of target adjustment samples corresponding to each faulty sampling sample from a plurality of sampling samples includes:
[0033] The sampling samples of the first quantity corresponding to each faulty sampling sample and which are closest to each faulty sampling sample among the multiple sampling samples are determined as target adjustment samples for each faulty sampling sample.
[0034] In the above implementation process, the first number of sampling samples corresponding to each fault sampling sample, which are closest to each fault sampling sample among the multiple sampling samples, are determined as target adjustment samples for each fault sampling sample, thereby ensuring the number of fault data and improving the prediction accuracy of the vehicle state prediction model.
[0035] Furthermore, the training sample is generated by the following formula:
[0036] ;
[0037] According to the The first fault sampling sample is generated training samples;
[0038] is the preset weight;
[0039] For the The first fault sampling sample Target adjustment samples.
[0040] In the above implementation process, the above formula can be used to quickly generate training samples, increase the amount of fault data, and further improve the prediction accuracy of the vehicle fault state prediction model.
[0041] Furthermore, the vehicle fault state prediction model includes: a convolution-pooling layer, and before the vehicle fault state prediction model is trained according to the training samples to obtain the trained vehicle fault state prediction model, it also includes:
[0042] The number of network series connections and the learning rate of the convolution-pooling layer in the vehicle fault state prediction model are determined according to the particle swarm algorithm, the pre-constructed loss function and the training samples.
[0043] In the above implementation process, the particle swarm algorithm can be used to determine the optimal combination of the number of network series connection and the learning rate among the number of network series connection and the learning rate of multiple convolution-pooling layers, thereby further improving the prediction accuracy of the vehicle fault state prediction model.
[0044] Further, the determining the number of network series connections and the learning rate of the convolution-pooling layer in the vehicle fault state prediction model according to the particle swarm algorithm, the pre-constructed loss function and the training sample includes:
[0045] S21: Initialize a particle swarm, the particle swarm includes a plurality of particles, each particle includes: a position attribute and a speed attribute; the position attribute corresponding to each particle is used to indicate the number of network series and the training learning rate, and the speed attribute corresponding to each particle indicates the direction and rate of updating the position attribute of each particle;
[0046] S22: Calculate the current cross entropy loss value corresponding to each particle according to the position attribute corresponding to each particle, and use the current cross entropy loss value of each particle as the fitness of each particle;
[0047] S23: taking the position of the particle with the smallest fitness in the particle swarm as the optimal particle position attribute of the particle swarm;
[0048] S24: updating the speed attribute of each particle according to the first preset formula, the speed attribute of each particle, the optimal position attribute of the particle group and the position attribute of each particle, and updating the position attribute of each particle according to the second preset formula, the speed attribute of each particle and the position attribute of each particle;
[0049] S25: Repeat steps S22 to S24 until the iteration termination condition is met;
[0050] S26: Using the number of network series connected and the training learning rate corresponding to the particle with the highest fitness in the particle swarm as the number of network series connected in the convolution-pooling layer in the vehicle fault state prediction model.
[0051] In the above implementation process, the optimal combination of the number of network series connection and the learning rate can be determined among the number of network series connection and the learning rate of multiple convolution-pooling layers, so as to further improve the prediction accuracy of the vehicle fault state prediction model.
[0052] In a second aspect, an embodiment of the present application provides a vehicle fault prediction device, comprising:
[0053] A parameter data acquisition module is used to acquire vehicle parameter data;
[0054] A segmentation module, used for segmenting the automobile parameter data according to a preset time interval to obtain a plurality of sub-data sets;
[0055] A sampling module is used to sample each sub-data set according to a preset sampling frequency to obtain multiple sampling samples;
[0056] A training sample generating module, used for generating a training sample according to the plurality of sampling samples;
[0057] A training module, used for training a vehicle fault state prediction model according to the training samples to obtain a trained vehicle fault state prediction model;
[0058] The prediction module is used to predict the vehicle fault state by using the trained vehicle fault state prediction model.
[0059] In a third aspect, the present application provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method described in any one of the first aspects is implemented.
[0060] In a fourth aspect, the present application provides a computer-readable storage medium having instructions stored thereon. When the instructions are executed on a computer, the computer executes the method as described in any one of the first aspects. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0062] Figure 1 A schematic diagram of a process flow of a vehicle fault prediction method provided in an embodiment of the present application;
[0063] Figure 2A schematic diagram of a process for determining the number of network series connections and the learning rate of a convolution-pooling layer according to a particle swarm algorithm provided in an embodiment of the present application;
[0064] Figure 3 A schematic diagram of the structure of a vehicle fault prediction device provided in an embodiment of the present application;
[0065] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0066] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0067] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0068] See also Figure 1 , the embodiment of the present application provides a vehicle fault prediction method, comprising:
[0069] S11: Obtaining vehicle parameter data;
[0070] The vehicle parameter data is continuous time series data; the vehicle parameter data is obtained through the battery management system, which can measure the battery status of the electric vehicle in real time and provide continuous feedback of the measurement results. During driving, the parameters may fluctuate due to external factors. Battery high temperature fault diagnosis based only on characteristic measurement values at a single moment has the problem of low prediction accuracy. Therefore, this application uses time series data for battery high temperature fault detection.
[0071] S12: Segmenting the automobile parameter data according to a preset time interval to obtain a plurality of sub-data sets;
[0072] Exemplarily, the collected parameter feature data are sliced in units of 10 seconds to obtain N groups of sub-data sets in total.
[0073] S13: Sampling each sub-data set according to a preset sampling frequency to obtain a plurality of sampling samples;
[0074] For example, for each 10-second vehicle parameter data, uniform time sampling is performed at a frequency of 5 Hz, and finally The length of the vehicle parameter data corresponding to the group data is 50, namely:
[0075] ,in, For the Set vehicle parameter data at time point The characteristic data of .
[0076] Characteristic data include but are not limited to: battery temperature, voltage, current, battery capacity, and ambient temperature and humidity.
[0077] It is understandable that each sample also has a corresponding battery status label , It is used to indicate whether the vehicle is in normal state or high temperature fault state. High temperature faults include: battery overcharge, battery aging, over discharge and cooling system fault.
[0078] That is, multiple samples form ,in, include and Corresponding tags .
[0079] S14: Generate training samples according to multiple sampling samples;
[0080] S15: training a vehicle fault state prediction model according to the training samples to obtain a trained vehicle fault state prediction model;
[0081] S16: Predict the vehicle fault state using the trained vehicle fault state prediction model.
[0082] In the above implementation process, the vehicle parameter data is obtained; the vehicle parameter data is segmented according to a preset time interval to obtain multiple sub-data sets; each sub-data set is sampled according to a preset sampling frequency to obtain multiple sampling samples; and training samples are generated based on the multiple sampling samples. Continuous measurement results are obtained through sampling and segmentation operations, and the vehicle fault state prediction model is trained based on the continuous measurement results, so that the trained vehicle fault state prediction model can accurately predict the vehicle fault state.
[0083] In some embodiments, since different types of vehicle parameter data (such as temperature and voltage) have different data scales, directly using the initial data set for model training will affect the diagnostic performance of the neural network model to a certain extent. S1 also performs standardized preprocessing on the vehicle parameter data so that different dimensional variables have the same scale, thereby accelerating the convergence of weight parameters in the subsequent neural network training process. The formula for data standardization is:
[0084] ;
[0085] in, is the standardized automobile parameter data; is the car parameter data; The minimum value in the car parameter data; The maximum value in the car parameter data. The standardized car parameter data can be expressed as: .
[0086] Since in actual situations, batteries are usually in normal working state, the number of normal state data in the data set far exceeds the high temperature fault data. This serious data imbalance problem makes it difficult for the fault diagnosis model to fully learn the characteristics of high temperature faults, which ultimately affects the accuracy of high temperature fault diagnosis prediction. Therefore, in some embodiments, training samples are generated based on multiple sampling samples, including: obtaining the weight of each fault sampling sample based on the distance between multiple sampling samples, and the weight is used to characterize the reliability of the sampling sample; determining the number of training samples that need to be generated for each fault sampling sample based on the weight corresponding to each fault sampling sample; determining the first number of target adjustment samples corresponding to each fault sampling sample in multiple sampling samples; adjusting each fault sampling sample based on the target adjustment sample corresponding to each fault sampling sample to obtain a training sample.
[0087] In this application, the fault sampling sample refers to a sample with a label of a high temperature fault state.
[0088] In the above implementation process, because in actual situations, the battery is usually in normal working state, resulting in less high temperature fault data. This serious data imbalance problem makes it difficult for the fault diagnosis model to fully learn the characteristics of high temperature faults, which ultimately affects the accuracy of high temperature fault diagnosis prediction. Through the above method, the high temperature fault data can be expanded to further improve the prediction accuracy of the vehicle fault state prediction model.
[0089] In some embodiments, obtaining a weight of each fault sampling sample according to the distance between the plurality of sampling samples includes:
[0090] The weight of each fault sampling sample is obtained according to the following formula:
[0091] ;
[0092] ;
[0093] ;
[0094] in, For the The first fault sampling sample Dimensional data;
[0095] For the The first sample Dimensional data;
[0096] is the dimension of the sampled data;
[0097] For the The sum of the distances between a fault sampling sample and other sampling samples;
[0098] For the Fault sampling samples;
[0099] For the Samples of samples;
[0100] is the number of samples;
[0101] No. The weight of each fault sampling sample.
[0102] In the above implementation process, the above formula takes into account multiple dimensional data of all sampling samples and accurately calculates the weights of all fault sampling samples.
[0103] In some embodiments, the first quantity corresponding to each fault sampling sample is obtained according to the following formula:
[0104] * ;in, For the The weight corresponding to the fault sampling sample, is the total number of samples to be generated.
[0105] like If is not an integer, then Perform rounding operation.
[0106] In some embodiments, determining a first number of target adjustment samples corresponding to each faulty sampling sample from a plurality of sampling samples includes:
[0107] The first number of sampling samples corresponding to each fault sampling sample and closest to each fault sampling sample among the multiple sampling samples are determined as the first number of target adjustment samples for each fault sampling sample.
[0108] In the above implementation process, the first number of sampling samples corresponding to each fault sampling sample, which are closest to each fault sampling sample among multiple sampling samples, are determined as the first number of target adjustment samples for each fault sampling sample, thereby ensuring the number of fault data and improving the prediction accuracy of the vehicle state prediction model.
[0109] In some embodiments, the training samples are generated by the following formula:
[0110] ;
[0111] According to The first fault sampling sample is generated training samples;
[0112] is the preset weight, between 0 and 1;
[0113] For the The first fault sampling sample Target adjustment samples.
[0114] It is understandable that The fault sampling samples correspond to Less than or equal to For example, if the first number of a certain fault sampling sample is 3, then It is 1, 2, 3.
[0115] In some embodiments, the vehicle fault state prediction model includes a fully connected layer, a RelU activation function, multiple convolution-pooling layers connected in series, each convolution-pooling layer includes: a three-convolution pooling layer and a RelU activation function; a Dropout layer; a global average pooling layer; and a softmax classification layer.
[0116] The working process of the vehicle fault state prediction model is as follows: First, the vehicle parameter data (training samples or test data) is sent to the network input layer, and the data is expanded using the fully connected layer, and the network neurons are activated using the ReLU activation function. After that, the data will be input into multiple three-convolution-pooling modules for feature extraction and aggregation. The three-convolution-pooling module uses two conv3 convolution layers and one conv1 convolution layer, followed by a maximum pooling layer, and the ReLU activation function is also used after this module for network neuron activation. Finally, feature fusion is performed through the global average pooling layer, and then the data is sent to the softmax layer for classification, and the high-temperature fault diagnosis prediction result corresponding to the final input parameter feature measurement value is obtained.
[0117] In addition, in order to further optimize the model, this technology adds a dropout layer to regularize the network to avoid overfitting. Among them, the fully connected layer receives the car parameter data, and the softmax classification layer outputs the high temperature diagnosis result.
[0118] In some embodiments, the loss function of the vehicle fault state prediction model is as follows:
[0119] ;
[0120] is the cross entropy loss function value;
[0121] is the total number of training samples;
[0122] is the total number of vehicle status categories;
[0123] For the training samples do not belong to The probability of the class, ;
[0124] For the The true labels of the training samples.
[0125] In some embodiments, =0, or =1.
[0126] In some embodiments, before training a vehicle fault state prediction model based on training samples to obtain the trained vehicle fault state prediction model, it also includes: determining the number of network series and the learning rate of the convolution-pooling layer in the vehicle fault state prediction model based on a particle swarm algorithm, a pre-constructed loss function and training samples.
[0127] In the above implementation process, the particle swarm algorithm can be used to determine the optimal combination of the number of network series connection and the learning rate among the number of network series connection and the learning rate of multiple convolution-pooling layers, thereby further improving the prediction accuracy of the vehicle fault state prediction model.
[0128] See also Figure 2 In some embodiments, the number of network series connections and the learning rate of the convolution-pooling layer in the vehicle fault state prediction model are determined according to the particle swarm algorithm, the pre-built loss function and the training samples, including:
[0129] S21: Initialize a particle swarm, which includes multiple particles. Each particle includes: a position attribute and a speed attribute. The position attribute corresponding to each particle is used to indicate the number of network series and the training learning rate. The speed attribute corresponding to each particle indicates the direction and rate of updating the position attribute of each particle.
[0130] For example, the particle swarm is initialized to include particles, where the position of each particle represents the number of networks connected in series with a set of convolution-pooling layers. and learning rate ; That is The position properties of each particle , .
[0131] S22: Calculate the current cross entropy loss value corresponding to each particle according to the position attribute corresponding to each particle, and use the current cross entropy loss value of each particle as the fitness of each particle;
[0132] Exemplarily, the loss function is used to calculate The loss value of the training sample output by the training model under the particle parameters is taken as the average loss value of all training samples. The fitness of a particle .
[0133] S23: taking the position of the particle with the smallest fitness in the particle swarm as the optimal particle position attribute of the particle swarm;
[0134] For example, find the particle position corresponding to the particle individual with the smallest fitness among all particles and use it as the current best particle position . .
[0135] S24: updating the speed attribute of each particle according to the first preset formula, the speed attribute of each particle, the optimal position attribute of the particle group and the position attribute of each particle, and updating the position attribute of each particle according to the second preset formula, the speed attribute of each particle and the position attribute of each particle;
[0136] The first preset formula is: ;
[0137] ;
[0138] in, No. The updated velocity attribute of each particle, is the preset weight, which is 0.7. is a random number between 0 and 1, for The current velocity property of each particle, No. The updated position properties of each particle; for The current position property of each particle.
[0139] S25: Repeat steps S22 to S24 until the iteration termination condition is met;
[0140] The termination condition may be that the number of iterations reaches a preset value.
[0141] S27: The number of network series connected and the training learning rate corresponding to the particle with the highest fitness in the particle swarm are used as the number of network series connected in the convolution-pooling layer in the vehicle fault state prediction model.
[0142] In the above implementation process, the optimal combination of the number of network series connection and the learning rate can be determined among the number of network series connection and the learning rate of multiple convolution-pooling layers, so as to further improve the prediction accuracy of the vehicle fault state prediction model.
[0143] In some implementations, after the number of network series and the training learning rate corresponding to the particle with the highest fitness in the particle swarm are used as the number of network series in the convolution-pooling layer in the vehicle fault state prediction model, the present application selects the Adam adaptive learning algorithm for the cross entropy loss function, iteratively updates the parameters of the vehicle fault state prediction model to ensure that the loss function decreases along the gradient direction; and all data sets are integrated into the model training process, and the number of training iterations is set to 300. Finally, a high temperature fault diagnosis prediction model that can be directly used is obtained.
[0144] In some embodiments, predicting a vehicle fault state using a trained vehicle fault state prediction model includes:
[0145] Based on the battery management system, the vehicle parameter data of the electric vehicle is measured in real time, including battery temperature, voltage, current, battery capacity, ambient temperature and humidity, and other parameters, and the sub-dataset is obtained using the S2 method; the data of the sub-dataset is preprocessed to obtain standardized input data;
[0146] The feature data is input into the trained vehicle fault status prediction model to predict the corresponding battery status output (normal operation, battery overcharge, battery aging, over discharge, and cooling system failure).
[0147] See also Figure 3 , the embodiment of the present application provides a vehicle fault prediction device, comprising:
[0148] The parameter data acquisition module 31 is used to acquire the vehicle parameter data;
[0149] A segmentation module 32, used for segmenting the automobile parameter data according to a preset time interval to obtain a plurality of sub-data sets;
[0150] A sampling module 33 is used to sample each sub-data set according to a preset sampling frequency to obtain a plurality of sampling samples;
[0151] A training sample generating module 34, used to generate a training sample according to a plurality of sampling samples;
[0152] A training module 35 is used to train a vehicle fault state prediction model according to training samples to obtain a trained vehicle fault state prediction model;
[0153] The prediction module 36 is used to predict the vehicle fault state by using the trained vehicle fault state prediction model.
[0154] The device is also used to execute the method of the method embodiment, which will not be described in detail here.
[0155] This application also provides an electronic device, see Figure 4 , Figure 4 A block diagram of an electronic device provided in an embodiment of the present application. The electronic device may include a processor 41, a communication interface 42, a memory 43, and at least one communication bus 44. The communication bus 44 is used to realize direct connection and communication between these components. The communication interface 42 of the electronic device in the embodiment of the present application is used to communicate signaling or data with other node devices. The processor 41 may be an integrated circuit chip with signal processing capabilities.
[0156] The processor 41 mentioned above can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor 41 can also be any conventional processor, etc.
[0157] The memory 43 may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), etc. The memory 43 stores computer-readable instructions. When the computer-readable instructions are executed by the processor 41, the electronic device may execute the various steps involved in the above method embodiment.
[0158] Optionally, the electronic device may further include a storage controller and an input / output unit.
[0159] The memory 43, storage controller, processor 41, peripheral interface, input and output unit components are directly or indirectly electrically connected to each other to achieve data transmission or interaction. For example, these components can be electrically connected to each other via one or more communication buses 44. The processor 41 is used to execute executable modules stored in the memory 43, such as software function modules or computer programs included in the electronic device.
[0160] The input and output unit is used to provide users with the task creation and to create a start optional time period or preset execution time for the task to realize the interaction between the user and the server. The input and output unit can be, but is not limited to, a mouse and a keyboard.
[0161] Understandably, Figure 4 The structure shown is for illustration only, and the electronic device may also include Figure 4 More or fewer components as shown, or with Figure 4 Different configurations are shown. Figure 4 Each component shown in the figure can be implemented by hardware, software or a combination thereof.
[0162] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and a part of the module, program segment or code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0163] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0164] If the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0165] The above are only embodiments of the present application and are not intended to limit the scope of protection of the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application. It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.
[0166] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0167] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
Claims
1. A vehicle fault prediction method, characterized in that: include: Get car parameter data; Segmenting the automobile parameter data according to preset time intervals to obtain multiple sub-data sets; Sampling each sub-data set according to a preset sampling frequency to obtain a plurality of sampling samples; Generate training samples according to the multiple sampling samples; Training a vehicle fault state prediction model according to the training samples to obtain a trained vehicle fault state prediction model; Predicting a vehicle fault state using the trained vehicle fault state prediction model; The generating of training samples according to the plurality of sampling samples comprises: Obtaining a weight of each fault sampling sample according to the distances between the plurality of sampling samples, wherein the weight is used to characterize the reliability of the sampling sample; Determine a first number of training samples that need to be generated for each fault sample according to the weight corresponding to each fault sampling sample; Determine a first number of target adjustment samples corresponding to each faulty sample from a plurality of sample samples; Adjust each fault sampling sample according to the target adjustment sample corresponding to each fault sampling sample to obtain a training sample; The step of obtaining the weight of each fault sampling sample according to the distance between the plurality of sampling samples comprises: The weight of each fault sampling sample is obtained according to the following formula: ; ; ; in, For the The first fault sampling sample Dimensional data; For the The first sample Dimensional data; is the dimension of the sampled data; For the The sum of the distances between a fault sampling sample and other sampling samples; For the Fault sampling samples; For the Samples of samples; is the number of samples; No. The weight of each fault sampling sample.
2. The vehicle fault prediction method according to claim 1, characterized in that: The step of determining a first number of target adjustment samples corresponding to each faulty sample from a plurality of sample samples comprises: The sampling samples of the first quantity corresponding to each faulty sampling sample and which are closest to each faulty sampling sample among the multiple sampling samples are determined as target adjustment samples for each faulty sampling sample.
3. The vehicle fault prediction method according to claim 1, characterized in that: The training samples are generated by the following formula: ; According to The first fault sampling sample is generated training samples; is the preset weight; For the The first fault sampling sample Target adjustment samples.
4. The vehicle fault prediction method according to claim 1, characterized in that: The vehicle fault state prediction model comprises: a convolution-pooling layer, and before the vehicle fault state prediction model is trained according to the training sample to obtain the trained vehicle fault state prediction model, the method further comprises: The number of network series connections and the learning rate of the convolution-pooling layer in the vehicle fault state prediction model are determined according to the particle swarm algorithm, the pre-constructed loss function and the training samples.
5. The vehicle fault prediction method according to claim 4, characterized in that: The determining the number of network series connections and the learning rate of the convolution-pooling layer in the vehicle fault state prediction model according to the particle swarm algorithm, the pre-constructed loss function and the training sample includes: S21: Initialize a particle swarm, the particle swarm includes a plurality of particles, each particle includes: a position attribute and a speed attribute; the position attribute corresponding to each particle is used to indicate the number of network series and the training learning rate, and the speed attribute corresponding to each particle indicates the direction and rate of updating the position attribute of each particle; S22: Calculate the current cross entropy loss value corresponding to each particle according to the position attribute corresponding to each particle, and use the current cross entropy loss value of each particle as the fitness of each particle; S23: taking the position of the particle with the smallest fitness in the particle swarm as the optimal particle position attribute of the particle swarm; S24: updating the speed attribute of each particle according to the first preset formula, the speed attribute of each particle, the optimal position attribute of the particle group and the position attribute of each particle, and updating the position attribute of each particle according to the second preset formula, the speed attribute of each particle and the position attribute of each particle; S25: Repeat steps S22 to S24 until the iteration termination condition is met; S26: Using the number of network series connected and the training learning rate corresponding to the particle with the highest fitness in the particle swarm as the number of network series connected in the convolution-pooling layer in the vehicle fault state prediction model.
6. A vehicle fault prediction device, characterized in that: include: A parameter data acquisition module is used to acquire vehicle parameter data; A segmentation module, used for segmenting the automobile parameter data according to a preset time interval to obtain a plurality of sub-data sets; A sampling module is used to sample each sub-data set according to a preset sampling frequency to obtain multiple sampling samples; A training sample generating module, used for generating a training sample according to the plurality of sampling samples; A training module, used for training a vehicle fault state prediction model according to the training samples to obtain a trained vehicle fault state prediction model; A prediction module, used to predict a vehicle fault state using the trained vehicle fault state prediction model; The generating of training samples according to the plurality of sampling samples comprises: Obtaining a weight of each fault sampling sample according to the distances between the plurality of sampling samples, wherein the weight is used to characterize the reliability of the sampling sample; Determine a first number of training samples that need to be generated for each fault sample according to the weight corresponding to each fault sampling sample; Determine a first number of target adjustment samples corresponding to each faulty sample from a plurality of sample samples; Adjust each fault sampling sample according to the target adjustment sample corresponding to each fault sampling sample to obtain a training sample; The step of obtaining the weight of each fault sampling sample according to the distance between the plurality of sampling samples comprises: The weight of each fault sampling sample is obtained according to the following formula: ; ; ; in, For the The first fault sampling sample Dimensional data; For the The first sample Dimensional data; is the dimension of the sampled data; For the The sum of the distances between a fault sampling sample and other sampling samples; For the The sum of the distances between a fault sampling sample and other sampling samples; For the The sum of the distances between a fault sampling sample and other sampling samples; For the Fault sampling samples; For the Samples of samples; is the number of samples; No. The weight of each fault sampling sample.
7. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method according to any one of claims 1 to 5 when executing the computer program.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed on a computer, the computer is enabled to execute the method according to any one of claims 1 to 5.
