A new energy vehicle clustering method and device

By obtaining and correcting the charging records of new energy vehicles, dividing the charging segments and calculating the structural characteristic values, and combining with density parameter adjustment, the problem of inconsistent data dimensions in the clustering of new energy vehicles is solved, and the accuracy and efficiency of clustering are improved.

CN114627320BActive Publication Date: 2024-11-26BEIJING SHENGKE ENERGY TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011438210.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-11
Publication Date
2024-11-26
Estimated Expiration
2040-12-11

AI Technical Summary

Technical Problem

The existing clustering methods have problems such as inconsistent data dimensions and unfixed charging information in the charging data processing of new energy vehicles, resulting in large clustering errors and difficulty in accurately grouping abnormal vehicles.

Method used

By obtaining the most recent preset number of charging records of new energy vehicles, identifying and correcting abnormal data, dividing the charging segments to make the data amounts of each charging segment equal, calculating the constructed characteristic values ​​and clustering, using density parameters and distance measurement standards Clustering is performed, and density parameters are adjusted to improve clustering accuracy.

Benefits of technology

The accuracy of clustering of new energy vehicles has been improved, and it can effectively identify abnormal vehicles, reduce clustering errors, and adapt to the data characteristics of different charging records.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114627320B_ABST
    Figure CN114627320B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention discloses a new energy vehicle clustering method and device. The method includes: obtaining the most recent preset number of charging records of each new energy vehicle, identifying abnormal data in each charging record, and correcting the identified abnormal data; dividing each charging record to obtain each charging segment; for each charging segment, according to each data included in the charging segment, sequentially calculating the value of each structural feature, and filling the value of the structural feature into the charging segment in a preset order; for any first new energy vehicle and second new energy vehicle, calculating the target distance between the first new energy vehicle and the second new energy vehicle; obtaining the stored density parameter and distance metric, and clustering each new energy vehicle to obtain a clustering result, and the clustering result includes a concentrated new energy vehicle set and a dispersed new energy vehicle set. Applying the solution provided by the embodiment of the present invention can improve the accuracy of new energy vehicle clustering.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of information clustering, and in particular to a new energy vehicle clustering method and device. Background Art

[0002] Clustering is a very important part of life. For example, a new energy vehicle company wants to group vehicles, find new energy vehicles that may have abnormalities and deal with them in a timely manner.

[0003] Known clustering methods all require that the amount of information of each piece of data, that is, the data dimension is consistent, and the characteristic dimension of each piece of data is large enough. However, when clustering new energy vehicles, firstly, different new energy vehicles have different charging times, some new energy vehicles have only one charging, and some new energy vehicles have up to 20 charging times; secondly, the data dimension of each piece of data in the charging information of new energy vehicles is inconsistent. Because there are problems of unfixed charging time and charging power in different charging, the amount of information of each piece of data is not fixed. For example, the last charging time of new energy vehicle A was long and complete, from 20% to 100%, and it contained 200 records of current, voltage and other data; but the last charging time of new energy vehicle B was short, from 50% to 60%, and it only contained 50 records of current, voltage and other data. Therefore, the information contained in this charging of new energy vehicle A is much more than that of new energy vehicle B. This unfixed data information makes the traditional clustering algorithm not suitable for new energy vehicle charging data; finally, for each charging, although many records can be collected, each record only has basic information such as current and voltage. This small data dimension will lead to large clustering errors. Therefore, in order to improve the accuracy of new energy vehicle clustering, a new energy vehicle clustering method is urgently needed. Summary of the invention

[0004] The present invention provides a new energy vehicle clustering method and device to improve the accuracy of new energy vehicle clustering. The specific technical solution is as follows.

[0005] In a first aspect, an embodiment of the present invention provides a new energy vehicle clustering method, the method comprising:

[0006] Obtain the most recent preset number of charging records of each new energy vehicle, identify abnormal data in each charging record, and correct the identified abnormal data;

[0007] According to the preset features included in each charging record and the preset endpoint values ​​of each interval, each charging record is divided to obtain each charging segment; wherein the number of charging segments included in each charging record is equal, and the amount of data included in each charging segment is equal;

[0008] For each charging segment, according to each piece of data included in the charging segment, the value of each structural feature is calculated in sequence, and the value of the structural feature is filled into the charging segment in a preset order;

[0009] For any first new energy vehicle and second new energy vehicle, determine the number of first charging records of the first new energy vehicle and the number of second charging records of the second new energy vehicle, determine the minimum value of the first charging record number and the second charging record number, and select the nearest minimum value sub-target charging record in the charging records of the first new energy vehicle and the second new energy vehicle; calculate the initial distance corresponding to the i-th charging record between the first new energy vehicle and the second new energy vehicle according to each charging segment included in the i-th target charging record of the first new energy vehicle and the second new energy vehicle, and determine the weight of each initial distance, and calculate the target distance between the first new energy vehicle and the second new energy vehicle according to the weight and each initial distance;

