Charging pile fault data generation method, device, storage medium and product
By analyzing and coding real charging pile fault data, constructing a sample data set and using the data generation model to generate charging pile fault data, the problem of insufficient data generation accuracy and scalability in traditional methods is solved, and high-quality fault data is achieved Generated, providing reliable data support for subsequent applications.
Patent Information
- Application Number
- CN202411499459.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2044-10-25
AI Technical Summary
Traditional data generation methods are difficult to fully simulate real scenarios, lack of scalability, lack of randomness and variability, resulting in reduced accuracy of data generation and difficulty in obtaining real charging pile failure data.
By obtaining real charging pile fault data, analyze and select the characteristic information of each fault data, encode and generate feature vectors, construct a sample data set, and use an unsupervised training data generation model to generate charging pile fault data.
It improves the accuracy and quality of data generation, solves the problem of lack of randomness and variability in data in traditional methods, provides a basis for real data, and provides support for fault prediction and equipment maintenance optimization.
Smart Images

Figure CN119025999B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of data processing technology, and in particular relates to a charging pile fault data generation method, device, storage medium and product. Background Art
[0002] With the popularity of electric vehicles, the number and scale of electric vehicle charging stations have grown rapidly, and charging stations have become an important guarantee for electric vehicle users' daily travel. Due to environmental factors such as weather conditions, aging of parts, or human factors such as improper operation, charging piles may experience faults such as overheating of the charging gun, failure of the BMS (battery management system), or undervoltage of the charging module during use. The increasing number of charging piles has also led to a huge number of faults. Timely and accurate grasp of charging pile fault data is crucial to ensure a good user experience for electric vehicle users. Charging pile fault data can not only help operators quickly identify and fix problems and reduce the inconvenience caused by interruptions in the charging process, but also predict potential faults in advance through big data analysis, optimize equipment maintenance plans, and improve the reliability and efficiency of the overall charging network. However, due to technical safety and other reasons, it is difficult to obtain real charging pile fault data. Based on real charging pile fault data, a large amount of charging pile fault data is generated, and the generated charging pile fault data is analyzed and utilized, which not only solves the technical safety problem, but also solves the problem of difficulty in obtaining real charging pile fault data.
[0003] Traditional data generation methods usually rely on preset rules or templates, which makes the generated data often lack diversity and complexity, and it is difficult to fully simulate real complex scenarios. When processing large-scale data, traditional data generation methods often show insufficient scalability and have difficulty generating enough data samples to meet the needs of modern data-driven applications. Due to the lack of randomness and variability in the data generation process, the generated data may not accurately reflect real noise and anomalies, limiting its effectiveness in training machine learning models. Summary of the invention
[0004] The purpose of the present invention is to provide a charging pile fault data generation method, device, storage medium and product to solve the problem that traditional data generation methods are difficult to fully simulate real scenarios, lack of scalability, lack of randomness and variability, resulting in reduced data generation accuracy.
[0005] The present invention solves the above technical problems through the following technical solutions: a charging pile fault data generating method, comprising:
[0006] Obtain real charging pile failure data;
[0007] Analyze the charging pile fault data, and select characteristic information of each fault data according to the analysis result;
[0008] Encode the characteristic information of each piece of fault data to obtain a characteristic vector of the corresponding piece of fault data;
[0009] Construct a sample data set based on all feature vectors of charging pile failure data;
[0010] Loading a data generation model, and performing unsupervised training on the data generation model using the sample data set to obtain a target generation model;
[0011] The target generation model is used to generate charging pile fault data.
[0012] Furthermore, the characteristic information of each piece of fault data includes the fault type, fault device ID, fault date, fault device manufacturer, fault start time and fault duration.
[0013] Furthermore, the characteristic information of each piece of fault data is encoded, including:
[0014] Determine the first sub-code length according to all fault device IDs and all fault device manufacturers of the charging pile fault data; based on the first sub-code length, use a unique hot vector to encode the fault device ID and fault device manufacturer of each fault data to obtain the first sub-code of the corresponding fault data;
[0015] Determine the second sub-code length according to all fault dates of the charging pile fault data; based on the second sub-code length, use a one-hot vector to encode the fault date of each fault data to obtain the second sub-code of the corresponding fault data;
[0016] Determine the length of the third sub-code according to all fault types of the charging pile fault data, and based on the length of the third sub-code, use a one-hot vector to encode the fault type of each piece of fault data to obtain the third sub-code of the corresponding piece of fault data;
[0017] A Gaussian mixture model is used to perform distribution fitting on all fault start times of the charging pile fault data, and the mean, standard deviation and weight of each Gaussian distribution component contained in the distribution of all fault start times are obtained; for the fault start time of each fault data, the contribution of each Gaussian distribution component to its distribution is calculated, and the Gaussian distribution component with the highest contribution is used as the distribution to which the fault start time belongs; the fault start time is normalized; a one-hot vector is used to encode the distribution to which the fault start time belongs, and then it is spliced with the normalized fault start time to obtain the fourth sub-code;
[0018] A Gaussian mixture model is used to perform distribution fitting on all fault durations of charging pile fault data, and the mean, standard deviation and weight of each Gaussian distribution component contained in the distribution of all fault durations are obtained; for the fault duration of each fault data, the contribution of each Gaussian distribution component to its distribution is calculated, and the Gaussian distribution component with the highest contribution is taken as the distribution to which the fault duration belongs; the fault duration is normalized; a one-hot vector is used to encode the distribution to which the fault duration belongs, and then it is spliced with the normalized fault duration to obtain the fifth sub-code;
[0019] The first sub-code, the second sub-code, the third sub-code, the fourth sub-code and the fifth sub-code are concatenated to obtain a feature vector of each fault data.
[0020] Furthermore, the fault start time or fault duration of each fault data is normalized using the mean and standard deviation of the Gaussian distribution component with the highest contribution. The specific formula is:
[0021] ;
[0022] Among them, t' s / d represents the normalized fault start time or fault duration; t s / d Indicates the fault start time or fault duration before normalization; i Indicates the fault start time t s Or fault duration t d Gaussian distribution component to which it belongs; μ i Represents Gaussian distribution component i The mean value, σ i Represents Gaussian distribution component i The standard deviation of .
[0023] Furthermore, the data generation model is a variational autoencoder, a large language model, a generative adversarial network or a diffusion model.
[0024] Furthermore, when the data generation model is a variational autoencoder, unsupervised training of the data generation model is performed using the sample data set, including:
[0025] The encoder of the variational autoencoder processes the feature vectors in the sample data set to obtain the mean and standard deviation of the first latent variable;
[0026] Sampling from a standard normal distribution according to the mean and standard deviation of the first latent variable to obtain a first latent variable;
[0027] Using the first latent variable as an input of a decoder of a variational autoencoder, and reconstructing data according to the first latent variable;
[0028] A variational lower bound loss is calculated, and encoder and decoder parameters of the variational autoencoder are updated according to the variational lower bound loss.
[0029] Furthermore, when the data generation model is a variational autoencoder, the target generation model is used to generate charging pile fault data, including:
[0030] Inputting an integer indicating the number of data items to be generated into the target generation model;
[0031] Sampling from the standard normal distribution to obtain the second latent variable;
[0032] Using the second latent variable as input of a decoder of the target generation model, and reconstructing data according to the second latent variable;
[0033] Repeat the steps of sampling from the standard normal distribution and reconstructing the data until the number of items obtained reaches the input integer;
[0034] According to the encoding rules of the feature vectors in the sample data set, the data reconstructed and output by the decoder of the target generation model is restored to obtain the generated charging pile fault data.
[0035] Based on the same concept, the present invention provides an electronic device, including a memory, a processor, and a computer program / instructions stored in the memory, wherein the processor executes the computer program / instructions to implement the charging pile fault data generating method as described above.
[0036] Based on the same concept, the present invention provides a computer-readable storage medium having a computer program / instruction stored thereon, which, when executed by a processor, implements the charging pile fault data generating method as described above.
[0037] Based on the same concept, the present invention provides a computer program product, including a computer program / instruction, which implements the charging pile fault data generation method as described above when executed by a processor.
[0038] Beneficial Effects
[0039] Compared with the prior art, the advantages of the present invention are:
[0040] The present invention analyzes the real charging pile fault data and extracts the characteristic information of each fault data, then constructs a sample data set by encoding the characteristic information of each fault data, uses the sample data set to train a deep learning model, and uses the trained deep learning model to generate fault data similar to the real charging pile fault data, thereby providing a data basis for subsequent fault prediction, etc.
[0041] The present invention constructs a sample data set according to the characteristics of different types of data in real charging pile fault data, and uses a deep learning model to fully learn the relationship between the distribution characteristics of different types of data and fault data, thereby improving the training effect of the model, thereby improving the quality and accuracy of the generated data, and solving the problem that the traditional method lacks randomness and variability, which leads to reduced accuracy of the generated data. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solution of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only one embodiment of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0043] Figure 1 is a flow chart of a method for generating charging pile fault data in an embodiment of the present invention;
[0044] Figure 2 is a distribution diagram of the top 10 fault types according to the total number of faults in an embodiment of the present invention;
[0045] Figure 3 is a distribution diagram of the total number of failures on different dates in an embodiment of the present invention;
[0046] Figure 4 is a distribution diagram of the top 8 fault types of the charging pile A according to the embodiment of the present invention;
[0047] Figure 5 is a distribution diagram of the top 8 fault types of the charging pile B according to the embodiment of the present invention;
[0048] Figure 6 This is a distribution diagram of the top 8 fault types of the charging piles of manufacturer C in the embodiment of the present invention;
[0049] Figure 7 This is a distribution diagram of the top 8 fault types of the charging piles of manufacturer D in the embodiment of the present invention;
[0050] Figure 8 is a CDF diagram of fault start time of different fault types in an embodiment of the present invention;
[0051] Fig. 9 is a CDF diagram of fault durations of different fault types in an embodiment of the present invention;
[0052] Fig.10 is the correlation matrix of the real data set in the embodiment of the present invention;
[0053] Fig.11is a correlation matrix for generating a data set in an embodiment of the present invention;
[0054] Fig.12 is a distribution diagram of the top 10 fault types ranked by the total number of faults in the charging pile fault data generated in an embodiment of the present invention;
[0055] Fig.13 It is a distribution diagram of the total number of failures of all devices on different dates in the charging pile failure data generated in an embodiment of the present invention. DETAILED DESCRIPTION
[0056] The following is a clear and complete description of the technical solutions in the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0057] The technical solution of the present application is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0058] Example 1
[0059] like Figure 1 As shown, a charging pile fault data generation method provided in this embodiment includes the following steps:
[0060] Step 1: Obtain real charging pile failure data.
[0061] Step 2: Analyze the real charging pile fault data and select the characteristic information of each fault data according to the analysis results.
[0062] In order to avoid the influence of noise on the analysis results, before analyzing the charging pile fault data, the charging pile fault data is cleaned first, and data containing null values and other data with errors (such as negative fault duration, etc.) are eliminated to ensure data quality.
[0063] The statistical analysis method is used to analyze the real charging pile failure data, including: Statistical analysis of the top 10 failure types of all charging piles, such as Figure 2 As shown; Statistical analysis of the total number of failures of all charging piles on different dates, such as Figure 3 As shown; Statistical analysis of the top 8 fault types of charging pile A and charging pile B, such as Figure 4 and Figure 5 As shown in the figure; Statistical analysis of the top 8 fault types of charging piles from different manufacturers, such as Figure 6 and Figure 7 As shown; Statistical analysis of fault start time and fault duration of different fault types, such as Figure 8 and Fig. 9 shown.
[0064] Depend on Figures 2 to 9 The visual analysis results show that compared with other faults, the frequency of the charging port electronic lock fault is the highest. Except for the charging port electronic lock fault and the emergency stop button action fault, the frequencies of other faults are relatively close. From the top 8 fault types (such as Figure 4 and Figure 5 ) distribution, we can see that the types and times of faults that occur in different charging piles are different, which is related to environmental factors such as the local weather of the charging pile and its own factors such as the operating status of the charging pile. From the total distribution of fault times on different dates (such as Figure 3 As shown in Figure 2, the number of failures of charging piles from the 9th to the 25th of the month is less than that of other days, which may be related to factors such as weather and traffic conditions on that day. The distribution of the top 8 failure types of charging piles from different manufacturers (such as Figure 6 and Figure 7 ) shows that the fault types and frequency distribution of charging pile equipment produced by different manufacturers are different, which is mainly caused by manufacturer factors such as quality control and equipment architecture. From the fault start time of different fault types (such as Figure 8 As shown in the figure, the CDF (Cumulative Distribution Function) of the fault start time shows consistency. However, the CDF of the fault duration of different fault types is different, indicating that the distribution of fault duration of different fault types is different, and the fault duration shows an obvious long-tail distribution; the difference in the distribution of fault duration is mainly caused by the different nature of the fault; the long-tail distribution is mainly due to the fact that the fault with a fault duration of 0 is an instantaneous fault, which has a special meaning.
[0065] Based on the above analysis results, the feature information selected from the real charging pile fault data by the present invention includes fault type, fault device ID, fault date, fault device manufacturer, fault start time and fault duration. Fault type, fault device ID, fault date, fault start time and fault duration are necessary data for determining the fault device and describing the fault, and their distribution has its own characteristics; the fault device ID can uniquely determine the device manufacturer, but the device manufacturer still needs to be introduced to assist in constructing the characteristics of the charging pile fault data.
[0066] Step 3: Encode the characteristic information of each piece of fault data to obtain the characteristic vector of the corresponding piece of fault data.
[0067] From the statistical analysis results of charging pile failure data, it can be seen that the distribution of charging pile failure data is diverse. Before constructing the sample data set, it is necessary to normalize and encode according to the characteristics of each feature information to adapt to the diversity and randomness of the data.
[0068] In a specific implementation of the present invention, encoding the characteristic information of each piece of fault data includes:
[0069] Step 3.1: Encode the faulty device ID and the faulty device manufacturer for each piece of fault data.
[0070] Before encoding the faulty device ID and faulty device manufacturer of each piece of fault data, it is necessary to first determine the first sub-coding length based on all the faulty device IDs and all the faulty device manufacturers of the charging pile fault data, and then based on the first sub-coding length, use a unique hot vector to encode the faulty device ID and faulty device manufacturer of each piece of fault data to obtain the first sub-coding of the corresponding piece of fault data.
[0071] In the real charging pile fault data, let the number of faulty devices be n1 and the number of faulty device manufacturers be n2, then the length of the first sub-code is n1+n2. For example, the number of faulty devices is n1=3, the number of faulty device manufacturers is n2=2, then the length of the first sub-code is 5. A unique hot vector is used to encode the faulty device ID and the faulty device manufacturer of each fault data, without normalization. Assuming that the faulty device of a certain fault data belongs to the second device and is produced by the first manufacturer, the corresponding first sub-code is: [0,1,0,1,0], where the first 3 bits indicate that there are 3 faulty devices in the charging pile fault data, the last 2 bits indicate that there are 2 device manufacturers in the charging pile fault data, the second bit is 1, indicating that the faulty device of the fault data belongs to the second faulty device, and the fourth bit is 1, indicating that the device manufacturer of the fault data belongs to the first device manufacturer.
[0072] Step 3.2: Encode the failure date for each failure data.
[0073] Before encoding the fault date of each fault data, it is necessary to first determine the second sub-code length according to all the fault dates of the charging pile fault data, and then based on the second sub-code length, use a one-hot vector to encode the fault date of each fault data to obtain the second sub-code of the corresponding fault data.
[0074] Assume that in the real charging pile fault data, the number of fault dates is n3, then the length of the second sub-code is n3. Exemplarily, the number of fault dates is n3=30, then the length of the second sub-code is 30. A one-hot vector is used to encode the fault date of each fault data without normalization. Assuming that the fault date of a certain fault data belongs to the third fault date, the corresponding second sub-code is: [0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], where 30 bits indicate that there are 30 different fault dates in the charging pile fault data, and the third bit is 1, indicating that the fault date of the fault data is the third fault date.
[0075] Step 3.3: Encode the fault type of each fault data.
[0076] Before encoding the fault type of each fault data, it is necessary to first determine the third sub-code length according to all fault types of the charging pile fault data, and then based on the third sub-code length, use a unique hot vector to encode the fault type of each fault data to obtain the third sub-code of the corresponding fault data.
[0077] Assume that in the real charging pile fault data, the number of fault types is n4, then the length of the third sub-code is n4. Exemplarily, the number of fault types is n4=4, then the length of the third sub-code is 4. A unique hot vector is used to encode the fault type of each fault data without normalization. Assuming that the fault type of a certain fault data belongs to the fourth fault type, the corresponding third sub-code is: [0,0,0,1], where 4 bits indicate that there are 4 fault types in the charging pile fault data, and the fourth bit is 1, indicating that the fault type of the fault data is the fourth fault type.
[0078] Step 3.4: Encode the fault start time of each fault data.
[0079] The fault start time is treated as a continuous variable. In a specific embodiment of the present invention, encoding the fault start time of each fault data includes:
[0080] Step 3.41: Use the Gaussian mixture model to perform distribution fitting on all fault start times of the charging pile fault data, and obtain the mean, standard deviation and weight of each Gaussian distribution component contained in the distribution of all fault start times;
[0081] Step 3.42: For the fault start time of each fault data, calculate the contribution of each Gaussian distribution component to the distribution of the fault start time, and take the Gaussian distribution component with the highest contribution (i.e., the component with the highest probability density distribution ratio) as the distribution to which the fault start time belongs;
[0082] Step 3.43: normalize the fault start time;
[0083] Step 3.44: Use a one-hot vector to encode the distribution to which the fault start time belongs, and then concatenate it with the normalized fault start time to obtain the fourth sub-code.
[0084] In this embodiment, the fault start time of each fault data is normalized using the mean and standard deviation of the Gaussian distribution component with the highest contribution. The specific formula is:
[0085] (1)
[0086] Among them, t' s represents the normalized fault start time; t' s represents the fault start time before normalization; si Indicates the fault start time t s The Gaussian distribution component to which it belongs, that is, the fault start time t s The Gaussian distribution component with the highest contribution to the distribution; μ si Represents Gaussian distribution component si The mean value, σ si Represents Gaussian distribution component si The standard deviation of .
[0087] Exemplarily, assuming that the number of Gaussian distribution components contained in the distribution of all fault start times of the charging pile fault data is n5=4, and the distribution to which the fault start time of a certain fault data belongs is the third Gaussian distribution component, that is, the third Gaussian distribution component contributes the most to the distribution of the fault start time, then a unique hot vector is used to encode the distribution to which the fault start time belongs, and [0,0,1,0] is obtained, where 4 bits represent that the distribution of all fault start times of the charging pile fault data contains 4 Gaussian distribution components, and the third bit is 1, indicating that the fault start time distribution of the fault data belongs to the third Gaussian distribution component. The fourth subcode obtained by splicing with the normalized fault start time is: [t' s ,0,0,1,0].
[0088] Step 3.5: Encode the fault duration of each fault data.
[0089] Since the value 0 has a special meaning in the fault duration, 0 is regarded as a discrete variable, and the non-zero fault duration is treated as a continuous variable. In a specific embodiment of the present invention, encoding the fault duration of each fault data includes:
[0090] Step 3.51: Use the Gaussian mixture model to perform distribution fitting on all fault durations of the charging pile fault data, and obtain the mean, standard deviation and weight of each Gaussian distribution component contained in the distribution of all fault durations;
[0091] Step 3.52: For the fault duration of each piece of fault data, calculate the contribution of each Gaussian distribution component to the distribution of the fault duration, and take the Gaussian distribution component with the highest contribution (i.e., the component with the highest probability density distribution ratio) as the distribution to which the fault duration belongs;
[0092] Step 3.53: normalize the fault duration;
[0093] Step 3.54: Use a one-hot vector to encode the distribution to which the fault duration belongs, and then concatenate it with the normalized fault duration to obtain the fifth sub-code.
[0094] In this embodiment, the fault duration of each piece of fault data is normalized using the mean and standard deviation of the Gaussian distribution component with the highest contribution. The specific formula is:
[0095] (2)
[0096] Among them, t' d represents the normalized fault duration; t d represents the fault duration before normalization; d Denotes the fault duration t d The Gaussian distribution component to which it belongs, that is, the fault duration t d The Gaussian distribution component with the highest contribution to the distribution; μ di Represents Gaussian distribution component d The mean value, σ di Represents Gaussian distribution component d The standard deviation of .
[0097] Exemplarily, assuming that the number of Gaussian distribution components contained in the distribution of all fault durations of charging pile fault data is n6=4, and the distribution to which the fault duration of a certain fault data belongs is the third Gaussian distribution component, that is, the third Gaussian distribution component contributes the most to the distribution of the fault duration, then a unique hot vector is used to encode the distribution to which the fault duration belongs, and [0,0,1,0,0] is obtained, where 5 bits indicate that the distribution of all fault durations of charging pile fault data contains 4 Gaussian distribution components and a 0 discrete component, and the third bit is 1, indicating that the fault duration distribution of the fault data belongs to the third Gaussian distribution component. The fifth subcode obtained by splicing with the normalized fault duration is: [t' d ,0,0,1,0,0].
[0098] The present invention uses a Gaussian mixture model to normalize the fault start time and fault duration of each fault data. The Gaussian mixture model can identify multiple sub-distributions that may exist in all fault start times or all fault durations, better retain the original structure and distribution information of the fault start time and fault duration, and realize the encoding of the complex distribution of the fault start time and fault duration, which is helpful to improve the training effect of the data generation model. Maximum-minimum normalization linearly maps the data to [0,1]. This method is very sensitive to outliers, and outliers in the fault duration and fault start time will significantly affect the normalization result, causing most data points to gather in a very narrow range, reducing the resolution of the data. Z-score normalization is based on the mean and standard deviation of the data for standardization. It is assumed that the data obeys a normal distribution. If the actual distribution of the data deviates from the normal distribution, the effect of z-score normalization will be limited. Therefore, both maximum-minimum normalization and z-score normalization cannot encode the complex distribution of fault duration and fault start time well.
[0099] The first subcode, the second subcode, the third subcode, the fourth subcode and the fifth subcode of each piece of fault data are concatenated to obtain a feature vector of the fault data.
[0100] Step 4: Construct a sample data set based on all feature vectors of charging pile failure data.
[0101] Step 5: Load the data generation model and use the sample data set to perform unsupervised training on the data generation model to obtain the target generation model.
[0102] In a specific embodiment of the present invention, the data generation model is a variational autoencoder, a large language model, a generative adversarial network or a diffusion model. In this embodiment, the data generation model adopts a variational autoencoder. The variational autoencoder is a generative model and an important technology for unsupervised learning in deep learning. It combines the ideas of classic autoencoders and probabilistic graph models to generate new data points that have a similar distribution to the training data. The variational autoencoder consists of an encoder and a decoder, both of which are implemented by a neural network. The encoder is used to receive real data in the training phase, learn the potential distribution of the data, and map the data to the hidden variable space; the decoder receives the hidden variable input, reconstructs new data from the hidden variables, and completes the work of data generation.
[0103] The encoder structure of the variational autoencoder can be expressed as:
[0104] (3)
[0105] Among them, x input represents the input feature vector, input dimension represents the dimension of the input feature vector, FC represents the fully connected layer, ReLU represents the ReLU activation function (i.e., rectified linear unit), represents the first hidden layer of the encoder, represents the second hidden layer of the encoder, and Represent the first latent variable The mean and standard deviation of .
[0106] The decoder structure of the variational autoencoder can be expressed as:
[0107] (4)
[0108] in, represents the first hidden layer of the decoder, represents the second hidden layer of the decoder, represents the third hidden layer of the decoder; output dimension represents the dimension of the output feature vector, which is equal to the dimension of the input feature vector; tanh represents the hyperbolic tangent function; output represents the output feature vector.
[0109] In a specific embodiment of the present invention, unsupervised training of a data generation model using a sample data set includes:
[0110] Step 5.1: The encoder of the variational autoencoder processes the feature vector in the sample data set to obtain the mean of the first latent variable and standard deviation ;
[0111] Step 5.2: According to the mean of the first latent variable and standard deviation Sampling from the standard normal distribution, we get the first latent variable ,Right now ;in, It follows a standard normal distribution. .
[0112] Step 5.3: Take the first latent variable As the input of the decoder of the variational autoencoder, and according to the first latent variable Reconstruct data;
[0113] Step 5.4: Calculate the variational lower bound loss (Evidence Lower Bound, ELBO), and update the encoder and decoder parameters of the variational autoencoder according to the variational lower bound loss.
[0114] Step 6: Generate charging pile fault data using the target generation model.
[0115] Taking the trained variational autoencoder as an example, the target generation model is used to generate charging pile fault data, including:
[0116] Step 6.1: Input an integer b indicating the number of data items to be generated into the target generation model;
[0117] Step 6.2: Sample from the standard normal distribution to obtain the second latent variable ;
[0118] Step 6.3: Take the second latent variable As the input of the decoder of the target generative model, and according to the second latent variable Reconstruct data;
[0119] Step 6.4: Repeat steps 6.2 and 6.3 until the number of items reaches the input integer b;
[0120] Step 6.5: According to the encoding rules of the feature vectors in the sample data set, the data reconstructed and output by the decoder of the target generation model is restored to obtain the generated charging pile fault data, that is, the charging pile fault table data.
[0121] Tabular data is data organized in the form of rows and columns, usually used to represent structured information, each row represents a record or data entry, and each column represents an attribute or feature of the record. Charging pile fault data also belongs to tabular data. Based on the analysis of real charging pile fault data, the present invention uses a data generation model to learn the complex relationship between the distribution characteristics of different types of data and fault data, and generates high-quality fault data, thereby improving the accuracy of data generation. Providing data support for downstream applications such as charging pile fault prediction and health assessment is conducive to optimizing equipment operation and maintenance and improving the reliability and efficiency of charging piles.
[0122] In order to evaluate the effectiveness of the method of the present invention, the fault data generated by the method of the present invention are evaluated from two aspects: statistical indicator similarity and distribution similarity.
[0123] In terms of statistical indicator similarity, for the real charging pile failure data (real data set) and the generated charging pile failure data (generated data set), different statistical indicators are used to evaluate the correlation between different columns of each data set, and a correlation matrix M is constructed, where M ij It represents the correlation between the i-th column and the j-th column of the data set. By comparing the correlation matrix of the real data set and the generated data set, the distribution similarity of the real charging pile fault data and the generated charging pile fault data can be evaluated.
[0124] The columns of the data set are divided into two groups, the first group: fault device ID, fault date, fault type; the second group: fault start time, fault duration. Based on the different characteristics of the two groups of data, different statistical indicators are selected for correlation calculation between and within groups.
[0125] Group 1 - Group 1: Theil's U. Theil's U is a statistic used to measure the relationship between two variables X and Y, especially to measure the predictive power of one discrete variable on another discrete variable. and , Theil uncertainty coefficient U is defined as:
[0126] (5)
[0127] (6)
[0128] (7)
[0129] Among them, P(y m ) represents the probability that y takes the value m, P(x p ) represents the probability that x takes the value p, P(y m ∣x p ) represents the probability that y takes the value m under the condition that x takes the value p, y is the data in the column data Y, x is the data in the column data X, m and p respectively represent two categories in the column data Y and X. For example, X represents the faulty device ID, Y represents the fault type, then m represents a certain fault type, and p represents a certain faulty device ID.
[0130] Group 1-Group 2: Correlation Ratio. The correlation ratio η is a statistical indicator used to measure the nonlinear relationship between variables. For the first group of data , contains k categories in total, and the number of m-th category is k m , the second set of data , the correlation ratio η is defined as:
[0131] (8)
[0132] in, is the mean of all y of category m, is the mean of column data Y, y mj It represents the y with subscript j corresponding to the category m.
[0133] Group 2 - Group 2: Pearson correlation coefficient. For the two columns of data in the second group and , use the Pearson correlation coefficient r to describe the strength and direction of its linear relationship:
[0134] (9)
[0135] in, Respectively represent the mean of column data X, Y, and n represents the number of data in each column.
[0136] Based on the selected correlation indicators and calculation methods, a correlation matrix comparison chart of the real data set and the generated data set is drawn, such as Fig.10 and Fig.11 As shown, the numbers on the right side of the color scale represent the corresponding correlation values (i.e., uncertainty coefficient U, correlation ratio η or correlation coefficient r). Fig.10 and Fig.11 It shows that the correlation between the columns of the generated charging pile fault data is close to the real charging pile fault data, which accurately reflects the distribution characteristics of each column in the real charging pile fault data.
[0137] In terms of distribution similarity, data visualization methods are used to compare the distribution similarity of the generated charging pile failure data and the real charging pile failure data. Fig.12 Indicates the distribution of the top 10 fault types in terms of the total number of faults in the generated charging pile fault data; Fig.13 It represents the distribution diagram of the total number of failures of all devices on different dates in the generated charging pile failure data. Fig.12 and Fig.13 It shows that the generated charging pile failure data is similar to the real charging pile failure data in terms of the number of failures and the change trend of the failure ratio (compared to Figure 2 The distribution of the number of failures on dates also shows a trend of relatively low numbers from the 9th to the 25th of the month and relatively high numbers on other dates (similar to Figure 3 similar).
[0138] The results of statistical indicator similarity and distribution similarity analysis show that the generated charging pile failure data accurately characterizes the distribution characteristics of the internal correlation of the real charging pile failure data, and can provide support for subsequent scientific research and downstream applications.
[0139] Example 2
[0140] An embodiment of the present invention further provides an electronic device, which includes: a memory, a processor, and a computer program / instructions stored in the memory, and the processor executes the computer program / instructions to implement the charging pile fault data generation method in the embodiment of the present application.
[0141] Although not shown, the electronic device includes a processor that can perform various appropriate operations and processes according to the programs and / or data stored in the read-only memory (ROM) or the programs and / or data loaded from the storage part into the random access memory (RAM). The processor can be a multi-core processor or can include multiple processors. In some embodiments, the processor can include a general-purpose main processor and one or more special coprocessors, such as a central processing unit, a graphics processing unit (GPU), a neural network processor (NPU), a digital signal processor (DSP), etc. In RAM, various programs and data required for device operation are also stored. The processor, ROM, and RAM are connected to each other via a bus. The input / output (I / O) interface is also connected to the bus.
[0142] The processor and memory are used together to execute the program / instructions stored in the memory. When the program / instructions are executed by the computer, the methods, steps or functions described in the above embodiments can be implemented.
[0143] Although not shown, an embodiment of the present invention further provides a computer-readable storage medium on which a computer program / instruction is stored. When the computer program / instruction is executed by a processor, the charging pile fault data generating method in the embodiment of the present application is implemented.
[0144] Readable storage media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0145] Although not shown, an embodiment of the present invention further provides a computer program product, including: a computer program / instruction, which, when executed by a processor, implements the charging pile fault data generating method in the embodiment of the present application.
[0146] What is disclosed above is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or modifications within the technical scope disclosed in the present invention, which should be covered within the protection scope of the present invention.
Claims
1. A method for generating charging pile fault data, characterized in that: The generation method comprises: Obtain real charging pile failure data; Analyzing the charging pile fault data by using a statistical analysis method, and selecting characteristic information of each fault data according to the analysis result; Encode the characteristic information of each piece of fault data to obtain a characteristic vector of the corresponding piece of fault data; Construct a sample data set based on all feature vectors of charging pile failure data; Loading a data generation model, and performing unsupervised training on the data generation model using the sample data set to obtain a target generation model; Generate charging pile fault data using the target generation model; The characteristic information of each fault data is encoded, including: Determine the first sub-code length according to all fault device IDs and all fault device manufacturers of the charging pile fault data; based on the first sub-code length, use a unique hot vector to encode the fault device ID and fault device manufacturer of each fault data to obtain the first sub-code of the corresponding fault data; Determine the second sub-code length according to all fault dates of the charging pile fault data; based on the second sub-code length, use a one-hot vector to encode the fault date of each fault data to obtain the second sub-code of the corresponding fault data; Determine the length of the third sub-code according to all fault types of the charging pile fault data, and based on the length of the third sub-code, use a one-hot vector to encode the fault type of each piece of fault data to obtain the third sub-code of the corresponding piece of fault data; A Gaussian mixture model is used to perform distribution fitting on all fault start times of the charging pile fault data, and the mean, standard deviation and weight of each Gaussian distribution component contained in the distribution of all fault start times are obtained; for the fault start time of each fault data, the contribution of each Gaussian distribution component to its distribution is calculated, and the Gaussian distribution component with the highest contribution is used as the distribution to which the fault start time belongs; the fault start time is normalized; a one-hot vector is used to encode the distribution to which the fault start time belongs, and then it is spliced with the normalized fault start time to obtain the fourth sub-code; A Gaussian mixture model is used to perform distribution fitting on all fault durations of charging pile fault data, and the mean, standard deviation and weight of each Gaussian distribution component contained in the distribution of all fault durations are obtained; for the fault duration of each fault data, the contribution of each Gaussian distribution component to its distribution is calculated, and the Gaussian distribution component with the highest contribution is taken as the distribution to which the fault duration belongs; the fault duration is normalized; a one-hot vector is used to encode the distribution to which the fault duration belongs, and then it is spliced with the normalized fault duration to obtain the fifth sub-code; The first sub-code, the second sub-code, the third sub-code, the fourth sub-code and the fifth sub-code are concatenated to obtain a feature vector of each fault data.
2. The charging pile fault data generation method according to claim 1, characterized in that: The characteristic information of each fault data includes fault type, fault device ID, fault date, fault device manufacturer, fault start time and fault duration.
3. The charging pile fault data generation method according to claim 1, characterized in that: The fault start time or fault duration of each fault data is normalized using the mean and standard deviation of the Gaussian distribution component with the highest contribution. The specific formula is: ; Among them, t' s / d represents the normalized fault start time or fault duration; t s / d Indicates the fault start time or fault duration before normalization; i Indicates the fault start time t s Or fault duration t d Gaussian distribution component to which it belongs; μ i Represents Gaussian distribution component i The mean value, σ i Represents Gaussian distribution component i The standard deviation of .
4. The charging pile fault data generation method according to claim 1, characterized in that: The data generation model is a variational autoencoder, a large language model, a generative adversarial network or a diffusion model.
5. The charging pile fault data generation method according to any one of claims 1 to 4, characterized in that: When the data generation model is a variational autoencoder, unsupervised training is performed on the data generation model using the sample data set, including: The encoder of the variational autoencoder processes the feature vectors in the sample data set to obtain the mean and standard deviation of the first latent variable; Sampling from a standard normal distribution according to the mean and standard deviation of the first latent variable to obtain a first latent variable; Using the first latent variable as an input of a decoder of a variational autoencoder, and reconstructing data according to the first latent variable; A variational lower bound loss is calculated, and encoder and decoder parameters of the variational autoencoder are updated according to the variational lower bound loss.
6. The charging pile fault data generation method according to claim 5, characterized in that: When the data generation model is a variational autoencoder, the target generation model is used to generate charging pile fault data, including: Inputting an integer indicating the number of data items to be generated into the target generation model; Sampling from the standard normal distribution to obtain the second latent variable; Using the second latent variable as input of a decoder of the target generation model, and reconstructing data according to the second latent variable; Repeat the steps of sampling from the standard normal distribution and reconstructing the data until the number of items obtained reaches the input integer; According to the encoding rules of the feature vectors in the sample data set, the data reconstructed and output by the decoder of the target generation model is restored to obtain the generated charging pile fault data.
7. An electronic device comprising a memory, a processor, and a computer program / instruction stored in the memory, characterized in that: The processor executes the computer program / instructions to implement the charging pile fault data generating method according to any one of claims 1 to 6.
8. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instruction is executed by a processor, the charging pile fault data generating method as described in any one of claims 1 to 6 is implemented.
9. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the charging pile fault data generating method as described in any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Compressor gear fault sample expansion method and system
CN113850180A