Vehicle charging safety monitoring method and device

Through the analysis and model training of charging process data and user habit data, vehicle charging safety is monitored in real time, the risk of safety accidents during the charging process is solved, and pre-accident prevention and safety assessment are improved.

CN118618098APending Publication Date: 2024-09-10CHONGQING CHANGAN AUTOMOBILE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410830521.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-25
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

During the car charging process, due to the differences in the battery management systems (BMS) of different vehicles and the influence of aging and environmental factors, the information transmitted by the charging pile is biased, which increases the risk of serious safety accidents such as battery fires. The existing technology is difficult to effectively Monitoring and early warning.

Method used

By using charging process data and user charging habit data to train fault prediction models, vehicle charging safety is monitored in real time, and methods such as oversampling and kernel principal component analysis are used to improve the prediction accuracy and efficiency of the model and achieve pre-accident prevention.

Benefits of technology

It improves the efficiency of charging safety monitoring, reduces the probability of accidents, and enhances the safety assessment and fault warning capabilities of the vehicle charging process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118618098A
    Figure CN118618098A
Patent Text Reader

Abstract

The invention relates to a vehicle charging safety monitoring method and device, and the method comprises the steps: enabling the obtained charging process data and user charging habit data at a current moment to serve as the input of a first fault prediction model, and obtaining a fault prediction result; wherein the first fault prediction model is obtained by training a preset fault prediction model based on obtained charging process data and user charging habit data at historical moments; and performing vehicle charging safety assessment based on the fault prediction result to obtain a charging safety assessment result. Therefore, the charging safety of the vehicle is monitored in real time through the charging process data and the user charging habit data, so that the charging safety monitoring efficiency is improved, the purpose of precaution before an accident is achieved, and the accident occurrence probability is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of vehicle battery charging safety, and in particular to a vehicle charging safety monitoring method and device. Background Art

[0002] In recent years, the number of new energy vehicles has increased significantly, and the incidents of spontaneous combustion of vehicles during charging have been reported frequently. This has not only caused huge economic losses and personal injuries to car owners, but also reduced people's acceptance of new energy vehicles to a certain extent, affecting the development of the new energy vehicle industry. At present, in the process of car charging, the battery management system (BMS) is dominant, and the charging pile side only serves as a signal receiver and charges according to the instructions sent by the BMS. However, the BMS of different vehicles are different, and the function of the BMS is easily affected by battery aging and environmental factors, resulting in deviations in the information transmitted to the charging pile, which can cause serious safety accidents such as battery fires. Therefore, safety monitoring and fault warning during charging are of great practical significance. Summary of the invention

[0003] One of the purposes of the present invention is to provide a vehicle charging safety monitoring method to solve the problem of serious safety accidents such as battery fire caused during the charging process in the prior art; the second purpose is to provide a vehicle charging safety monitoring device; the third purpose is to provide a vehicle charging safety monitoring equipment; the fourth purpose is to provide a computer storage medium; the fifth purpose is to provide a computer program product.

[0004] In order to achieve the above object, the technical solution adopted by the present invention is as follows:

[0005] A vehicle charging safety monitoring method, the vehicle charging safety monitoring method comprising:

[0006] The charging process data and the user charging habit data at the current moment are used as inputs of a first fault prediction model to obtain a fault prediction result; wherein the first fault prediction model is obtained by training a preset fault prediction model based on the charging process data and the user charging habit data at historical moments;

[0007] A vehicle charging safety assessment is performed based on the fault prediction result to obtain a charging safety assessment result.

[0008] According to the above-mentioned technical means, the vehicle charging safety is monitored in real time through the charging process data and the user's charging habit data, thereby improving the efficiency of charging safety monitoring, achieving the purpose of pre-accident prevention and reducing the probability of accidents.

[0009] Furthermore, the vehicle charging safety monitoring method also includes: preprocessing multiple first sample data to obtain multiple second sample data after preprocessing; wherein the first sample data includes the charging process data and user charging habit data at the historical moment; dividing the multiple second sample data into multiple normal sample data and multiple first fault sample data; performing oversampling processing based on the multiple first fault sample data to obtain multiple second fault sample data; wherein the number of all fault sample data is the same as the number of all normal sample data; performing feature screening on the total sample data to obtain the principal component corresponding to each sample data; wherein the total sample data includes all normal sample data and all fault sample data; based on the principal components corresponding to each of the total sample data, training the preset fault prediction model to obtain the trained first fault prediction model.

[0010] According to the above technical means, the sample size of fault data is increased by oversampling method, the problem of sample category imbalance is solved, which is conducive to improving the prediction accuracy of subsequent models. Through kernel principal component analysis, some features that have a greater impact on charging safety are selected from more complex features, which solves the problems of information duplication and multicollinearity caused by multiple features and improves the working efficiency of the prediction model.

[0011] Furthermore, the preprocessing of the multiple first sample data to obtain the preprocessed multiple second sample data includes: deleting data with the same target features in the multiple first sample data; filling in missing values ​​of the target features in the multiple first sample data; and normalizing the multiple first sample data to obtain the multiple second sample data.

[0012] Further, the oversampling processing is performed based on the multiple first fault sample data to obtain multiple second fault sample data, including: determining the Euclidean distance between the ith first fault sample data and the rth first fault sample data; i≠r; based on the Euclidean distance between the ith first fault sample data and the rth first fault sample data, selecting k first fault sample data closest to the ith first fault sample data; based on the target first fault sample data randomly selected from the k first fault sample data, synthesizing it with the ith first fault sample data into the second fault sample data.

[0013] According to the above technical means, the sample size of fault data is increased through oversampling method to solve the problem of sample category imbalance, which is conducive to improving the prediction accuracy of subsequent models.

[0014] Furthermore, the target first fault sample data randomly selected from the k first fault sample data is synthesized with the i-th first fault sample data into the second fault sample data, including: multiplying the difference between the target first fault sample data and the i-th first fault sample data with a random function, and then adding it to the i-th first fault sample data to obtain the second fault sample data.

[0015] Furthermore, the feature screening of the total sample data to obtain the principal component corresponding to each sample data includes: mapping each sample data in the total sample data to a high-dimensional feature space through a nonlinear kernel function, and performing centralization processing to obtain the centralized data corresponding to each sample data; constructing the characteristic equation of the covariance matrix based on the centralized data corresponding to each sample data in the total sample data, and solving to obtain M eigenvalues ​​corresponding to each sample data and eigenvectors corresponding to the eigenvalues; wherein each sample data includes M features; based on the M eigenvalues ​​corresponding to each sample data and the eigenvectors corresponding to the eigenvalues, determining the principal component corresponding to each sample data.

[0016] According to the above technical means, some features that have a greater impact on charging safety are selected from more complex features through kernel principal component analysis, which solves the problems of information duplication and multicollinearity caused by multiple features and improves the working efficiency of the prediction model.