[0010] The stored density parameters and distance metrics are obtained, and according to the density parameters and distance metrics, as well as the target distance between every two new energy vehicles, the new energy vehicles are clustered to obtain clustering results, wherein the clustering results include a concentrated new energy vehicle set and a dispersed new energy vehicle set.

[0011] Optionally, the step of obtaining the most recent preset number of charging records of each new energy vehicle includes:

[0012] For any new energy vehicle, determine whether the number of charging records of the new energy vehicle is less than a preset number;

[0013] When the number of charging records of the new energy vehicle is less than the preset number, obtaining all charging records of the new energy vehicle;

[0014] When the number of charging records of the new energy vehicle is not less than the preset number, the most recent preset number of charging records of the new energy vehicle are obtained.

[0015] Optionally, the step of identifying abnormal data in each charging record and correcting the identified abnormal data includes:

[0016] For each charging record, identifying missing data points in the charging record, and filling the data point with a first preset number of data before and after the data point;

[0017] For each charging record, a data point with an abnormal data range in the charging record is identified, and the data point is corrected according to a second preset number of data before and after the data point.

[0018] Optionally, each charging record includes at least a state of charge, and each interval endpoint value includes a starting charge amount and a corresponding ending charge amount; the step of dividing each charging record according to preset features included in each charging record and preset interval endpoint values ​​to obtain each charging segment includes:

[0019] Obtaining each preset starting charge amount and the corresponding ending charge amount, and constructing an initial charging segment corresponding to each starting charge amount and the corresponding ending charge amount;

[0020] For each charging record, sequentially search for data whose state of charge is within the range of each starting charge amount and the corresponding ending charge amount, and add the searched data to the corresponding initial charging segment;

[0021] For each initial charging segment, when the initial state of charge included in the initial charging segment is not equal to the corresponding initial charge amount, the preset data is used to fill the data from the initial charge amount to the initial state of charge; when the termination state of charge included in the initial charging segment is not equal to the corresponding termination charge amount, the preset data is used to fill the data from the termination state of charge to the termination charge amount to obtain the charging segment corresponding to the initial charging segment.

[0022] Optionally, the construction features include: the mean and variance of each feature included in the charging record.

[0023] Optionally, the new energy vehicles included in the concentrated new energy vehicle set are normal new energy vehicles, and the new energy vehicles included in the dispersed new energy vehicle set are abnormal new energy vehicles, and the method further includes:

[0024] Obtaining inspection results of each of the new energy vehicles, wherein the inspection results include whether each of the new energy vehicles is normal or abnormal;

[0025] The clustering result is compared with the inspection result. When the recognition error rate of abnormal new energy vehicles is greater than a first threshold, the density parameter is reduced. When the recognition error rate of normal new energy vehicles is greater than a second threshold, the density parameter is increased.

[0026] In a second aspect, an embodiment of the present invention provides a new energy vehicle clustering device, the device comprising:

[0027] A data acquisition module is used to obtain the most recent preset number of charging records of each new energy vehicle, identify abnormal data in each charging record, and correct the identified abnormal data;

[0028] A data partitioning module, configured to partition each charging record according to preset features and preset endpoint values ​​of each interval included in each charging record to obtain charging segments; wherein each charging record includes an equal number of charging segments and an equal amount of data included in each charging segment;

[0029] A feature construction module, for calculating, for each charging segment, the value of each construction feature in turn according to each piece of data included in the charging segment, and filling the value of the construction feature into the charging segment in a preset order;

[0030] A distance calculation module, for determining, for any first new energy vehicle and second new energy vehicle, the number of first charging records of the first new energy vehicle and the number of second charging records of the second new energy vehicle, determining the minimum value of the first charging record number and the second charging record number, and selecting the nearest target charging record of the minimum value in the charging records of the first new energy vehicle and the second new energy vehicle; calculating the initial distance corresponding to the i-th charging record between the first new energy vehicle and the second new energy vehicle according to each charging segment included in the i-th target charging record of the first new energy vehicle and the second new energy vehicle, and determining the weight of each initial distance, and calculating the target distance between the first new energy vehicle and the second new energy vehicle according to the weight and each initial distance;

[0031] The new energy vehicle clustering module is used to obtain the stored density parameters and distance metrics, and cluster the new energy vehicles according to the density parameters and distance metrics, as well as the target distance between every two new energy vehicles to obtain clustering results, wherein the clustering results include a concentrated new energy vehicle set and a dispersed new energy vehicle set.

[0032] Optionally, the data acquisition module includes:

[0033] The quantity judgment submodule is used to judge whether the number of charging records of any new energy vehicle is less than a preset number;

[0034] A first record acquisition submodule, configured to acquire all charging records of the new energy vehicle when the number determination submodule determines that the number of charging records of the new energy vehicle is less than the preset number;

[0035] The second record acquisition submodule is used to obtain the latest preset number of charging records of the new energy vehicle when the number judgment submodule determines that the number of charging records of the new energy vehicle is not less than the preset number.

[0036] Optionally, the data acquisition module includes:

