Test road generation method and device and electronic equipment
By generating and clustering driving segments of vehicle-collected data, and generating test roads based on latitude, longitude, and road information, the problem of inaccurate test results caused by the large difference between user energy consumption and actual energy consumption is solved, achieving cost reduction and accuracy improvement.
Patent Information
- Application Number
- CN202511017145.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-22
- Publication Date
- 2025-11-18
AI Technical Summary
Existing test road generation methods result in significant discrepancies between user energy consumption and actual energy consumption, leading to inaccurate test results and high costs.
Multiple driving segments are generated by acquiring vehicle data, clustering is performed to determine the cluster category, and test roads are generated based on latitude, longitude and road information. Candidate roads are then selected, and finally the test roads are determined.
This improved the accuracy of test results and reduced testing costs.
Smart Images

Figure CN120974208A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the technical field of vehicles, in particular to a test road generation method and device and electronic equipment. BACKGROUND
[0002] At present, there are few test road generation methods, mainly including the following two schemes: obtaining a test road conforming to the China Light Vehicle Test Cycle (CLTC) based on CLTC test data and a Geographic Information System (GIS); and a test road generation method for automatic driving.
[0003] However, the above-mentioned test road generation method based on CLTC and the test road generation method for automatic driving have the following problems: the difference between the user energy consumption and the actual energy consumption is large, resulting in inaccurate test results; and the test cost is high. SUMMARY
[0004] Therefore, embodiments of the present application provide a test road generation method, device and computer equipment for improving the accuracy of test results and reducing test costs.
[0005] The first aspect provides a test road generation method, comprising: generating a plurality of driving segments according to the obtained vehicle collection data, wherein the driving segment comprises a start latitude and longitude, an end latitude and longitude and a plurality of driving characteristics; clustering the plurality of driving segments according to the obtained number of cluster categories and the best features obtained from the plurality of driving characteristics to obtain a plurality of cluster categories, and recording the cluster category corresponding to each driving segment; determining a plurality of specified driving segments and driving roads corresponding to the specified driving segments according to the start latitude and longitude and the end latitude and longitude of the driving segment, wherein each driving road corresponds to at least one specified driving segment; determining a candidate road corresponding to each cluster category according to the plurality of driving roads and the cluster category corresponding to each specified driving segment; determining a test road from the candidate roads corresponding to the plurality of cluster categories.
[0006] In a possible implementation manner, the generating a plurality of driving segments according to the obtained vehicle collection data comprises: performing data cleaning processing on the vehicle collection data; slicing the vehicle collection data after data cleaning processing according to idle speed to idle speed to generate a plurality of original driving segments; generate the start longitude and latitude, the end longitude and latitude, and the driving feature according to the original driving segment.
[0007] In a possible implementation, before the clustering of the plurality of driving segments according to the obtained clustering category number and the optimal feature from the plurality of driving features, the method further includes: randomly selecting a set number of driving segments from the plurality of driving segments, and taking the randomly selected driving segments as sample segments, each of the sample segments including a plurality of sample features; determining, according to the plurality of sample segments, a plurality of sample features from the plurality of driving features; setting different k as the clustering category number and selecting different combinations of sample features; classifying, according to the set clustering category number k, the selected sample features in the plurality of sample segments, so that each clustering category includes a plurality of selected sample features; calculating, by a silhouette coefficient formula, the sample features in the plurality of clustering categories, to generate a silhouette coefficient corresponding to the set clustering category number k and the selected sample features; determining, as the clustering category number, the clustering category number k corresponding to the maximum silhouette coefficient, and determining, as the optimal feature, the sample feature corresponding to the maximum silhouette coefficient.
[0008] In a possible implementation, the determining, according to the plurality of sample segments, a plurality of sample features from the plurality of driving features includes: calculating, by a Pearson correlation coefficient formula, the driving features in the plurality of sample segments to generate a plurality of Pearson correlation coefficients; taking, as the sample features, the driving features corresponding to the Pearson correlation coefficients less than a set coefficient threshold.
[0009] In a possible implementation, the determining, according to the start longitude and latitude and the end longitude and latitude of the driving segment, a plurality of specified driving segments and driving roads corresponding to the specified driving segments, each of the driving roads corresponding to at least one specified driving segment, includes: obtaining, by an address resolution interface, start region information and start road information corresponding to the start longitude and latitude of the driving segment and end region information and end road information corresponding to the end longitude and latitude of the driving segment according to the start longitude and latitude and the end longitude and latitude of the driving segment; filtering out the driving segments with the start region information and the end region information both located in a specified region, and taking the filtered driving segments as specified driving segments; According to the start road information and the end road information of each of the specified driving segments, a driving road corresponding to each of the specified driving segments is generated.
[0010] In a possible implementation, before the start latitude and longitude corresponding to the start area information and the start road information of the driving segment and the end latitude and longitude corresponding to the end area information and the end road information of the driving segment are obtained through the address resolution interface according to the start latitude and longitude and the end latitude and longitude of the driving segment, the method further includes: A rectangular boundary of the specified area is determined according to the latitude and longitude of the specified area. Driving segments in which the start latitude and the end latitude are both located in the rectangular boundary are screened out.
[0011] In a possible implementation, the candidate road corresponding to each of the clustering categories is determined according to the plurality of driving roads and the clustering category corresponding to each of the specified driving segments, including: The number of the specified driving segments corresponding to each driving road is counted. The proportion of each driving road in each clustering category is calculated according to the number of the specified driving segments corresponding to each driving road and the clustering category corresponding to the specified driving segment. Driving roads in which the number of the specified driving segments is greater than a set number threshold are screened out, and the screened driving roads are taken as screening roads. The candidate road corresponding to each of the clustering categories is determined from the plurality of screening roads according to the proportion of each screening road in each clustering category.
[0012] In a possible implementation, the proportion of each driving road in each clustering category is calculated according to the number of the specified driving segments corresponding to each driving road and the clustering category corresponding to the specified driving segment, including: The number of the specified driving segments corresponding to each driving road in each clustering category is counted according to the clustering category corresponding to the specified driving segment. The number of the specified driving segments corresponding to each driving road in each clustering category is divided by the number of the specified driving segments corresponding to the driving road, to obtain the proportion of each driving road in each clustering category.
[0013] In a possible implementation, the candidate road corresponding to each of the clustering categories is determined from the plurality of screening roads according to the proportion of each screening road in each clustering category, including: A first proportion is screened out from the proportion of each screening road in each clustering category, the first proportion being a proportion greater than a set proportion threshold. If a second proportion is selected from the first proportions, the screening road is taken as a candidate road corresponding to a first specific cluster category, the second proportion is the maximum proportion of the screening road in the proportions of each cluster category, and the first specific cluster category includes the cluster category in which the second proportion is located.
[0014] In a possible implementation, after the step of selecting a second proportion from the first proportions and taking the screening road as a candidate road corresponding to a first specific cluster category, the method further includes: If a second specific cluster category exists, a third proportion is selected from the proportions of the second specific cluster category among the screening roads, the third proportion is the maximum proportion of the screening roads in the second specific cluster category, and the second specific cluster category includes a cluster category that does not have a corresponding candidate road; The screening road corresponding to the third proportion is determined as a candidate road corresponding to the second specific cluster category; If the candidate road corresponding to the first specific cluster category includes the candidate road corresponding to the second specific cluster category, the candidate road corresponding to the second specific cluster category is deleted from the candidate road corresponding to the first specific cluster category.
[0015] In a possible implementation, the step of determining a test road from the candidate roads corresponding to the plurality of cluster categories includes: According to a selection operation input by a user, a specified candidate road corresponding to each cluster category is selected from the candidate roads corresponding to the cluster categories; If the specified candidate roads corresponding to the plurality of cluster categories are continuous, the test road is generated according to the specified candidate roads corresponding to the plurality of cluster categories; or, If the specified candidate roads corresponding to the plurality of cluster categories are discontinuous and the number of additional roads required for the specified candidate roads corresponding to the plurality of cluster categories to form a continuous road is less than or equal to 2, an additional road is added according to an addition operation input by a user, and the test road is generated according to the additional road and the specified candidate roads; or, If the specified candidate roads corresponding to the plurality of cluster categories are discontinuous and the number of additional roads required for the specified candidate roads corresponding to the plurality of cluster categories to form a continuous road is greater than 2, the step of selecting a specified candidate road corresponding to each cluster category from the candidate roads corresponding to the cluster categories is continuously performed according to the selection operation input by the user.
[0016] In a possible implementation, the method further includes: If the additional road is a candidate road corresponding to a cluster category, the additional road is marked as a duplicate road corresponding to the cluster category; or If the additional road is not a candidate road corresponding to any cluster category, the additional road is marked as an auxiliary road.
[0017] In a possible implementation, before the selecting, according to the selection operation input by the user, a specified candidate road corresponding to each cluster category from the candidate roads corresponding to the cluster category, the method further includes: According to the deletion operation input by the user, under the condition that at least one candidate road is reserved in the candidate roads corresponding to each cluster category, deleting the candidate road not connected with other candidate roads.
[0018] The second aspect provides a test road generation device, including: A first generation module is configured to generate a plurality of driving segments according to acquired vehicle collection data, wherein each driving segment includes a start longitude and latitude, an end longitude and latitude, and a plurality of driving features. A clustering module is configured to cluster the plurality of driving segments according to a number of cluster categories and optimal features acquired from the plurality of driving features to obtain the plurality of cluster categories, and record a cluster category corresponding to each driving segment. A first determination module is configured to determine a plurality of specified driving segments and driving roads corresponding to the specified driving segments according to the start longitude and latitude and the end longitude and latitude of the driving segment. A second determination module is configured to determine candidate roads corresponding to each cluster category according to the plurality of driving roads and the cluster category corresponding to each specified driving segment. A third determination module is configured to determine a test road from the candidate roads corresponding to the plurality of cluster categories.
[0019] The third aspect provides an electronic device, including one or more processors, a memory, and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, when executed by the electronic device, causing the electronic device to perform the test road generation method in the first aspect or any possible implementation of the first aspect.
[0020] The fourth aspect provides a computer-readable storage medium, including a stored program, wherein when the program is running, the computer-readable storage medium controls an electronic device where the computer-readable storage medium is located to perform the test road generation method in the first aspect or any possible implementation of the first aspect.
[0021] In the technical scheme provided by the embodiment of the present application, a plurality of driving segments are generated according to the acquired vehicle collection data, the driving segments include starting longitude and latitude, ending longitude and latitude, and a plurality of driving characteristics; a plurality of clustering categories are obtained by clustering the plurality of driving segments according to the acquired number of clustering categories and the optimal characteristics obtained from the plurality of driving characteristics, and the clustering category corresponding to each driving segment is recorded; a plurality of specified driving segments and driving roads corresponding to the specified driving segments are determined according to the starting longitude and latitude and the ending longitude and latitude of the driving segments, and each driving road corresponds to at least one specified driving segment; a candidate road corresponding to each clustering category is determined according to the plurality of driving roads and the clustering category corresponding to each specified driving segment; and a test road is determined from the candidate roads corresponding to the plurality of clustering categories. The road test scheme based on the driving characteristics and longitude and latitude of the user in the embodiment of the present application can effectively compensate for the problem that the energy consumption of the user and the actual energy consumption are greatly different, thereby improving the accuracy of the test result and reducing the test cost. BRIEF DESCRIPTION OF DRAWINGS
[0022] In order to more clearly illustrate the technical scheme of the embodiments of the present application, the drawings required in the embodiments will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0023] Figure 1 A flowchart of a method for generating a test road provided by the embodiment of the present application; Figure 2 A flowchart of a method for generating a driving segment provided by the embodiment of the present application; Figure 3 A flowchart of a method for acquiring a number of clustering categories and optimal characteristics provided by the embodiment of the present application; Figure 4 A flowchart of a method for determining a driving road provided by the embodiment of the present application; Figure 5 A flowchart of a method for determining a candidate road provided by the embodiment of the present application; Figure 6 A specific flowchart of a method for determining a candidate road provided by the embodiment of the present application; Figure 7 A flowchart of a method for determining a test road provided by the embodiment of the present application; Figure 8 A structural schematic diagram of a test road generation device provided by the embodiment of the present application; Figure 9 A structural schematic diagram of an electronic device provided by the embodiment of the present application. DETAILED DESCRIPTION
[0024] In order to better understand the technical solutions of the present application, the embodiments of the present application are described in detail below with reference to the drawings.
[0025] It should be clear that the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the scope of protection of the present application.
[0026] The terms used in the embodiments of the present application are only for the purpose of describing the specific embodiments, and are not intended to limit the present application. The singular forms "a", "said" and "the" used in the embodiments of the present application and the appended claims are also intended to include the plural forms, unless the context clearly indicates otherwise.
[0027] It should be understood that the term "and / or" used herein is only to describe the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B, which can represent the three cases of A alone, A and B together, and B alone. In addition, the character " / " in this paper generally represents that the front and rear associated objects are a "or" relationship.
[0028] The steps in the embodiments of the present application can be executed by an electronic device. For example, the electronic device can include a mobile phone, a tablet computer, a notebook computer, a desktop computer, etc.
[0029] Figure 1 A flowchart of a method for generating a test road according to an embodiment of the present application is shown in FIG. 1, which includes the following steps. Figure 1 Step 102, generating a plurality of driving segments according to the acquired vehicle collection data, the driving segment including a start latitude and longitude, an end latitude and longitude, and a plurality of driving features.
[0030] Step 104, clustering the plurality of driving segments according to the acquired number of cluster categories and the optimal features acquired from the plurality of driving features to obtain a plurality of cluster categories, and recording the cluster category corresponding to each driving segment.
[0031] Step 106, determining a plurality of specified driving segments and driving roads corresponding to the specified driving segments according to the start latitude and longitude and the end latitude and longitude of the driving segments, each driving road corresponding to at least one specified driving segment.
[0032] Step 108, determining the candidate road corresponding to each cluster category according to the plurality of driving roads and the cluster category corresponding to each specified driving segment.
[0033] Step 110, determining a test road from candidate roads corresponding to a plurality of clustering categories.
[0034] Figure 2 A flowchart of a driving segment generation method provided by an embodiment of the present application is shown in FIG. 2. As shown in FIG. 2, step 102 can specifically include: Figure 2 Step 1022, performing data cleaning processing on the vehicle collection data.
[0035] The vehicle sends the vehicle collection data to the electronic device at a set time interval, so that the electronic device obtains the vehicle collection data from the vehicle. For example, if the set time interval is 2s, the vehicle reports the vehicle collection data to the electronic device every 2s. As an optional solution, the vehicle collection data can include data collection time, vehicle speed, accelerator pedal opening degree, brake pedal opening degree, latitude and longitude, etc.
[0036] After obtaining the vehicle collection data, the electronic device needs to perform data cleaning on the vehicle collection data. The vehicle reports the vehicle collection data at a set time interval, that is, the vehicle reports a piece of vehicle collection data every set time interval.
[0037] The data cleaning process can include one or any combination of the following processing methods: the continuous three vehicle collection data can include the previous vehicle collection data, the current vehicle collection data and the next vehicle collection data, if only the current vehicle collection data in the continuous three vehicle collection data is missing, the previous vehicle collection data can be used as the current vehicle collection data, that is, the previous vehicle collection data is used instead of the current vehicle collection data; if the movement time of the plurality of vehicle collection data is less than the set movement time, the plurality of vehicle collection data is deleted, for example, the movement time of the plurality of vehicle collection data is 10s, and the set movement time is 30s, so the movement time of the plurality of vehicle collection data 10s is less than the set movement time 30s, and the plurality of vehicle collection data is deleted, wherein the movement time can be determined by the data collection time and the vehicle speed in the plurality of vehicle collection data, for example, the vehicle speed of the continuously reported 10 vehicle collection data starts from 0 to greater than 0 and then ends at 0, wherein the number of vehicle collection data whose vehicle speed starts from 0 to greater than 0 is 5, and the number of vehicle collection data whose vehicle speed starts from greater than 0 to equal to 0 is 5, so the movement time of the 5 vehicle collection data whose vehicle speed starts from greater than 0 to equal to 0 is 10s; if the driving distance of the plurality of vehicle collection data is less than the set driving distance, the plurality of vehicle collection data is deleted, for example, the driving distance of the plurality of vehicle collection data is 60m, and the set driving distance is 100m, so the driving distance of the plurality of vehicle collection data 60m is less than the set driving distance 100m, and the plurality of vehicle collection data is deleted, wherein the driving distance can be determined by the data collection time and the vehicle speed in the plurality of vehicle collection data, for example, the vehicle speed of the continuously reported 30 vehicle collection data starts from 0 to greater than 0 and then ends at 0, and a total of 60m is driven, so the driving distance of the 30 vehicle collection data is 60m; for the vehicle speed starting from 0 to greater than 0 and then ending at 0, the continuous two vehicle collection data includes the previous vehicle collection data and the next vehicle collection data, if the difference between the data collection time of the previous vehicle collection data and the next vehicle collection data is greater than the set time period, for example, the set time period is 6 seconds, it indicates that the data starts to upload discontinuously from the next vehicle collection data, then the first vehicle collection data to the previous vehicle collection data is deleted, for example, there are 30 vehicle collection data, the vehicle speed of the first 10 vehicle collection data is equal to 0, the vehicle speed of the 11th to the 30th vehicle collection data is greater than 0, and the difference between the vehicle collection time of the 29th vehicle collection data and the 30th vehicle collection data is greater than 6 seconds, which is regarded as discontinuous data uploading, so the 1st to 29th vehicle collection data is deleted; if the vehicle collection data is abnormal data, the vehicle collection data is deleted, for example, the vehicle speed in the vehicle collection data is greater than the set vehicle speed threshold, the vehicle collection data is determined as abnormal data, and the vehicle collection data can be deleted.
[0038] Step 1024, slice the vehicle collection data after data cleaning processing according to idle speed to idle speed to generate a plurality of original driving segments.
[0039] Among them, idle speed to idle speed refers to the process of vehicle speed from 0 to greater than 0 to 0, and the electronic device slices the vehicle collection data according to the process of vehicle speed from 0 to greater than 0 to 0 to generate a plurality of original driving segments, that is, the process of vehicle speed from 0 to greater than 0 to 0 can form an original driving segment.
[0040] Step 1026, generate start latitude and longitude, end latitude and longitude, and driving characteristics according to the original driving segment.
[0041] As an optional solution, the original driving segment can include a plurality of vehicle collection data, and each vehicle collection data includes data collection time, vehicle speed, accelerator pedal opening degree, brake pedal opening degree, latitude and longitude.
[0042] As an optional solution, the plurality of driving characteristics can include: idle speed ratio, maximum vehicle speed, maximum acceleration, maximum deceleration, acceleration duration ratio, uniform speed duration ratio, deceleration duration ratio, driving duration, acceleration pedal use frequency, maximum acceleration pedal position, brake pedal use frequency, average brake pedal position, 95% quantile of the product of acceleration and vehicle speed, etc.
[0043] Divide the idle speed duration in the original driving segment by the original driving segment duration to calculate the idle speed ratio. Among them, the idle speed duration is equal to the total number of vehicle collection data from the vehicle collection data with vehicle speed equal to 0 to the vehicle collection data with vehicle speed greater than 0 multiplied by the set time interval, and the original driving segment duration is equal to the total number of vehicle collection data from idle speed to idle speed multiplied by the set time interval. For example, the set time interval is 2s.
[0044] Select the maximum vehicle speed from the vehicle speeds of the plurality of vehicle collection data of the original driving segment, and take the maximum vehicle speed as the maximum vehicle speed in the original driving segment.
[0045] Select the maximum acceleration from the plurality of accelerations of the original driving segment, and take the maximum acceleration as the maximum acceleration; select the minimum acceleration from the plurality of accelerations of the original driving segment, and take the minimum acceleration as the maximum deceleration. Among them, the difference between the vehicle speed of the current vehicle collection data and the vehicle speed of the previous vehicle collection data in the original driving segment and the difference between the data collection time of the current vehicle collection data and the data collection time of the previous vehicle collection data can be calculated, and the difference between the vehicle speed of the current vehicle collection data and the vehicle speed of the previous vehicle collection data is divided by the difference between the data collection time of the current vehicle collection data and the data collection time of the previous vehicle collection data to calculate the acceleration.
[0046] If the acceleration is in the acceleration threshold range, the current strip vehicle collection data corresponding to the acceleration is determined as acceleration data; if the acceleration is in the deceleration threshold range, the current strip vehicle collection data corresponding to the acceleration is determined as deceleration data; if the acceleration is in the uniform speed threshold range, and the vehicle speed of the current strip vehicle collection data corresponding to the acceleration is not equal to 0, the current strip vehicle collection data corresponding to the acceleration is determined as uniform speed data. For example, the acceleration in the acceleration threshold range can include: 0.1 <= acceleration < 5; the acceleration in the deceleration threshold range can include: -10 < acceleration <= -0.1; and the acceleration in the uniform speed threshold range can include: -0.1 < acceleration < 0.1. Wherein, the current strip vehicle collection data corresponding to the acceleration and the last strip vehicle collection data corresponding to the acceleration are the current strip vehicle collection data and the last strip vehicle collection data used when calculating the acceleration. The number of acceleration data strips, the number of deceleration data strips, and the number of uniform speed data strips are counted, and the number of acceleration data strips, the number of deceleration data strips, and the number of uniform speed data strips are added to obtain the total number of data strips; the number of acceleration data strips is multiplied by the set time interval to obtain the acceleration duration, the number of deceleration data strips is multiplied by the set time interval to obtain the deceleration duration, the number of uniform speed data strips is multiplied by the set time interval to obtain the uniform speed duration, and the total number of data strips is multiplied by the set time interval to obtain the total data duration. The acceleration duration is divided by the total data duration to obtain the uniform speed duration ratio, the deceleration duration is divided by the total data duration to obtain the deceleration duration ratio, and the uniform speed duration is divided by the total data duration to obtain the uniform speed duration ratio. For example, the set time interval can be 2s.
[0047] The number of vehicle collection data strips in which the vehicle speed is greater than 0 to equal to 0 in the original driving segment is counted, and the number of counted vehicle collection data strips is multiplied by the set time interval to obtain the driving duration. For example, the set time interval can be 2s.
[0048] If the accelerator pedal opening degree of the current strip vehicle collection data is less than or equal to the accelerator pedal opening degree threshold, and the accelerator pedal opening degree of the next strip vehicle collection data is greater than the accelerator pedal opening degree threshold, it indicates that the accelerator pedal is used once, and the number of accelerator pedal uses is incremented by 1 to count the number of accelerator pedal uses in the original driving segment. For example, the accelerator pedal opening degree threshold can be 2, and the initial value of the number of accelerator pedal uses can be 0.
[0049] The maximum accelerator pedal opening degree is selected from the accelerator pedal opening degrees of the plurality of vehicle collection data in the original driving segment, and the maximum accelerator pedal opening degree is taken as the maximum accelerator pedal position.
[0050] If the brake pedal opening of the current vehicle collection data is less than or equal to the brake pedal opening threshold value, and the brake pedal opening of the next vehicle collection data is greater than the brake pedal opening threshold value, it indicates that the brake pedal is used once, and the brake pedal use times are incremented by 1 to count the brake pedal use times of the original driving segment. For example, the brake pedal opening threshold value can be 2, and the initial value of the brake pedal use times can be 0.
[0051] The vehicle collection data with a speed greater than 0 is selected from the original driving segment, and the brake pedal opening in the selected vehicle collection data is averaged to obtain the average brake pedal position.
[0052] The product of the speed and the corresponding acceleration of each acceleration data in the original driving segment is calculated, and the 95th percentile of the plurality of products in the original driving segment is calculated, and the calculated 95th percentile is taken as the 95th percentile of the product of the acceleration and the speed of the original driving segment. The acceleration data is the current vehicle collection data corresponding to the acceleration within the acceleration threshold range, for example, the acceleration within the acceleration threshold range can include: 0.1 <= acceleration < 5.
[0053] The electronic device determines the latitude and longitude corresponding to the start speed of 0 in the original driving segment as the start latitude and longitude, and determines the latitude and longitude corresponding to the end speed of 0 in the original driving segment as the end latitude and longitude.
[0054] Figure 3 A flowchart of a method for obtaining a clustering category number and a best feature provided by an embodiment of the present application is shown in FIG. 104, which can include the following steps before step 104: Figure 3 Step 1031, a plurality of driving segments are randomly extracted from the plurality of driving segments, and the randomly extracted driving segments are taken as sample segments, and each sample segment includes a plurality of driving features.
[0055] In the embodiment of the present application, the electronic device randomly extracts a plurality of sample segments from the plurality of driving segments.
[0056] As an optional solution, before step 1031, the plurality of driving features in the plurality of driving segments are further normalized.
[0057] For example, the plurality of driving features in the plurality of driving segments can be normalized by a maximum and minimum normalization formula to eliminate the dimensional influence between the features.
[0058] Specifically, the normalized driving feature can be calculated by the formula: The normalized driving feature is a driving feature in any one driving segment, a minimum value of the same driving feature in all driving segments, a maximum value of the same driving feature in all driving segments.
[0059] Step 1032, determining a plurality of sample features from the plurality of driving features according to a plurality of sample segments.
[0060] As an optional solution, step 1032 can specifically include: Step S11, calculating the driving features in the plurality of sample segments by a Pearson correlation coefficient formula to generate a plurality of Pearson correlation coefficients.
[0061] The Pearson correlation coefficient formula is as follows: wherein, is a Pearson correlation coefficient between any two driving features, is any one driving feature in any one sample segment, is another driving feature in any one sample segment, is an average value of one driving feature in all sample segments, is an average value of another driving feature in all sample segments, is a number of sample segments.
[0062] Step S12, taking the driving features corresponding to the Pearson correlation coefficients less than a set coefficient threshold as sample features.
[0063] For example, the coefficient threshold can be 0.7, the number of driving features in each sample segment can be several, and the number of sample features can be 3-7.
[0064] In the embodiments of the present application, the Pearson correlation coefficient formula can be used to select the driving features with lower correlation from the plurality of driving features, thereby reducing the influence of the driving features with higher correlation on the clustering result.
[0065] Step 1033, setting different k as the number of classification categories and selecting different combinations of sample features.
[0066] In the embodiments of the present application, different sample features can be selected from the plurality of sample features to obtain different combinations of sample features. For example, when the number of sample features is 5, 3 sample features can be selected from the 5 sample features to obtain a combination of 3 sample features; for another example, when the number of sample features is 5, 5 sample features can be selected from the 5 sample features to obtain a combination of 5 sample features.
[0067] In the embodiments of the present application, k can be a positive integer greater than or equal to 2, for example, the number of classification categories k can be set to 2, 3 or 4, etc.
[0068] Subsequently, by performing step 1034 and step 1035, the silhouette coefficients in the case of selecting different classification category numbers k and different sample features can be calculated. For example, the classification category number k is selected as 2 and 3 sample feature combinations are selected; for example, the classification category number k is selected as 3 and 5 sample feature combinations are selected; for example, the classification category number k is selected as 4 and 4 sample feature combinations are selected; here, they are not listed one by one. By performing step 1034 and step 1035, the silhouette coefficients in the above different cases can be calculated respectively.
[0069] Step 1034, according to the set classification category number k, the selected sample features in the plurality of sample segments are classified, so that each classification category includes a plurality of selected sample features.
[0070] As an optional solution, according to the set classification category number k, the selected sample features in the plurality of sample segments are classified by the k-means algorithm.
[0071] Step 1035, the sample features of the plurality of classification categories are calculated by the silhouette coefficient formula, and the silhouette coefficient corresponding to the set classification category number k and the selected sample features is generated.
[0072] Specifically, the silhouette coefficient formula is as follows: Wherein, is the silhouette coefficient, is the average value of the distance between each sample feature and other sample features in the classification category to which the sample feature belongs, b is the minimum value of the average distance between each sample feature and all sample features in the classification category excluding the sample feature.
[0073] The silhouette coefficient calculated by the above silhouette coefficient formula is located in [-1, 1], and the closer the silhouette coefficient is to 1, the more optimal the cohesion and separation are.
[0074] Step 1036, the classification category number k corresponding to the maximum silhouette coefficient is determined as the clustering category number, and the sample feature corresponding to the maximum silhouette coefficient is determined as the best feature.
[0075] For example, if the silhouette coefficient is maximum when the classification category number k is selected as 4 and 3 sample feature combinations are selected, the classification category number 4 is determined as the clustering category number, and the 3 sample features selected are determined as the best features. For example, the 3 sample features can include idle speed ratio, maximum speed and driving time.
[0076] In the embodiment of the present application, step 104 can specifically include: adopting a clustering algorithm, clustering the plurality of driving segments according to the obtained number of clustering categories and the optimal features obtained from the plurality of driving features to obtain a plurality of clustering categories, and recording the clustering category corresponding to each driving segment. As an optional solution, the clustering algorithm can be a K-means algorithm.
[0077] Figure 4 A flowchart of a method for determining a driving road provided by the embodiment of the present application is shown in FIG. 6. As shown in FIG. 6, step 106 can specifically include: Figure 4 Step 1062, obtaining, through an address resolution interface, starting area information and starting road information corresponding to the starting longitude and latitude of the driving segment and ending area information and ending road information corresponding to the ending longitude and latitude of the driving segment according to the starting longitude and latitude and the ending longitude and latitude of the driving segment.
[0078] In the embodiment of the present application, the address resolution interface can be provided by a map vendor, that is, the address resolution interface is an address resolution interface of the map vendor.
[0079] As an optional solution, the starting area information and the ending area information can both be area names, for example, the area name can be a city name; the starting road information and the ending road information can both be road names.
[0080] Step 1064, screening out the driving segment whose starting area information and ending area information are both located in a specified area, and taking the screened driving segment as a specified driving segment.
[0081] The driving segment whose starting area information and ending area information are both located in the specified area is retained, and the driving segment whose starting area information and / or ending area information is not located in the specified area is eliminated, so as to screen out the driving segment whose starting area information and ending area information are both located in the specified area.
[0082] The specified area can be an area selected by a user, for example, the specified area can be a city. For example, the specified area is Beijing, if the starting area information is Beijing and the ending area information is Beijing, the starting area information and the ending area information are both located in the specified area, the driving segment corresponding to the starting area information and the ending area information is determined as a specified driving segment; or, if the starting area information is Beijing and the ending area information is Tianjin, the ending area information is not located in the specified area, the driving segment corresponding to the starting area information and the ending area information is eliminated; or, if the starting area information is Tianjin and the ending area information is Tianjin, the starting area information and the ending area information are both not located in the specified area, the driving segment corresponding to the starting area information and the ending area information is eliminated.
[0083] Step 1066: Generate the driving road corresponding to each specified driving segment based on the start road information and end road information of each specified driving segment.
[0084] The road corresponding to the start road information and the road corresponding to the end road information of each specified driving segment are combined into a driving road. Therefore, each specified driving segment corresponds to a driving road, and a driving road can correspond to one or more specified driving segments.
[0085] As an alternative, the following may also be included before step 1062: Step 1060: Determine the rectangular boundary of the specified region based on its latitude and longitude.
[0086] The rectangular boundary of the specified region is determined by using the rectangular limits of the latitude and longitude of the specified region as the boundary.
[0087] Step 1061: Filter out driving segments whose starting latitude and longitude and ending latitude and longitude are both within the rectangular boundary.
[0088] Driving segments whose start and end latitude and longitude are both within the rectangular boundary are retained, while driving segments whose start and / or end latitude and longitude are not within the rectangular boundary are removed, thus filtering out driving segments that are within the rectangular boundary.
[0089] After step 1061, step 1062 can be executed using the driving segments selected in step 1061.
[0090] In this embodiment, driving segments whose start and end latitude and longitude are both within the rectangular boundary are selected, thus achieving preliminary screening of driving segments and reducing the amount of data for subsequent address parsing.
[0091] Figure 5 A flowchart illustrating a method for determining candidate roads provided in this application embodiment is shown below. Figure 5 As shown, step 108 may specifically include: Step 1082: Count the number of specified driving segments corresponding to each driving road.
[0092] Since each driving road can correspond to one or more specified driving segments, the number of specified driving segments corresponding to each driving road can be one or more.
[0093] Step 1084: Calculate the proportion of each driving road in each cluster category based on the number of specified driving segments corresponding to each driving road and the cluster category corresponding to the specified driving segments.
[0094] As an optional approach, step 1084 may specifically include: Step S21, according to the cluster category corresponding to each specified driving segment, the number of each driving road corresponding to the specified driving segment in each cluster category is counted.
[0095] Taking a driving road as an example, the driving road corresponds to a plurality of specified driving segments, since each specified driving segment corresponds to a cluster category, the plurality of specified driving segments corresponding to a driving road can correspond to one or more cluster categories. For example, the number of specified driving segments corresponding to a driving road is 10, of which 6 specified driving segments correspond to cluster category A, then the number of specified driving segments corresponding to the driving road in cluster category A is counted as 6; 3 specified driving segments correspond to cluster category B, then the number of specified driving segments corresponding to the driving road in cluster category B is counted as 3; 1 specified driving segment corresponds to cluster category C, then the number of specified driving segments corresponding to the driving road in cluster category C is counted as 1.
[0096] Step S22, the number of each driving road corresponding to the specified driving segment in each cluster category is divided by the number of the specified driving segment corresponding to the driving road, to obtain the proportion of each driving road in each cluster category.
[0097] For example, taking a driving road as an example, the number of specified driving segments corresponding to the driving road is 10. If the number of specified driving segments corresponding to the driving road in cluster category A is 6, then the number of specified driving segments corresponding to the driving road in cluster category A is divided by the number of specified driving segments corresponding to the driving road, i.e. 10, to obtain the proportion of the driving road in cluster category A, which is 60%; if the number of specified driving segments corresponding to the driving road in cluster category B is 3, then the number of specified driving segments corresponding to the driving road in cluster category B is divided by the number of specified driving segments corresponding to the driving road, i.e. 10, to obtain the proportion of the driving road in cluster category B, which is 30%; if the number of specified driving segments corresponding to the driving road in cluster category C is 1, then the number of specified driving segments corresponding to the driving road in cluster category C is divided by the number of specified driving segments corresponding to the driving road, i.e. 10, to obtain the proportion of the driving road in cluster category C, which is 10%.
[0098] Step 1086, the driving road with the number of specified driving segments greater than the set number threshold is screened out, and the screened driving road is taken as a screening road.
[0099] The driving road with the number of specified driving segments greater than the set number threshold is retained, and the driving road with the number of specified driving segments less than or equal to the set number threshold is removed, so as to screen out the driving road with a larger number of specified driving segments, for subsequent screening and planning of the road.
[0100] As an optional solution, the set number threshold can be determined according to the proportion result. For example, if the proportion of a certain driving road in the cluster category is small, the set number threshold can be set to a small value, for example, the set number threshold is 10; for example, if the proportions of the driving roads in the cluster categories are all large, the set number threshold can be set to a large value, for example, the set number threshold is 20.
[0101] Step 1088, determining a candidate road corresponding to each cluster category from the plurality of screening roads according to the proportion of each screening road in each cluster category.
[0102] Figure 6 A specific flowchart of a candidate road determination method provided by the embodiment of the present application is shown in FIG. 11. Specifically, step 1088 can include: Figure 6 Step S31, screening a first proportion from the proportions of each screening road in each cluster category, the first proportion being a proportion greater than a set proportion threshold.
[0103] A cluster category can correspond to one or more screening roads, and each screening road corresponding to the cluster category has a proportion in the cluster category. Therefore, the proportions of all screening roads corresponding to the cluster category in the cluster category can be compared with the set proportion threshold, and the proportions greater than the set proportion threshold in the cluster category are screened, for example, the set proportion threshold is 20%. Taking four screening roads as an example, for example, the proportions of the four screening roads in cluster category A include 60%, 50%, 25% and 5% in turn, and the proportions of cluster category A are compared with the set proportion threshold 20%, and the proportions 60%, 50% and 25% greater than the set proportion threshold 20% are screened, that is, the first proportions of cluster category A include 60%, 50% and 25%. For example, the proportions of the four screening roads in cluster category B include 40%, 20%, 30% and 25% in turn, and the proportions of cluster category B are compared with the set proportion threshold 20%, and the proportions 40%, 30% and 25% greater than the set proportion threshold 20% are screened, that is, the first proportions of cluster category B include 40%, 30% and 25%.
[0104] Step S32, if a second proportion is selected from the first proportion, the screening road is taken as a candidate road corresponding to a first specific cluster category, the second proportion being the maximum proportion of the screening road in the proportions in each cluster category, and the first specific cluster category including the cluster category where the second proportion is located.
[0105] For example, for the first screening road, the second proportion of 60% is selected from the first proportions of 60%, 50%, and 25%. The second proportion of 60% is the maximum proportion of the first screening road in each cluster category, and the first screening road is taken as a candidate road corresponding to a first specific cluster category. The first specific cluster category includes the cluster category A in which the second proportion of 60% is located, that is, the first screening road is taken as a candidate road corresponding to the cluster category A in which the second proportion of 60% is located.
[0106] For example, for the second screening road, the second proportion of 50% is selected from the first proportions of 60%, 50%, and 25%. The second proportion of 50% is the maximum proportion of the second screening road in each cluster category, and the second screening road is taken as a candidate road corresponding to a first specific cluster category. The first specific cluster category includes the cluster category A in which the second proportion of 50% is located, that is, the second screening road is taken as a candidate road corresponding to the cluster category A in which the second proportion of 50% is located.
[0107] For example, for the third screening road, the second proportion of 30% is selected from the first proportions of 40%, 30%, and 25%. The second proportion of 30% is the maximum proportion of the third screening road in each cluster category, and the third screening road is taken as a candidate road corresponding to a first specific cluster category. The first specific cluster category includes the cluster category B in which the second proportion of 30% is located, that is, the third screening road is taken as a candidate road corresponding to the cluster category B in which the second proportion of 30% is located.
[0108] For example, for the fourth screening road, the second proportion of 25% is selected from the first proportions of 40%, 30%, and 25%. The second proportion of 25% is the maximum proportion of the fourth screening road in each cluster category, and the fourth screening road is taken as a candidate road corresponding to a first specific cluster category. The first specific cluster category includes the cluster category B in which the second proportion of 25% is located, that is, the fourth screening road is taken as a candidate road corresponding to the cluster category B in which the second proportion of 25% is located.
[0109] After steps S31 and S32 are performed, the cluster category A and the cluster category B in the above two cluster categories each have a corresponding candidate road.
[0110] As an optional solution, in actual application, there can be a cluster category without a corresponding candidate road. In this case, step S33 needs to be continuously performed to determine a corresponding candidate road for the cluster category without a corresponding candidate road.
[0111] Step S33, if the second specific cluster category exists, selecting a third proportion from the proportions of the plurality of screening roads in the second specific cluster category, wherein the third proportion is the maximum proportion in the proportions of the plurality of screening roads in the second specific cluster category, and the second specific cluster category includes a cluster category without a corresponding candidate road.
[0112] For example, there is a second specific cluster category, the second specific cluster category includes a cluster category C without a corresponding candidate road, the proportions of the four screening roads in the cluster category C include 45%, 15%, 25% and 30% in turn, and the third proportion is 45% selected from 45%, 15%, 25% and 30%.
[0113] Step S34, determining the screening road corresponding to the third proportion as the candidate road corresponding to the second specific cluster category.
[0114] For example, the screening road corresponding to the third proportion 45% is the first screening road, and the first screening road is determined as the candidate road corresponding to the cluster category C.
[0115] Step S35, if the candidate road corresponding to the first specific cluster category includes the candidate road corresponding to the second specific cluster category, deleting the candidate road corresponding to the second specific cluster category from the candidate road corresponding to the first specific cluster category.
[0116] For example, the first specific cluster category includes a cluster category A and a cluster category B, the candidate road corresponding to the first specific cluster category includes the candidate road corresponding to the cluster category A and the candidate road corresponding to the cluster category B, wherein the candidate road corresponding to the cluster category A includes the first screening road and the second screening road, and the candidate road corresponding to the cluster category B includes the third screening road and the fourth screening road. The second specific cluster category includes a cluster category C, and the candidate road corresponding to the cluster category C includes the first screening road. Since the candidate road corresponding to the first specific cluster category also includes the first screening road, the candidate road corresponding to the first specific cluster category includes the candidate road corresponding to the second specific cluster category, and the first screening road can be deleted from the candidate road corresponding to the first specific cluster category, that is, the first screening road is deleted from the candidate road corresponding to the cluster category A, so that the candidate road corresponding to the cluster category A is the second screening road, and the candidate road corresponding to the second specific cluster category (that is, the cluster category C) is the first screening road.
[0117] In the embodiment of the application, the scheme of steps S31 to S35 is adopted, which ensures that the candidate road corresponding to each cluster category can be screened out, thereby facilitating the subsequent planning of the test road.
[0118] Figure 7A flowchart of a method for determining a test road according to an embodiment of the present application is shown in FIG. 11. The step 110 can specifically include: Figure 7 The step 1102 can specifically include: The step 1102 can specifically include:
[0119] The user can input a selection operation to the electronic device to select a candidate road from the candidate roads corresponding to each cluster category, and take the selected candidate road as the designated candidate road corresponding to the cluster category. As an optional solution, before the step 1102, the method can further include: The step 1101 can specifically include:
[0120] The user can input a selection operation to the electronic device to delete the candidate roads that are obviously not connected to other candidate roads from the map, but at least keep one candidate road for each cluster category, so as to facilitate the selection operation of the step 1102.
[0121] As an optional solution, before the step 1101 or the step 1102, the method can further include: The step 1100 can specifically include:
[0122] Specifically, the start and end longitude and latitude of all candidate roads can be marked on the map to mark the candidate roads on the map, or all candidate roads can be highlighted on the map to mark the candidate roads on the map. In actual applications, other ways of marking the candidate roads on the map can also be used as needed, which are not listed one by one here.
[0123] When the step 1101 is performed, the user can input a deletion operation to the electronic device by performing a deletion operation on the candidate roads marked on the displayed map, and the step 1101 can specifically include: deleting the candidate roads that are not connected to other candidate roads from the candidate roads corresponding to each cluster category under the condition that at least one candidate road is kept for each cluster category according to the deletion operation input by the user on the displayed map, thereby facilitating the user to perform a deletion operation on the candidate roads.
[0124] When step 1102 is performed, the user can select a candidate road on the map according to the candidate road marked on the displayed map to input a selection operation to the electronic device, and then step 1102 can specifically include: selecting a specified candidate road corresponding to each cluster category from the candidate roads corresponding to the cluster category according to the selection operation input by the user on the displayed map, thereby facilitating the user to select the candidate road.
[0125] Step 1104: determining whether the specified candidate roads corresponding to the plurality of cluster categories are continuous, if yes, performing step 1106; if no, performing step 1108.
[0126] When the user selects the specified candidate road from each cluster category, the user preferentially selects the specified candidate road that can be continuous, where the continuity refers to that the specified candidate roads of different cluster categories can be sequentially connected, i.e., the specified candidate roads corresponding to the plurality of cluster categories can form a continuous road. Then, in step 1104, if it is determined that the specified candidate roads corresponding to the plurality of cluster categories are continuous, indicating that the specified candidate roads corresponding to the plurality of cluster categories are sequentially connected, step 1106 is performed; if it is determined that the specified candidate roads corresponding to the plurality of cluster categories are discontinuous, indicating that at least one of the specified candidate roads corresponding to the plurality of cluster categories is not connected with the other specified candidate roads, step 1108 is performed.
[0127] Step 1106: generating a test road according to the specified candidate roads corresponding to the plurality of cluster categories, and the flow ends.
[0128] In this case, the generated test road can include the continuous specified candidate roads corresponding to the plurality of cluster categories.
[0129] Step 1108: determining whether the number of additional roads required for the specified candidate roads corresponding to the plurality of cluster categories to form a continuous road is less than or equal to 2, if no, continuing to perform step 1102; if yes, performing step 1110.
[0130] If it is determined that the number of additional roads required for the specified candidate roads corresponding to the plurality of cluster categories to form a continuous road is greater than 2, indicating that the specified candidate roads corresponding to the plurality of cluster categories need at least three additional roads to be continuous, i.e., the specified candidate roads corresponding to the plurality of cluster categories and at least three additional roads can form a continuous road, which indicates that the number of additional roads required to form a continuous road is relatively large, then step 1102 is continued to be performed to re-perform the selection operation of the candidate road. As an optional solution, if step 1101 is included before step 102, when it is determined that the number of additional roads required for the specified candidate roads corresponding to the plurality of cluster categories to form a continuous road is greater than 2, step 1101 can be continued to be performed to re-perform the deletion operation of the candidate road.
[0131] If it is determined that the number of additional roads required for the specified candidate roads corresponding to the plurality of cluster categories to form a continuous road is less than or equal to 2, it indicates that the specified candidate roads corresponding to the plurality of cluster categories require at most two additional roads to be continuous, i.e., the specified candidate roads corresponding to the plurality of cluster categories and at most two additional roads can form a continuous road, which indicates that the number of additional roads required to form a continuous road is small, and step 1110 is performed.
[0132] In step 1110, an additional road is added according to the user input addition operation, and the test road is generated according to the additional road and the specified candidate road, and the flow ends.
[0133] The user can input an addition operation to the electronic device to add a selected additional road. Specifically, the user can add an additional road on the map according to the roads displayed on the map to input an addition operation to the electronic device.
[0134] In this case, the generated test road can include the specified candidate roads corresponding to the plurality of cluster categories and the additional road.
[0135] As an optional solution, if the additional road is a candidate road corresponding to a cluster category, the method further includes: marking the additional road as a duplicate road corresponding to the cluster category As another optional solution, if the additional road is not a candidate road corresponding to any cluster category, the method further includes: marking the additional road as an auxiliary road.
[0136] In the technical solution provided by the embodiments of the present application, a plurality of driving segments are generated according to the acquired vehicle collection data, the driving segments include start longitude and latitude, end longitude and latitude, and a plurality of driving characteristics; a plurality of cluster categories are obtained by clustering the plurality of driving segments according to the acquired number of cluster categories and the best characteristics obtained from the plurality of driving characteristics, and the cluster category corresponding to each driving segment is recorded; a plurality of specified driving segments and driving roads corresponding to the specified driving segments are determined according to the start longitude and latitude and the end longitude and latitude of the driving segments, and each driving road corresponds to at least one specified driving segment; a candidate road corresponding to each cluster category is determined according to the plurality of driving roads and the cluster category corresponding to each specified driving segment; and a test road is determined from the candidate roads corresponding to the plurality of cluster categories. The road test solution based on the driving characteristics and longitude and latitude of the user in the embodiments of the present application can effectively solve the problem that the energy consumption of the user and the actual energy consumption are greatly different, thereby improving the accuracy of the test result and reducing the test cost.
[0137] The method provided by the embodiment of the application filters out continuous test roads meeting the driving characteristics of a user based on the driving characteristics and latitude and longitude data of the user through a K-means algorithm and a path planning method of the user. The road test based on the driving characteristics of the user can effectively make up for the problem that the difference between the energy consumption of a user and the actual energy consumption is large due to the laboratory test and the CLTC test. Meanwhile, the road screening can be completed only by using the vehicle collection data collected by a vehicle enterprise without additional collection of road information and traffic information, which can accelerate the development and iteration speed.
[0138] The host factory can generate test roads based on the driving characteristics of a user in a specified city for different vehicle models by using the method to perform real vehicle testing. The above scheme can be used to revise the test standards of an enterprise according to the driving habits of a user and to adjust the control strategy of a whole vehicle and optimize the energy consumption of the whole vehicle. The test roads generated based on the driving characteristics of a user make the test and optimization process more scientific and efficient, make the product closer to the user, and thus improve the user satisfaction.
[0139] Figure 8 A structural schematic diagram of a test road generation device provided by the embodiment of the application is shown in FIG. 1. Figure 8 As shown in FIG. 1, the device includes a first generation module 11, a clustering module 12, a first determination module 13, a second determination module 14, and a third determination module 15.
[0140] The first generation module 11 is configured to generate a plurality of driving segments according to the acquired vehicle collection data, wherein the driving segment includes a start latitude and longitude, an end latitude and longitude, and a plurality of driving characteristics.
[0141] The clustering module 12 is configured to cluster the plurality of driving segments according to the acquired number of clustering categories and the optimal characteristics acquired from the plurality of driving characteristics to obtain a plurality of clustering categories, and record the clustering category corresponding to each driving segment.
[0142] The first determination module 13 is configured to determine a plurality of specified driving segments and driving roads corresponding to the specified driving segments according to the start latitude and longitude and the end latitude and longitude of the driving segment, wherein each driving road corresponds to at least one specified driving segment.
[0143] The second determination module 14 is configured to determine the candidate road corresponding to each clustering category according to the plurality of driving roads and the clustering category corresponding to each specified driving segment.
[0144] The third determination module 15 is configured to determine the test road from the candidate roads corresponding to the plurality of clustering categories.
[0145] In a possible implementation, the first generation module 11 is specifically configured to perform data cleaning processing on the vehicle collection data; slice the vehicle collection data after the data cleaning processing according to idle speed to idle speed to generate a plurality of original driving segments; and generate the starting latitude and longitude, the ending latitude and longitude, and the driving feature according to the original driving segments.
[0146] In a possible implementation, the device further includes an extraction module 16, a fourth determination module 17, a setting module 18, a classification module 19, a calculation module 20, and a fifth determination module 21.
[0147] The extraction module 16 is configured to randomly extract a set number of driving segments from the plurality of driving segments, and take the randomly extracted driving segments as sample segments, each of which includes a plurality of sample features. The fourth determination module 17 is configured to determine a plurality of sample features from the plurality of driving features according to the plurality of sample segments. The setting module 18 is configured to set different k as the number of classification categories and select different combinations of sample features. The classification module 19 is configured to classify the selected sample features in the plurality of sample segments according to the set number of classification categories k, so that each classification category includes a plurality of selected sample features. The calculation module 20 is configured to calculate the sample features of the plurality of classification categories by a silhouette coefficient formula to generate a silhouette coefficient corresponding to the set number of classification categories k and the selected sample features. The fifth determination module 21 is configured to determine the number of classification categories k corresponding to the maximum silhouette coefficient as the number of clustering categories, and determine the sample features corresponding to the maximum silhouette coefficient as the best features.
[0148] In a possible implementation, the fourth determination module 17 is specifically configured to calculate the driving features in the plurality of sample segments by a Pearson correlation coefficient formula to generate a plurality of Pearson correlation coefficients; and take the driving features corresponding to the Pearson correlation coefficients less than a set coefficient threshold as sample features.
[0149] In a possible implementation, the first determination module 13 is specifically configured to obtain, by an address resolution interface, starting area information and starting road information corresponding to the starting latitude and longitude of the driving segment and ending area information and ending road information corresponding to the ending latitude and longitude of the driving segment according to the starting latitude and longitude and the ending latitude and longitude of the driving segment; filter out the driving segments whose starting area information and ending area information are located in a specified area, and take the filtered driving segments as specified driving segments; and generate a driving road corresponding to each of the specified driving segments according to the starting road information and the ending road information of each of the specified driving segments.
[0150] In a possible implementation, the first determining module 13 is specifically configured to determine a rectangular boundary of the specified region according to the longitude and latitude of the specified region; and filter out the driving segment in which both the start longitude and latitude and the end longitude and latitude are located within the rectangular boundary.
[0151] In a possible implementation, the second determining module 14 is specifically configured to count the number of the specified driving segment corresponding to each driving road; calculate the proportion of each driving road in each cluster category according to the number of the specified driving segment corresponding to each driving road and the cluster category corresponding to the specified driving segment; filter out the driving road in which the number of the specified driving segment is greater than a set number threshold, and take the filtered driving road as a filtered road; and determine the candidate road corresponding to each cluster category from the plurality of filtered roads according to the proportion of each filtered road in each cluster category.
[0152] In a possible implementation, the second determining module 14 is specifically configured to count the number of the specified driving segment corresponding to each cluster category according to the cluster category corresponding to the specified driving segment; and calculate the proportion of each driving road in each cluster category by dividing the number of the specified driving segment corresponding to each cluster category by the number of the specified driving segment corresponding to the driving road.
[0153] In a possible implementation, the second determining module 14 is specifically configured to filter out a first proportion from the proportion of each filtered road in each cluster category, the first proportion being a proportion greater than a set proportion threshold. If a second proportion is selected from the first proportion, the filtered road is taken as a candidate road corresponding to a first specific cluster category, the second proportion being the maximum proportion in the proportion of the filtered road in each cluster category, and the first specific cluster category including the cluster category in which the second proportion is located.
[0154] In a possible implementation, the second determining module 14 is specifically configured to, if there is a second specific cluster category, select a third proportion from the proportion of the plurality of filtered roads in the second specific cluster category, wherein the third proportion is the maximum proportion in the proportion of the plurality of filtered roads in the second specific cluster category, and the second specific cluster category includes a cluster category that does not have a corresponding candidate road; determine the filtered road corresponding to the third proportion as the candidate road corresponding to the second specific cluster category; and if the candidate road corresponding to the first specific cluster category includes the candidate road corresponding to the second specific cluster category, delete the candidate road corresponding to the second specific cluster category from the candidate road corresponding to the first specific cluster category.
[0155] In a possible implementation, the third determining module 15 is specifically configured to: select a designated candidate road corresponding to each of the cluster categories from the candidate roads corresponding to the cluster categories according to a selection operation input by a user; if the designated candidate roads corresponding to the multiple cluster categories are continuous, generate the test road according to the designated candidate roads corresponding to the multiple cluster categories; or if the designated candidate roads corresponding to the multiple cluster categories are discontinuous and the number of additional roads required for the designated candidate roads corresponding to the multiple cluster categories to form a continuous road is less than or equal to 2, add an additional road according to an addition operation input by the user, and generate the test road according to the additional road and the designated candidate roads; or if the designated candidate roads corresponding to the multiple cluster categories are discontinuous and the number of additional roads required for the designated candidate roads corresponding to the multiple cluster categories to form a continuous road is greater than 2, continue to perform the step of selecting a designated candidate road corresponding to each of the cluster categories from the candidate roads corresponding to the cluster categories according to the selection operation input by the user.
[0156] In a possible implementation, the apparatus further includes a marking module 22. The marking module 22 is configured to: if the additional road is a candidate road corresponding to a cluster category, mark the additional road as a repeated road corresponding to the cluster category; or if the additional road is not a candidate road corresponding to any cluster category, mark the additional road as an auxiliary road.
[0157] In a possible implementation, the apparatus further includes a deleting module 23. The deleting module 23 is configured to: according to a deletion operation input by a user, delete a candidate road that is not connected to other candidate roads, under the condition that at least one candidate road corresponding to each cluster category is retained.
[0158] The test road generation method and device provided in the embodiments of the present application can effectively compensate for the problem that the energy consumption of a user and the actual energy consumption are greatly different, thereby improving the accuracy of a test result and reducing the test cost.
[0159] The embodiments of the present application provide a computer readable storage medium, which includes a stored program, wherein the program controls an electronic device in which the storage medium is located to perform the embodiments of the test road generation method when the program is run.
[0160] The embodiments of the present application provide an electronic device, which includes: one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, which, when executed by the electronic device, cause the electronic device to perform the embodiments of the test road generation method.
[0161] Figure 9 A structural schematic diagram of an electronic device provided in an embodiment of the present application is shown in FIG. 1. As shown in the figure, the electronic device 30 includes a processor 31, a memory 32, and a computer program 33 stored in the memory 32 and executable on the processor 31. The computer program 33, when executed by the processor 31, implements the method for generating a test road in the embodiment. To avoid repetition, details are not described herein. Figure 9
[0162] The electronic device 30 includes, but is not limited to, the processor 31 and the memory 32. Those skilled in the art can understand that the electronic device 30 is only an example and does not constitute a limitation on the electronic device 30, and can include more or fewer components than shown, or combine certain components, or include different components, for example, the electronic device 30 can also include an input / output device, a network access device, a bus, etc. Figure 9
[0163] The processor 31 can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor.
[0164] The memory 32 can be an internal storage unit of the electronic device 30, such as a hard disk or a memory of the electronic device 30. The memory 32 can also be an external storage device of the electronic device 30, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. provided on the electronic device 30. Further, the memory 32 can include both the internal storage unit and the external storage device of the electronic device 30. The memory 32 is used to store computer programs and other programs and data required by the electronic device 30. The memory 32 can also be used to temporarily store data that has been output or will be output.
[0165] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the system, device and unit described above can refer to the corresponding processes in the foregoing method embodiments, which are not described herein.
[0166] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other manners. For example, the described device embodiments are merely schematic. For example, the division of the units is only a logical function division. There can be another division manner for the actual implementation, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections between the units can be indirect couplings or communication connections through some interfaces, devices or units, and can be electrical, mechanical or in other forms.
[0167] The units described as separated components can or can not be physically separated, and the components displayed as units can or can not be physical units, i.e., can be located in one place, or can be distributed on a plurality of network units. In actual implementation, some or all of the units can be selected according to the actual needs to achieve the purposes of the embodiments of the present application.
[0168] In addition, each functional unit in the embodiments of the present application can be integrated in a processing unit, or each unit can exist physically as a separate unit, or two or more units can be integrated in one unit. The above integrated unit can be implemented in the form of hardware, or in the form of hardware plus software function units.
[0169] The integrated unit implemented in the form of software function units can be stored in a computer readable storage medium. The above software function unit stored in a storage medium includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (Processor) to perform some steps of the method described in the embodiments of the present application. The above-mentioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, and various program code storage media.
[0170] The above only describes the preferred embodiments of the present application and is not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A method for generating test roads, characterized in that, include: Based on the acquired vehicle data, multiple driving segments are generated, each driving segment including start latitude and longitude, end latitude and longitude, and multiple driving features; Multiple driving segments are clustered based on the number of cluster categories obtained and the best feature obtained from multiple driving features to obtain multiple cluster categories, and the cluster category corresponding to each driving segment is recorded. Based on the start latitude and longitude and the end latitude and longitude of the driving segment, multiple designated driving segments and driving roads corresponding to the designated driving segments are determined, and each driving road corresponds to at least one designated driving segment; Based on the multiple driving roads and the clustering categories corresponding to each specified driving segment, candidate roads corresponding to each clustering category are determined; Test roads are determined from candidate roads corresponding to multiple clustering categories.
2. The method according to claim 1, characterized in that, The process involves generating multiple driving segments based on the acquired vehicle data, including: The vehicle data is cleaned and processed. The vehicle data collected after data cleaning and processing is sliced according to idle speed to idle speed to generate multiple original driving segments; Based on the original driving segment, the starting latitude and longitude, the ending latitude and longitude, and the driving characteristics are generated.
3. The method according to claim 1, characterized in that, Before clustering multiple driving segments to obtain cluster categories based on the number of cluster categories obtained and the best feature obtained from multiple driving features, the method further includes: A set number of driving segments are randomly selected from multiple driving segments, and the randomly selected driving segments are used as sample segments. Each sample segment includes multiple sample features. Based on the multiple sample segments, multiple sample features are determined from the multiple driving features; Set different k values for the number of classification categories and select different combinations of sample features; The sample features selected from multiple sample segments are classified according to the set number of classification categories k, such that each classification category includes multiple selected sample features. The silhouette coefficient formula is used to calculate the sample features of multiple classification categories, generating silhouette coefficients corresponding to the set number of classification categories k and the selected sample features. The number of classification categories k corresponding to the maximum silhouette coefficient is determined as the number of cluster categories, and the sample feature corresponding to the maximum silhouette coefficient is determined as the optimal feature.
4. The method according to claim 3, characterized in that, The step of determining multiple sample features from multiple driving features based on multiple sample fragments includes: Multiple Pearson correlation coefficients are generated by calculating the driving characteristics in multiple sample segments using the Pearson correlation coefficient formula. The driving features corresponding to Pearson correlation coefficients that are less than the set coefficient threshold are used as sample features.
5. The method according to claim 1, characterized in that, The step of determining multiple designated driving segments and corresponding driving roads based on the start and end latitude and longitude of the driving segment, wherein each driving road corresponds to at least one designated driving segment, includes: Through the address resolution interface, based on the start latitude and longitude and the end latitude and longitude of the driving segment, the starting region information and starting road information corresponding to the start latitude and longitude of the driving segment, as well as the ending region information and ending road information corresponding to the end latitude and longitude of the driving segment, are obtained. Filter out driving segments in which both the start region information and the end region information are located in a specified region, and use the filtered driving segments as the specified driving segments; Based on the start and end road information of each specified driving segment, a driving road corresponding to each specified driving segment is generated.
6. The method according to claim 5, characterized in that, Before obtaining the starting region information and starting road information corresponding to the starting latitude and longitude of the driving segment, and the ending region information and ending road information corresponding to the ending latitude and longitude of the driving segment, through the address resolution interface, the method further includes: Determine the rectangular boundary of the specified region based on its latitude and longitude. Select driving segments whose starting latitude and longitude and ending latitude and longitude are both within the rectangular boundary.
7. The method according to claim 1, characterized in that, The step of determining candidate roads corresponding to each cluster category based on multiple driving roads and cluster categories corresponding to each specified driving segment includes: Count the number of specified driving segments corresponding to each driving road; Based on the number of designated driving segments corresponding to each driving road and the cluster category corresponding to the designated driving segments, the proportion of each driving road in each cluster category is calculated; Filter out driving roads where the number of specified driving segments is greater than a set threshold, and use the filtered driving roads as the filter roads; Based on the proportion of each selected road in each cluster category, the candidate road corresponding to each cluster category is determined from the multiple selected roads.
8. The method according to claim 7, characterized in that, The step of calculating the proportion of each driving road in each cluster category based on the number of specified driving segments corresponding to each driving road and the cluster category corresponding to the specified driving segments includes: Based on the cluster category corresponding to the specified driving segment, the number of specified driving segments corresponding to each driving road in each cluster category is counted; Divide the number of specified driving segments corresponding to each driving road in each cluster category by the number of specified driving segments corresponding to that driving road to obtain the proportion of each driving road in each cluster category.
9. The method according to claim 7, characterized in that, The step of determining the candidate road corresponding to each cluster category from multiple selected roads based on the proportion of each selected road in each cluster category includes: The first proportion is selected from the proportion of each selected path in each cluster category. The first proportion is the proportion that is greater than the set proportion threshold. If a second proportion is selected from the first proportion, the filtered road is taken as a candidate road corresponding to the first specific cluster category. The second proportion is the maximum proportion of the filtered road in each cluster category. The first specific cluster category includes the cluster category in which the second proportion is located.
10. The method according to claim 9, characterized in that, If a second proportion is selected from the first proportion, and the filtered road is used as a candidate road corresponding to the first specific cluster category, the method further includes: If a second specific cluster category exists, a third proportion is selected from the proportions of multiple screening roads in the second specific cluster category, wherein the third proportion is the maximum proportion of multiple screening roads in the second specific cluster category, and the second specific cluster category includes cluster categories that do not have corresponding candidate roads; The screening path corresponding to the third proportion is determined as the candidate path corresponding to the second specific clustering category; If the candidate road corresponding to the first specific cluster category includes the candidate road corresponding to the second specific cluster category, then the candidate road corresponding to the second specific cluster category is removed from the candidate road corresponding to the first specific cluster category.
11. The method according to claim 1, characterized in that, The step of determining the test road from the candidate roads corresponding to the multiple clustering categories includes: Based on the user's input selection, select a specified candidate road corresponding to each cluster category from the candidate roads corresponding to each cluster category; If the specified candidate roads corresponding to multiple cluster categories are consecutive, then the test road is generated based on the specified candidate roads corresponding to the multiple cluster categories; or, If the specified candidate roads corresponding to multiple cluster categories are not contiguous, and the number of additional roads required to form a contiguous road from the specified candidate roads corresponding to multiple cluster categories is less than or equal to 2, then additional roads are added according to the user's input addition operation, and the test road is generated based on the additional roads and the specified candidate roads; or, If the designated candidate roads corresponding to multiple cluster categories are not contiguous and the number of additional roads required to form a contiguous road from the designated candidate roads corresponding to multiple cluster categories is greater than 2, then continue to execute the step of selecting a designated candidate road corresponding to each cluster category from the candidate roads corresponding to each cluster category based on the selection operation based on user input.
12. The method according to claim 11, characterized in that, The method further includes: If the additional road is a candidate road corresponding to a certain cluster category, then the additional road is marked as a duplicate road corresponding to that cluster category; or, If the additional road is not a candidate road corresponding to any cluster category, then the additional road is marked as an auxiliary road.
13. The method according to claim 11, characterized in that, Before selecting a specified candidate road corresponding to each cluster category from the candidate roads corresponding to each cluster category based on the user's selection operation, the method further includes: Based on the user's input deletion operation, candidate roads that are not connected to other candidate roads are deleted, provided that at least one candidate road is retained in the candidate roads corresponding to each cluster category.
14. A test road generation device, characterized in that, include: The first generation module is used to generate multiple driving segments based on the acquired vehicle data. The driving segments include start latitude and longitude, end latitude and longitude, and multiple driving features. The clustering module is used to cluster multiple driving segments based on the number of cluster categories obtained and the best feature obtained from multiple driving features to obtain multiple cluster categories, and to record the cluster category corresponding to each driving segment; The first determining module is used to determine multiple designated driving segments and driving roads corresponding to the designated driving segments based on the start latitude and longitude and the end latitude and longitude of the driving segment, wherein each driving road corresponds to at least one designated driving segment; The second determining module is used to determine the candidate road corresponding to each cluster category based on the multiple driving roads and the cluster category corresponding to each specified driving segment; The third determining module is used to determine the test road from the candidate roads corresponding to the multiple clustering categories.
15. An electronic device, characterized in that, include: One or more processors; Memory; And one or more computer programs, wherein the one or more computer programs are stored in the memory, the one or more computer programs including instructions that, when executed by the electronic device, cause the electronic device to perform the test road generation method according to any one of claims 1 to 13.
16. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein, when the program is executed, it controls the electronic device in which the computer-readable storage medium resides to perform the test road generation method according to any one of claims 1 to 13.