[0017] Further, the method of determining the principal component corresponding to each sample data based on the M eigenvalues ​​corresponding to each sample data and the eigenvectors corresponding to the eigenvalues ​​includes: sorting the M eigenvalues ​​corresponding to each sample data in descending order, and counting the cumulative contribution rate of the first m eigenvalues; when the cumulative contribution rate is greater than a first threshold, using the eigenvectors corresponding to the sorted first m eigenvalues ​​as the principal component.

[0018] According to the above technical means, the M eigenvalues ​​corresponding to each sample data are sorted in descending order. This is because larger eigenvalues ​​correspond to directions with larger data changes, that is, the main change mode in the data.

[0019] Furthermore, the preset fault prediction model is trained based on the principal components corresponding to each of the total sample data to obtain the trained first fault prediction model, including: establishing the preset fault prediction model based on a multi-layer feedforward neural network; wherein the weight of each sample data in the preset fault prediction model is one of the number of the total sample data; based on the principal components corresponding to each of the total sample data, the preset fault prediction model is trained to obtain a second fault prediction model; the weight of each sample data in the second fault prediction model is updated using an integrated learning algorithm; based on the principal components corresponding to each of the total sample data, the second fault prediction model is trained to obtain a third fault prediction model; the training process is iteratively performed to obtain the Qth fault prediction model; based on the second fault prediction model and the corresponding weights, the third fault prediction model and the corresponding weights, and the Qth fault prediction model and the corresponding weights, the trained first fault prediction model is obtained.

[0020] Furthermore, the method also includes: using the principal component of each sample data in the total sample data as the input of the qth fault prediction model to obtain the fault prediction result of each sample data; q takes a value from 2 to Q; based on the actual result and the fault prediction result of each sample data in the total sample data, determining the classification error rate of the qth fault prediction model; based on the classification error rate of the qth fault prediction model, determining the weight corresponding to the qth fault prediction model.

[0021] A vehicle charging safety monitoring device, characterized in that the vehicle charging safety monitoring device comprises:

[0022] a processing unit, configured to use the charging process data and the user charging habit data obtained at the current moment as inputs of a first fault prediction model to obtain a fault prediction result; wherein the first fault prediction model is obtained by training a preset fault prediction model based on the charging process data and the user charging habit data obtained at historical moments;

[0023] An evaluation unit is used to perform a vehicle charging safety evaluation based on the fault prediction result to obtain a charging safety evaluation result.

[0024] A vehicle charging safety monitoring device comprises: a processor and a memory configured to store a computer program that can be run on the processor, wherein the processor is configured to execute the steps of the aforementioned method when running the computer program.

[0025] A computer-readable storage medium stores a computer program, which implements the steps of the above method when executed by a processor.

[0026] A computer program product comprises a computer program or instructions, wherein when the computer program or instructions are executed by a processor, the steps of the aforementioned method are implemented.

[0027] Beneficial effects of the present invention:

[0028] (1) The present invention monitors vehicle charging safety in real time through charging process data and user charging habit data, thereby improving the efficiency of charging safety monitoring, achieving the purpose of preventing accidents before they occur, and reducing the probability of accidents.

[0029] (2) The present invention increases the sample size of fault data through an oversampling method, solves the problem of sample category imbalance, and is conducive to improving the prediction accuracy of subsequent models;

[0030] (3) Through kernel principal component analysis, some features that have a greater impact on charging safety are selected from a large number of complex features, which solves the problems of information duplication and multicollinearity caused by multiple features and improves the working efficiency of the prediction model. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 The process diagram of the vehicle charging safety monitoring method in the embodiment of the present invention is as follows Figure 1 ;

[0032] Figure 2 The process diagram of the vehicle charging safety monitoring method in the embodiment of the present invention is as follows Figure 2 ;

[0033] Figure 3 The process diagram of the vehicle charging safety monitoring method in the embodiment of the present invention is as follows Figure 3 ;

[0034] Figure 4 The process diagram of the vehicle charging safety monitoring method in the embodiment of the present invention is as follows Figure 4 ;

[0035] Figure 5 The process diagram of the vehicle charging safety monitoring method in the embodiment of the present invention is as follows Figure 5 ;

[0036] Figure 6 The process diagram of the vehicle charging safety monitoring method in the embodiment of the present invention is as follows Figure 6 ;

[0037] Figure 7 A schematic diagram of the composition structure of a vehicle charging safety monitoring device according to an embodiment of the present invention;

[0038] Figure 8 It is a schematic diagram of the composition structure of the vehicle charging safety monitoring device in an embodiment of the present invention. DETAILED DESCRIPTION

[0039] The following will describe the embodiments of the present invention with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be understood that the preferred embodiments are only for illustrating the present invention, not for limiting the scope of protection of the present invention.

[0040] The embodiment of the present invention provides a vehicle charging safety monitoring method. Figure 1 The process diagram of the vehicle charging safety monitoring method in the embodiment of the present invention is as follows Figure 1 ,like Figure 1 As shown, the vehicle charging safety monitoring method includes the following steps:

[0041] S101: Using the current charging process data and user charging habit data as inputs to a first fault prediction model to obtain a fault prediction result; wherein the first fault prediction model is obtained by training a preset fault prediction model based on the charging process data and user charging habit data obtained at historical moments.

[0042] In an embodiment of the present application, a trained first fault prediction model is used to perform fault prediction processing on the vehicle's current charging process data and the user's charging habit data during the vehicle charging process to obtain a fault prediction result, that is, a predicted value of the probability of a fault occurring.

[0043] The charging process data refers to the data generated during the vehicle battery charging process, including but not limited to the highest voltage, the lowest voltage, the maximum current, the minimum current, the battery temperature, the battery capacity, the battery health status, and the charger working status.

[0044] User charging habit data includes but is not limited to the power before and after charging and the charging time.

[0045] S102: Perform a vehicle charging safety assessment based on the fault prediction result to obtain a charging safety assessment result.

[0046] In the embodiment of the present application, the fault prediction result is expressed in the form of a percentage, and the charging safety assessment result = 100 - (100 x fault prediction result). Further, the charging safety assessment result is displayed by a display unit of the electronic device.

[0047] In some embodiments, the vehicle charging safety monitoring method further includes: outputting warning information when it is determined that the charging safety assessment result is less than a first threshold.

[0048] When the charging safety assessment result is less than the first threshold, an alarm is sounded through the application, or a warning is provided to the user through SMS, WeChat, etc., and charging is stopped immediately.

[0049] In the embodiment of the present application, the vehicle charging safety is monitored in real time through the charging process data and the user's charging habit data, thereby improving the efficiency of charging safety monitoring, achieving the purpose of pre-accident prevention, and reducing the probability of accidents.

[0050] The first fault prediction model is obtained by training a preset fault prediction model based on charging process data at historical moments and user charging habit data. Specifically, in some embodiments, the vehicle charging safety monitoring method also includes Figure 2 Steps shown:

[0051] S201: Preprocess a plurality of first sample data to obtain a plurality of preprocessed second sample data; wherein the first sample data includes charging process data at historical moments and user charging habit data.