[0037] A data filling submodule, for identifying, for each charging record, a missing data point in the charging record, and filling the data point with a first preset number of data before and after the data point;

[0038] The data correction submodule is used to identify, for each charging record, a data point with an abnormal data range in the charging record, and correct the data point according to a second preset number of data before and after the data point.

[0039] Optionally, each charging record includes at least a state of charge, and each interval endpoint value includes a starting charge and a corresponding ending charge; the data division module includes:

[0040] A charging segment construction submodule is used to obtain each preset starting charge amount and the corresponding ending charge amount, and to construct an initial charging segment corresponding to each starting charge amount and the corresponding ending charge amount;

[0041] A data adding submodule is used to sequentially search for data whose state of charge is within the range of each starting charge amount and the corresponding ending charge amount for each charging record, and add the found data to the corresponding initial charging segment;

[0042] The data filling submodule is used to fill the data from the starting charge amount to the starting state of charge for each initial charging segment when the starting state of charge included in the initial charging segment is not equal to the corresponding starting charge amount; and to fill the data from the ending state of charge to the ending charge amount using the preset data when the ending state of charge included in the initial charging segment is not equal to the corresponding ending charge amount, so as to obtain the charging segment corresponding to the initial charging segment.

[0043] Optionally, the construction features include: the mean and variance of each feature included in the charging record.

[0044] Optionally, the new energy vehicles included in the concentrated new energy vehicle set are normal new energy vehicles, and the new energy vehicles included in the dispersed new energy vehicle set are abnormal new energy vehicles, and the device further includes:

[0045] An inspection result acquisition module is used to acquire the inspection result of each of the new energy vehicles, wherein the inspection result includes whether each of the new energy vehicles is normal or abnormal;

[0046] The parameter adjustment module is used to compare the clustering result with the inspection result, and when the recognition error rate of abnormal new energy vehicles is greater than a first threshold, reduce the density parameter; when the recognition error rate of normal new energy vehicles is greater than a second threshold, increase the density parameter.

[0047] From the above content, it can be seen that a new energy vehicle clustering method and device provided by an embodiment of the present invention can obtain the charging records of each new energy vehicle and then divide each charging record into each charging segment. In this way, each charging record with an equal number of charging segments can be obtained, and the amount of data of each charging segment is also equal, that is, each charging record with consistent dimensions can be obtained; and structural features can also be added to each charging segment, so that the data dimension of each charging segment can be increased; and then the new energy vehicles are clustered according to each charging segment with consistent data dimensions and larger data dimensions, which can improve the accuracy of new energy vehicle clustering. Of course, implementing any product or method of the present invention does not necessarily need to achieve all the advantages described above at the same time.

[0048] The innovative features of the embodiments of the present invention include:

[0049] 1. After obtaining the charging records of each new energy vehicle, each charging record is divided into charging segments, so that charging records with an equal number of charging segments can be obtained, and the amount of data in each charging segment is also equal, that is, each charging record with consistent dimensions can be obtained; and structural features can be added to each charging segment, so as to increase the data dimension of each charging segment; and then the new energy vehicles are clustered according to the charging records with consistent and larger data dimensions, which can improve the accuracy of new energy vehicle clustering.

[0050] 2. After clustering the new energy vehicles, the clustering results are judged according to the test results, and the density parameters are adjusted according to the judgment results. When the recognition error rate of abnormal new energy vehicles is large, that is, more abnormal new energy vehicles are clustered as normal new energy vehicles, indicating that the current density parameter value is large. In this case, the density parameter can be reduced; when the recognition error rate of normal new energy vehicles is large, that is, more normal new energy vehicles are clustered as abnormal new energy vehicles, indicating that the current density parameter value is small. In this case, the density parameter can be increased; in this way, in the subsequent clustering process, appropriate density parameters can be used to cluster new energy vehicles, thereby improving the accuracy of new energy vehicle clustering. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without creative work.

[0052] Figure 1 A schematic diagram of a process flow of a new energy vehicle clustering method provided by an embodiment of the present invention;

[0053] Figure 2 This is a schematic diagram of the clustering results of new energy vehicles according to an embodiment of the present invention;

[0054] Figure 3 A schematic diagram of the structure of a new energy vehicle clustering device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0055] The following will be combined with the accompanying drawings in the embodiments of the present invention to clearly and completely describe the technical solutions 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.

[0056] It should be noted that the terms "including" and "having" and any variations thereof in the embodiments of the present invention and the accompanying drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products or devices.

[0057] The embodiment of the present invention discloses a new energy vehicle clustering method and device, which can improve the accuracy of new energy vehicle clustering. The embodiment of the present invention is described in detail below.

[0058] Figure 1 A schematic flow chart of a new energy vehicle clustering method provided in an embodiment of the present invention. The method is applied to electronic equipment. The method specifically includes the following steps.

[0059] S110: Acquire the most recent preset number of charging records of each new energy vehicle, identify abnormal data in each charging record, and correct the identified abnormal data.

