Electric vehicle charging behavior feature mining method and system based on t-SNE-AP algorithm
The t-SNE-AP algorithm is used to reduce and cluster the charging data of electric vehicles, which solves the problem of ignoring the sensitivity of dimensionality reduction and clustering algorithms to initialization in the existing technology, and realizes effective feature mining of electric vehicles' charging behavior and user group Dividing.
Patent Information
- Application Number
- CN202411537470.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-02-18
AI Technical Summary
The prior art ignores the effect of dimensionality reduction when analyzing the charging behavior of electric vehicles, resulting in poor results when processing highly nonlinear charging data. Traditional clustering algorithms are sensitive to initialization and difficult to deal with non-spherical clustering.
The charging behavior feature mining method of electric vehicles based on the t-SNE-AP algorithm is used to reduce dimensionality through the t-SNE algorithm. The data after the dimensionality is reduced by using the AP algorithm for clustering, and the quality evaluation is performed through cluster evaluation indicators.
While quantifying charging behavior, it is possible to clearly divide different user groups, effectively explore the charging behavior characteristics of electric vehicle users, and improve the clustering effect and data processing accuracy.
Smart Images

Figure CN119474933A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electric vehicle charging behavior analysis, and in particular to an electric vehicle charging behavior feature mining method and system based on a t-SNE-AP algorithm. Background Art
[0002] As the number of electric vehicles increases, the demand pattern of electric vehicles has changed. The spontaneous and uncontrolled charging behavior of users will have a significant impact on the distribution system, such as the overload charging demand of electric vehicles and the huge load fluctuations of the distribution system. Due to the diversity and randomness of charging behavior, the load of charging piles is uncertain, which may endanger the safe operation of charging stations and power systems.
[0003] In order to meet the diverse charging needs of different types of electric vehicle users, it is necessary to analyze the charging behavior. Existing research on electric vehicle charging behavior mainly uses clustering algorithms, while ignoring the role of dimensionality reduction; the current mainstream dimensionality reduction algorithm is principal component analysis (PCA), but PCA is a linear dimensionality reduction algorithm that may fail on many data points when processing highly nonlinear charging data. In addition, traditional clustering algorithms, such as the K-means algorithm, are sensitive to cluster initialization and require the number of clusters to be determined in advance. They may not be suitable for clusters of arbitrary shapes, such as non-spherical clusters.
[0004] Therefore, it is necessary to provide a new method and system for mining electric vehicle charging behavior features based on the t-SNE-AP algorithm. Summary of the invention
[0005] Based on the above-mentioned problems existing in the prior art, the purpose of the embodiments of the present invention is to provide a method and system for mining electric vehicle charging behavior characteristics based on the t-SNE-AP algorithm. The t-SNE-AP algorithm has a good clustering effect, can quantify charging behavior while achieving clear division of different user groups, and plays a guiding role in mining the charging behavior characteristics of electric vehicle users.
[0006] To achieve the above purpose, the technical solution adopted by the present invention is: a method for mining electric vehicle charging behavior characteristics based on the t-SNE-AP algorithm, comprising:
[0007] S1, collect and preprocess the electric vehicle charging data to obtain the initial data set;
[0008] S2, using the t-SNE algorithm to reduce the dimension of the initial data set to obtain the first target data set;
[0009] S3, clustering the first target data set using the AP algorithm to obtain a second target data set;
[0010] S4, clustering quality evaluation is performed using clustering evaluation indicators, and the charging behavior of each type of electric vehicles is statistically analyzed.
[0011] Furthermore, in S1, the electric vehicle charging data is collected and preprocessed to obtain an initial data set, including:
[0012] Step S11, collecting electric vehicle charging data includes: collecting historical charging data of charging piles in a region to obtain an original charging data set;
[0013] Step S12, preprocessing the electric vehicle charging data includes cleaning and standardizing the original charging data set to obtain an initial charging data set.
[0014] Furthermore, in S2, the t-SNE algorithm is used to reduce the dimension of the initial data set to obtain a first target data set, including:
[0015] Step S21, inputting N-dimensional charging data in the initial charging data set;
[0016] Step S22, setting parameters such as perplexity, learning rate and maximum number of iterations;
[0017] Step S23, calculating the conditional probability distribution and probability similarity of the high-dimensional space;
[0018] Step S24, calculating the conditional probability distribution and probability similarity of the low-dimensional space;
[0019] Step S25, calculating the Kullback–Leibler divergence, which is used to measure the difference between the probability distribution of the high-dimensional space and the probability distribution of the low-dimensional space;
[0020] Step S26, using the gradient descent method to solve the minimum value of the Kullback–Leibler divergence;
[0021] Step S27, outputting the visualization result after dimensionality reduction to obtain the first target data set.
[0022] Furthermore, the conditional probability distribution formula in the high-dimensional space is:
[0023]
[0024] Among them, p j|i is the conditional probability distribution in high-dimensional space, ||x i -x j || is the data point x i With x j The Euclidean distance between them, i≠j; ‖x i -x l‖ represents data x i Point and x l The Euclidean distance between them, i≠l; is the variance of the Gaussian probability distribution model, corresponding to the perplexity parameter in the t-SNE algorithm;
[0025] The Euclidean distance between electric vehicle users in high-dimensional space is converted into probability similarity. The calculation formula of probability similarity in high-dimensional space is:
[0026]
[0027] Among them, p ij is the probability similarity in high-dimensional space, p j|i and p i|j is the conditional probability distribution in high-dimensional space, n is the number of data points;
[0028] The conditional probability distribution formula in the low-dimensional space is:
[0029]
[0030] Among them, q j|i is the conditional probability distribution in low-dimensional space, ‖y i -y j || is the data point y i With y j The Euclidean distance between them, i≠j; ‖y i -y l ‖ represents data y i Point and y l The Euclidean distance between them, i≠l.
[0031] The calculation formula for probability similarity in low-dimensional space is:
[0032]
[0033] Among them, q ij is the probability similarity in low-dimensional space, ||y i -y j || is the data point y i With y j The Euclidean distance between them, i≠j; ‖y k -y l ‖ represents data y k Point and y l The Euclidean distance between them, k≠l.
[0034] Furthermore, the Kullback–Leibler divergence is a quantitative indicator to measure the similarity between two probability distributions, using the cost function F costThe calculation formula of Kullback-Leibler divergence is:
[0035]
[0036] Among them, F cost is the cost function, P is the probability distribution matrix in the high-dimensional space, Q is the probability distribution matrix in the low-dimensional space, and p ij is the probability similarity in high-dimensional space, q ij is the probabilistic similarity in low-dimensional space;
[0037] The cost function F cost The smaller the value, the higher the accuracy of the low-dimensional space simulation point of the high-dimensional space. The calculation formula of the gradient descent method is:
[0038]
[0039] Among them, F cost is the cost function, y i is the data point of cluster i, y j is the data point of cluster j, p ij is the probability similarity in high-dimensional space, q ij is the probability similarity in low-dimensional space, ||y i -y j || is the data point y i With y j The Euclidean distance between .
[0040] Furthermore, in S3, clustering the first target data set using the AP algorithm to obtain the second target data set includes:
[0041] Step S31, inputting the first target data set after dimension reduction;
[0042] Step S32, setting parameters such as preference coefficient, damping coefficient and maximum number of iterations;
[0043] Step S33, calculating a similarity matrix;
[0044] Step S34, calculating and updating the attraction degree and the belonging degree, so as to determine the cluster to which the data point belongs and the center of each cluster;
[0045] Step S35, determine whether the cluster center no longer changes. If the cluster center no longer changes, output the second target data set; if the cluster center still changes, continue to determine whether the maximum number of iterations is reached. When the maximum number of iterations is reached, output the second target data set. When the maximum number of iterations is not reached, continue to calculate and update the attraction and attribution degrees.
[0046] Furthermore, in S4, the clustering quality evaluation is performed using the clustering evaluation index, and the charging behavior of each type of electric vehicle is statistically analyzed, including:
[0047] Step S41: preset the initial cluster number K and the maximum cluster number K max ;
[0048] Step S42, by setting the preference coefficient corresponding to the current cluster number K, substituting the preference coefficient corresponding to the current cluster number K into step S3, and using the AP algorithm to obtain the second target data set corresponding to the current cluster number K;
[0049] Step S43, using a cluster evaluation index to evaluate the second target data set corresponding to the current cluster number K, to obtain a variance ratio standard CHI corresponding to the current cluster number K;
[0050] Step S44, determine whether the cluster number K is less than the maximum cluster number K max , if K is less than K max , then K increases by 1 as the new K value, and returns to step S42. If K is equal to K max , the evaluation is completed;
[0051] Step S45, compare the initial cluster number K to the maximum cluster number K max For each corresponding variance ratio standard CHI, select the cluster number K corresponding to the maximum variance ratio standard CHI and the second target data set as the optimal clustering result, where the optimal clustering result is the charging behavior feature mining result;
[0052] Step S46, collecting statistics on the charging parameters of each type of electric vehicles in the optimal clustering result, and extracting the charging behavior characteristics of each type of electric vehicles.
[0053] The electric vehicle charging behavior feature mining system based on the t-SNE-AP algorithm is applied to the electric vehicle charging behavior feature mining method based on the t-SNE-AP algorithm, and the system includes:
[0054] A data set acquisition module is used to collect and preprocess the electric vehicle charging data to obtain an initial data set;
[0055] A data set dimension reduction module is used to reduce the dimension of the initial data set by using the t-SNE algorithm to obtain a first target data set;
[0056] A data set clustering module, used to cluster the first target data set using an AP algorithm to obtain a second target data set;
[0057] The evaluation and analysis module is used to evaluate the clustering quality using clustering evaluation indicators and to perform statistics and analysis on the charging behavior of each type of electric vehicles.
[0058] The embodiment of the present invention further provides a network side server, including:
[0059] At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned electric vehicle charging behavior feature mining method based on the t-SNE-AP algorithm.
[0060] An embodiment of the present invention further provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the above-mentioned electric vehicle charging behavior feature mining method based on the t-SNE-AP algorithm.
[0061] The beneficial effects of the present invention are as follows: the electric vehicle charging behavior feature mining method based on the t-SNE-AP algorithm of the present invention comprises collecting and preprocessing electric vehicle charging data to obtain an initial data set; using the t-SNE algorithm to reduce the dimension of the initial data set to obtain a first target data set; using the AP algorithm to cluster the first target data set to obtain a second target data set; using clustering evaluation indicators to evaluate clustering quality, and performing statistics and analysis on each type of electric vehicle charging behavior, and presetting the initial cluster number K and the maximum cluster number K max , by setting the preference coefficient corresponding to the current number of clusters K, the preference coefficient corresponding to the current number of clusters K is used, and the AP algorithm is used to obtain the second target data set corresponding to the current number of clusters K, and to determine whether the number of clusters K is less than the maximum number of clusters K max , if K is less than K max , then K increases by 1 as the new K value, and the AP algorithm is continued to be used to obtain the second target data set corresponding to the current cluster number K. If K is equal to K max , then the evaluation is completed, comparing the initial number of clusters K to the maximum number of clusters K max For each corresponding variance ratio standard CHI, the cluster number K corresponding to the maximum variance ratio standard CHI and the second target data set are selected as the optimal clustering result, wherein the optimal clustering result is the charging behavior feature mining result. The electric vehicle charging behavior feature mining method based on the t-SNE-AP algorithm of the present invention adopts the t-SNE-AP algorithm with good clustering effect, can realize the clear division of different user groups while quantifying the charging behavior, and plays a guiding role in mining the charging behavior characteristics of electric vehicle users. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0063] In the figure:
[0064] Figure 1A flow chart of a method for mining electric vehicle charging behavior characteristics based on the t-SNE-AP algorithm provided in the first embodiment of the present invention;
[0065] Figure 2 The variance ratio standard CHI line graph corresponding to the cluster numbers 2 to 10 provided in the first embodiment of the present invention;
[0066] Figure 3 A schematic diagram of the optimal clustering results of electric vehicle charging parameters provided in the first embodiment of the present invention;
[0067] Figure 4 A distribution diagram of electric vehicle charging behavior parameters of each user in the first cluster provided in the first embodiment of the present invention;
[0068] Figure 5 A schematic diagram of a module of an electric vehicle charging behavior feature mining system based on a t-SNE-AP algorithm provided in the second embodiment of the present invention;
[0069] Figure 6 It is a structural diagram of a network-side server provided according to a third embodiment of the present invention. DETAILED DESCRIPTION
[0070] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are 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.
[0071] First embodiment:
[0072] The first embodiment of the present invention provides an electric vehicle charging behavior feature mining method based on the t-SNE-AP algorithm, including: collecting and preprocessing electric vehicle charging data to obtain an initial data set; using the t-SNE algorithm to reduce the dimension of the initial data set to obtain a first target data set; using the AP algorithm to cluster the first target data set to obtain a second target data set; using clustering evaluation indicators to evaluate clustering quality, and performing statistics and analysis on each type of electric vehicle charging behavior. The electric vehicle charging behavior feature mining method based on the t-SNE-AP algorithm of the present invention uses the t-SNE-AP algorithm to have a good clustering effect, can achieve a clear division of different user groups while quantifying charging behavior, and plays a guiding role in mining the charging behavior characteristics of electric vehicle users.
[0073] The following is a detailed description of the implementation details of the electric vehicle charging behavior feature mining method based on the t-SNE-AP algorithm in this embodiment. The following content is only for the convenience of understanding the implementation details, which is not necessary for the implementation of this solution. The specific process of this embodiment is as follows: Figure 1 As shown, this embodiment is applied to an electric vehicle charging behavior feature mining system based on the t-SNE-AP algorithm.
[0074] Step S1, collecting and preprocessing the electric vehicle charging data to obtain an initial data set;
[0075] Specifically, the specific steps for collecting and preprocessing electric vehicle charging data are as follows:
[0076] Step S11, collecting the electric vehicle charging data includes: collecting the historical charging data of the charging piles in a region to obtain an original charging data set.
[0077] Optionally, the original charging data set includes name data and value data, wherein the name data includes: user ID, charging location and charging port type; the value data includes: charging start time, charging end time, charging duration, charging energy, charging power and charging frequency.
[0078] Step S12, preprocessing the electric vehicle charging data includes cleaning and standardizing the original charging data set to obtain an initial charging data set.
[0079] Optionally, data cleaning of the original charging data set includes: deleting the charging time, charging energy and charging power that exceed the standard value, and deleting invalid data with missing user ID or GPS.
[0080] Among them, the value exceeding the standard is lower or higher than the maximum value of data such as battery capacity, charger power and charging pile output power that are popular on the market.
[0081] Optionally, performing data standardization on the original charging data set includes using a Min-Max method to perform standardization processing on the cleaned charging data to obtain a standardized charging data set.
[0082] The data standardization method is the Min-Max method, and the calculation formula of the Min-Max method is:
[0083]
[0084] in, is the charging data of the ith tag before normalization, x i is the charging data of the i-th label after standardization, i = 1, 2, 3, ..., N, N is the dimension before dimensionality reduction; is the original charging data of the jth user, and n is the number of data points.
[0085] In this embodiment, N=6, n=6500.
[0086] Step S2: Use the t-SNE algorithm to reduce the dimension of the initial data set to obtain a first target data set.
[0087] Specifically, the specific steps of using the t-SNE algorithm to reduce the dimension of the initial charging data set are as follows:
[0088] Step S21, inputting N-dimensional charging data in the initial charging data set.
[0089] Step S22, setting parameters such as perplexity, learning rate and maximum number of iterations.
[0090] Step S23, calculating the conditional probability distribution and probability similarity of the high-dimensional space.
[0091] Optionally, the conditional probability distribution formula in high-dimensional space is:
[0092]
[0093] Among them, p j|i is the conditional probability distribution in high-dimensional space, ||x i -x j || is the data point x i With x j The Euclidean distance between them, i≠j; ‖x i -x l ‖ represents data x i Point and x l The Euclidean distance between them, i≠l; is the variance of the Gaussian probability distribution model, corresponding to the perplexity parameter in the t-SNE algorithm.
[0094] The Euclidean distance between electric vehicle users in high-dimensional space is converted into probability similarity. The calculation formula of probability similarity in high-dimensional space is:
[0095]
[0096] Among them, p ij is the probability similarity in high-dimensional space, p j|i and p i|j is the conditional probability distribution in high-dimensional space, and n is the number of data points.
[0097] Step S24, calculating the conditional probability distribution and probability similarity of the low-dimensional space.
[0098] Optionally, the conditional probability distribution formula in low-dimensional space is:
[0099]
[0100] Among them, q j|i is the conditional probability distribution in low-dimensional space, ||y i -y j || is the data point y i With y j The Euclidean distance between them, i≠j; ‖y i -y l ‖ represents data y i Point and y l The Euclidean distance between them, i≠l.
[0101] The calculation formula for probability similarity in low-dimensional space is:
[0102]
[0103] Among them, q ij is the probability similarity in low-dimensional space, ||y i -y j || is the data point y i With y j The Euclidean distance between them, i≠j; ‖y k -y l ‖ represents data y k Point and y l The Euclidean distance between them, k≠l.
[0104] Step S25, calculating the Kullback-Leibler divergence, which is used to measure the difference between the probability distribution of the high-dimensional space and the probability distribution of the low-dimensional space.
[0105] Optionally, the Kullback–Leibler divergence is a quantitative measure of the similarity between two probability distributions, using the cost function F cost The calculation formula of Kullback-Leibler divergence is:
[0106]
[0107] Among them, F cost is the cost function, P is the probability distribution matrix in the high-dimensional space, Q is the probability distribution matrix in the low-dimensional space, and p ij is the probability similarity in high-dimensional space, q ij is the probability similarity in low-dimensional space.
[0108] Step S26, using the gradient descent method to find the minimum value of the Kullback-Leibler divergence.
[0109] Optionally, the cost function F cost The smaller the value, the higher the accuracy of the low-dimensional space simulation point of the high-dimensional space. The calculation formula of the gradient descent method is:
[0110]
[0111] Among them, F cost is the cost function, y i is the data point of cluster i, y j is the data point of cluster j, p ij is the probability similarity in high-dimensional space, q ij is the probability similarity in low-dimensional space, ||y i -y j || is the data point y i With y j The Euclidean distance between .
[0112] Step S27, outputting the visualization result after dimensionality reduction to obtain the first target data set.
[0113] Step S3: clustering the first target data set using the AP algorithm to obtain a second target data set.
[0114] Specifically, the specific steps of clustering the first target data set using the AP algorithm to obtain the second target data set are as follows:
[0115] Step S31, inputting the first target data set after dimensionality reduction.
[0116] Step S32, setting parameters such as preference coefficient, damping coefficient and maximum number of iterations.
[0117] Step S33, calculating the similarity matrix.
[0118] Optionally, the similarity matrix calculation formula between any two points is:
[0119] S[i,j]=-||y i -y j ‖ 2
[0120] Among them, S[i,j] is the data point x i With x j The similarity matrix between ||y i -y j ‖ is the data point y i With y j The Euclidean distance between .
[0121] Step S34, calculating and updating the attraction degree and the belonging degree, so as to determine the cluster to which the data point belongs and the center of each cluster.
[0122] Optional, attraction degree for node x j Attract node x i As the selected capacity, the calculation formula is:
[0123] R[i,j]=S[i,j]-max{A[i,j]+S[i,j]}
[0124] Where R[i,j] is x i to x j The attraction matrix between points, S[i,j] is x i to x j The similarity matrix between points, A[i,j] is x i to x j The degree matrix between points.
[0125] Optionally, the degree of belonging reflects the i Select node x j As the probability of selection, the calculation formula is:
[0126]
[0127] Where A[i,j] is x i to x j The degree matrix between points, R[i,j] is x i to x j The attraction matrix between points, R[l,j] is x l to x j The attraction matrix between points, where l∈1,2,...,n,
[0128] The calculation formula of the attractiveness in the mth iteration is:
[0129] R m =(1-λ)*R m +λ*R m-1
[0130] Among them, R m is the attraction matrix of the mth iteration, R m-1 is the attraction matrix of the m-1th iteration, and λ is the damping coefficient, which is used to measure the degree of convergence in the iteration.
[0131] The calculation formula of the attribution degree in the mth iteration is:
[0132] A m =(1-λ)*A m +λ*Am-1
[0133] Among them, A m is the mth iteration attribution matrix, A m-1 is the attribution matrix of the m-1th iteration, and λ is the damping coefficient, which is used to measure the degree of convergence in the iteration.
[0134] Step S35, determine whether the cluster center no longer changes. If the cluster center no longer changes, output the second target data set; if the cluster center still changes, continue to determine whether the maximum number of iterations is reached. When the maximum number of iterations is reached, output the second target data set. When the maximum number of iterations is not reached, continue to calculate and update the attraction and attribution degrees.
[0135] Specifically, determine whether the cluster center no longer changes, including, for each data point x i , if R[i,i]+A[i,i] remains unchanged in several consecutive iterations, the cluster center will not change, otherwise the cluster center will change.
[0136] Step S4, using clustering evaluation indicators to evaluate clustering quality, and performing statistics and analysis on the charging behavior of each type of electric vehicles.
[0137] Specifically, the specific steps of using clustering evaluation indicators to evaluate clustering quality and to conduct statistics and analysis on the charging behavior of each type of electric vehicles are as follows:
[0138] Step S41: preset the initial cluster number K and the maximum cluster number K max .
[0139] Step S42, by setting the preference coefficient corresponding to the current cluster number K, substituting the preference coefficient corresponding to the current cluster number K into step S3, and using the AP algorithm to obtain the second target data set corresponding to the current cluster number K.
[0140] Step S43: Use the clustering evaluation index to evaluate the second target data set corresponding to the current cluster number K to obtain the variance ratio standard CHI corresponding to the current cluster number K.
[0141] Specifically, the calculation formula of the variance ratio standard CHI in the clustering evaluation index is:
[0142]
[0143] Among them, CH(K) is the variance ratio standard, B(K) is the between-cluster variance, W(K) is the within-cluster variance, n k is the number of samples in the kth cluster, c k is the centroid of the kth cluster, c is the global centroid, d i For data point x iIntra-cluster distance to the centroid.
[0144] Furthermore, CHI measures the closeness within a cluster by calculating the sum of the squares of the distances between a data point and its cluster center, and measures the separation between clusters by calculating the sum of the squares of the distances between each cluster center and the overall data cluster center. The larger the CHI value, the greater the similarity between the current cluster and other clusters, and the higher the clustering quality; conversely, the lower the clustering quality.
[0145] Step S44, determine whether the cluster number K is less than the maximum cluster number K max , if K is less than K max , then K increases by 1 as the new K value, and returns to step S42. If K is equal to K max , the evaluation is completed.
[0146] Step S45, compare the initial cluster number K to the maximum cluster number K max For each corresponding variance ratio standard CHI, the cluster number K corresponding to the maximum variance ratio standard CHI and the second target data set are selected as the optimal clustering result, where the optimal clustering result is the charging behavior feature mining result.
[0147] Step S45 , collecting statistics on charging parameters of each type of electric vehicles in the optimal clustering result, and extracting charging behavior characteristics of each type of electric vehicles.
[0148] Specifically, statistics on charging parameters of each type of electric vehicles in the optimal clustering results include: calculating the average value of each parameter in each cluster; drawing a parameter distribution diagram of each user in each type of electric vehicle; and mining and summarizing the charging behavior characteristics of each type of electric vehicle.
[0149] As an example, the initial number of clusters K is preset to 2, and the maximum number of clusters K is max is 10; from the initial cluster number K = 2 to the maximum cluster number K max =10 corresponds to a variance greater than the standard CHI. Figure 2 As shown in Figure 2, when the number of clusters K = 8, the variance ratio standard CHI is the largest. At this time, the second target data set corresponding to the number of clusters K = 8 is the optimal clustering result, that is, the optimal clustering result of electric vehicle charging parameters is as follows: Figure 3 shown.
[0150] The statistical method for the optimal clustering results of electric vehicle charging parameters includes calculating the average value of each parameter in each cluster as shown in Table 1 below.
[0151]
[0152] in, is the average charging start time, is the average charging end time, is the average charging time, is the average charging energy, is the average charging power, is the average charging frequency.
[0153] in, Figure 4 It is the distribution diagram of the electric vehicle charging behavior parameters of each user in the first cluster.
[0154] Specifically, the charging behavior characteristics of each type of electric vehicle are mined and summarized. The characteristics of each type of electric vehicle user are as follows:
[0155] In the first cluster, users mainly charge in the morning, including in the early morning, with a medium charging duration, charging energy, and charging power. Most users only charge on weekdays.
[0156] In the second cluster, users mainly charge at noon, and the charging time and charging energy are the smallest among all categories. Most users only charge on weekdays.
[0157] In the third cluster, users mainly charge in the afternoon, with a higher charging power, and most users only charge on weekdays;
[0158] In the fourth cluster, users mainly charge in the afternoon and evening, with lower charging time, energy and power. Most users only charge on weekdays.
[0159] In the fifth cluster, users mainly charge during the day, excluding the early morning, and the charging time is relatively long, but the charging power is the smallest among all categories;
[0160] In the sixth cluster, users mainly charge during the day, excluding the early morning, and the charging energy and charging power are relatively large;
[0161] The charging behavior of users in the seventh cluster lasts from morning to evening, and the charging energy and charging power are relatively small;
[0162] In the eighth cluster, users charge almost all day long, and the charging time continues until the next day. The charging time and charging energy are the largest among all categories.
[0163] The first embodiment of the present invention provides an electric vehicle charging behavior feature mining method based on the t-SNE-AP algorithm, comprising: collecting and preprocessing electric vehicle charging data to obtain an initial data set; using the t-SNE algorithm to reduce the dimension of the initial data set to obtain a first target data set, including inputting N-dimensional charging data in the initial charging data set, setting parameters such as perplexity, learning rate and maximum number of iterations, calculating the conditional probability distribution and probability similarity of the high-dimensional space, calculating the conditional probability distribution and probability similarity of the low-dimensional space, calculating the Kullback-Leibler divergence, using the gradient descent method to solve the minimum value of the Kullback-Leibler divergence, outputting the visualization result after dimensionality reduction, and obtaining the first target data set; using the AP algorithm to reduce the dimension of the first target data set. A target data set is clustered to obtain a second target data set, including inputting the first target data set after dimensionality reduction, setting parameters such as preference coefficient, damping coefficient and maximum number of iterations, calculating similarity matrix, calculating and updating attraction and belonging, so as to determine the cluster to which the data point belongs, and the center of each cluster, and judging whether the cluster center no longer changes. If the cluster center no longer changes, the second target data set is output; if the cluster center still changes, it continues to judge whether the maximum number of iterations is reached. When the maximum number of iterations is reached, the second target data set is output. When the maximum number of iterations is not reached, the attraction and belonging are continued to be calculated and updated; clustering quality evaluation is performed using clustering evaluation indicators, and each type of electric vehicle charging behavior is statistically analyzed, and the initial cluster number K and the maximum cluster number K are preset. max , by setting the preference coefficient corresponding to the current number of clusters K, the preference coefficient corresponding to the current number of clusters K is used, and the AP algorithm is used to obtain the second target data set corresponding to the current number of clusters K, and to determine whether the number of clusters K is less than the maximum number of clusters K max , if K is less than K max , then K increases by 1 as the new K value, and the AP algorithm is continued to be used to obtain the second target data set corresponding to the current cluster number K. If K is equal to K max , then the evaluation is completed, comparing the initial number of clusters K to the maximum number of clusters K max For each corresponding variance ratio standard CHI, the cluster number K corresponding to the maximum variance ratio standard CHI and the second target data set are selected as the optimal clustering result, wherein the optimal clustering result is the charging behavior feature mining result. The electric vehicle charging behavior feature mining method based on the t-SNE-AP algorithm of the present invention adopts the t-SNE-AP algorithm with good clustering effect, can realize the clear division of different user groups while quantifying the charging behavior, and plays a guiding role in mining the charging behavior characteristics of electric vehicle users.
[0164] The step division of the above methods is only for the purpose of clear description. When implemented, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this patent; adding insignificant modifications to the algorithm or process or introducing insignificant designs without changing the core design of the algorithm and process are all within the scope of protection of this patent.
[0165] Second implementation method:
[0166] like Figure 5 As shown, the second embodiment of the present invention provides an electric vehicle charging behavior feature mining system based on the t-SNE-AP algorithm, and the system includes: a data set acquisition module 201, a data set dimensionality reduction module 202, a data set clustering module 203, and an evaluation and analysis module 204.
[0167] Specifically, the data set acquisition module 201 is used to collect and preprocess the electric vehicle charging data to obtain an initial data set; the data set dimension reduction module 202 is used to reduce the dimension of the initial data set using the t-SNE algorithm to obtain a first target data set; the data set clustering module 203 is used to cluster the first target data set using the AP algorithm to obtain a second target data set; the evaluation and analysis module 204 is used to evaluate the clustering quality using clustering evaluation indicators, and to perform statistics and analysis on the charging behavior of each type of electric vehicle.
[0168] It is not difficult to find that this embodiment is a system embodiment corresponding to the first embodiment, and this embodiment can be implemented in conjunction with the first embodiment. The relevant technical details mentioned in the first embodiment are still valid in this embodiment, and in order to reduce repetition, they are not repeated here. Accordingly, the relevant technical details mentioned in this embodiment can also be applied in the first embodiment.
[0169] It is worth mentioning that all modules involved in this embodiment are logic modules. In practical applications, a logic unit can be a physical unit, a part of a physical unit, or a combination of multiple physical units. In addition, in order to highlight the innovative part of the present invention, this embodiment does not introduce units that are not closely related to solving the technical problem proposed by the present invention, but this does not mean that there are no other units in this embodiment.
[0170] A third embodiment of the present invention relates to a network side server, such as Figure 6As shown, it includes at least one processor 302; and a memory 301 that is communicatively connected to the at least one processor 302; wherein the memory 301 stores instructions that can be executed by the at least one processor 302, and the instructions are executed by the at least one processor 302 so that the at least one processor 302 can execute the above-mentioned data processing method.
[0171] The memory 301 and the processor 302 are connected in a bus manner, and the bus may include any number of interconnected buses and bridges, and the bus connects various circuits of one or more processors 302 and the memory 301 together. The bus can also connect various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. The data processed by the processor 302 is transmitted on a wireless medium via an antenna, and further, the antenna also receives data and transmits the data to the processor 302.
[0172] The processor 302 is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management and other control functions. The memory 301 can be used to store data used by the processor 302 when performing operations.
[0173] The fourth embodiment of the present invention relates to a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the method for mining electric vehicle charging behavior characteristics based on the t-SNE-AP algorithm in the first embodiment is implemented.
[0174] That is, those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0175] The above is only an embodiment of the present invention. The common sense such as the known specific structure and characteristics in the scheme is not described in detail here. The ordinary technicians in the relevant field know all the common technical knowledge in the technical field of the invention before the application date or priority date, can know all the existing technologies in the field, and have the ability to apply the conventional experimental means before that date. The ordinary technicians in the relevant field can improve and implement this scheme in combination with their own abilities under the enlightenment given by this application. Some typical known structures or known methods should not become obstacles for ordinary technicians in the relevant field to implement this application. It should be pointed out that for those skilled in the art, without departing from the structure of the present invention, several deformations and improvements can be made, which should also be regarded as the scope of protection of the present invention, which will not affect the effect of the implementation of the present invention and the practicality of the patent. The scope of protection required by this application shall be based on the content of its claims, and the specific implementation methods and other records in the specification can be used to interpret the content of the claims.
[0176] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for mining electric vehicle charging behavior features based on t-SNE-AP algorithm, characterized in that: include: S1, collect and preprocess the electric vehicle charging data to obtain the initial data set; S2, using the t-SNE algorithm to reduce the dimension of the initial data set to obtain the first target data set; S3, clustering the first target data set using the AP algorithm to obtain a second target data set; S4, clustering quality evaluation is performed using clustering evaluation indicators, and the charging behavior of each type of electric vehicles is statistically analyzed.
2. The electric vehicle charging behavior feature mining method based on the t-SNE-AP algorithm according to claim 1 is characterized in that: In S1, the electric vehicle charging data is collected and preprocessed to obtain an initial data set, including: Step S11, collecting electric vehicle charging data includes: collecting historical charging data of charging piles in a region to obtain an original charging data set; Step S12, preprocessing the electric vehicle charging data includes cleaning and standardizing the original charging data set to obtain an initial charging data set.
3. The electric vehicle charging behavior feature mining method based on t-SNE-AP algorithm according to claim 1 is characterized in that: In S2, the t-SNE algorithm is used to reduce the dimension of the initial data set to obtain a first target data set, including: Step S21, inputting N-dimensional charging data in the initial charging data set; Step S22, setting parameters such as perplexity, learning rate and maximum number of iterations; Step S23, calculating the conditional probability distribution and probability similarity of the high-dimensional space; Step S24, calculating the conditional probability distribution and probability similarity of the low-dimensional space; Step S25, calculating the Kullback–Leibler divergence, which is used to measure the difference between the probability distribution of the high-dimensional space and the probability distribution of the low-dimensional space; Step S26, using the gradient descent method to solve the minimum value of the Kullback-Leibler divergence; Step S27, outputting the visualization result after dimensionality reduction to obtain the first target data set.
4. The electric vehicle charging behavior feature mining method based on t-SNE-AP algorithm according to claim 3 is characterized in that: The conditional probability distribution formula in the high-dimensional space is: Among them, p j|i is the conditional probability distribution in high-dimensional space, ||x i -x j || is the data point x i With x j The Euclidean distance between them, i≠j; ‖x i -x l ‖ represents data x i Point and x l The Euclidean distance between them, i≠l; is the variance of the Gaussian probability distribution model, corresponding to the perplexity parameter in the t-SNE algorithm; The Euclidean distance between electric vehicle users in high-dimensional space is converted into probability similarity. The calculation formula of probability similarity in high-dimensional space is: Among them, p ij is the probability similarity in high-dimensional space, p j|i and p i|j is the conditional probability distribution in high-dimensional space, n is the number of data points; The conditional probability distribution formula in the low-dimensional space is: Among them, q j|i is the conditional probability distribution in low-dimensional space, ||y i -y j || is the data point y i With y j The Euclidean distance between them, i≠j; ‖y i -y l ‖ represents data y i Point and y l The Euclidean distance between them, i≠l. The calculation formula for probability similarity in low-dimensional space is: Among them, q ij is the probability similarity in low-dimensional space, ||y i -y j || is the data point y i With y j The Euclidean distance between them, i≠j; ‖y k -y l ‖ represents data y k Point and y l The Euclidean distance between them, k≠l.
5. The electric vehicle charging behavior feature mining method based on t-SNE-AP algorithm according to claim 4 is characterized in that: The Kullback–Leibler divergence is a quantitative indicator to measure the similarity between two probability distributions, using the cost function F cost The calculation formula of Kullback-Leibler divergence is: Among them, F cost is the cost function, P is the probability distribution matrix in the high-dimensional space, Q is the probability distribution matrix in the low-dimensional space, and p ij is the probability similarity in high-dimensional space, q ij is the probabilistic similarity in low-dimensional space; The cost function F cost The smaller the value, the higher the accuracy of the low-dimensional space simulation point of the high-dimensional space. The calculation formula of the gradient descent method is: Among them, F cost is the cost function, y i is the data point of cluster i, y j is the data point of cluster j, p ij is the probability similarity in high-dimensional space, q ij is the probability similarity in low-dimensional space, ||y i -y j || is the data point y i With y j The Euclidean distance between .
6. The electric vehicle charging behavior feature mining method based on t-SNE-AP algorithm according to claim 1 is characterized in that: In S3, clustering the first target data set using the AP algorithm to obtain the second target data set includes: Step S31, inputting the first target data set after dimension reduction; Step S32, setting parameters such as preference coefficient, damping coefficient and maximum number of iterations; Step S33, calculating a similarity matrix; Step S34, calculating and updating the attraction degree and the belonging degree, so as to determine the cluster to which the data point belongs and the center of each cluster; Step S35, determine whether the cluster center no longer changes. If the cluster center no longer changes, output the second target data set; if the cluster center still changes, continue to determine whether the maximum number of iterations is reached. When the maximum number of iterations is reached, output the second target data set. When the maximum number of iterations is not reached, continue to calculate and update the attraction and attribution degrees.
7. The electric vehicle charging behavior feature mining method based on t-SNE-AP algorithm according to claim 6 is characterized in that: In S4, the clustering quality evaluation is performed using clustering evaluation indicators, and the charging behavior of each type of electric vehicle is statistically analyzed, including: Step S41: preset the initial cluster number K and the maximum cluster number K max ; Step S42, by setting the preference coefficient corresponding to the current cluster number K, substituting the preference coefficient corresponding to the current cluster number K into step S3, and using the AP algorithm to obtain the second target data set corresponding to the current cluster number K; Step S43, using a cluster evaluation index to evaluate the second target data set corresponding to the current cluster number K, to obtain a variance ratio standard CHI corresponding to the current cluster number K; Step S44, determine whether the cluster number K is less than the maximum cluster number K max , if K is less than K max , then K increases by 1 as the new K value, and returns to step S42. If K is equal to K max , the evaluation is completed; Step S45, compare the initial cluster number K to the maximum cluster number K max For each corresponding variance ratio standard CHI, select the cluster number K corresponding to the maximum variance ratio standard CHI and the second target data set as the optimal clustering result, where the optimal clustering result is the charging behavior feature mining result; Step S46, statistics are collected on the charging parameters of each type of electric vehicles in the optimal clustering result to extract the charging behavior characteristics of each type of electric vehicles.
8. Electric vehicle charging behavior feature mining system based on t-SNE-AP algorithm, characterized by: Applied to the electric vehicle charging behavior feature mining method based on the t-SNE-AP algorithm described in claim 1, the system comprises: A data set acquisition module is used to collect and preprocess the electric vehicle charging data to obtain an initial data set; A data set dimension reduction module is used to reduce the dimension of the initial data set by using the t-SNE algorithm to obtain a first target data set; A data set clustering module, used to cluster the first target data set using an AP algorithm to obtain a second target data set; The evaluation and analysis module is used to evaluate the clustering quality using clustering evaluation indicators and to perform statistics and analysis on the charging behavior of each type of electric vehicles.
9. A network side server, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the electric vehicle charging behavior feature mining method based on the t-SNE-AP algorithm as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the electric vehicle charging behavior feature mining method based on the t-SNE-AP algorithm described in any one of claims 1 to 7 is implemented.