[0052] In the embodiment of the present application, the plurality of first sample data includes charging process data and user charging habit data at a plurality of historical moments. The plurality of first sample data are normalized to obtain a plurality of normalized second sample data.

[0053] S202: Divide a plurality of second sample data into a plurality of normal sample data and a plurality of first fault sample data.

[0054] In the embodiment of the present application, the charging process data includes the working state of the charger. Based on the working state of the charger included in each of the plurality of second sample data, the plurality of second sample data are divided into a plurality of normal sample data and a plurality of first fault sample data. Specifically, when the working state of the charger included in the second sample data is a normal working state, the second sample data is normal sample data. When the working state of the charger included in the second sample data is an abnormal working state, the second sample data is first fault sample data.

[0055] S203: Perform oversampling processing based on the plurality of first fault sample data to obtain a plurality of second fault sample data; wherein the number of all the fault sample data is the same as the number of all the normal sample data.

[0056] In the embodiment of the present application, the oversampling process is to increase the amount of fault sample data, to ensure that the amount of all fault sample data is the same as that of all normal sample data, thereby ensuring the prediction accuracy of the preset fault prediction model. Wherein, all fault sample data includes a plurality of first fault sample data and a plurality of second fault sample data.

[0057] S204: Perform feature screening on the total sample data to obtain the principal component corresponding to each sample data; wherein the total sample data includes all normal sample data and all fault sample data.

[0058] In the embodiment of the present application, kernel principal component analysis is used to perform feature screening on the total sample data consisting of all normal sample data and all fault sample data to obtain the principal component corresponding to each sample data, which not only retains the main information in each sample data, but also achieves the purpose of reducing the calculation cost.

[0059] S205: Based on the principal components corresponding to the total sample data, a preset fault prediction model is trained to obtain a trained first fault prediction model.

[0060] In some embodiments, S201 may include Figure 3 Steps shown:

[0061] S301: Delete data with the same target feature from multiple first sample data.

[0062] In the embodiment of the present application, the first sample data includes multiple features, and the target feature is any one of the multiple features. Data (ie, duplicate data) with exactly the same target features in the multiple first sample data are deleted.

[0063] S302: Fill in missing values ​​of target features in multiple first sample data.

[0064] In an embodiment of the present application, for the missing value of the target feature, an interpolation method is used, that is, the rate of change of the value of the target feature in the first sample data at two previous and subsequent moments, to determine the value of the missing value and fill it in to the corresponding position of the corresponding first sample data.

[0065] S303: performing normalization processing on the plurality of first sample data to obtain a plurality of second sample data.

[0066] In the embodiment of the present application, a maximum and minimum value normalization method is used to normalize multiple first sample data to obtain multiple second sample data. Specifically, the normalization result of the target feature in any first sample data is the ratio of the difference between the value of the target feature in any first sample data and the minimum value of the target feature in the multiple first sample data to the difference between the maximum value and the minimum value of the target feature in the multiple first sample data.

[0067] In some embodiments, S203 may include Figure 4 Steps shown:

[0068] S401: Determine the Euclidean distance between the i-th first fault sample data and the r-th first fault sample data; i≠r.

[0069] S402: Based on the Euclidean distance between the ith first fault sample data and the rth first fault sample data, select k first fault sample data that are closest to the ith first fault sample data.

[0070] S403: Based on the target first fault sample data randomly selected from the k first fault sample data, synthesize it with the i-th first fault sample data into the second fault sample data.

[0071] In the embodiment of the present application, the i-th first fault sample data is any first fault sample data among the plurality of first fault sample data. The r-th first fault sample data is any first fault sample data among the plurality of first fault sample data except the i-th first fault sample data.

[0072] In the embodiment of the present application, each first fault sample data includes M features. Taking the i-th first fault sample data as an example, the Euclidean distance calculation formula between it and the r-th first fault sample data is as follows:

[0073]

[0074] in, represents the value of the jth feature of the normalized i-th first fault sample data, j = 1, 2, ..., m, represents the value of the jth feature of the normalized rth first fault sample data, r≠j. According to the above method, for each first fault sample data, the Euclidean distance from it to the other first fault sample data is calculated.

[0075] In an embodiment of the present application, for the i-th first fault sample data, one first fault sample data is randomly selected from the corresponding k first fault sample data as the target first fault sample data, and the target first fault sample data and the i-th first fault sample data are synthesized into new fault sample data, namely, second fault sample data, until the number of all fault sample data is the same as the number of normal sample data.

[0076] In some embodiments, the target first fault sample data randomly selected from the k first fault sample data is synthesized with the i-th first fault sample data into the second fault sample data, including: multiplying the difference between the target first fault sample data and the i-th first fault sample data with a random function, and then adding it to the i-th first fault sample data to obtain the second fault sample data.

[0077] In the embodiment of the present application, the i-th first fault sample data The corresponding target first fault sample data New fault sample data is synthesized according to the following formula:

[0078]

[0079] Among them, x new represents the synthesized new fault sample data, namely the second fault sample data, and rand(0,1) represents a random number between (0, 1).

[0080] In some embodiments, S204 may include Figure 5 Steps shown:

[0081] S501: Map each sample data in the total sample data to a high-dimensional feature space through a nonlinear kernel function, and perform centralization processing to obtain centralized data corresponding to each sample data.

[0082] S502: Based on the centralized data corresponding to each sample data in the total sample data, construct a characteristic equation of the covariance matrix, and solve to obtain M eigenvalues ​​corresponding to each sample data and eigenvectors corresponding to the eigenvalues; wherein each sample data includes M features.

[0083] S503: Determine the principal component corresponding to each sample data based on the M eigenvalues ​​corresponding to each sample data and the eigenvectors corresponding to the eigenvalues.

[0084] In the embodiment of the present application, kernel principal component analysis is used to perform feature screening on the total sample data. The idea of ​​kernel principal component analysis is to map each sample data to a high-dimensional feature space through a nonlinear kernel function, and then use the principal component analysis method to perform feature screening. The specific steps are as follows:

[0085] Step 1: Map each sample data in the total sample data to a high-dimensional feature space through a nonlinear kernel function.

[0086] Assume that the total number of sample data after oversampling is N, x i is the i-th sample data, and the combination of N sample data is expressed as: X = [x1, x2, ... x N ], where each sample data x i is an M-dimensional column vector, where M represents the number of features.

[0087] The sample is mapped to the high-dimensional feature space F through nonlinear mapping Φ, and the data of the i-th sample data mapping space is Φ(x i ), all sample data are mapped into the feature space F, and a new M×N matrix Φ(X) is obtained:

[0088] Φ(X)=[Φ(x1),Φ(x2),...,Φ(x N)], where M is the number of features and N is the number of samples.

[0089] Step 2: Centralize the mapped data.

[0090] Before reducing the dimension of the feature, the mapped data needs to be preprocessed, that is, Φ(x i ) is centralized, and Φ(x i ) The vector obtained after centralization is The relationship between the two can be expressed as:

[0091]

[0092] The above expression can also be written as:

[0093]