[0060] In an embodiment of the present invention, new energy vehicles that need to be charged can be clustered to determine normal new energy vehicles and abnormal new energy vehicles. In practical applications, each time each new energy vehicle is charged, the charging device can record the charging record corresponding to the charging, for example, the state of charge, current, voltage and other information at each moment during the charging process of the new energy vehicle can be recorded. In an embodiment of the present invention, each new energy vehicle can be clustered based on its charging record.

[0061] In one implementation, the electronic device can establish a connection with each charging device in advance by wireless means, so that the charging records of each new energy vehicle stored in each charging device can be obtained based on the established connection. For example, each charging device can actively send the charging record to the electronic device after recording the charging record within a period of time; or, the electronic device can send a charging record acquisition request to each charging device, and each charging device will send the charging record stored in itself that has not been sent to the electronic device to the electronic device after receiving the charging record acquisition request sent by the electronic device. This is reasonable, and the embodiments of the present invention do not make specific limitations on this. Among them, the above-mentioned charging record acquisition request can be sent by the user through the electronic device, or it can be sent periodically by the electronic device, which is all possible, and the embodiments of the present invention do not make specific limitations on this.

[0062] The above-mentioned preset number can be any integer set by the user. It can be understood that when the above-mentioned preset number is large, each new energy vehicle can be clustered according to more charging records, thereby improving the accuracy of clustering; when the above-mentioned preset number is small, each new energy vehicle can be clustered using a smaller amount of data, thereby improving the efficiency of clustering. In actual applications, users can set the above-mentioned preset number according to actual needs, and the embodiments of the present invention do not limit its specific value.

[0063] It is understandable that in actual applications, the number of times each new energy vehicle is charged may vary greatly, so that some new energy vehicles may have more charging records and some new energy vehicles may have fewer charging records. In other words, it is possible that the number of charging records of some new energy vehicles is greater than the above-preset number, and the number of charging records of some new energy vehicles is less than the above-preset number.

[0064] In one implementation, when the electronic device obtains the charging records of each new energy vehicle, it can determine whether the number of charging records of any new energy vehicle is less than a preset number; when the number of charging records of the new energy vehicle is less than the preset number, all charging records of the new energy vehicle are obtained; when the number of charging records of the new energy vehicle is not less than the preset number, the most recent preset number of charging records of the new energy vehicle are obtained. In this way, the same number of charging records can be obtained for most new energy vehicles, so that each new energy vehicle can be accurately clustered.

[0065] In the embodiment of the present invention, the charging record recorded by the charging device may include multiple types of data, and each type of data may have its corresponding normal range, such as current, voltage, temperature, etc. However, in actual applications, the charging record acquired by the electronic device may contain some abnormal data, such as data with abnormal range or missing data.

[0066] In one implementation, after the electronic device obtains each charging record, it can identify, for each charging record, missing data points in the charging record, and fill in the data points based on a first preset number of data before and after the data point; and, it can identify, for each charging record, data points with abnormal data ranges in the charging record, and correct the data points based on a second preset number of data before and after the data point.

[0067] The first preset number of items and the second preset number of items may be set by the user according to actual applications, and the first preset number of items and the second preset number of items may be the same or different, which is not limited in the embodiment of the present invention.

[0068] When filling in missing data points in the charging record, for example, the electronic device can reasonably fill in the missing data points based on the first preset number of data before and after the data point using a time series method. When correcting abnormal data points in the charging record, for example, the electronic device can predict the data point based on the second preset number of data before and after the data point using a time series method, and use the predicted data point to replace the original data point.

[0069] S120: Divide each charging record according to preset features included in each charging record and preset endpoint values ​​of each interval to obtain each charging segment; wherein the number of charging segments included in each charging record is equal, and the amount of data included in each charging segment is equal.

[0070] The above-mentioned preset characteristics may include, for example, a state of charge, and each interval endpoint value may include a starting charge amount and a corresponding ending charge amount.

[0071] In one implementation, the electronic device divides each charging record to obtain each charging segment. It can first obtain each preset starting charge amount and the corresponding ending charge amount, and construct an initial charging segment corresponding to each starting charge amount and the corresponding ending charge amount; then, for each charging record, sequentially search for data whose charge state is within the range of each starting charge amount and the corresponding ending charge amount, and add the found data to the corresponding initial charging segment; finally, for each initial charging segment, when the starting charge state included in the initial charging segment is not equal to the corresponding starting charge amount, use the preset data to fill the data from the starting charge amount to the starting charge state; when the ending charge state included in the initial charging segment is not equal to the corresponding ending charge amount, use the preset data to fill the data from the ending charge state to the ending charge amount, and obtain the charging segment corresponding to the initial charging segment.

