Abnormal state detection method and device, equipment and storage medium
By adopting an abnormal state detection method in new energy vehicles, using pre-trained detection network and loss value calculation, the problem of data set imbalance is solved, and the accurate detection of vehicle abnormal state is achieved, and safety and detection efficiency are improved.
Patent Information
- Application Number
- CN202411279822.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-12
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2044-09-12
AI Technical Summary
In the field of new energy vehicles, abnormal state detection is difficult to accurately and efficiently identify, mainly due to the small number of abnormal samples, the data set is imbalanced, and traditional machine learning methods are difficult to effectively detect abnormal states of vehicles.
A method of abnormal state detection is adopted, by determining the abnormal mode to be detected, obtaining the corresponding data to be detected from the vehicle to be detected, inputting the data to be tested into the pre-trained detection network, calculating the target loss value and detecting the abnormal state using the abnormal threshold, including using The encoder and decoder obtain high-dimensional spatial eigenvectors, calculate reconstruction loss and regularization loss values, prevent overfitting, and calculate mileage loss values through multi-layer perceptrons to improve detection accuracy.
In the case of scarce abnormal state samples, it is effective to identify potential abnormal states, reduce accident risks, ensure the safety of vehicles and passengers, and improve the accuracy and efficiency of detection.
Smart Images