[0094] Among them, the N-dimensional column vector I N×1 =[1,1,...1] T According to the above formula, centering all vectors in the Φ(X) matrix yields:

[0095] In the formula, I N is an N-order matrix with 1.

[0096] Step 3: Based on the centralized data corresponding to each sample data in the total sample data, construct the characteristic equation of the covariance matrix.

[0097] The mapped covariance matrix C is an M×M matrix, that is:

[0098]

[0099] According to the covariance matrix, the characteristic equation is:

[0100] Cp=λp,

[0101] p is the M-dimensional weight vector in the feature space, and λ is the eigenvalue. For simplicity, we can also use Omitted, solve the following eigenvalue problem:

[0102]

[0103] In order to filter out the factors that are more important in determining whether a vehicle has a fault, we only need to find the eigenvector corresponding to the larger eigenvalue, and do not need to calculate the eigenvector corresponding to the eigenvalue of 0. Therefore, we only consider the case of λ≠0, and divide both sides of the equation by λ to get the following formula:

[0104]

[0105] That is, when λ≠0, let Then the corresponding eigenvector p can be expressed as:

[0106]

[0107] Where α=[α1,α2,...,α N ] T is an N-dimensional column vector, representing the coefficient vector. Substituting into Cp=λp, we get:

[0108]

[0109] Multiply both sides of the equation by the matrix get:

[0110]

[0111] Define an N×N dimensional matrix The above formula can be simplified to:

[0112] Kα=λα.

[0113] From the above process, it can be seen that in order to calculate the larger eigenvalue and its corresponding eigenvector α, the matrix K must be calculated first.

[0114] Step 4: Solve to obtain M eigenvalues ​​and the eigenvectors corresponding to the eigenvalues.

[0115] according to It can be seen that the elements in the matrix K can be obtained by Calculation shows that since the mapping Φ(X) is not explicitly defined, the value of Φ(X) cannot be directly calculated. At this point, we only need to introduce the kernel function K(x,y)=Φ(x) T Φ(y), we can directly obtain the dot product of Φ(x) and Φ(y) after mapping the low-dimensional vectors x and y in the input space to the feature space F.

[0116] The kernel function is used to calculate each element in the matrix K, thereby obtaining the matrix K. Then, according to the formula Kα=λα, the M eigenvalues ​​λ of each sample data and the eigenvector α corresponding to the eigenvalues ​​are calculated, and then according to Get the corresponding eigenvector p.

[0117] Further, in some embodiments, the principal component corresponding to each sample data is determined based on the M eigenvalues ​​corresponding to each sample data and the eigenvectors corresponding to the eigenvalues, including: sorting the M eigenvalues ​​corresponding to each sample data in order from large to small, and counting the cumulative contribution rate of the first m eigenvalues; when the cumulative contribution rate is greater than a first threshold, taking the eigenvectors corresponding to the sorted first m eigenvalues ​​as the principal component.

[0118] In an embodiment of the present application, the M eigenvalues ​​of each sample data are sorted in order from large to small, the corresponding eigenvectors are adjusted, the cumulative contribution rate of the first m eigenvalues ​​is calculated, and a first threshold is set. When the cumulative contribution rate is greater than the first threshold, the corresponding eigenvector is the extracted principal component, and the feature screening is completed. Among them, the cumulative contribution rate refers to the ratio of the sum of the first m eigenvalues ​​to the sum of all eigenvalues. It should be noted that the reason why the M eigenvalues ​​of each sample data are sorted in order from large to small is that the larger eigenvalues ​​correspond to the direction in which the data changes more, that is, the main change mode in the data.

[0119] In the process of feature screening using kernel principal component analysis, there are two key points: one is the selection of kernel function, and the other is to determine the cumulative contribution rate threshold of the selected features. Both need to be completed in practice according to the specific characteristics of the data. In practice, different kernel functions and different contribution thresholds can be set to perform feature screening on sample data, and explore the prediction accuracy of the probability of fault occurrence under different circumstances, so as to select the appropriate kernel function and contribution threshold. For this, the present invention does not discuss it too much here.

[0120] In some embodiments, S205 may include Figure 6 Steps shown:

[0121] S601: Establishing a preset fault prediction model based on a multi-layer feedforward neural network; wherein the weight of each sample data in the preset fault prediction model is one of the total number of sample data.

[0122] S602: Based on the principal components corresponding to the total sample data, a preset fault prediction model is trained to obtain a second fault prediction model.

[0123] S603: Using an integrated learning algorithm to update the weight of each sample data in the second fault prediction model.

[0124] S604: Based on the principal components corresponding to the total sample data, the second fault prediction model is trained to obtain a third fault prediction model; the training process is iterated to obtain a Qth fault prediction model.

[0125] S605: Based on the second fault prediction model and the corresponding weight, the third fault prediction model and the corresponding weight, and the Qth fault prediction model and the corresponding weight, a trained first fault prediction model is obtained.

[0126] In the embodiment of the present application, the multi-layer feedforward neural network takes the BP neural network as an example, and establishes the BP neural network as the base learner, that is, the preset fault prediction model. The integrated learning algorithm takes the AdBoost algorithm as an example. That is, the process of using the AdBoost algorithm to improve the BP neural network, which continuously adjusts the weight distribution of the sample according to the prediction results of the previous BP neural network, and continuously trains the new BP neural network on the new sample weight distribution, and then uses the linear combination of M trained BP neural networks as the final first fault prediction model.

[0127] Specifically, the initialization sample weight distribution of each sample data is:

[0128]

[0129] N represents the total number of sample data, N samples. From the above formula, we can see that the purpose of initializing sample weights is to make each sample equally important and build a model under this sample weight distribution.

[0130] The structure of BP neural network includes input layer, hidden layer and output layer. The calculation of BP neural network includes forward propagation and back propagation. Assume that the data processed by SMOTE and kernel principal component analysis has N samples, each sample has M features, x ij is the value of the jth feature of the ith sample. The number of neurons in the input layer is the number of sample features. Since the output data is the probability of a fault, there is only one neuron in the output layer. The forward propagation process of the BP neural network is:

[0131] The first step is to set the weight w between the jth neuron in the input layer and the pth neuron in the hidden layer jp and bias b jp Perform the sum operation and use the activation function g(·) to complete the nonlinear operation, and the output data of the hidden layer is:

[0132]

[0133] In the second step, similarly, the same transformation is performed between the hidden layer and the output layer, and the output value can be obtained as follows:

[0134]

[0135] The third step is to calculate the error value through the loss function:

[0136]

[0137] Among them, y i represents the true result of the i-th sample, d i represents the fault prediction result of the i-th sample, and E represents the total error of the BP neural network model. The true result of the sample is determined according to the working state of the charger.

[0138] The back-propagation process is to transfer the error between the fault prediction result and the actual result to the neuron, and repeatedly update the weights and biases through the gradient descent method until the total error of the model is minimized, and then output the final result, that is, the fault prediction result during the vehicle charging process.

[0139] At this point, a complete BP neural network prediction process is completed, and the second fault prediction model is obtained.