[0072] For example, when the state of charge included in any charging record is 10%-80%, and the preset endpoint values ​​of each interval are 0-20%, 20%-40%, 40%-60%, 60%-80%, 80%-100%, respectively, 5 initial charging segments of 0-20%, 20%-40%, 40%-60%, 60%-80%, 80%-100% can be constructed first; then the data corresponding to the state of charge of 10-20% in the charging record is added to the initial charging segment of 0-20%, and the data corresponding to the state of charge of 20-40% in the charging record is added to the initial charging segment of 0-20%. The data corresponding to the state of charge of 40% in the charging record is added to the 20-40% initial charging segment, the data corresponding to the state of charge of 40%-60% in the charging record is added to the 40-60% initial charging segment, and the data corresponding to the state of charge of 60%-80% in the charging record is added to the 60-80% initial charging segment; thereafter, the data corresponding to the 0-10% state of charge in the 0-20% initial charging segment is filled with the preset data, and the 80%-100% initial charging segment is filled with the preset data, to obtain 5 charging segments corresponding to the charging record.

[0073] The above-mentioned preset data may be any pre-set number, such as 0, 1, etc., which is not limited in the embodiment of the present invention.

[0074] It can be seen that since each charging record is divided into charging segments and data is filled, the number of charging segments included in each charging record is equal, and since the data included in each charging segment is data corresponding to the same state of charge range, the amount of data included in each charging segment is also equal. Therefore, after dividing each charging record, the charging records of different lengths can be reduced to a consistent dimension.

[0075] S130: For each charging segment, according to each piece of data included in the charging segment, calculate the value of each structural feature in turn, and fill the value of the structural feature into the charging segment in a preset order.

[0076] The above-mentioned construction features may include, for example, the mean and variance of each feature included in each charging record. For example, the electronic device may search for data of each feature in each charging segment, calculate the mean and variance of the found data, and fill the calculated mean and variance into the charging segment.

[0077] By constructing features, new features can be generated based on a few basic features, the original data in the time dimension can be converted into feature data, and the data dimension of the charging record can be increased.

[0078] S140: For any first new energy vehicle and second new energy vehicle, determine the number of first charging records of the first new energy vehicle and the number of second charging records of the second new energy vehicle, determine the minimum value between the first charging record number and the second charging record number, and select the nearest minimum value sub-target charging record in the charging records of the first new energy vehicle and the second new energy vehicle; calculate the initial distance corresponding to the i-th charging record between the first new energy vehicle and the second new energy vehicle according to each charging segment included in the i-th target charging record of the first new energy vehicle and the second new energy vehicle, determine the weight of each initial distance, and calculate the target distance between the first new energy vehicle and the second new energy vehicle according to the weight and each initial distance.

[0079] After obtaining the charging segments corresponding to the charging records, the electronic device can cluster the new energy vehicles according to the charging records corresponding to the new energy vehicles. The segmented charging records are then integrated so that all charging records have consistent information while retaining as much information as possible in the original charging records, thereby improving the accuracy of clustering new energy vehicles. The above initial distance can be a Euclidean distance.

[0080] For example, for any two new energy vehicles, assuming that the number of charging times selected by the two new energy vehicles are n1 and n2 respectively, calculate the min(n1,n2) initial distances corresponding to the min(n1,n2) most recent charging times of the two new energy vehicles, add a weight to each initial distance and calculate the distance d between the two new energy vehicles.

[0081] When determining the weight of each initial distance, for example, the initial distance corresponding to the closer charging record is set to a larger weight according to the time of each charging record. And the sum of the weights of each initial distance is 1. After determining the weight of each initial distance, the weighted sum of each initial distance can be performed to obtain the target distance.

[0082] S150: Obtaining the stored density parameters and distance metrics, and clustering the new energy vehicles according to the density parameters and distance metrics, as well as the target distance between every two new energy vehicles to obtain clustering results, wherein the clustering results include a concentrated new energy vehicle set and a dispersed new energy vehicle set.

[0083] The above density parameters and distance metrics can be determined by the user according to actual conditions. For example, different density parameters and distance metrics can be set for the clustering of new energy vehicles in different regions. For example, for a larger area, a larger density parameter and distance metric can be set; for a smaller area, a smaller density parameter and distance metric can be set.

[0084] In one implementation, when the electronic device clusters the new energy vehicles, it can cluster them using DBSCAN (Density-Based Spatial Clustering of Application with Noise) based on the distances between the two new energy vehicles. In the clustering results, for categories with more concentrated distribution, we believe that the vehicles in this category are more similar and are likely to be normal categories; while for categories with more dispersed distribution and some abnormal points whose categories cannot be determined, we believe that the vehicles in this category are quite different from most vehicles and are likely to be abnormal vehicles.

[0085] From the above content, it can be seen that in this embodiment, after obtaining the charging records of each new energy vehicle, each charging record can be divided into each charging segment, so that each charging record with an equal number of charging segments can be obtained, and the amount of data of each charging segment is also equal, that is, each charging record with consistent dimensions can be obtained; and, structural features can also be added to each charging segment, so as to increase the data dimension of each charging segment; and then, the new energy vehicles are clustered according to the charging records with consistent data dimensions and larger data dimensions, which can improve the accuracy of the clustering of new energy vehicles.