Figure CN119246990A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of abnormal state detection, and in particular to an abnormal state detection method, device, equipment and storage medium. Background Art
[0002] In the field of new energy vehicles, abnormal conditions are relatively rare compared to normal operating conditions. Such abnormal conditions may be abnormal events that occur in the electrical system, power system, and battery management of new energy vehicles, such as battery failure, motor abnormality, etc. If these abnormal conditions are not discovered and handled in a timely manner, they may cause serious safety problems. However, there are many types of abnormal conditions, and it is difficult to collect them comprehensively. When training based on abnormal samples through traditional machine learning methods, the number of abnormal samples is far less than that of normal samples, resulting in serious imbalance in the data set, making it difficult to accurately and efficiently detect abnormal conditions of vehicles.
[0003] Therefore, how to accurately detect the abnormal state of the vehicle is a problem that technical personnel in this field need to solve. Summary of the invention
[0004] The present application provides an abnormal state detection method, device, equipment and storage medium to accurately detect the abnormal state of a vehicle.
[0005] In a first aspect, the present application provides an abnormal state detection method, comprising:
[0006] determining the abnormal pattern to be detected;
[0007] Acquire the data to be detected corresponding to the abnormal pattern from the vehicle to be detected; the data to be detected includes: first data to be detected and second data to be detected;
[0008] Inputting the first data to be detected and the second data to be detected into a pre-trained detection network to obtain predicted data;
[0009] Calculate a target loss value according to the predicted data and the first data to be detected;
[0010] The target loss value and the abnormality threshold are used to detect abnormal conditions.
[0011] Optionally, inputting the first data to be detected and the second data to be detected into a pre-trained detection network to obtain predicted data includes:
[0012] Inputting the first data to be detected and the second data to be detected into the encoder of the detection network to obtain a high-dimensional space feature vector;
[0013] The high-dimensional space feature vector and the second data to be detected are input into a decoder of the detection network to obtain predicted data.
[0014] Optionally, calculating a target loss value according to the predicted data and the first data to be detected includes:
[0015] Calculating a reconstruction loss value using a reconstruction loss determination rule, the predicted data, and the first data to be detected;
[0016] The reconstruction loss determination rule is:
[0017] l recom (θ,ζ,x0,x1)=MSE(Decoder ζ (z,x1),x0);
[0018] Among them, l recom is the reconstruction loss value, θ is the encoder coefficient, ζ is the decoder coefficient, x0 is the first data to be detected, x1 is the second data to be detected, z is the high-dimensional space feature vector, z = Encoder θ (x0,x1), Encoder is the encoder, Decoder is the decoder, MSE is the mean square error loss function, Decoder ζ (z,x1) is the predicted data.
[0019] Optionally, if the abnormal mode is a power battery abnormal mode, after calculating the reconstruction loss value by using the reconstruction loss determination rule, the predicted data and the first data to be detected, the method further includes:
[0020] Calculating a regularization loss value using a regularization loss determination rule and the high-dimensional space feature vector;
[0021] The regularization loss determination rule is:
[0022]
[0023] Among them, l reg is the regularized loss value, μ represents the mean, σ represents the mean square error, tr represents the trace number, and log represents the logarithm.
[0024] Optionally, if the abnormal mode is a power battery abnormal mode, after calculating the reconstruction loss value by using the reconstruction loss determination rule, the predicted data and the first data to be detected, the method further includes:
[0025] Inputting the high-dimensional space feature vector into the decoder of the detection network, and inputting the output result into the multi-layer perceptron of the detection network to obtain a predicted mileage value;
[0026] Calculating a mileage loss value using a mileage loss determination rule, the predicted mileage value, and the actual mileage value;
[0027] The mileage loss determination rule is:
[0028] l mile (θ,x0,x1)=MSE(MLP ξ (Decoder ζ (z,θ)),mile);
[0029] Among them, l mile is the mileage loss value, MLP is the multi-layer perceptron, ξ is the multi-layer perceptron parameter, and mile is the actual mileage value.
[0030] Optionally, the detecting the abnormal state by using the target loss value and the abnormal threshold value includes:
[0031] Determining a target loss value for each signal sample in the data to be detected;
[0032] According to the abnormal sample ratio coefficient, the target loss value to be processed is selected from the target loss values of all signal samples;
[0033] Calculate the average loss value of all pending target loss values;
[0034] Determine whether the average loss value is greater than an abnormal threshold;
[0035] If so, it is determined that an abnormal state corresponding to the abnormal pattern is detected.
[0036] Optionally, after the determining that an abnormal state corresponding to the abnormal mode is detected, the method further includes:
[0037] Displaying the abnormal state in the digital twin model and generating an early warning signal;
[0038] The warning signal is sent to a predetermined terminal device.
[0039] In a second aspect, the present application provides an abnormal state detection device, comprising:
[0040] A determination module, used to determine an abnormal pattern to be detected;
[0041] An acquisition module is used to acquire the data to be detected corresponding to the abnormal mode from the vehicle to be detected; the data to be detected includes: first data to be detected and second data to be detected;
[0042] An input module, used for inputting the first data to be detected and the second data to be detected into a pre-trained detection network to obtain prediction data;
[0043] A calculation module, used for calculating a target loss value according to the predicted data and the first data to be detected;
[0044] The detection module is used to detect abnormal conditions using the target loss value and the abnormal threshold.
[0045] In a third aspect, the present application provides an electronic device, including:
[0046] A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor executes the steps of the abnormal state detection method described above in the present application through the computer program.
[0047] In a fourth aspect, the present application provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the steps of the above-mentioned abnormal state detection method of the present application.
[0048] The above technical solution provided by the embodiment of the present application has the following advantages over the prior art: when performing abnormal state detection, the embodiment of the present application first determines the abnormal mode to be detected, obtains the data to be detected corresponding to the abnormal mode from the vehicle to be detected, and the data to be detected includes: first data to be detected and second data to be detected; the first data to be detected and the second data to be detected are input into a pre-trained detection network to obtain predicted data; the target loss value is calculated according to the predicted data and the first data to be detected; the abnormal state is detected using the target loss value and the abnormal threshold; it can be seen that the present application can detect the abnormal state of the vehicle according to the target loss value. If the target loss value is too large, it means that the predicted data is significantly different from the input first detection data, and therefore it is determined that the vehicle is in an abnormal state. In this way, the present application can effectively identify potential abnormal states when abnormal state samples are scarce. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0050] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0051] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0052] Figure 1 A schematic diagram of a method for detecting an abnormal state provided in an embodiment of the present application;
[0053] Figure 2 A schematic diagram of another abnormal state detection method provided in an embodiment of the present application;
[0054] Figure 3 A flow chart of a detection method based on a few-sample knowledge flexible migration network provided in an embodiment of the present application;
[0055] Figure 4 A schematic diagram of a method for detecting an abnormal state provided in an embodiment of the present application;
[0056] Figure 5 A schematic diagram of the structure of an abnormal state detection device provided in an embodiment of the present application;
[0057] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0058] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0059] The disclosure below provides many different embodiments or examples to implement different structures of the present invention. In order to simplify the disclosure of the present invention, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present invention. In addition, the present invention can repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed.
[0060] It should be noted that there are currently few abnormal samples during the driving of new energy vehicles, and the cost of sample collection and sorting is high, while traditional anomaly detection algorithms require a large number of samples, so it is difficult to accurately and efficiently detect abnormal conditions of new energy vehicles and take reasonable control measures. Therefore, the embodiments of the present invention disclose an abnormal state detection method, device, equipment and storage medium to accurately detect the abnormal state of a vehicle.
[0061] See also Figure 1 , Figure 1A schematic diagram of a method for detecting an abnormal state provided in an embodiment of the present application is provided, and the method specifically comprises the following steps:
[0062] S101, determining an abnormal pattern to be detected;
[0063] In this embodiment, the abnormal mode refers to the abnormal type of the vehicle that needs to be detected, such as: the abnormal mode can be a power battery abnormal mode, a motor abnormal mode, etc. In addition, different types of abnormal modes require different data to be detected. Therefore, when performing abnormal state detection, the present application first needs to determine which type of abnormal mode is to be detected, and then perform subsequent detection operations based on the abnormal mode.
[0064] S102, acquiring data to be detected corresponding to the abnormal pattern from the vehicle to be detected; the data to be detected includes: first data to be detected and second data to be detected;
[0065] In this embodiment, the vehicle to be detected is a vehicle that needs to be detected for abnormal conditions. Therefore, when performing abnormal detection, this solution needs to obtain the data to be detected corresponding to the abnormal mode from the vehicle to be detected. The data to be detected is various data collected in real time during the operation of the vehicle. When acquiring data, the present application can acquire the data to be detected through various sensors deployed on the vehicle. The sensors include: temperature sensors, pressure sensors, current sensors, etc., which are not specifically limited here. In addition, the type of the data to be detected needs to be determined according to the abnormal mode. If the abnormal mode is a power battery abnormal mode, the data to be detected that needs to be acquired include: temperature signal, voltage signal, current signal, SOC (State of Charge, battery charge and discharge state) value; if the abnormal mode is a motor bearing abnormal mode, the acquired data to be detected include: current signal, vibration signal, voltage signal.
[0066] Furthermore, after obtaining the data to be detected, the present application needs to divide the data to be detected into two categories according to its function. The first category of data not only needs to be used as input data of the detection network, but also needs to be compared with the predicted data to determine the target loss value. The present application refers to the first category of data as the first data to be detected, and the second category of data only needs to be used as input data of the detection network. The present application refers to the second category of data as the second data to be detected.
[0067] It should be noted that, in the present embodiment, the first data to be detected and the second data to be detected are two types of data divided according to type, and the first data to be detected and the second data to be detected may include one or more data, for example: if the abnormal mode is a power battery abnormal mode, the acquired data to be detected include: temperature signal, voltage signal, current signal, SOC value, therefore, the present application uses the temperature signal and voltage signal as the first data to be detected, and uses the current signal and SOC value as the second data to be detected; if the abnormal mode is a motor bearing abnormal mode, the acquired data to be detected include: current signal, vibration signal, voltage signal, and the current signal may be used as the first data to be detected, and the vibration signal and voltage signal may be used as the second data to be detected.
[0068] S103, inputting the first data to be detected and the second data to be detected into a pre-trained detection network to obtain predicted data;
[0069] It should be noted that the detection network is a pre-trained detection network, which is a few-sample knowledge flexible transfer network. The network can effectively detect abnormal conditions based on the hidden relationship between the captured signals. In the testing phase, it is first necessary to obtain training data, the type of which is consistent with the type of the data to be detected, and then train the detection network with the training data to obtain the detection network of the present application. The present application inputs the first data to be detected and the second data to be detected into the pre-trained detection network, and the detection network can output the corresponding prediction data, which is the prediction data when the vehicle does not have an abnormal condition.
[0070] For example: if the abnormal mode is the abnormal mode of the power battery, the first data to be detected is the temperature signal and the voltage signal, and the second data to be detected is the current signal and the SOC value, then after the temperature signal, the voltage signal, the current signal and the SOC value are input into the detection network, the predicted data output by the detection network is: predicted temperature signal and predicted voltage signal. If the abnormal mode is the abnormal mode of the motor bearing, the first data to be detected is the current signal, and the second data to be detected is the vibration signal and the voltage signal, then after the current signal, the vibration signal and the voltage signal are input into the detection network, the predicted data output by the detection network is: predicted current signal.
[0071] S104, calculating a target loss value according to the predicted data and the first data to be detected;
[0072] It should be noted that, since there are more normal samples and fewer abnormal samples in the training data during the training process, after the detection network training is completed, after the first data to be detected and the second data to be detected are input into the detection network, if the vehicle is currently in a normal working state, the predicted data output by the detection network should be close to the first data to be detected, and the loss value is small. If the vehicle is currently in a certain abnormal state, the predicted data output by the detection network should be significantly different from the first data to be detected, and the loss value is large. Based on this, the present application calculates the target loss value through the predicted data and the first data to be detected, so as to determine whether the vehicle is in an abnormal state according to the target loss value.
[0073] When calculating the target loss value, this embodiment can calculate the loss value in different ways, such as: calculating the target loss value between the predicted data and the first data to be detected by the mean square error (MSE), and calculating the target loss value between the predicted data and the first data to be detected by the square absolute error (MAE), which is not specifically limited here.
[0074] S105. Detect abnormal conditions using the target loss value and the abnormal threshold.
[0075] In this embodiment, the abnormal threshold is a threshold set in combination with actual data and engineer experience. By comparing the target loss value with the abnormal threshold, it can be determined whether the vehicle is in an abnormal state. For example, if the target loss value is less than the abnormal threshold, it is determined that the vehicle is not in an abnormal state; if the target loss value is not less than the abnormal threshold, it is determined that the vehicle is in an abnormal state.
[0076] In summary, when detecting the abnormal state of the vehicle, the present application sets an abnormal threshold as an evaluation standard, and detects the abnormal state by comparing the abnormal threshold with the target loss value. If the target loss value is too large, it means that the predicted data is far from the input first detection data, and the vehicle is in an abnormal state. Otherwise, it is in a normal state. In this way, the present application can effectively identify potential abnormal behaviors when abnormal state samples are scarce, thereby providing timely warnings, reducing accident risks, and ensuring the safety of vehicles and passengers.
[0077] See also Figure 2 , Figure 2 A flowchart of another abnormal state detection method provided in an embodiment of the present application, the method specifically comprises the following steps:
[0078] S201, determining an abnormal pattern to be detected;
[0079] S202, acquiring data to be detected corresponding to the abnormal pattern from the vehicle to be detected; the data to be detected includes: first data to be detected and second data to be detected;
[0080] S203, inputting the first data to be detected and the second data to be detected into an encoder of a detection network to obtain a high-dimensional space feature vector;
[0081] S204, inputting the high-dimensional space feature vector and the second data to be detected into a decoder of the detection network to obtain predicted data;
[0082] S205, calculating a target loss value according to the predicted data and the first data to be detected;
[0083] S206: Detect abnormal state using target loss value and abnormal threshold.
[0084] It should be noted that the detection network in this embodiment is a few-sample knowledge flexible transfer network, which mainly includes three parts: an encoder, a decoder and a multi-layer perceptron, wherein the encoder and the decoder respectively include three layers of GRU (gated recurrent unit). Here, taking the abnormal mode as the abnormal mode of the power battery as an example, the process of the detection network outputting the predicted data is explained.
[0085] See also Figure 3 , Figure 3 A flow chart of a detection method based on a few-sample knowledge flexible transfer network provided for an embodiment of the present invention. It can be seen from the process that in the power battery abnormality detection, the data collected by the sensor mainly include temperature signals, voltage signals, current signals and SOC values, and there must be a strong correlation between these signals. The present application captures the hidden relationship between such signals through a few-sample flexible knowledge transfer network, thereby effectively detecting abnormal states. The present application divides the collected data into first data to be detected x0: temperature signal and voltage signal, and second data to be detected x1: current signal and SOC value. The first data to be detected x0 and the second data to be detected x1 are input into the encoder of the detection network to obtain a high-dimensional space feature vector, and then the high-dimensional space feature vector and the second data to be detected x1 are input into the decoder of the detection network to obtain the predicted data x ′ 0, the prediction data includes the predicted temperature signal and the predicted voltage signal. If the battery is in normal condition, the output x ′ 0 can basically fit x0, and the loss function is small. If the battery is in an abnormal condition, the model output x ′ Therefore, this application uses the loss value as an evaluation indicator and sets a reasonable abnormal threshold to effectively determine whether the power battery is in an abnormal state.
[0086] In addition, in order to complete the training of the detection network, the CPU (Central Processing Unit) of the computer used in the experiment is Intel Core i7-9750H, the memory is 16G, the graphics card is four NVIDIA3080, the video memory is 8GB, the operating system is ubuntu, and the framework is the pytorch platform of python3.6. The number of samples in each batch (batch size) is set to 512, the number of iterations is set to 500, the learning rate is set to 0.01, the loss function is defined as cross entropy, and the Adam algorithm is used for training.
[0087] It should be noted that when detecting anomalies, existing solutions usually need to train a dedicated model for a specific abnormal state detection task. When processing other types of abnormal state detection tasks, the dedicated model needs to modify the structure of the model. Therefore, the detection model in the existing solution is difficult to directly apply to other types of abnormal state detection tasks, especially in the field of new energy vehicles, where vehicles of different brands and models may have different abnormal patterns. In this application, the small sample knowledge flexible transfer network can be applied to different abnormal state detection tasks of vehicles of different brands and models. There is no need to modify the network structure. It only needs to retrain the network using the training data of different abnormal state detection tasks, and then the trained network can perform different types of abnormal state detection tasks.
[0088] Based on the above embodiment, in this embodiment, calculating the target loss value according to the predicted data and the first data to be detected includes: calculating the reconstruction loss value using a reconstruction loss determination rule, the predicted data and the first data to be detected;
[0089] The reconstruction loss determination rule is:
[0090] l recom (θ,ζ,x0,x1)=MSE(Decoder ζ (z,x1),x0);
[0091] Among them, l recom is the reconstruction loss value, θ is the encoder coefficient, ζ is the decoder coefficient, x0 is the first data to be detected, x1 is the second data to be detected, z is the high-dimensional space feature vector, z = Encoder θ (x0,x1), Encoder is the encoder, Decoder is the decoder, MSE is the mean square error loss function, Decoder ζ (z,x1) is the predicted data.
[0092] In this embodiment, the reconstruction loss value can be calculated by the reconstruction loss determination rule, and the reconstruction loss value is used as the target loss value to compare with the abnormal threshold to detect the abnormal state. However, in the case of a small number of abnormal samples, the trained detection model is prone to overfitting the training data, resulting in poor performance in the test set or actual application. In order to prevent overfitting and taking into account the strong correlation between the cruising range and the battery signal, the present application introduces regularization loss and mileage loss into the overall loss, thereby improving the model detection accuracy. Therefore, after calculating the reconstruction loss value using the reconstruction loss determination rule, the predicted data and the first data to be detected, the present application also includes:
[0093] 1. Calculate the regularization loss value using the regularization loss determination rule and the high-dimensional space feature vector; the regularization loss determination rule is:
[0094]
[0095] Among them, l reg is the regularized loss value, μ represents the mean, σ represents the mean square error, tr represents the trace number, and log represents the logarithm.
[0096] Second, the high-dimensional spatial feature vector is input into the decoder of the detection network, and the output result is input into the multi-layer perceptron of the detection network to obtain the predicted mileage value;
[0097] The mileage loss value is calculated using the mileage loss determination rule, the predicted mileage value and the actual mileage value; the mileage loss determination rule is:
[0098] l mile (θ,x0,x1)=MSE(MLP ξ (Decoder ζ (z,θ)),mile);
[0099] Among them, l mile is the mileage loss value, MLP is the multi-layer perceptron, ξ is the multi-layer perceptron parameter, and mile is the actual mileage value.
[0100] pass Figure 3 It can be seen that this embodiment calculates the regularized loss value based on the high-dimensional space feature vector and the regularized loss determination rule, inputs the high-dimensional space feature vector into the decoder of the detection network, and inputs the output result into the multi-layer perceptron of the detection network to obtain the predicted mileage value, and then the overall loss can be calculated based on the reconstruction loss value, the regularized loss value and the mileage loss value. The overall loss is the target loss value in this application. Among them, the overall loss determination rule is:
[0101] l(θ,ζ,ξ)=l recom (θ,ζ,x0,x1)+l reg(θ,x0,x1)+l mile (θ,x0,x1);
[0102] Among them, l(θ,ζ,ξ) is the overall loss value.
[0103] From the above, it can be seen that when calculating the target loss value, the present application not only calculates the reconstruction loss value through the reconstruction loss determination rule, but also calculates the regularization loss value through the regularization loss determination rule, and calculates the mileage loss value through the mileage loss determination rule. The overall loss of the reconstruction loss value, the regularization loss value and the mileage loss value is used to detect abnormal conditions, effectively preventing overfitting and improving the detection accuracy of abnormal conditions.
[0104] See also Figure 4 , Figure 4 A schematic diagram of a method for detecting an abnormal state provided in an embodiment of the present application is provided, and the method specifically comprises the following steps:
[0105] S301, determining an abnormal pattern to be detected;
[0106] S302, acquiring data to be detected corresponding to the abnormal pattern from the vehicle to be detected; the data to be detected includes: first data to be detected and second data to be detected;
[0107] S303, inputting the first data to be detected and the second data to be detected into an encoder of a detection network to obtain a high-dimensional space feature vector;
[0108] S304, inputting the high-dimensional space feature vector and the second data to be detected into a decoder of the detection network to obtain predicted data;
[0109] S305, calculating a target loss value according to the predicted data and the first data to be detected;
[0110] S306, determining a target loss value for each signal sample in the data to be detected;
[0111] S307, selecting a target loss value to be processed from the target loss values of all signal samples according to the abnormal sample proportion coefficient;
[0112] S308, calculating the average loss value of all target loss values to be processed;
[0113] S309, determining whether the average loss value is greater than an abnormal threshold;
[0114] If yes, execute S310; if no, continue to execute S302;
[0115] S310, determining that an abnormal state corresponding to an abnormal mode is detected;
[0116] S311. Display the abnormal state in the digital twin model and generate an early warning signal;
[0117] S312. Send the warning signal to the predetermined terminal device.
[0118] In this embodiment, in order to effectively evaluate the abnormal condition of the power battery, the present invention combines actual data and engineer experience to set two parameters to determine the abnormal state, which are: abnormal sample proportion coefficient p and abnormal threshold τ. Among them, the abnormal sample proportion coefficient p is used to select the first n target loss values to be processed with larger target loss values from m sample signals, that is: n = p × m, m is the total number of signal samples. Therefore, after the present application determines the target loss value of each signal sample in the data to be detected, it is necessary to calculate the number n of target loss values to be processed based on the abnormal sample proportion coefficient p and the total number m of signal samples, and then arrange the target loss values of all signal samples in order from large to small, and select the first n target loss values to be processed with larger target loss values, and finally calculate the average loss value of all target loss values to be processed, and determine whether there is an abnormal state based on the average loss value and the abnormal threshold τ.
[0119] The specific process is:
[0120] L vehicle =(l1(θ,ζ,ξ),......,l m (θ,ζ,ξ));
[0121]
[0122] Among them, L vehicle represents the target loss value of all signal samples, l1(θ,ζ,ξ) is the target loss value of the first signal sample, l m (θ,ζ,ξ) is the target loss value of the mth signal sample, and VehicleError is the average loss value of the n larger target loss values screened out. Determine whether VehicleError is greater than the abnormal threshold τ. If it is greater than the abnormal threshold τ, it is determined that an abnormal state has occurred, otherwise it is determined that no abnormal state has occurred.
[0123] Furthermore, the present application can also construct a digital twin model, combining the digital twin model with a detection network to detect abnormal conditions. The method for constructing the digital twin model includes: clarifying the abnormal mode of the digital twin model, deeply understanding the operating mechanism of new energy vehicles according to specific abnormal working conditions and abnormal performances, and determining the key parameters and abnormal detection standards that the model needs to monitor. The key parameter is the data to be detected under the abnormal mode, and the abnormal detection standard includes the abnormal sample ratio coefficient and the abnormal threshold. Various key data in the vehicle operation process are collected in real time through various sensors deployed on the vehicle, and a digital twin model is constructed in combination with the detection network.
[0124] In addition, the digital twin model can reflect the operating status of the vehicle in real time. Once the detection network detects an abnormal state, the abnormal state can be displayed in the digital twin model, and the digital twin model will immediately issue an early warning signal, wherein the early warning signal includes: abnormal state, abnormal cause and solution. The early warning signal can be sent to a predetermined terminal device, such as sending the early warning signal to the driver or maintenance personnel's mobile phone, so as to remind the driver or maintenance personnel to pay attention to the abnormal state and take reasonable measures to reduce or eliminate the impact of the abnormal state.
[0125] In summary, in order to effectively evaluate the abnormal condition of the power battery, this application combines actual data and engineer experience, and transfers expert knowledge to the detection network by using the two parameters of abnormal sample proportion coefficient p and abnormal threshold τ, so as to realize the detection process combining expert knowledge with data analysis, thereby effectively solving the problem that the power battery is difficult to detect due to the small number of abnormal samples under actual working conditions. In addition, the digital twin model constructed by this application can reflect the vehicle operation status in real time. Once an abnormal state is detected, the digital twin model will immediately issue an early warning signal to remind the driver or maintenance personnel to pay attention and take reasonable measures to reduce or eliminate the impact of the abnormal state. This early warning mechanism helps manufacturers and maintenance organizations to formulate targeted maintenance plans in advance, optimize maintenance strategies, and reduce downtime and maintenance costs caused by sudden failures. As an emerging means of transportation, user experience is one of the key factors in its market promotion, and this application can promptly discover and solve small problems in vehicle operation, avoid small problems from accumulating into big problems, thereby improving user satisfaction and trust.
[0126] See also Figure 5 , Figure 5 A schematic diagram of the structure of an abnormal state detection device provided in an embodiment of the present application, the device specifically comprises:
[0127] A determination module 11, used to determine an abnormal pattern to be detected;
[0128] The acquisition module 12 is used to acquire the data to be detected corresponding to the abnormal pattern from the vehicle to be detected; the data to be detected includes: first data to be detected and second data to be detected;
[0129] An input module 13, used for inputting the first data to be detected and the second data to be detected into a pre-trained detection network to obtain prediction data;
[0130] A calculation module 14, configured to calculate a target loss value according to the predicted data and the first data to be detected;
[0131] The detection module 15 is used to detect abnormal conditions using the target loss value and the abnormal threshold.
[0132] As an optional embodiment, the input module includes:
[0133] A first input unit, used for inputting the first to-be-detected data and the second to-be-detected data into an encoder of the detection network to obtain a high-dimensional space feature vector;
[0134] The second input unit is used to input the high-dimensional space feature vector and the second data to be detected into the decoder of the detection network to obtain predicted data.
[0135] As an optional embodiment, the calculation module includes:
[0136] The first calculation unit is used to calculate the reconstruction loss value by using the reconstruction loss determination rule, the predicted data and the first data to be detected; the reconstruction loss determination rule is:
[0137] l recom (θ,ζ,x0,x1)=MSE(Decoder ζ (z,x1),x0);
[0138] Among them, l recom is the reconstruction loss value, θ is the encoder coefficient, ζ is the decoder coefficient, x0 is the first data to be detected, x1 is the second data to be detected, z is the high-dimensional space feature vector, z = Encoder θ (x0,x1), Encoder is the encoder, Decoder is the decoder, MSE is the mean square error loss function, Decoder ζ (z,x1) is the predicted data.
[0139] As an optional embodiment, the calculation module further includes:
[0140] The second calculation unit is used to calculate the regularization loss value by using the regularization loss determination rule and the high-dimensional space feature vector; the regularization loss determination rule is:
[0141]
[0142] Among them, l reg is the regularized loss value, μ represents the mean, σ represents the mean square error, tr represents the trace number, and log represents the logarithm.
[0143] As an optional embodiment, the calculation module further includes:
[0144] A third input unit is used to input the high-dimensional space feature vector into the decoder of the detection network, and input the output result into the multi-layer perceptron of the detection network to obtain a predicted mileage value;
[0145] The third calculation unit is used to calculate the mileage loss value by using the mileage loss determination rule, the predicted mileage value and the actual mileage value; the mileage loss determination rule is:
[0146] l mile (θ,x0,x1)=MSE(MLP ξ (Decoder ζ (z,θ)),mile);
[0147] Among them, l mile is the mileage loss value, MLP is the multi-layer perceptron, ξ is the multi-layer perceptron parameter, and mile is the actual mileage value.
[0148] As an optional embodiment, the detection module includes:
[0149] A determination unit, used to determine a target loss value for each signal sample in the data to be detected;
[0150] A selection unit, used to select a target loss value to be processed from the target loss values of all signal samples according to the abnormal sample proportion coefficient;
[0151] A fourth calculation unit, used for calculating an average loss value of all target loss values to be processed;
[0152] A judging unit, used to judge whether the average loss value is greater than an abnormal threshold; if so, triggering the judging unit;
[0153] The determination unit is used to determine whether an abnormal state corresponding to the abnormal mode is detected.
[0154] As an optional embodiment, the device further includes:
[0155] A display module, used to display the abnormal state in the digital twin model and generate an early warning signal;
[0156] The sending module is used to send the warning signal to a predetermined terminal device.
[0157] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0158] See also Figure 6 , Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application, the electronic device specifically includes:
[0159] The processor 21, the memory 22 and the computer program stored in the memory 22 and executable on the processor 21, the processor 21 executes the steps of the abnormal state detection method described in any of the above method embodiments through the computer program.
[0160] Among them, the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 21 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 21 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0161] The memory 22 may include one or more computer-readable storage media, which may be non-transitory. The memory 22 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 22 is at least used to store the following computer program 221, wherein, after the computer program is loaded and executed by the processor 21, it can implement the relevant steps in the abnormal state detection method disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 22 may also include an operating system 222 and data 223, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 222 may include Windows, Unix, Linux, etc.
[0162] In some embodiments, the electronic device may further include a display screen 23 , an input / output interface 24 , a communication interface 25 , a sensor 26 , a power source 27 , and a communication bus 28 .
[0163] certainly, Figure 6 The structure of the electronic device shown does not constitute a limitation on the electronic device in the embodiments of the present application. In actual applications, the electronic device may include Figure 6 More or fewer components than shown, or combinations of certain components.
[0164] In another exemplary embodiment, a computer storage medium is also provided, and when the program instructions are executed by a processor, the steps of the abnormal state detection method described in any of the above method embodiments are implemented. The storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
[0165] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment will not be described in detail here.
[0166] It should be understood that the terms used herein are only for the purpose of describing specific example embodiments and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used herein may also be meant to include plural forms. The terms "include", "comprise", "contain", and "have" are inclusive, and therefore specify the existence of stated features, steps, operations, elements and / or parts, but do not exclude the existence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not interpreted as necessarily requiring them to be performed in the specific order described or illustrated, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps may be used.
[0167] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A method for detecting an abnormal state, characterized in that: include: determining the abnormal pattern to be detected; Acquire the to-be-detected data corresponding to the abnormal pattern from the to-be-detected vehicle; The data to be detected includes: first data to be detected and second data to be detected; Inputting the first data to be detected and the second data to be detected into a pre-trained detection network to obtain predicted data; Calculate a target loss value according to the predicted data and the first data to be detected; The target loss value and the abnormality threshold are used to detect abnormal conditions.
2. The abnormal state detection method according to claim 1, characterized in that: The step of inputting the first data to be detected and the second data to be detected into a pre-trained detection network to obtain predicted data includes: Inputting the first data to be detected and the second data to be detected into the encoder of the detection network to obtain a high-dimensional space feature vector; The high-dimensional space feature vector and the second data to be detected are input into a decoder of the detection network to obtain predicted data.
3. The abnormal state detection method according to claim 2, characterized in that: Calculating a target loss value according to the predicted data and the first data to be detected includes: Calculating a reconstruction loss value using a reconstruction loss determination rule, the predicted data, and the first data to be detected; The reconstruction loss determination rule is: l recom (θ, ζ, x0, x1)=MSE(Decoder ζ (z, x1), x0); Among them, l recom is the reconstruction loss value, θ is the encoder coefficient, ζ is the decoder coefficient, x0 is the first data to be detected, x1 is the second data to be detected, z is the high-dimensional space feature vector, z = Encoder θ (x0, x1), Encoder is the encoder, Decoder is the decoder, MSE is the mean square error loss function, and Decoderζ(z, x1) is the predicted data.
4. The abnormal state detection method according to claim 3, characterized in that: If the abnormal mode is a power battery abnormal mode, after calculating the reconstruction loss value by using the reconstruction loss determination rule, the prediction data and the first to-be-detected data, the method further includes: Calculating a regularization loss value using a regularization loss determination rule and the high-dimensional space feature vector; The regularization loss determination rule is: Among them, l reg is the regularized loss value, μ represents the mean, σ represents the mean square error, tr represents the trace number, and log represents the logarithm.
5. The abnormal state detection method according to claim 3, characterized in that: If the abnormal mode is a power battery abnormal mode, after calculating the reconstruction loss value by using the reconstruction loss determination rule, the prediction data and the first to-be-detected data, the method further includes: Inputting the high-dimensional space feature vector into the decoder of the detection network, and inputting the output result into the multi-layer perceptron of the detection network to obtain a predicted mileage value; Calculating a mileage loss value using a mileage loss determination rule, the predicted mileage value, and the actual mileage value; The mileage loss determination rule is: l mile (θ, x0, x1)=MSE(MLP ξ (Decoder ζ (z,θ))),mile); Among them, l mile is the mileage loss value, MLP is the multi-layer perceptron, ξ is the multi-layer perceptron parameter, and mile is the actual mileage value.
6. The abnormal state detection method according to any one of claims 1 to 5, characterized in that: The detecting the abnormal state by using the target loss value and the abnormal threshold value includes: Determining a target loss value for each signal sample in the data to be detected; According to the abnormal sample ratio coefficient, the target loss value to be processed is selected from the target loss values of all signal samples; Calculate the average loss value of all pending target loss values; Determine whether the average loss value is greater than an abnormal threshold; If so, it is determined that an abnormal state corresponding to the abnormal pattern is detected.
7. The abnormal state detection method according to claim 6, characterized in that: After the determination detects the abnormal state corresponding to the abnormal mode, the method further includes: Displaying the abnormal state in the digital twin model and generating an early warning signal; The warning signal is sent to a predetermined terminal device.
8. An abnormal state detection device, characterized in that: include: A determination module, used to determine an abnormal pattern to be detected; An acquisition module, used for acquiring the to-be-detected data corresponding to the abnormal pattern from the to-be-detected vehicle; The data to be detected includes: first data to be detected and second data to be detected; An input module, used for inputting the first data to be detected and the second data to be detected into a pre-trained detection network to obtain prediction data; A calculation module, used for calculating a target loss value according to the predicted data and the first data to be detected; The detection module is used to detect abnormal conditions using the target loss value and the abnormal threshold.
9. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor executes the steps of the abnormal state detection method described in any one of claims 1 to 7 of the present application through the computer program.
10. A computer storage medium, characterized in that: The computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the steps of the abnormal state detection method described in any one of claims 1 to 7 of the present application.
Citation Information
Patent Citations
Data type determination method and device, storage medium and electronic device
CN110781433A
Training method and device for anomaly detection model based on differential privacy
CN111539769A
Credit card fraud detection method and system based on memory variation self-encoding model
CN115187266A
Abnormality detection method and device, computer equipment, storage medium and program product
CN117150401A
Method and device for determining battery anomaly detection model and electronic equipment
CN117269813A
Cited By
Temperature prediction method, state detection method, related equipment and medium
CN121188378A
Temperature prediction method, state detection method, and related devices and media
CN121188378B