[0140] Furthermore, the weight of each sample data in the second fault prediction model is updated using the AdBoost algorithm. The updated weight distribution of each sample data is:

[0141] D2=(w 21 , w 22 ,...,w 2N )

[0142]

[0143] If the fault prediction result is not equal to the actual result, then γ i = -1, otherwise, γ i =1, θ1 is the normalization factor, It can be seen that if the sample is predicted correctly, then when constructing the next BP neural network, its weight is reduced; on the contrary, its weight is increased. By increasing the weight of the sample with incorrect prediction, the proportion of it in the whole sample is larger, so that when used for training the model, the model's ability to identify the sample with incorrect prediction can be improved, thereby enhancing the accuracy of the model's prediction.

[0144] Under the above sample weight distribution, a new BP neural network is constructed. The entire training process is iteratively carried out, and finally Z BP neural networks are trained, Z = Q-1, and their linear combination is constructed as:

[0145]

[0146] At this time, H Z (x) is the final BP_AdBoost model, that is, the first fault prediction model.

[0147] In some embodiments, the method also includes: using the principal component of each sample data in the total sample data as the input of the qth fault prediction model to obtain the fault prediction result of each sample data; q takes a value from 2 to Q; based on the actual results and fault prediction results of each sample data in the total sample data, determining the classification error rate of the qth fault prediction model; based on the classification error rate of the qth fault prediction model, determining the weight corresponding to the qth fault prediction model.

[0148] In an embodiment of the present application, the principal component of each sample data in the total sample data is used as the input of the qth fault prediction model to obtain a fault prediction result for each sample data, and the fault prediction result is divided into a fault and no fault according to a threshold value. For example, a fault prediction result greater than 0.5 is considered to have occurred, and a fault less than or equal to 0.5 is considered to have not occurred.

[0149] The classification error rate e of the qth fault prediction model z :

[0150]

[0151] Among them, y i represents the true result of the i-th sample, d i represents the fault prediction result of the i-th sample, and I(·) is an indicative function with values ​​of 0 and 1.

[0152] The weight of the qth fault prediction model in the final BP_AdBoost model

[0153]

[0154] From the above formula, we can see that It will increase as e decreases, which means that the BP neural network with a smaller classification error rate plays a greater role and has a more important position in the final BP_AdBoost model.

[0155] Based on the above embodiments, the present invention specifically provides a vehicle charging safety monitoring method, which includes the following steps:

[0156] Step 1: Acquire multiple first sample data, the first sample data including charging process data at historical moments and user charging habit data, the charging process data including but not limited to maximum voltage, minimum voltage, maximum current, minimum current, battery temperature, battery capacity, battery health status, charger working status, user charging habit data including but not limited to the user's power before each charging, power after charging and charging time.

[0157] Step 2: Preprocess the plurality of first sample data to obtain a plurality of preprocessed second sample data. The details are as follows:

[0158] Deleting data with exactly the same target features among multiple first sample data (i.e., duplicate data);

[0159] Filling the missing values ​​of the target features in the plurality of first sample data;

[0160] The maximum and minimum value normalization method is used to normalize the multiple first sample data to obtain multiple second sample data. The specific calculation formula is:

[0161]

[0162] Among them, x ij represents the jth eigenvalue of the i-th sample in the original data, i = 1, 2, ..., n, j = 1, 2, ..., m, Represent the minimum and maximum values ​​of the original data respectively. is the data value after normalization, and its value range is [-1, 1].

[0163] Step three: based on the charger working status respectively included in the plurality of second sample data, the plurality of second sample data are divided into a plurality of normal sample data and a plurality of first fault sample data.

[0164] Specifically, when the charger working state included in the second sample data is a normal working state, the second sample data is normal sample data. When the charger working state included in the second sample data is an abnormal working state, the second sample data is first fault sample data.

[0165] Step 4: Use the SMOTE oversampling method to increase the number of fault samples to ensure that the proportion of fault sample data and normal sample data remains balanced.

[0166] It should be noted that since the first fault sample data is small and has a significant difference in data volume from the normal sample data, this easily leads to a poor fitting of the prediction model to the fault sample data, thereby affecting the prediction accuracy of the model. In order to solve this problem, the present invention uses the SMOTE oversampling method to generate some fault samples before the prediction model is established. The principle of the SMOTE method is to perform random linear interpolation between the fault sample and its neighboring fault samples. The specific implementation steps are:

[0167] (1) Calculate the Euclidean distance between fault sample data.

[0168] Taking the i-th fault sample as an example, the Euclidean distance calculation formula between it and the r-th fault sample is as follows:

[0169]

[0170] in, represents the value of the jth feature of the i-th sample after normalization, j = 1, 2, ..., m, represents the value of the jth feature of the rth sample after normalization, r≠j. According to the above method, for each normalized fault sample, the Euclidean distance from it to all other fault sample data is calculated.

[0171] (2) Select K nearest neighbors.

[0172] According to the Euclidean distance between fault samples, select the k samples closest to the fault sample data and randomly select a sample from them.

[0173] (3) Synthesize new samples.

[0174] sample With the original fault sample Synthesize new samples according to the following formula:

[0175]

[0176] Among them, x new represents a new synthetic fault sample, and rand(0,1) represents a random number between (0, 1).

[0177] The above three steps can be repeated to obtain a plurality of synthesized second fault sample data until the number of all fault sample data is the same as the number of all normal sample data.

[0178] Step 5: Use kernel principal component analysis to perform feature screening on the total sample data and obtain the principal components of each sample data.

[0179] The total sample data includes all normal sample data and all fault sample data.

[0180] The idea of ​​kernel principal component analysis is to map the original input data into a high-dimensional feature space through a nonlinear kernel function, and then use the principal component analysis method to perform feature screening. The specific steps are as follows:

[0181] (1) Centralize the mapped data.

[0182] Assume that the total number of sample data after oversampling is N, x i is the i-th sample data, and the combination of N sample data is expressed as: X = [x1, x2, ... x N ], where each sample data x iis an M-dimensional column vector, where M represents the number of features.

[0183] The sample is mapped to the high-dimensional feature space F through nonlinear mapping Φ, and the data of the i-th sample data mapping space is Φ(x i ), all sample data are mapped into the feature space F, and a new M×N matrix Φ(X) is obtained:

[0184] Φ(X)=[Φ(x1),Φ(x2),...,Φ(x N )], where M is the number of features and N is the number of samples.

[0185] Before reducing the dimension of the feature, the mapped data needs to be preprocessed, that is, Φ(x i ) is centralized, and Φ(x i ) The vector obtained after centralization is The relationship between the two can be expressed as:

[0186]

[0187] The above expression can also be written as:

[0188]

[0189] Among them, the N-dimensional column vector I N×1 =[1,1,...1] T According to the above formula, centering all vectors in the Φ(X) matrix yields:

[0190] In the formula, I N is an N-order matrix with 1.

[0191] (2) Calculate the characteristic equation of the covariance matrix.