[0086] In practical applications, when the density parameter is not set accurately, the accuracy of the new energy vehicle clustering result may be low. As an implementation method of the present invention, the electronic device clusters the new energy vehicles to obtain a concentrated new energy vehicle set, which includes normal new energy vehicles, and the new energy vehicles included in the dispersed new energy vehicle set are abnormal new energy vehicles. After the electronic device clusters the new energy vehicles to obtain the clustering result, the density parameter can be adjusted based on the clustering result.

[0087] For example, the classification effect can be verified by horizontal comparison of various new energy vehicle data warning schemes, or by experts conducting actual vehicle inspections, to obtain inspection results for each new energy vehicle, including whether each new energy vehicle is normal or abnormal. The clustering results can then be compared with the inspection results. When the recognition error rate of abnormal new energy vehicles is greater than a first threshold, the density parameter is reduced. When the recognition error rate of normal new energy vehicles is greater than a second threshold, the density parameter is increased.

[0088] The first threshold and the second threshold may be set by a user according to actual applications, and the first threshold and the second threshold may be the same or different, which is not limited in the embodiment of the present invention.

[0089] After clustering the new energy vehicles, the clustering results are judged according to the test results, and the density parameters are adjusted according to the judgment results. When the recognition error rate of abnormal new energy vehicles is large, that is, more abnormal new energy vehicles are clustered as normal new energy vehicles, indicating that the current density parameter value is large. In this case, the density parameter can be reduced; when the recognition error rate of normal new energy vehicles is large, that is, more normal new energy vehicles are clustered as abnormal new energy vehicles, indicating that the current density parameter value is small. In this case, the density parameter can be increased; in this way, in the subsequent clustering process, appropriate density parameters can be used to cluster new energy vehicles, thereby improving the accuracy of new energy vehicle clustering.

[0090] like Figure 2 As shown, it shows a schematic diagram of the clustering results after clustering the new energy vehicles, wherein each coordinate represents the position of the new energy vehicle, the square represents the scattered distribution and abnormal points, and the circle represents the concentrated distribution points.

[0091] like Figure 3 As shown, it shows a schematic diagram of the structure of a new energy vehicle clustering device provided by an embodiment of the present invention, and the device includes:

[0092] The data acquisition module 310 is used to acquire the most recent preset number of charging records of each new energy vehicle, identify abnormal data in each charging record, and correct the identified abnormal data;

[0093] The data partitioning module 320 is used to partition each charging record according to the preset features and the preset endpoint values ​​of each interval included in each charging record to obtain each charging segment; wherein the number of charging segments included in each charging record is equal, and the amount of data included in each charging segment is equal;

[0094] A feature construction module 330 is used to calculate the value of each construction feature in turn according to each piece of data included in each charging segment, and fill the value of the construction feature into the charging segment in a preset order;

[0095] The distance calculation module 340 is used to determine the number of first charging records of the first new energy vehicle and the number of second charging records of the second new energy vehicle for any first new energy vehicle and second new energy vehicle, determine the minimum value of the first charging record number and the second charging record number, and select the nearest minimum value sub-target charging record in the charging records of the first new energy vehicle and the second new energy vehicle; calculate the initial distance corresponding to the i-th charging record between the first new energy vehicle and the second new energy vehicle according to each charging segment included in the i-th target charging record of the first new energy vehicle and the second new energy vehicle, and determine the weight of each initial distance, and calculate the target distance between the first new energy vehicle and the second new energy vehicle according to the weight and each initial distance;

[0096] The new energy vehicle clustering module 350 is used to obtain the stored density parameters and distance metrics, and cluster the new energy vehicles according to the density parameters and distance metrics, as well as the target distance between every two new energy vehicles to obtain clustering results, wherein the clustering results include a concentrated new energy vehicle set and a dispersed new energy vehicle set.

[0097] Optionally, the data acquisition module 310 includes:

[0098] The quantity judgment submodule is used to judge whether the number of charging records of any new energy vehicle is less than a preset number;

[0099] A first record acquisition submodule, configured to acquire all charging records of the new energy vehicle when the number determination submodule determines that the number of charging records of the new energy vehicle is less than the preset number;

[0100] The second record acquisition submodule is used to obtain the latest preset number of charging records of the new energy vehicle when the number judgment submodule determines that the number of charging records of the new energy vehicle is not less than the preset number.

[0101] Optionally, the data acquisition module 310 includes:

[0102] A data filling submodule, for identifying, for each charging record, a missing data point in the charging record, and filling the data point with a first preset number of data before and after the data point;

[0103] The data correction submodule is used to identify, for each charging record, a data point with an abnormal data range in the charging record, and correct the data point according to a second preset number of data before and after the data point.

[0104] Optionally, each charging record includes at least a state of charge, and each interval endpoint value includes a starting charge and a corresponding ending charge; the data partitioning module 320 includes:

[0105] A charging segment construction submodule is used to obtain each preset starting charge amount and the corresponding ending charge amount, and to construct an initial charging segment corresponding to each starting charge amount and the corresponding ending charge amount;

