A method for generating random route spectrum based on multi-algorithm competition and splicing of micro-travels
By using a multi-algorithm competition and micro-trajectory splicing method, the problems of single algorithm, insufficient physical feasibility and one-sided evaluation system in the existing technology are solved. The method generates a synthetic road spectrum that is best represented in multiple dimensions, thereby improving the effectiveness of engine bench testing and equipment durability.
Patent Information
- Application Number
- CN202611146746.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-30
- Publication Date
- 2026-11-10
AI Technical Summary
Existing synthetic road spectrum generation technologies suffer from problems such as single and rigid algorithms, insufficient physical feasibility, one-sided evaluation systems, and lack of quantitative basis for decision-making. These issues lead to synthetic road spectrum generation being unable to be performed on engine test benches or causing abnormal vibrations and wear.
A method of competing and splicing micro-travel segments using multiple algorithms is adopted. Seven machine learning clustering algorithms are called in parallel to classify and splice micro-travel segments. A speed difference threshold constraint is introduced, and a multi-dimensional quantitative evaluation system is constructed to automatically recommend the optimal algorithm and parameter configuration.
Generate synthetic road profiles that are best representative of the original operating conditions across multiple key statistical dimensions, ensuring physical feasibility and engineering usability, and improving the effectiveness of bench tests and the durability of equipment.
Smart Images