[0192] The mapped covariance matrix C is an M×M matrix, that is:

[0193]

[0194] According to the covariance matrix, the characteristic equation is:

[0195] Cp=λp,

[0196] p is the M-dimensional weight vector in the feature space, and λ is the eigenvalue. For simplicity, we can also use Omitted, solve the following eigenvalue problem:

[0197]

[0198] In order to filter out the factors that are more important in determining whether a vehicle has a fault, we only need to find the eigenvector corresponding to the larger eigenvalue, and do not need to calculate the eigenvector corresponding to the eigenvalue of 0. Therefore, we only consider the case of λ≠0, and divide both sides of the equation by λ to get the following formula:

[0199]

[0200] That is, when λ≠0, let Then the corresponding eigenvector p can be expressed as:

[0201]

[0202] Where α=[α1,α2,...,α N ] T is an N-dimensional column vector, representing the coefficient vector. Substituting into Cp=λp, we get:

[0203]

[0204] Multiply both sides of the equation by the matrix get:

[0205]

[0206] Define an N×N dimensional matrix The above formula can be simplified to:

[0207] Kα=λα.

[0208] From the above process, it can be seen that in order to calculate the larger eigenvalue and its corresponding eigenvector α, the matrix K must be calculated first.

[0209] (3) Calculate the eigenvalues ​​and eigenvectors and determine the principal components.

[0210] according to It can be seen that the elements in the matrix K can be obtained by Calculation shows that since the mapping Φ(X) is not explicitly defined, the value of Φ(X) cannot be directly calculated. At this point, we only need to introduce the kernel function K(x,y)=Φ(x) T Φ(y), we can directly obtain the dot product of Φ(x) and Φ(y) after mapping the low-dimensional vectors x and y in the input space to the feature space F.

[0211] The kernel function is used to calculate each element in the matrix K, thereby obtaining the matrix K. Then, according to the formula Kα=λα, the M eigenvalues ​​λ of each sample data and the eigenvector α corresponding to the eigenvalues ​​are calculated, and then according to Get the corresponding eigenvector p.

[0212] Sort the M eigenvalues ​​of each sample data in descending order, adjust the corresponding eigenvector, calculate the cumulative contribution rate of the first m eigenvalues, and set a first threshold. When the cumulative contribution rate is greater than the first threshold, the corresponding eigenvector is the extracted principal component, and the feature screening is completed. The cumulative contribution rate refers to the ratio of the sum of the first m eigenvalues ​​to the sum of all eigenvalues. It should be noted that the reason why the M eigenvalues ​​of each sample data are sorted in descending order is that the larger eigenvalues ​​correspond to the direction in which the data changes more, that is, the main change mode in the data.

[0213] In the process of feature screening using kernel principal component analysis, there are two key points: one is the selection of kernel function, and the other is to determine the cumulative contribution rate threshold of the selected features. Both need to be completed in practice according to the specific characteristics of the data. In practice, different kernel functions and different contribution thresholds can be set to perform feature screening on sample data, and explore the prediction accuracy of the probability of fault occurrence under different circumstances, so as to select the appropriate kernel function and contribution threshold. For this, the present invention does not discuss it too much here.

[0214] Step 6: Use the BP_AdBoost model to predict the probability of vehicle charging failure.

[0215] The BP_AdBoost model of the present invention is a process of using the BP neural network as a base learner and using the AdBoost method to improve the BP neural network. It continuously adjusts the weight distribution of samples according to the prediction results of the previous BP neural network, and continuously trains new BP neural networks on the new sample weight distribution, and then uses the linear combination of M trained BP neural networks as the final prediction model.

[0216] (1) Initialize the sample weight distribution as:

[0217]

[0218] N means that there are N samples of data after SMOTE and kernel principal component analysis. From the above formula, we can see that the purpose of initializing sample weights is to make each sample equally important and build a model under this sample weight distribution.

[0219] (2) Establish a BP neural network for sample data.

[0220] The structure of BP neural network includes input layer, hidden layer and output layer. The calculation of BP neural network includes forward propagation and back propagation. Assume that the data processed by SMOTE and kernel principal component analysis has N samples, each sample has M features, x ijis the value of the jth feature of the ith sample. The number of neurons in the input layer is the number of sample features. Since the output data is the probability of a fault, there is only one neuron in the output layer. The forward propagation process of the BP neural network is:

[0221] The first step is to set the weight w between the jth neuron in the input layer and the pth neuron in the hidden layer jp and bias b jp Perform the sum operation and use the activation function g(·) to complete the nonlinear operation, and the output data of the hidden layer is:

[0222]

[0223] In the second step, similarly, the same transformation is performed between the hidden layer and the output layer, and the output value can be obtained as follows:

[0224]

[0225] The third step is to calculate the error value through the loss function:

[0226]

[0227] Among them, y i represents the true value of the i-th sample, d i represents the fault prediction probability of the i-th sample, and E represents the total error of the BP neural network model.

[0228] The back-propagation process is to transfer the error between the predicted result and the actual value to the neuron, and repeatedly update the weights and biases through the gradient descent method until the total error of the model is minimized, and then output the final result, that is, the probability of failure during vehicle charging.

[0229] At this point, a complete BP neural network prediction process is completed.

[0230] (3) Train the BP_AdBoost model.

[0231] In the first step, the fault probability predicted by the first BP neural network is divided into fault occurrence and non-fault occurrence according to the threshold. For example, a predicted fault probability greater than 0.5 is considered to be a fault occurrence, and a predicted fault probability less than or equal to 0.5 is considered to be non-fault occurrence.

[0232] The second step is to calculate the classification error rate e1 of the BP neural network:

[0233]

[0234] Among them, y i represents the true value of the i-th sample, d irepresents the failure prediction probability of the i-th sample, and I(·) is an indicative function with values ​​of 0 and 1.

[0235] The third step is to calculate the weight α1 of the BP neural network in the final BP_AdBoost model:

[0236]

[0237] It can be seen from the above formula that α will increase as e decreases, which means that the BP neural network with a smaller classification error rate plays a greater role and has a more important position in the final BP_AdBoost model.

[0238] The fourth step is to update the sample weight distribution as follows:

[0239] D2=(w 21 , w 22 ,...,w 2N )

[0240]

[0241] If the predicted result is not equal to the actual result, then γ i = -1, otherwise, γ i =1, It can be seen that if the sample is predicted correctly, then when constructing the next BP neural network, its weight is reduced; on the contrary, its weight is increased. By increasing the weight of the sample with incorrect prediction, the proportion of it in the whole sample is larger, so that when used for training the model, the model's ability to identify the sample with incorrect prediction can be improved, thereby enhancing the accuracy of the model's prediction.

[0242] The fifth step is to construct a new BP neural network under the above sample weight distribution. The entire training process is iteratively carried out, and finally M BP neural networks are trained, and their linear combination is constructed as:

[0243]

[0244] At this time, H M (x) is the final BP_AdBoost model.