[0106] A data adding submodule is used to sequentially search for data whose state of charge is within the range of each starting charge amount and the corresponding ending charge amount for each charging record, and add the found data to the corresponding initial charging segment;

[0107] The data filling submodule is used to fill the data from the starting charge amount to the starting state of charge for each initial charging segment when the starting state of charge included in the initial charging segment is not equal to the corresponding starting charge amount; and to fill the data from the ending state of charge to the ending charge amount using the preset data when the ending state of charge included in the initial charging segment is not equal to the corresponding ending charge amount, so as to obtain the charging segment corresponding to the initial charging segment.

[0108] Optionally, the construction features include: the mean and variance of each feature included in the charging record.

[0109] Optionally, the new energy vehicles included in the concentrated new energy vehicle set are normal new energy vehicles, and the new energy vehicles included in the dispersed new energy vehicle set are abnormal new energy vehicles, and the device further includes:

[0110] An inspection result acquisition module is used to acquire the inspection result of each of the new energy vehicles, wherein the inspection result includes whether each of the new energy vehicles is normal or abnormal;

[0111] The parameter adjustment module is used to compare the clustering result with the inspection result, and when the recognition error rate of abnormal new energy vehicles is greater than a first threshold, reduce the density parameter; when the recognition error rate of normal new energy vehicles is greater than a second threshold, increase the density parameter.

[0112] From the above content, it can be seen that a new energy vehicle clustering device provided by an embodiment of the present invention can, after acquiring the charging records of each new energy vehicle, divide each charging record into each charging segment, so that charging records with an equal number of charging segments can be obtained, and the amount of data of each charging segment is also equal, that is, each charging record with consistent dimensions can be obtained; and, structural features can also be added to each charging segment, so as to increase the data dimension of each charging segment; and then, the new energy vehicles are clustered according to the charging records with consistent data dimensions and larger data dimensions, which can improve the accuracy of new energy vehicle clustering.

[0113] The above device embodiment corresponds to the method embodiment and has the same technical effect as the method embodiment. For specific description, please refer to the method embodiment. The device embodiment is obtained based on the method embodiment. For specific description, please refer to the method embodiment part, which will not be repeated here.

[0114] Those skilled in the art can understand that the accompanying drawings are only schematic diagrams of an embodiment, and the modules or processes in the accompanying drawings are not necessarily required to implement the present invention.

[0115] Those skilled in the art can understand that the modules in the device in the embodiment can be distributed in the device in the embodiment according to the description of the embodiment, or can be changed accordingly and located in one or more devices different from the embodiment. The modules in the above embodiment can be combined into one module, or can be further divided into multiple sub-modules.

[0116] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A new energy vehicle clustering method, characterized in that: The method comprises: Obtain the most recent preset number of charging records of each new energy vehicle, identify abnormal data in each charging record, and correct the identified abnormal data; According to the preset features included in each charging record and the preset endpoint values ​​of each interval, each charging record is divided to obtain each charging segment; wherein the number of charging segments included in each charging record is equal, and the amount of data included in each charging segment is equal; For each charging segment, according to each piece of data included in the charging segment, the value of each structural feature is calculated in sequence, and the value of the structural feature is filled into the charging segment in a preset order; For any first new energy vehicle and second new energy vehicle, determine the number of first charging records of the first new energy vehicle and the number of second charging records of the second new energy vehicle, determine the minimum value of the first charging record number and the second charging record number, and select the nearest minimum value sub-target charging record in the charging records of the first new energy vehicle and the second new energy vehicle; calculate the initial distance corresponding to the i-th charging record between the first new energy vehicle and the second new energy vehicle according to each charging segment included in the i-th target charging record of the first new energy vehicle and the second new energy vehicle, and determine the weight of each initial distance, and calculate the target distance between the first new energy vehicle and the second new energy vehicle according to the weight and each initial distance; The stored density parameters and distance metrics are obtained, and according to the density parameters and distance metrics, as well as the target distance between every two new energy vehicles, the new energy vehicles are clustered to obtain clustering results, wherein the clustering results include a concentrated new energy vehicle set and a dispersed new energy vehicle set.

2. The method according to claim 1, characterized in that The step of obtaining the most recent preset number of charging records of each new energy vehicle includes: For any new energy vehicle, determine whether the number of charging records of the new energy vehicle is less than a preset number; When the number of charging records of the new energy vehicle is less than the preset number, obtaining all charging records of the new energy vehicle; When the number of charging records of the new energy vehicle is not less than the preset number, the most recent preset number of charging records of the new energy vehicle are obtained.

3. The method according to claim 1, characterized in that: The step of identifying abnormal data in each charging record and correcting the identified abnormal data includes: For each charging record, identifying missing data points in the charging record, and filling the data point with a first preset number of data before and after the data point; For each charging record, a data point with an abnormal data range in the charging record is identified, and the data point is corrected according to a second preset number of data before and after the data point.