Figure CN123069540A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of engine micro-travel path spectrum generation methods, and in particular to a random path spectrum generation method based on multi-algorithm competition and splicing of micro-travels. Background Technology
[0002] In vehicle durability and reliability verification and new product development, it is often necessary to reproduce various complex driving conditions on real roads in bench tests to simulate loads and life tests on key components and the entire vehicle system. The traditional approach is to directly collect real-world driving data from several prototype vehicles as the driving input for bench tests. However, this test-based method has significant inherent drawbacks. First, due to high time and economic costs, the total amount of data that can be collected is often extremely limited, containing only a small number of vehicles' driving records over a specific period. The statistical representativeness of this sample is severely insufficient, making it difficult to cover the diverse driving styles, road types, and usage environments of a broad user base. This results in a synthesized load spectrum that cannot fully reflect all possible loads in the real world. Second, bench durability tests often require hundreds or even thousands of hours, while limited-duration test data usually cannot directly meet or custom-generate equivalent load spectra for such long periods. Furthermore, certain extreme driving conditions caused by specific driver habits may be missing from the test data, causing bench tests based on this data to overlook the testing of corresponding critical failure modes, thus introducing potential quality risks.
[0003] To compensate for the shortcomings of measured road spectra, the industry has developed random road spectrum generation technology, represented by synthetic road spectra. The core idea is to extract statistically representative basic driving units from basic driving data and recombine them according to specific rules to construct synthetic driving scenarios that meet specified durations and statistical characteristics. Current mainstream technical solutions mainly include the following: First, the random sampling method, which involves randomly selecting several segments from the original data and simply splicing them together. While this method is simple to operate, it lacks statistical design, leading to a systematic deviation between the generated synthetic scenarios and the original data in terms of key feature distribution, resulting in poor representativeness. Second, the K-means method based on a single clustering algorithm has become the most commonly used synthetic path. This method extracts multi-dimensional features from the segmented micro-trips, uses the K-means algorithm for clustering, and then selects representative segments from each group for splicing. However, the K-means algorithm assumes that the data clusters are spherically convex, which is ineffective for classifying complex and irregularly shaped categories that may exist in actual driving data. Furthermore, the number of clusters, K, needs to be specified manually in advance, which introduces a degree of subjectivity and uncertainty. Thirdly, some studies have attempted to use Markov chain Monte Carlo methods to generate sequences by modeling the transition probabilities between micro-travels. Such methods can preserve the statistical transition properties of sequences to some extent, but they are sensitive to feature dimensionality, and model performance degrades significantly when the data is high-dimensional or sparse.
[0004] Existing synthetic road spectrum generation technologies generally suffer from the following limitations: First, the algorithms are singular and rigid. Most commercial tools or mature solutions rely solely on a single clustering algorithm. Users cannot ascertain whether there are other, superior algorithms capable of generating more representative road spectra for a specific dataset, lacking a mechanism for horizontal comparison and selection of different algorithms. Second, the generated synthetic road spectra are physically inadequate. Existing methods, when performing micro-stroke splicing, typically focus only on the surface continuity of velocity or acceleration signals, neglecting key physical parameters directly related to engine operating conditions, especially engine speed. This neglect can lead to physically impossible instantaneous and drastic jumps in engine speed before and after the splicing point; for example, one segment ends at a high speed, and the next segment immediately begins at a low speed. Such unrealistic conditions may be impossible to execute on an engine test bench or may cause abnormal vibration and wear, thus affecting the effectiveness of the experiment and the durability of the equipment. Third, the evaluation system is one-sided. The evaluation of synthesized road spectrum quality often relies solely on error comparisons of a few indicators such as the mean or variance of velocity distribution, lacking a comprehensive, multi-dimensional quantitative evaluation system. It fails to incorporate key dimensions such as acceleration distribution, the proportion of different driving modes, kinetic energy intensity, and the degree of adherence to physical constraints into the system's consideration. Fourth, decision-making lacks quantitative basis. Faced with multiple possible synthesis algorithms or parameter combinations, users lack an objective, automated evaluation and comparison tool to quantify the merits of each scheme and make the optimal choice accordingly. They typically rely on subjective judgment based on experience.
[0005] The information disclosed in this background section is intended only to enhance the understanding of the overall background of the invention and should not be construed as an admission or in any way implying that the information constitutes prior art known to those skilled in the art. Summary of the Invention
[0006] The purpose of this invention is to provide a random route spectrum generation method based on multi-algorithm competition and splicing of micro-travels, thereby solving the problems in the background technology.
[0007] To achieve the above objectives, this invention provides a method for generating random road spectrum based on multi-algorithm competition and micro-travel concatenation, comprising the following steps: S1: Preprocessing and interpolating the original driving data from the vehicle ECU to obtain uniform and clean time-series data; S2: Performing micro-travel segmentation on the resampled time-series data, dividing the driving data into multiple micro-travel segments with consecutive stopping events as boundaries, and extracting a vector with 16-dimensional features contained in each micro-travel segment, wherein the 16-dimensional feature vector includes 13-dimensional features representing speed features and 3-dimensional rotational speed features; S3: Parallel invoking seven machine learning clustering algorithms through a unified data interface to process the data. All micro-travel segments are classified so that each algorithm outputs a corresponding cluster group; S4: For all the cluster groups, within each group, a representative micro-travel segment is selected based on the distance between the micro-travel segment and the feature center within the group; S5: For the selected representative micro-travel segment sequence, a physical constraint-based splicing operation is performed. When connecting two adjacent micro-travel segments, a speed difference threshold constraint is applied, and it is checked whether the absolute difference between the ending speed of the previous micro-travel segment and the starting speed of the next micro-travel segment is not greater than a preset physical allowable threshold; S6: If the speed difference threshold constraint is met, the micro-travel segment splicing is performed. This forms a continuous composite data segment. If the speed difference constraint is not met, another candidate segment that meets the speed difference constraint must be selected from the pool of representative micro-stroke segments to replace and reassemble the data. If no candidate segment that meets the constraint can be found, the constraint can be ignored, but the splicing event that violates the constraint must be recorded. S7: The composite data obtained by splicing through the speed difference constraint, i.e., the composite road spectrum, is evaluated using a comprehensive multi-dimensional quantitative evaluation index system to obtain the comprehensive representative quantitative score of the composite road spectrum. The evaluation index system includes at least a subclass of index reflecting velocity distribution error and a subclass reflecting acceleration distribution error. The algorithm is further divided into three subclasses: index subclasses reflecting the proportion of driving modes and index subclasses reflecting the degree of compliance with the speed difference constraint; S8: Based on the comprehensive representative quantitative score, the synthetic road spectra generated by all 7 tested machine learning clustering algorithms are quantitatively ranked according to their comprehensive performance, forming a list of algorithm PK rankings, and automatically recommending an optimal clustering algorithm and corresponding optimal parameter configuration scheme based on the PK ranking list; wherein, the 7 machine learning clustering algorithms specifically include K-means algorithm, Gaussian Mixture Model (GMM) algorithm, density-based DBSCAN algorithm, Ward's hierarchical clustering algorithm, One-Class SVM support vector machine algorithm, Autoencoder combined with K-means algorithm, and mean drift algorithm.
[0008] In one embodiment of the present invention, step S1 specifically includes: S11: reading field data containing timestamps, vehicle speed, engine speed, throttle opening, and torque signals from the original ECU driving data file in CSV format; S12: performing a first-stage preprocessing on the field data to remove all data rows with missing values and delete duplicate rows; S13: performing a second-stage preprocessing on the field data containing vehicle speed to trim the numerical range of the vehicle speed data to a set actual physical possible range of 0 to 200 km / h; S14: performing a second-stage preprocessing on the field data containing engine speed to trim all speed values to a minimum physical limit greater than or equal to 0; S15: performing linear interpolation on the field data processed by steps S11-S14 until the data sequence is resampled to a time interval strictly of 1 second, obtaining standardized time-series data that can be used for subsequent micro-stroke cutting.
[0009] In one embodiment of the present invention, step S2 further includes:
[0010] S21: Define the parking judgment rule as the vehicle speed is maintained at an extremely low speed of less than or equal to 0.5 km / h for a continuous period of time not less than 3 seconds. Identify the continuous period of time that meets the parking judgment rule as a parking segment, and define the driving data sandwiched between adjacent parking segments as a micro-trip.
[0011] S22: While performing the micro-stroke cutting in step S21, the same segmentation operation is performed simultaneously on the vehicle speed sequence and the engine speed sequence to determine the time correspondence between the vehicle speed point and the engine speed point in each micro-stroke segment.
[0012] S23: For any micro-travel segment with a duration of less than 10 seconds that is too short, discard it and generate the remaining data as valid data;
[0013] S24: Extract all features constituting the 16-dimensional feature vector from the internal driving data of the segment of the valid data;
[0014] Among the 16-dimensional features, the 13-dimensional features representing speed characteristics include: the total duration of the micro-trip, the total distance traveled in the micro-trip, the average speed of the vehicle within the micro-trip segment, the maximum speed reached by the vehicle within the micro-trip segment, the 95th percentile value of the vehicle speed within the micro-trip segment, the standard deviation of the vehicle speed within the micro-trip segment, the average acceleration of the vehicle within the micro-trip segment, the average deceleration of the vehicle within the micro-trip segment, the time proportion of idling state within the micro-trip segment, the time proportion of cruising state within the micro-trip segment, and the average kinetic energy intensity (PKE) calculated from all data points within the micro-trip segment;
[0015] Among the 16-dimensional features, the 3-dimensional rotational speed feature includes: the initial engine speed recorded at the start time of the micro-travel segment, the final engine speed recorded at the end time of the micro-travel segment, and the average value of the engine speed recorded throughout the entire micro-travel segment.
[0016] In one embodiment of the present invention, the clustering grouping in step S3 includes:
[0017] S31: For each cluster group output after processing by the seven machine learning clustering algorithms, calculate the Euclidean distance between the feature vectors of all micro-travel segments belonging to the cluster group and the center of the feature vectors within the cluster group.
[0018] S32: Establish and store a data mapping table containing the distance values between each micro-travel segment in the cluster group and its feature center within the group;
[0019] S33: For each micro-travel segment in the cluster group, a quantitative index of its representativeness is defined based on the magnitude of its distance value; wherein, the magnitude of the distance value of the micro-travel segment is inversely proportional to the magnitude of its representativeness;
[0020] S34: Select the most representative micro-travel segment as the final representative segment for clustering;
[0021] S35: For each cluster group obtained by the algorithm, the above-mentioned distance and probability-based selection operation is performed independently, and finally a set of selected representative micro-travel segments representing the characteristics of all groups is generated.
[0022] In one embodiment of the present invention, step S6 includes:
[0023] Check the speed difference between the beginning and end of adjacent micro-strokes: if |Δrpm| ≤ 50, splicing is allowed; otherwise, select another from the candidate pool; if there are no compliant candidates, ignore the constraints and record the violation; insert a 3-second transition segment between adjacent segments to ensure continuity.
[0024] In one embodiment of the present invention, step S7 includes:
[0025] S71: Define a comprehensive representative score with a total score of 0 to 100 as a total index for quantitatively evaluating the quality of the synthetic road spectrum;
[0026] S72: Construct a weighted calculation model for six categories of indicators, including: speed distribution error, acceleration distribution error, driving mode error, speed constraint, KL divergence, and Pearson correlation coefficient;
[0027] S73: Assign weights to the six dimensions, specifically: speed distribution error accounts for 28%, acceleration distribution error accounts for 23%, driving mode error accounts for 24%, speed constraint accounts for 10%, KL divergence accounts for 10%, and Pearson correlation coefficient accounts for 5%. Calculate the weighted comprehensive score and assign a rating.
[0028] Secondly, the present invention provides a random route spectrum generation system based on multi-algorithm competition and micro-trip concatenation. Based on the same concept as the aforementioned random route spectrum generation method based on multi-algorithm competition and micro-trip concatenation, it includes multiple execution modules. The execution modules implement the aforementioned random route spectrum generation method based on multi-algorithm competition and micro-trip concatenation during runtime.
[0029] Thirdly, the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor, when executing the computer program, implements the aforementioned method for generating random route spectrum based on multi-algorithm competition and splicing micro-travels.
[0030] Fourthly, the present invention provides a non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that the computer program, when executed by a processor, implements the aforementioned method for generating random route spectrum based on multi-algorithm competition and splicing of micro-travels.
[0031] Compared with the prior art, the present invention has the following technical advantages:
[0032] By running seven mainstream machine learning clustering algorithms in parallel and constructing a weighted comprehensive evaluation system covering multiple dimensions such as speed distribution error, acceleration distribution error, and driving mode ratio error, the system automatically quantifies and scores the road spectra generated by all algorithms and forms a PK ranking. This changes the limitations of the traditional single K-means algorithm. Through the selection mechanism of multi-algorithm competition, it ensures that no matter what distribution characteristics of real driving data are faced, the optimal algorithm that best matches the current data characteristics can be selected, and a synthetic road spectrum that is most representative of the original working conditions on multiple key statistical dimensions can be generated.
[0033] By introducing physical constraints in the micro-stroke splicing process, namely checking and controlling whether the difference in engine speed between the first and last engines of adjacent segments does not exceed a preset threshold, and combining this with a conditional replacement mechanism and transition processing, the physical feasibility and engineering usability of the synthesized road spectrum are satisfied. Attached Figure Description
[0034] Figure 1 This is a schematic diagram of the overall process of a random route spectrum generation method based on multi-algorithm competition and splicing of micro-travels;
[0035] Figure 2This is a schematic diagram of the overall process of a random route spectrum generation scheme based on multi-algorithm competition and micro-travel splicing. Detailed Implementation
[0036] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings, but it should be understood that the scope of protection of the present invention is not limited to the specific embodiments.
[0037] Unless otherwise expressly stated, throughout the specification and claims, the term "comprising" or its variations such as "including" or "comprises" shall be understood to include the stated elements or components without excluding other elements or other components.
[0038] Example 1:
[0039] This embodiment provides a random road spectrum generation method based on multi-algorithm competition and micro-travel concatenation, including the following steps: S1: Preprocessing and interpolating the original driving data of the vehicle ECU to obtain uniform and clean time series data; S2: Performing micro-travel segmentation on the resampled time series data, dividing the driving data into multiple micro-travel segments with consecutive stopping events as boundaries, and extracting a vector with 16-dimensional features contained in each micro-travel segment, wherein the 16-dimensional feature vector includes 13-dimensional features representing speed features and 3-dimensional speed features; S3: Parallel invoking 7 machine learning clustering algorithms through a unified data interface to process all micro-travels. The segments are classified so that each algorithm outputs a corresponding cluster group; S4: For all the cluster groups, within each group, a representative micro-travel segment is selected based on the distance between the micro-travel segment and the feature center within the group; S5: For the selected representative micro-travel segment sequence, a physical constraint-based splicing operation is performed. When connecting two adjacent micro-travel segments, a speed difference threshold constraint is applied, and it is checked whether the absolute difference between the ending speed of the previous micro-travel segment and the starting speed of the next micro-travel segment is not greater than a preset physical allowable threshold; S6: If the speed difference threshold constraint is met, the micro-travel segments are spliced to form The entire continuous synthetic data; if the speed difference constraint condition is not met, another candidate segment that can meet the speed difference constraint condition needs to be selected from the candidate representative micro-stroke segment pool to replace and reassemble. If no candidate segment that meets the constraint condition can be found, the constraint can be ignored, but the splicing event that violates the constraint must be recorded; S7: The synthetic road spectrum obtained by splicing through the speed difference constraint is evaluated using a comprehensive multi-dimensional quantitative evaluation index system to obtain the comprehensive representative quantitative score of the synthetic road spectrum. The evaluation index system includes at least an index subclass reflecting velocity distribution error and an index reflecting acceleration distribution error. Subclasses, index subclasses reflecting the proportion of driving modes, and index subclasses reflecting the degree of compliance with the speed difference constraint; S8: Based on the comprehensive representative quantitative score, the comprehensive performance of the synthetic road spectra generated by all 7 tested machine learning clustering algorithms is quantitatively ranked to form a list of algorithm PK rankings, and an optimal clustering algorithm and corresponding optimal parameter configuration scheme are automatically recommended based on the PK ranking list; wherein, the 7 machine learning clustering algorithms specifically include K-means algorithm, Gaussian Mixture Model (GMM) algorithm, density-based DBSCAN algorithm, Ward's hierarchical clustering algorithm, One-Class SVM support vector machine algorithm, Autoencoder combined with K-means algorithm, and mean drift algorithm.
[0040] Specifically, this embodiment discloses the overall process of a random road spectrum generation method based on multi-algorithm competition and micro-trip concatenation. In practice: First, raw driving data exported from the vehicle ECU, typically in CSV format, is cleaned and standardized. This data may contain missing values, outliers, and non-uniform sampling intervals. Further, data cleaning and numerical trimming are performed, and linear interpolation resampling is applied to the time axis to ensure a time series with second-level uniformity and good data quality. Second, the preprocessed time series data is segmented into micro-trips. This step uses consecutive stopping events as the segmentation boundary. For example, a period where the vehicle speed is continuously below 0.5 km / h for more than 3 seconds is identified as a stop, and the driving data between two adjacent stops is defined as a micro-trip. From each micro-trip segment, a total of 16-dimensional feature vectors are extracted, including 13 statistics reflecting speed characteristics and 3 newly added speed features. Next, through a pre-defined unified data call interface, seven machine learning clustering algorithms—K-means, Gaussian mixture model, DBSCAN, Ward hierarchical clustering, One-Class SVM, autoencoder combined with K-means, and mean shift—are run in parallel to classify all micro-travel segments. Each algorithm divides all segments into different groups. Then, for each cluster group output by each algorithm, the most representative micro-travel segment is selected based on the Euclidean distance between the feature vector of each micro-travel segment within the group and the feature center of the group. Subsequently, one of the core steps is to perform physical constraint-based splicing: the selected representative segments are arranged in the grouping order or random order. When splicing two segments, the absolute difference between the ending speed of the previous segment and the starting speed of the next segment is forcibly checked to see if it exceeds a preset physical allowable threshold, preferably such as 50 rpm. If the difference is within the threshold, the splicing is valid; if it exceeds the threshold, a segment that satisfies the speed continuity must be selected from other candidate segments in the same group to replace it. If no suitable segment is found, the constraints are relaxed and splicing continues, with violations recorded as a prerequisite. A 3-second linear transition segment is inserted at the segment connection to ensure a smooth curve. Subsequently, all synthesized road maps independently generated by the algorithms through the above process are comprehensively evaluated using a quantitative evaluation index system covering multiple dimensions such as speed distribution, acceleration distribution, driving mode ratio, and compliance with speed constraints, calculating a comprehensive representative score from 0 to 100. Finally, based on this comprehensive score, the road maps generated by the seven algorithms are sorted in descending order to form a PK ranking list, and the algorithm with the highest score and its corresponding parameter configuration are automatically recommended as the optimal solution for processing the current input data.
[0041] This implementation method systematically solves the problem of limited adaptability in traditional methods due to reliance on a single algorithm by constructing a quantitative evaluation and ranking system that integrates multiple parallel algorithms and unified physical constraints. The parallel competition among seven algorithms ensures that when faced with real driving data with different distribution characteristics, the system can always find the classification method that best matches the current data characteristics, thereby improving the accuracy and reliability of the micro-trip output results.
[0042] In one preferred embodiment, step S1 specifically includes:
[0043] S11: Read field data containing timestamps, vehicle speed, engine speed, throttle opening, and torque signals from the raw ECU driving data file in CSV format;
[0044] S12: Perform the first stage preprocessing on the field data, remove all data rows with missing values in the data records, and delete duplicate rows in the data records;
[0045] S13: Perform second-stage 2-segment preprocessing on the field data containing vehicle speed to crop the numerical range of the vehicle speed data to the set actual physical possible range of 0 to 200 km / h;
[0046] S14: Perform a second stage of preprocessing on the field data containing engine speed, cropping all speed values to a minimum physical limit greater than or equal to 0;
[0047] S15: Perform linear interpolation on the field data obtained after steps S11-S14 until the data sequence is resampled to a time interval of strictly 1 second, to obtain normalized time-series data that can be used for subsequent micro-travel segmentation.
[0048] Specifically, this implementation method is a detailed refinement of step S1 in implementation method one. In practice: First, the system reads the specified original ECU driving data file in CSV format from the storage device. This file contains at least the timestamp, vehicle speed, engine speed, throttle opening, and torque signal. After reading, the system performs the first stage of preprocessing: scanning all data rows and deleting any entire row with missing data in any core field to ensure data integrity; simultaneously, it checks and removes completely duplicate data rows to avoid bias in subsequent statistics. Then, the system proceeds to the second stage of data range limiting processing: for the vehicle speed field, all recorded vehicle speed values are cropped to a reasonable physical range of 0 to 200 km / h to eliminate unreasonable data such as negative speeds or extreme speeds caused by sensor malfunctions; for the engine speed field, all recorded engine speed values are cropped to a physical lower limit greater than or equal to 0 to ensure the data conforms to reality. Since the original ECU data may have uneven sampling intervals or slight time jitter, a linear interpolation algorithm is used to resample the cleaned data, converting the non-uniform time series into a strictly uniform time series with one data point per second. The purpose of this implementation is to ensure that the vehicle speed time series and the engine speed time series are strictly aligned point-to-point on the time axis, so as to provide a guarantee for subsequent accurate micro-stroke cutting and feature extraction.
[0049] In a preferred embodiment, step S2 further includes:
[0050] S21: Define the parking judgment rule as the vehicle speed is maintained at an extremely low speed of less than or equal to 0.5 km / h for a continuous period of time not less than 3 seconds. Identify the continuous period of time that meets the parking judgment rule as a parking segment, and define the driving data sandwiched between adjacent parking segments as a micro-trip.
[0051] S22: While performing the micro-stroke cutting in step S21, the same segmentation operation is performed simultaneously on the vehicle speed sequence and the engine speed sequence to determine the time correspondence between the vehicle speed point and the engine speed point in each micro-stroke segment.
[0052] S23: For any micro-travel segment with a duration of less than 10 seconds that is too short, discard it and generate the remaining data as valid data;
[0053] S24: Extract all features constituting the 16-dimensional feature vector from the internal driving data of the segment of the valid data;
[0054] Among the 16-dimensional features, the 13-dimensional features representing speed characteristics include: the total duration of the micro-trip, the total distance traveled in the micro-trip, the average speed of the vehicle within the micro-trip segment, the maximum speed reached by the vehicle within the micro-trip segment, the 95th percentile value of the vehicle speed within the micro-trip segment, the standard deviation of the vehicle speed within the micro-trip segment, the average acceleration of the vehicle within the micro-trip segment, the average deceleration of the vehicle within the micro-trip segment, the time proportion of idling state within the micro-trip segment, the time proportion of cruising state within the micro-trip segment, and the average kinetic energy intensity (PKE) calculated from all data points within the micro-trip segment;
[0055] Among the 16-dimensional features, the 3-dimensional rotational speed feature includes: the initial engine speed recorded at the start time of the micro-travel segment, the final engine speed recorded at the end time of the micro-travel segment, and the average value of the engine speed recorded throughout the entire micro-travel segment.
[0056] Specifically, this implementation method is a detailed refinement of step S2 in implementation method two. In practice: the system first defines the logic for determining parking. Preferably, a parking segment is identified when the vehicle speed remains at an extremely low level of less than or equal to 0.5 km / h for at least 3 consecutive seconds. Using this parking determination rule, the system scans a vehicle speed sequence with uniform 1-second intervals, defining all driving data points between two adjacent parking segments as an independent micro-journey. During the process of cutting the time axis according to vehicle speed, the system simultaneously cuts the engine speed sequence into segments with identical start and end points, ensuring that within each micro-journey segment, each speed data point corresponds exactly to a speed data point at the same moment. All cut micro-journeys are then filtered; segments shorter than 10 seconds are discarded, and only segments with a duration ≥ 10 seconds are retained as valid data for further processing. For each valid micro-journey segment, the system automatically calculates and extracts a set of 16-dimensional statistical feature vectors from its internal data points. These features include: 13-dimensional features extracted from speed information, namely total duration of micro-travel, total distance traveled, average speed, maximum speed, 95th percentile speed (i.e., speed values exceeding 95% of data points, representing typical high-speed segments), speed standard deviation, average acceleration, average deceleration, the proportion of idling time to total time, the proportion of cruising time, and the average kinetic energy intensity calculated from all points; and 3-dimensional features extracted from rotational speed information, namely the rotational speed at the start of the segment, the rotational speed at the end of the segment, and the average rotational speed throughout the segment.
[0057] In a preferred embodiment, the clustering grouping in step S3 includes:
[0058] S31: For each cluster group output after processing by the seven machine learning clustering algorithms, calculate the Euclidean distance between the feature vectors of all micro-travel segments belonging to the cluster group and the center of the feature vectors within the cluster group.
[0059] S32: Establish and store a data mapping table containing the distance values between each micro-travel segment in the cluster group and its feature center within the group;
[0060] S33: For each micro-travel segment in the cluster group, a quantitative index of its representativeness is defined based on the magnitude of its distance value; wherein, the magnitude of the distance value of the micro-travel segment is inversely proportional to the magnitude of its representativeness;
[0061] S34: Select the most representative micro-travel segment as the final representative segment for clustering;
[0062] S35: For each cluster group obtained by the algorithm, the above-mentioned distance and probability-based selection operation is performed independently, and finally a set of selected representative micro-travel segments representing the characteristics of all groups is generated.
[0063] Specifically, in this implementation, when selecting segments, it does not simply always choose the closest and most representative segment. Instead, it sets a fixed probability (preferably 70%) to select the closest segment, while reserving a certain probability (preferably 30%) to randomly select a segment from that group. This mechanism avoids the final synthesized path spectrum from being too smooth due to being composed entirely of the most typical segments, thus losing some of the natural variability in the original data. For each group output by all clustering algorithms, the above-described strategy based on distance calculation and probabilistic selection is executed independently. Ultimately, each synthesized path generated by a single clustering algorithm is a sequence set composed of a representative segment from all its groups.
[0064] In a preferred embodiment, step S6 includes:
[0065] Check the speed difference between the beginning and end of adjacent micro-strokes: if |Δrpm| ≤ 50, splicing is allowed; otherwise, select another from the candidate pool; if there are no compliant candidates, ignore the constraints and record the violation; insert a 3-second transition segment between adjacent segments to ensure continuity.
[0066] Specifically, this implementation introduces a speed difference threshold check mechanism. Existing methods only focus on speed continuity, and the synthesized road spectrum may not be executable on an engine test bench because drastic instantaneous changes in engine speed can cause controller errors or mechanical damage. This implementation ensures that the engine operating conditions at the connection point of any two driving condition segments to be spliced together are continuously and gradually changing, conforming to the dynamic response characteristics of a real engine.
[0067] In a preferred embodiment, step S7 includes:
[0068] S71: Define a comprehensive representative score with a total score of 0 to 100 as a total index for quantitatively evaluating the quality of the synthetic road spectrum;
[0069] S72: Construct a weighted calculation model for six categories of indicators, including: speed distribution error, acceleration distribution error, driving mode error, speed constraint, KL divergence, and Pearson correlation coefficient;
[0070] S73: Assign weights to the six dimensions, specifically: speed distribution error accounts for 28%, acceleration distribution error accounts for 23%, driving mode error accounts for 24%, speed constraint accounts for 10%, KL divergence accounts for 10%, and Pearson correlation coefficient accounts for 5%. Calculate the weighted comprehensive score and assign a rating.
[0071] Example 2:
[0072] A random route spectrum generation system based on multi-algorithm competition and micro-trip concatenation, based on the same concept as the aforementioned random route spectrum generation method based on multi-algorithm competition and micro-trip concatenation, includes multiple execution modules, which implement the aforementioned random route spectrum generation method based on multi-algorithm competition and micro-trip concatenation during runtime.
[0073] Example 3:
[0074] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor, when executing the computer program, implements the aforementioned method for generating random route spectrum based on multi-algorithm competition and splicing micro-travels.
[0075] Example 4:
[0076] A non-transitory computer-readable storage medium storing a computer program, characterized in that, when the computer program is executed by a processor, it implements a random route spectrum generation method based on multi-algorithm competition and micro-travel splicing.
[0077] The foregoing description of specific exemplary embodiments of the invention is for illustrative and explanatory purposes. These descriptions are not intended to limit the invention to the precise forms disclosed, and it will be apparent that many changes and variations can be made in accordance with the foregoing teachings. The exemplary embodiments were chosen and described in order to explain the specific principles of the invention and its practical application, thereby enabling those skilled in the art to implement and utilize various different exemplary embodiments of the invention, as well as various different choices and variations. The scope of the invention is intended to be defined by the claims and their equivalents.
Claims
1. A method for generating random route spectrum based on multi-algorithm competition and splicing of micro-travels, characterized in that, Includes the following steps: S1: Preprocess and interpolate the raw driving data from the vehicle ECU to obtain uniform and clean time series data; S2: Perform micro-travel segmentation on the resampled time series data, dividing the driving data into multiple micro-travel segments with continuous stopping events as boundaries, and extracting a vector with 16-dimensional features contained in each micro-travel segment. The 16-dimensional feature vector includes 13-dimensional features representing speed features and 3-dimensional rotational speed features. S3: Seven machine learning clustering algorithms are called in parallel through a unified data interface to classify all micro-travel segments, so that each algorithm outputs a corresponding cluster group; S4: For all the clustering groups, within each group, select a representative micro-travel segment based on the distance between the micro-travel segment and the feature center within the group; S5: For the selected representative micro-stroke segment sequence, perform a splicing operation based on physical constraints. When connecting two adjacent micro-stroke segments, apply a speed difference threshold constraint condition and check whether the absolute difference between the end speed of the previous micro-stroke segment and the start speed of the next micro-stroke segment is not greater than the preset physical allowable threshold. S6: If the speed difference threshold constraint is met, the micro-stroke segments are spliced to form a continuous synthetic data segment; if the speed difference constraint is not met, another candidate segment that can meet the speed difference constraint needs to be selected from the pool of representative micro-stroke segments to replace and splice the data. If no candidate segment that meets the constraint can be found, the constraint can be ignored, but the splicing event that violates the constraint must be recorded. S7: The synthesized road spectrum obtained by stitching together the data through the speed difference constraint is evaluated using a comprehensive multi-dimensional quantitative evaluation index system to obtain a comprehensive representative quantitative score of the synthesized road spectrum. The evaluation index system includes at least a subclass of index reflecting speed distribution error, a subclass of index reflecting acceleration distribution error, a subclass of index reflecting the proportion of driving modes, and a subclass of index reflecting the degree of compliance with the speed difference constraint. S8: Based on the comprehensive representative quantitative score, the synthetic road spectrum generated by all 7 tested machine learning clustering algorithms is quantitatively ranked according to its comprehensive performance, forming a list of algorithm PK rankings, and automatically recommending the best clustering algorithm and the corresponding optimal parameter configuration scheme according to the PK ranking list. The seven machine learning clustering algorithms specifically include the K-means algorithm, the Gaussian Mixture Model (GMM) algorithm, the density-based DBSCAN algorithm, the Ward method for hierarchical clustering, the One-Class SVM support vector machine algorithm, the Autoencoder combined with K-means algorithm, and the mean shift algorithm.
2. The random route spectrum generation method based on multi-algorithm competition and micro-trip concatenation as described in claim 1, characterized in that, Step S1 specifically includes: S11: Read field data containing timestamps, vehicle speed, engine speed, throttle opening and torque signal from the raw ECU driving data file in CSV format; S12: Perform the first stage preprocessing on the field data, remove all data rows with missing values in the data records, and delete duplicate rows in the data records; S13: Perform a second-stage preprocessing on the field data containing vehicle speed, cropping the numerical range of the vehicle speed data to a set actual physical possible range of 0 to 200 km / h; S14: Perform a second stage of preprocessing on the field data containing engine speed, cropping all speed values to a minimum physical limit greater than or equal to 0; S15: Perform linear interpolation on the field data obtained after steps S11-S14 until the data sequence is resampled to a time interval of strictly 1 second, to obtain normalized time-series data that can be used for subsequent micro-travel segmentation.
3. The random route spectrum generation method based on multi-algorithm competition and micro-trip concatenation as described in claim 2, characterized in that, Step S2 further includes: S21: Define the parking judgment rule as the vehicle speed is maintained at an extremely low speed of less than or equal to 0.5 km / h for a continuous period of time not less than 3 seconds. Identify the continuous period of time that meets the parking judgment rule as a parking segment, and define the driving data sandwiched between adjacent parking segments as a micro-trip. S22: While performing the micro-stroke cutting in step S21, the same segmentation operation is performed simultaneously on the vehicle speed sequence and the engine speed sequence to determine the time correspondence between the vehicle speed point and the engine speed point in each micro-stroke segment. S23: For any micro-travel segment with a duration of less than 10 seconds that is too short, discard it and generate the remaining data as valid data; S24: Extract all features constituting the 16-dimensional feature vector from the internal driving data of the segment of the valid data; Among the 16-dimensional features, the 13-dimensional features representing speed characteristics include: the total duration of the micro-trip, the total distance traveled in the micro-trip, the average speed of the vehicle within the micro-trip segment, the maximum speed reached by the vehicle within the micro-trip segment, the 95th percentile value of the vehicle speed within the micro-trip segment, the standard deviation of the vehicle speed within the micro-trip segment, the average acceleration of the vehicle within the micro-trip segment, the average deceleration of the vehicle within the micro-trip segment, the time proportion of idling state within the micro-trip segment, the time proportion of cruising state within the micro-trip segment, and the average kinetic energy intensity (PKE) calculated from all data points within the micro-trip segment; Among the 16-dimensional features, the 3-dimensional rotational speed feature includes: the initial engine speed recorded at the start time of the micro-travel segment, the final engine speed recorded at the end time of the micro-travel segment, and the average value of the engine speed recorded throughout the entire micro-travel segment.
4. The random route spectrum generation method based on multi-algorithm competition and micro-trip concatenation as described in claim 3, characterized in that, The clustering grouping in step S3 includes: S31: For each cluster group output after processing by the seven machine learning clustering algorithms, calculate the Euclidean distance between the feature vectors of all micro-travel segments belonging to the cluster group and the center of the feature vectors within the cluster group. S32: Establish and store a data mapping table containing the distance values between each micro-travel segment in the cluster group and its feature center within the group; S33: For each micro-travel segment in the cluster group, a quantitative index of its representativeness is defined based on the magnitude of its distance value; wherein, the magnitude of the distance value of the micro-travel segment is inversely proportional to the magnitude of its representativeness; S34: Select the most representative micro-travel segment as the final representative segment for clustering; S35: For each cluster group obtained by the algorithm, the above-mentioned distance and probability-based selection operation is performed independently, and finally a set of selected representative micro-travel segments representing the characteristics of all groups is generated.
5. The random route spectrum generation method based on multi-algorithm competition and micro-trip concatenation as described in claim 4, characterized in that, Step S6 includes: Check the speed difference between the beginning and end of adjacent micro-strokes: if |Δrpm| ≤ 50, splicing is allowed; otherwise, select another from the candidate pool; if there are no compliant candidates, ignore the constraints and record the violation; insert a 3-second transition segment between adjacent segments to ensure continuity.
6. The random route spectrum generation method based on multi-algorithm competition and micro-trip concatenation as described in claim 5, characterized in that, Step S7 includes: S71: Define a comprehensive representative score with a total score of 0 to 100 as a total index for quantitatively evaluating the quality of the synthetic road spectrum; S72: Construct a weighted calculation model for six categories of indicators, including: speed distribution error, acceleration distribution error, driving mode error, speed constraint, KL divergence, and Pearson correlation coefficient; S73: Assign weights to the six dimensions, specifically: speed distribution error accounts for 28%, acceleration distribution error accounts for 23%, driving mode error accounts for 24%, speed constraint accounts for 10%, KL divergence accounts for 10%, and Pearson correlation coefficient accounts for 5%. Calculate the weighted comprehensive score and assign a rating.
7. A random route spectrum generation system based on multi-algorithm competition and micro-route splicing, based on the same concept as the random route spectrum generation method based on multi-algorithm competition and micro-route splicing described in any one of claims 1-6, characterized in that, It includes multiple execution modules, which implement the aforementioned method for generating random route spectrum based on multi-algorithm competition and splicing of micro-travels during runtime.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements a random route spectrum generation method based on multi-algorithm competition and micro-travel splicing as described in any one of claims 1 to 6.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements a random route spectrum generation method based on multi-algorithm competition and micro-trip stitching as described in any one of claims 1 to 6.