[0245] Step 7: Apply the trained BP_AdBoost model to fault prediction during vehicle charging to obtain the predicted value of the fault occurrence probability.

[0246] Step 8: Provide forecast results and provide risk warnings to customers.

[0247] The probability of failure during charging predicted by the BP_AdBoost model is calculated to obtain the charging safety score:

[0248] Charging safety score = 100-(100×failure probability)

[0249] The charging safety score will be fed back to the user. When the charging safety score is lower than a certain threshold, an alarm will be issued through the APP, or an early warning will be provided to the user through SMS, WeChat, etc., and charging will be stopped immediately.

[0250] In this way, the SMOTE method is used to solve the problem of sample category imbalance, kernel principal component analysis is used for feature screening, and on this basis, the BP_AdBoost model is established to predict the probability of failure during vehicle charging. At the same time, the charging safety score is calculated, and risk warnings and fault warnings are given to users, which effectively improves the safety monitoring efficiency, achieves the purpose of accident prevention, and is conducive to reducing the probability of accidents.

[0251] In order to implement the method of the embodiment of the present invention, based on the same inventive concept, the embodiment of the present invention further provides a vehicle charging safety monitoring device, Figure 7 FIG. 1 is a schematic diagram of the structure of the vehicle charging safety monitoring device according to an embodiment of the present invention. Figure 7 As shown, the vehicle charging safety monitoring device 70 includes:

[0252] The processing unit 701 is used to obtain the charging process data and the user charging habit data at the current moment as inputs of a first fault prediction model to obtain a fault prediction result; wherein the first fault prediction model is obtained by training a preset fault prediction model based on the charging process data and the user charging habit data obtained at historical moments;

[0253] The evaluation unit 702 is used to perform a vehicle charging safety evaluation based on the fault prediction result to obtain a charging safety evaluation result.

[0254] In the embodiment of the present invention, the charging process data and the user's charging habit data are used to monitor the vehicle charging safety in real time, thereby improving the charging safety monitoring efficiency, achieving the purpose of preventing accidents before they occur, and reducing the probability of accidents.

[0255] In some embodiments, the processing unit 701 is also used to preprocess multiple first sample data to obtain multiple preprocessed second sample data; wherein the first sample data includes the charging process data and the user charging habit data at the historical moment; the multiple second sample data are divided into multiple normal sample data and multiple first fault sample data; oversampling processing is performed based on the multiple first fault sample data to obtain multiple second fault sample data; wherein the number of all fault sample data is the same as the number of all normal sample data; feature screening is performed on the total sample data to obtain the principal component corresponding to each sample data; wherein the total sample data includes all normal sample data and all fault sample data; based on the principal components corresponding to each of the total sample data, the preset fault prediction model is trained to obtain the trained first fault prediction model.

[0256] In some embodiments, the processing unit 701 is also used to preprocess the multiple first sample data to obtain the preprocessed multiple second sample data, including: deleting the data with the same target features in the multiple first sample data; filling the missing values ​​of the target features in the multiple first sample data; normalizing the multiple first sample data to obtain the multiple second sample data.

[0257] In some embodiments, the processing unit 701 is also used to determine the Euclidean distance between the i-th first fault sample data and the r-th first fault sample data; i≠r; based on the Euclidean distance between the i-th first fault sample data and the r-th first fault sample data, select k first fault sample data that are closest to the i-th first fault sample data; based on the target first fault sample data randomly selected from the k first fault sample data, synthesize it with the i-th first fault sample data into the second fault sample data.

[0258] In some embodiments, the processing unit 701 is further used to multiply the difference between the target first fault sample data and the i-th first fault sample data by a random function, and then add the difference to the i-th first fault sample data to obtain the second fault sample data.

[0259] In some embodiments, the processing unit 701 is also used to map each sample data in the total sample data to a high-dimensional feature space through a nonlinear kernel function, and perform centralization processing to obtain centralized data corresponding to each sample data; based on the centralized data corresponding to each sample data in the total sample data, construct a characteristic equation of the covariance matrix, and solve to obtain M eigenvalues ​​corresponding to each sample data and eigenvectors corresponding to the eigenvalues; wherein each sample data includes M features; based on the M eigenvalues ​​corresponding to each sample data and the eigenvectors corresponding to the eigenvalues, determine the principal component corresponding to each sample data.

[0260] In some embodiments, the processing unit 701 is also used to sort the M eigenvalues ​​corresponding to each sample data in descending order, and count the cumulative contribution rate of the first m eigenvalues; when the cumulative contribution rate is greater than the first threshold, the eigenvector corresponding to the sorted first m eigenvalues ​​is used as the principal component.

[0261] In some embodiments, the processing unit 701 is also used to establish the preset fault prediction model based on a multi-layer feedforward neural network; wherein the weight of each sample data in the preset fault prediction model is one of the number of the total sample data; based on the principal components corresponding to each of the total sample data, the preset fault prediction model is trained to obtain a second fault prediction model; the weights of each sample data in the second fault prediction model are updated using an integrated learning algorithm; based on the principal components corresponding to each of the total sample data, the second fault prediction model is trained to obtain a third fault prediction model; the training process is iterated to obtain the Qth fault prediction model; based on the second fault prediction model and the corresponding weights, the third fault prediction model and the corresponding weights, and the Qth fault prediction model and the corresponding weights, the trained first fault prediction model is obtained.

[0262] In some embodiments, the processing unit 701 is also used to use the principal component of each sample data in the total sample data as the input of the qth fault prediction model to obtain the fault prediction result of each sample data; q takes a value from 2 to Q; based on the actual result and the fault prediction result of each sample data in the total sample data, the classification error rate of the qth fault prediction model is determined; based on the classification error rate of the qth fault prediction model, the weight corresponding to the qth fault prediction model is determined.

[0263] The embodiment of the present invention also provides another vehicle charging safety monitoring device, Figure 8 FIG. 1 is a schematic diagram of the structure of the vehicle charging safety monitoring device according to an embodiment of the present invention. Figure 8As shown, the vehicle charging safety monitoring device 80 includes: a processor 801 and a memory 802 configured to store a computer program that can be run on the processor;

[0264] The processor 801 is configured to execute the method steps in the aforementioned embodiment when running a computer program.

[0265] Of course, in practical applications, Figure 8 As shown, the various components in the vehicle charging safety monitoring device 80 are coupled together through a bus system 803. It can be understood that the bus system 803 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 803 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, Figure 8 Various buses are labeled as bus system 803.

[0266] In practical applications, the processor may be at least one of an application-specific integrated circuit (ASIC), a digital signal processing device (DSPD), a programmable logic device (PLD), a field-programmable gate array (FPGA), a controller, a microcontroller, and a microprocessor. It is understandable that for different devices, the electronic device used to implement the functions of the processor may also be other, and the embodiments of the present invention do not specifically limit this.

[0267] The above-mentioned memory can be a volatile memory (volatile memory), such as a random access memory (RAM); or a non-volatile memory (non-volatile memory), such as a read-only memory (ROM), a flash memory, a hard disk (HDD) or a solid-state drive (SSD); or a combination of the above-mentioned types of memory, and provide instructions and data to the processor.