4. The method according to claim 1, characterized in that: Each charging record includes at least a state of charge, and each interval endpoint value includes a starting charge amount and a corresponding ending charge amount; the step of dividing each charging record according to the preset features included in each charging record and the preset interval endpoint values ​​to obtain each charging segment includes: Obtaining each preset starting charge amount and the corresponding ending charge amount, and constructing an initial charging segment corresponding to each starting charge amount and the corresponding ending charge amount; For each charging record, sequentially search for data whose state of charge is within the range of each starting charge amount and the corresponding ending charge amount, and add the searched data to the corresponding initial charging segment; For each initial charging segment, when the initial state of charge included in the initial charging segment is not equal to the corresponding initial charge amount, the preset data is used to fill the data from the initial charge amount to the initial state of charge; when the termination state of charge included in the initial charging segment is not equal to the corresponding termination charge amount, the preset data is used to fill the data from the termination state of charge to the termination charge amount to obtain the charging segment corresponding to the initial charging segment.

5. The method according to any one of claims 1 to 4, characterized in that: The structural features include: the mean and variance of each feature included in the charging record.

6. The method according to any one of claims 1 to 4, characterized in that: The new energy vehicles included in the concentrated new energy vehicle set are normal new energy vehicles, and the new energy vehicles included in the dispersed new energy vehicle set are abnormal new energy vehicles. The method further includes: Obtaining inspection results of each of the new energy vehicles, wherein the inspection results include whether each of the new energy vehicles is normal or abnormal; The clustering result is compared with the inspection result. When the recognition error rate of abnormal new energy vehicles is greater than a first threshold, the density parameter is reduced. When the recognition error rate of normal new energy vehicles is greater than a second threshold, the density parameter is increased.

7. A new energy vehicle clustering device, characterized in that: The device comprises: The data acquisition module is used to obtain the most recent preset number of charging records of each new energy vehicle, identify abnormal data in each charging record, and correct the identified abnormal data; A data partitioning module, configured to partition each charging record according to preset features and preset endpoint values ​​of each interval included in each charging record to obtain charging segments; wherein each charging record includes an equal number of charging segments and an equal amount of data included in each charging segment; A feature construction module, for calculating, for each charging segment, the value of each construction feature in turn according to each piece of data included in the charging segment, and filling the value of the construction feature into the charging segment in a preset order; A distance calculation module, for determining, for any first new energy vehicle and second new energy vehicle, the number of first charging records of the first new energy vehicle and the number of second charging records of the second new energy vehicle, determining the minimum value of the first charging record number and the second charging record number, and selecting the nearest target charging record of the minimum value in the charging records of the first new energy vehicle and the second new energy vehicle; calculating the initial distance corresponding to the i-th charging record between the first new energy vehicle and the second new energy vehicle according to each charging segment included in the i-th target charging record of the first new energy vehicle and the second new energy vehicle, and determining the weight of each initial distance, and calculating the target distance between the first new energy vehicle and the second new energy vehicle according to the weight and each initial distance; The new energy vehicle clustering module is used to obtain the stored density parameters and distance metrics, and cluster the new energy vehicles according to the density parameters and distance metrics, as well as the target distance between every two new energy vehicles to obtain clustering results, wherein the clustering results include a concentrated new energy vehicle set and a dispersed new energy vehicle set.

8. The device according to claim 7, characterized in that The data acquisition module comprises: The quantity judgment submodule is used to judge whether the number of charging records of any new energy vehicle is less than a preset number; A first record acquisition submodule, configured to acquire all charging records of the new energy vehicle when the number determination submodule determines that the number of charging records of the new energy vehicle is less than the preset number; The second record acquisition submodule is used to obtain the latest preset number of charging records of the new energy vehicle when the number judgment submodule determines that the number of charging records of the new energy vehicle is not less than the preset number.

9. The device according to claim 7, characterized in that The data acquisition module comprises: A data filling submodule, for identifying, for each charging record, a missing data point in the charging record, and filling the data point with a first preset number of data before and after the data point; The data correction submodule is used to identify, for each charging record, a data point with an abnormal data range in the charging record, and correct the data point according to a second preset number of data before and after the data point.

10. The device according to claim 7, characterized in that Each charging record includes at least a state of charge, and each interval endpoint value includes a starting charge and a corresponding ending charge; the data division module includes: A charging segment construction submodule is used to obtain each preset starting charge amount and the corresponding ending charge amount, and to construct an initial charging segment corresponding to each starting charge amount and the corresponding ending charge amount; A data adding submodule is used to sequentially search for data whose state of charge is within the range of each starting charge amount and the corresponding ending charge amount for each charging record, and add the found data to the corresponding initial charging segment; The data filling submodule is used to fill the data from the starting charge amount to the starting state of charge for each initial charging segment when the starting state of charge included in the initial charging segment is not equal to the corresponding starting charge amount; and to fill the data from the ending state of charge to the ending charge amount using the preset data when the ending state of charge included in the initial charging segment is not equal to the corresponding ending charge amount, so as to obtain the charging segment corresponding to the initial charging segment.