[0268] In an exemplary embodiment, an embodiment of the present invention further provides a computer-readable storage medium for storing a computer program.

[0269] Optionally, the computer-readable storage medium can be applied to any one of the methods in the embodiments of the present invention, and the computer program enables the computer to execute the corresponding processes implemented by the processor in each method in the embodiments of the present invention. For the sake of brevity, they are not described here.

[0270] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0271] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0272] In addition, all functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may be a separate unit, or two or more units may be integrated into one unit; the above integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units. A person of ordinary skill in the art may understand that all or part of the steps of implementing the above method embodiments may be completed by hardware related to program instructions, and the above program may be stored in a computer-readable storage medium, which, when executed, executes the steps of the above method embodiments; and the above storage medium includes various media that can store program codes, such as mobile storage devices, read-only memories (ROM), random access memories (RAM), magnetic disks or optical disks.

[0273] The methods disclosed in the several method embodiments provided by the present invention can be arbitrarily combined without conflict to obtain new method embodiments.

[0274] The features disclosed in several product embodiments provided by the present invention can be arbitrarily combined without conflict to obtain new product embodiments.

[0275] The features disclosed in several method or device embodiments provided by the present invention can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.

[0276] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A vehicle charging safety monitoring method, characterized in that: The vehicle charging safety monitoring method comprises: The charging process data and the user charging habit data at the current moment are used as inputs of a first fault prediction model to obtain a fault prediction result; wherein the first fault prediction model is obtained by training a preset fault prediction model based on the charging process data and the user charging habit data at historical moments; A vehicle charging safety assessment is performed based on the fault prediction result to obtain a charging safety assessment result.

2. The vehicle charging safety monitoring method according to claim 1, characterized in that: The vehicle charging safety monitoring method further includes: Preprocessing the plurality of first sample data to obtain a plurality of preprocessed second sample data; wherein the first sample data includes the charging process data at the historical moment and the user charging habit data; dividing the plurality of second sample data into a plurality of normal sample data and a plurality of first fault sample data; Performing oversampling processing based on the plurality of first fault sample data to obtain a plurality of second fault sample data; wherein the number of all the fault sample data is the same as the number of all the normal sample data; Performing feature screening on the total sample data to obtain the principal component corresponding to each sample data; wherein the total sample data includes all normal sample data and all fault sample data; The preset fault prediction model is trained based on the principal components corresponding to the total sample data to obtain the trained first fault prediction model.

3. The vehicle charging safety monitoring method according to claim 2, characterized in that: The preprocessing of the plurality of first sample data to obtain the preprocessed plurality of second sample data includes: Deleting data with the same target feature from the plurality of first sample data; Filling missing values ​​of target features in the plurality of first sample data; The plurality of first sample data are normalized to obtain the plurality of second sample data.

4. The vehicle charging safety monitoring method according to claim 2, characterized in that: The oversampling process is performed based on the plurality of first fault sample data to obtain a plurality of second fault sample data, including: Determine the Euclidean distance between the i-th first fault sample data and the r-th first fault sample data; i≠r; Based on the Euclidean distance between the i-th first fault sample data and the r-th first fault sample data, select k first fault sample data closest to the i-th first fault sample data; Based on the target first fault sample data randomly selected from the k first fault sample data, the target first fault sample data is combined with the i-th first fault sample data into the second fault sample data.

5. The vehicle charging safety monitoring method according to claim 4, characterized in that: The step of synthesizing the target first fault sample data randomly selected from the k first fault sample data and the i-th first fault sample data into the second fault sample data comprises: The difference between the target first fault sample data and the i-th first fault sample data is multiplied by a random function, and then added to the i-th first fault sample data to obtain the second fault sample data.

6. The vehicle charging safety monitoring method according to claim 2, characterized in that: The feature screening of the total sample data to obtain the principal component corresponding to each sample data includes: Mapping each sample data in the total sample data to a high-dimensional feature space through a nonlinear kernel function, and performing centralization processing to obtain centralized data corresponding to each sample data; Based on the centralized data corresponding to each sample data in the total sample data, a characteristic equation of the covariance matrix is ​​constructed, and M eigenvalues ​​corresponding to each sample data and eigenvectors corresponding to the eigenvalues ​​are obtained by solving the equation; wherein each sample data includes M features; Based on the M eigenvalues ​​corresponding to each sample data and the eigenvectors corresponding to the eigenvalues, the principal component corresponding to each sample data is determined.

7. The vehicle charging safety monitoring method according to claim 6, characterized in that: The determining the principal component corresponding to each sample data based on the M eigenvalues ​​corresponding to each sample data and the eigenvectors corresponding to the eigenvalues ​​includes: Sort the M eigenvalues ​​corresponding to each sample data in descending order, and calculate the cumulative contribution rate of the first m eigenvalues; When the cumulative contribution rate is greater than the first threshold, the eigenvectors corresponding to the first m eigenvalues ​​after sorting are used as the principal components.

8. The vehicle charging safety monitoring method according to claim 2, characterized in that: The step of training the preset fault prediction model based on the principal components corresponding to the total sample data to obtain the trained first fault prediction model includes: The preset fault prediction model is established based on a multi-layer feedforward neural network; wherein the weight of each sample data in the preset fault prediction model is one of the total number of sample data; Based on the principal components corresponding to the total sample data, the preset fault prediction model is trained to obtain a second fault prediction model; Using an integrated learning algorithm to update the weight of each sample data in the second fault prediction model; Based on the principal components corresponding to the total sample data, the second fault prediction model is trained to obtain a third fault prediction model; The training process is iterated to obtain the Qth fault prediction model; Based on the second fault prediction model and the corresponding weight, the third fault prediction model and the corresponding weight, and the Qth fault prediction model and the corresponding weight, the trained first fault prediction model is obtained.

9. The vehicle charging safety monitoring method according to claim 8, characterized in that: The method further comprises: The principal component of each sample data in the total sample data is used as the input of the qth fault prediction model to obtain the fault prediction result of each sample data; q ranges from 2 to Q; Determining a classification error rate of the qth fault prediction model based on a true result and a fault prediction result of each sample data in the total sample data; Based on the classification error rate of the qth fault prediction model, a weight corresponding to the qth fault prediction model is determined.

10. A vehicle charging safety monitoring device, characterized in that: The vehicle charging safety monitoring device comprises: a processing unit, configured to use the charging process data and the user charging habit data obtained at the current moment as inputs of a first fault prediction model to obtain a fault prediction result; wherein the first fault prediction model is obtained by training a preset fault prediction model based on the charging process data and the user charging habit data obtained at historical moments; An evaluation unit is used to perform a vehicle charging safety evaluation based on the fault prediction result to obtain a charging safety evaluation result.

Citation Information

Patent Citations

  • Monitoring method and system for safe charging of power battery

    CN112622676A

  • Fault prediction method and device of Internet of Things equipment, electronic equipment and storage medium

    CN117493797A