Road slope parameter identification method and system based on recurrent neural network

By establishing road slope parameter identification models with different structures on the recurrent neural network, the problem of insufficient downhill identification accuracy of complex terrain and poor signal environments is solved, and higher recognition accuracy and real-time performance are achieved, improving the dynamic performance of the vehicle under complex terrain conditions and the performance of the intelligent driving control system.

CN119741837AInactive Publication Date: 2025-04-01JILIN UNIVERSITY +1

Patent Information

Application Number
CN202510247381.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-04
Publication Date
2025-04-01
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art problems of insufficient accuracy in downhill recognition of complex terrain and poor signal environments, poor real-time performance, and insufficient flexibility of intelligent control systems.

Method used

The road slope parameter identification method based on recurrent neural network is adopted, and the slope data of the vehicle passing through the road slope is collected, and the slope parameter identification model of different structures is established by using recurrent neural network models such as RNN, LSTM and GRU, and the model parameters are trained and optimized to improve the accuracy and real-time identification.

Benefits of technology

It significantly improves the accuracy and real-timeness of road slope recognition, improves the dynamic performance and driving control accuracy of engineering vehicles under complex terrain conditions, enhances the performance of intelligent driving control systems, and ensures the safe and efficient operation of the vehicles under various road conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119741837A_ABST
    Figure CN119741837A_ABST
Patent Text Reader

Abstract

The invention discloses a road slope parameter identification method and system based on a recurrent neural network, and relates to the technical field of data processing. The method comprises the following steps: acquiring gradient data of a road gradient through which a vehicle passes, and dividing the gradient data into a training set, a verification set and a test set; preprocessing the gradient data, and converting the preprocessed gradient data into a three-dimensional structure by using a sliding window method; establishing gradient parameter identification models of different structures by adopting different recurrent neural networks; initializing a network structure and hyper-parameters of each model, identifying the model for each gradient parameter, training the model by using the training set and the verification set, and updating model parameters; and inputting the test set into each trained model, verifying the precision and generalization ability of each model, performing comparative analysis to obtain an optimal slope parameter identification model, and obtaining a vehicle road slope parameter identification result. According to the invention, the road gradient can be monitored and predicted in real time, and the accuracy and real-time performance of road gradient identification are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a road slope parameter identification method and system based on a recurrent neural network. Background Art

[0002] In complex terrain or changing environments, accurate identification of road slope parameters is a key factor in improving driving safety and energy efficiency, and helps optimize the vehicle's control strategy, thereby achieving safe and efficient driving. Traditional slope detection methods mostly rely on sensors or GPS signals, which often perform poorly in complex terrain or weak signal conditions, limiting their application scope. Therefore, it is particularly important to develop a new road slope parameter identification method. Summary of the invention

[0003] In view of the problems of insufficient slope recognition accuracy, poor real-time performance and insufficient flexibility of the intelligent control system in the prior art under complex terrain and poor signal environments, the present invention provides a road slope parameter identification method and system based on a recurrent neural network. By using a recurrent neural network model to improve the accuracy and real-time performance of identification, the dynamic performance and driving control accuracy of engineering vehicles under complex terrain conditions are improved, the performance of the intelligent driving control system can be enhanced, and the safe and efficient operation of the vehicle under various road conditions can be ensured.

[0004] In order to achieve the above object, the present invention adopts the following technical solution: According to one aspect of the present invention, a road slope parameter identification method based on a recurrent neural network is provided, comprising: collecting slope data of a road slope through which a vehicle passes, dividing the slope data into a training set, a validation set and a test set; preprocessing the slope data, and converting the preprocessed slope data into a three-dimensional structure using a sliding window method; using different recurrent neural networks to establish slope parameter identification models with different structures, wherein the different recurrent neural networks include RNN, LSTM and GRU, and the different structures include a single-step output structure, a single-step output rolling iteration structure and a multi-step output structure; initializing the network structure and hyperparameters of each model, training the model using a training set and a validation set for each slope parameter identification model, updating the model parameters, and improving the fitting effect of the model by adjusting the hyperparameters and using an optimization algorithm; inputting the test set into each trained model, verifying the accuracy and generalization ability of each model, and obtaining the best slope parameter identification model through comparative analysis; using the best slope parameter identification model to obtain a vehicle road slope parameter identification result, and outputting a result set including slope value, slope change and slope feature segment information.

[0005] Optionally, the collecting of slope data of the road slope through which the vehicle passes, and dividing the slope data into a training set, a validation set and a test set includes: collecting the slope data of the road slope through which the vehicle passes according to a preset sampling interval, wherein the collected slope data includes the road slope, vehicle speed, driving distance and elevation; constructing a slope data set in the time sequence of collection, and dividing the slope data set into a training set, a validation set and a test set at a preset split ratio.

[0006] Optionally, the preprocessing of the slope data and converting the preprocessed slope data into a three-dimensional structure using a sliding window method includes: removing invalid data and abnormal data in the slope data, and using a minimum-maximum normalization method to scale the eigenvalues ​​of each data to between 0 and 1 to eliminate dimensional differences; setting the size N and stride of the sliding window; applying a sliding window to the normalized data, segmenting the data using the sliding window, extracting N consecutive time steps of data to generate input features, and recording the corresponding target output labels containing future short-term slope values; converting the generated input feature samples into a three-dimensional structure to adapt to the data format requirements of the recurrent neural network, wherein the three-dimensional structure refers to the structure of the data including three dimensions: sample size, time step, and number of features.

[0007] Optionally, the network structure and hyperparameters of each model are initialized including: if RNN is used to establish a slope parameter identification model, the slope parameter identification model is composed of stacked standard recurrent layers and fully connected layers, including an input layer, three recurrent layers, an activation function Tanh layer and an output layer; if LSTM is used to establish a slope parameter identification model, the slope parameter identification model is composed of stacked LSTM layers and fully connected layers, including an input layer, three LSTM layers and Dropout layers, Dense layers, activation function Relu layers and output layers; if GRU is used to establish a slope parameter identification model, the slope parameter identification model is composed of stacked GRU layers and fully connected layers, including an input layer, three GRU layers and Dropout layers, Dense layers, activation function Relu layers and output layers; for each slope parameter identification model, the number of network layers of the model, the number of neurons in each layer, the learning rate, the batch size, and the optimizer type are set.

[0008] Optionally, the method of training the model using the training set and the validation set, updating the model parameters, and improving the fitting effect of the model by adjusting the hyperparameters and using the optimization algorithm includes: model training: using the training set to perform multiple iterative training on the model, calculating the error between the predicted value and the actual value during forward propagation, and evaluating the model performance through a defined loss function; in each round of training, updating the model parameters through an optimizer to optimize the prediction ability of the model; back propagation and parameter update: during the training process, calculating the gradient of the loss function through a back propagation algorithm, and updating the network weights and biases based on the gradient; training the model through multiple rounds of iterations, and using the validation set to monitor the model performance, calculating the loss value of the validation set after each iteration, and if the loss of the validation set continues to decrease and the model is underfitting, then continue training; when the loss of the validation set reaches a preset value and no longer decreases within consecutive preset rounds, stop training to avoid overfitting.

[0009] Optionally, the model is trained multiple times iteratively using the training set, the error between the predicted value and the actual value is calculated during forward propagation, and the model performance is evaluated through a defined loss function, including: initializing model weights and biases: determining the input and output dimensions of each layer, and determining the weight initialization method based on the activation function; initializing the bias parameter to zero or a preset positive value to ensure that the symmetry of the network in the initial state is broken, prompting each neuron to learn in a different way; forward propagation, calculating the output of the hidden layer and the output layer: executing forward propagation, performing a linear transformation based on the input data and the initialized weights and biases, and calculating the input of the hidden layer; using the activation function to perform a nonlinear transformation on the hidden layer input to obtain the hidden layer output; multiplying the hidden layer output by the weight and bias of the output layer to calculate the input of the output layer; obtaining the predicted value through the activation function of the output layer; calculating the error between the predicted value and the actual value, and evaluating the model performance through the MSE loss function.

[0010] Optionally, the step of inputting the test set into each trained model to verify the accuracy and generalization ability of each model, and obtaining the best slope parameter identification model through comparative analysis includes: inputting the test set into each trained model to obtain the prediction results of each model; calculating the accuracy evaluation index of each model on the test set according to the prediction results, wherein the accuracy evaluation index includes mean square error (MSE), root mean square error (RMSE) and mean absolute error (MAE); comparing the accuracy evaluation indexes of each model, and selecting the model with the smallest prediction error as the best slope parameter identification model.

[0011] Optionally, the single-step output structure receives a series of historical feature values ​​as input, and outputs the slope prediction value of the next time step. At each moment, the model learns the rules and characteristics in the time series through the real data of the current time step and the previous multiple moments; the single-step output rolling iteration structure not only relies on the historical real data at each time step, but also uses the previous prediction result as the input of the next time step; the multi-step output structure predicts the results of multiple future time steps at one time by learning the feature sequence of historical time steps.

[0012] According to another aspect of the present invention, a road slope parameter identification system based on a recurrent neural network is also provided, comprising: a data acquisition module, used to collect slope data of a road slope passed by a vehicle; a data processing module, used to divide the slope data into a training set, a validation set and a test set; preprocessing the slope data, and converting the preprocessed slope data into a three-dimensional structure using a sliding window method; a model building module, used to establish slope parameter identification models with different structures using different recurrent neural networks, wherein the different recurrent neural networks include RNN, LSTM and GRU, and the different structures include a single-step output structure, a single-step output rolling iteration structure and a multi-step output structure; a model training and optimization module, used to initialize the network structure and hyperparameters of each model, for each slope parameter identification model, The model is trained using the training set and the validation set, the model parameters are updated, and the fitting effect of the model is improved by adjusting the hyperparameters and using the optimization algorithm; the model verification module is used to input the test set into each trained model, verify the accuracy and generalization ability of each model, and compare and analyze to obtain the best slope parameter identification model; the model output module is used to use the best slope parameter identification model to obtain the vehicle road slope parameter identification result, and output a result set including the slope value, slope change and slope feature segment information; the user control end is used to feedback the vehicle road slope parameter identification result, and receive the model parameter and training strategy adjustment instructions input by the user according to the vehicle road slope parameter identification result, and send the adjustment instructions to the model construction module and the model training and optimization module to optimize and adjust the slope parameter identification model.

[0013] According to another aspect of the present invention, a storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method described above are implemented.

[0014] The present invention applies a recurrent neural network to the problem of road slope identification, which can quickly obtain slope identification results, monitor and predict road slopes in real time, and significantly improve the accuracy and real-time performance of road slope identification. The identification method adopts a recurrent neural network model, which can effectively capture the dynamic changes of road slopes and improve the vehicle's dynamic performance and driving control accuracy under complex terrain conditions.

[0015] The road slope parameter identification results in the present invention can be further used for vehicle path planning, power system control and intelligent driving strategy optimization, providing effective support for intelligent driving, including improving energy efficiency, optimizing climbing and downhill safety control logic, and enhancing automatic driving decision-making capabilities, which can significantly improve the vehicle's driving performance and safety.

[0016] In addition, the road slope parameter identification system based on the recurrent neural network of the present invention integrates data collection, processing, model training and verification modules and adds a user control terminal. Users can adjust model parameters according to their needs and monitor the prediction effect in real time, thereby enhancing the applicability and decision-making support capabilities of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings: Figure 1 is a flow chart of a road slope parameter identification method based on a recurrent neural network in an embodiment of the present invention; Figure 2 is a schematic diagram of different model structures in embodiments of the present invention; Figure 3 It is a flowchart of the model training process; Figure 4 This is a schematic diagram of the LSTM model framework in the first embodiment of the present invention; Figure 5 This is a graph showing the result of single-step road slope identification using an LSTM network in an embodiment of the present invention; Figure 6 This is a graph showing the result of identifying the slope of a single-step rolling road in the embodiment 2s of the present invention; Figure 7 This is a graph showing the road slope identification result of a 5s single-step rolling road according to an embodiment of the present invention; Figure 8 This is a graph showing the road slope identification result of a 25s single-step rolling road according to an embodiment of the present invention; Fig. 9 This is a graph showing the slope identification result of a multi-step road in 2s according to an embodiment of the present invention; Fig.10 This is a graph showing the slope identification result of a multi-step road over 5 seconds according to an embodiment of the present invention; Fig.11 It is a structural block diagram of a road slope parameter identification system based on a recurrent neural network in an embodiment of the present invention; Fig.12 The data set division result of the present invention; Fig.13The data structure after the sliding window processing of the present invention; Fig.14 It is the parameter optimization result of the present invention; Fig.15 is the error value of different neural network models under the single-step output structure of the present invention; Fig.16 is the error value of different prediction durations under the single-step rolling structure of the present invention; Fig.17 It is the error value of different prediction methods and durations under the multi-step output structure of the present invention. DETAILED DESCRIPTION

[0018] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only embodiments of a part of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work should fall within the scope of protection of the present application. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.

[0019] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.

[0020] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0021] Embodiment 1: In this embodiment, a road slope parameter identification method based on a recurrent neural network is provided.

[0022] Reference Figure 1 , Figure 1is a flow chart of a road slope parameter identification method based on a recurrent neural network in an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps: S1, collecting slope data of the road slope passed by the vehicle, and dividing the slope data into a training set, a validation set and a test set; The embodiment of the present invention collects the road slope data of the vehicle driving for a long time under different road conditions through sensors (such as speed sensors, gyroscopes, GPS, etc.), including road slope, vehicle speed, driving distance and elevation (vertical distance from the current position to the geodetic datum), etc. In order to ensure that it can adapt to diverse road conditions, it is necessary to cover scenes with different slope changes during the data collection process, including flat roads, gentle slopes, steep slopes, and complex road conditions with sudden slope changes. These data are acquired in real time by high-precision sensors and recorded synchronously in combination with vehicle information to ensure the temporal and spatial consistency between different features of the data.

[0023] Set the sampling interval of the sensor to ensure that the frequency of data recording is high enough to capture information such as rapidly changing slopes. Then build the dataset in the chronological order of acquisition and divide the entire dataset into training set, validation set, and test set at a certain split ratio.

[0024] For example, in a specific implementation, the location is selected in Jilin Province, and the route is from Meihekou to Liaoyuan, with a total length of about 68km. Data is collected on this section of road, and the sampling interval is set to 0.05s, with a total duration of 3792.4s, including 75849 time steps of data. Each sampling time point contains four characteristic data: slope, speed, distance and elevation. Taking into account the temporal continuity of the data and the capture of long-term memory information by the long short-term memory network, the collected data is directly divided in chronological order without being disrupted, ensuring that the model can only use existing data for learning during the training process. The collected data set is divided, and the division ratio of the training set, validation set and test set is 6:2:2. The first 60% of the data is used as the training set, the next 20% as the validation set, and the last 20% as the test set. This ratio can be adjusted according to actual conditions. The training set is used to train model parameters; the validation set is used to adjust the model's hyperparameters and provide a preliminary estimate of model performance; the test set is used to evaluate the generalization ability of the trained model. The division results are shown in Fig.12 .

[0025] S2, preprocessing the slope data, and converting the preprocessed slope data into a three-dimensional structure using a sliding window method; Data preprocessing usually includes data cleaning, filling missing values, removing outliers, data standardization, etc.

[0026] After preprocessing, the collected slope data is converted into a three-dimensional structure suitable for model training using the sliding window method. The sliding window method extracts continuous segments from the original data to form three-dimensional structure data by defining the window size and step size.

[0027] In an implementation of an embodiment of the present invention, step S2 includes: S21, remove invalid and abnormal data in the slope data, and use the minimum-maximum normalization method to scale the eigenvalue of each data to between 0 and 1 to eliminate dimensional differences; Since features such as road slope, speed, distance, and elevation have different dimensions and numerical ranges, if normalization is not performed, the weights of some features in the model training process may be too large or too small, affecting the convergence speed and performance of the model. This embodiment adopts the minimum-maximum normalization method, also known as deviation normalization, which maps the data to a range between a specified minimum and maximum value through linear scaling. This method retains the distribution shape of the original data and scales different feature data to the interval between 0 and 1, eliminating dimensional differences. The specific normalization formula is: ; in is the original value of the feature data, and are the maximum and minimum values ​​of the sample data, respectively. is the normalized eigenvalue.

[0028] S22, setting the size N and stride of the sliding window; The window size refers to the number of data points contained in each window, which determines how many consecutive time steps each sample will contain.

[0029] The stride refers to the step size that the window moves on the data and is used to control the degree of sample overlap.

[0030] The appropriate window size N and stride can be selected according to the characteristics of the data and the requirements of the model.

[0031] S23, applying a sliding window to the normalized data, segmenting the data using the sliding window, extracting N consecutive time steps of data to generate input features, and recording corresponding target output labels including future short-term slope values; In this embodiment, the input features are data of N consecutive time steps generated by a sliding window, and the target output is the future short-term slope value corresponding to these input features, usually the slope value after one or several time steps.

[0032] S24, converting the generated input features into a three-dimensional structure to adapt to the data format requirements of the recurrent neural network, wherein the three-dimensional structure refers to the structure of the data including three dimensions: sample size, time step, and number of features.

[0033] From the preprocessed slope data, continuous segments are extracted according to the window size and stride. Each segment will form a two-dimensional array (time step × number of features), where the time step is the window size N and the number of features is 4 (i.e., road slope, vehicle speed, driving distance, and elevation). All extracted two-dimensional segments are stacked to form a three-dimensional array (sample size × time step × number of features), where the sample size refers to the number of input feature samples.

[0034] This embodiment moves a window of fixed length N on the time series data, divides the data into multiple subsequences, each of which contains a fixed length of continuous time steps, and realizes a one-to-one correspondence between the input sequence and the label by continuously moving the sliding time window. Usually, there can be overlap between adjacent windows, and the stride can be defined to control the interval between windows. For example, the sliding time window is initially set to 200 and the stride is 1. The specific processing process is as follows: First, keep the order of the original data sequence to ensure that the time sequence remains unchanged, discard the time column, and only retain the characteristic variables associated with the slope; The length of the sliding window can be changed according to the specific prediction requirements. In this embodiment, data of time steps ranging from 10s to 30s, totaling 200 to 3500, are used as feature sequences, and data of one or more time steps in the future are used as label sequences. The two correspond one-to-one as training samples. By adjusting the size and stride of the window and the length of the corresponding feature label sequence, the length of the input sequence and the number of prediction targets can be flexibly controlled to adapt to different prediction requirements; Through the above steps, the time series slope dataset has been converted from two-dimensional data to three-dimensional structure data suitable for learning the recurrent neural network model. The input matrix is ​​[sample size, time step, number of features], and the corresponding matrix is ​​[future short-term slope value]. After sliding window processing, the data structure is as follows Fig.13 shown.

[0035] S3, using different recurrent neural networks to establish slope parameter identification models with different structures, wherein the different recurrent neural networks include RNN, LSTM and GRU, and the different structures include a single-step output structure, a single-step output rolling iteration structure and a multi-step output structure; This embodiment selects a recurrent neural network suitable for time series data to construct a slope parameter identification model. Each network and its structure has its unique advantages and is suitable for different data and task requirements. By combining different recurrent neural network types and model structures, a slope parameter identification model suitable for different scenarios can be constructed, thereby improving prediction accuracy and efficiency.

[0036] The recurrent neural network in this embodiment includes RNN (Recurrent Neural Network), LSTM (Long short-term memory) and GRU (Gated Recurrent Unit). RNN captures short-term temporal correlation through its simple recurrent structure, but has the problem of gradient vanishing, and is suitable for slope prediction tasks within a short time range. LSTM can effectively capture long-term and short-term dependencies by introducing the structure of forget gate, input gate and output gate, solving the problem of gradient vanishing and explosion of traditional RNN. GRU simplifies the model structure through the gating mechanism, which is suitable for scenarios that balance prediction accuracy and computing resource requirements.

[0037] The different structures in this embodiment include a single-step output structure, a single-step output rolling iteration structure, and a multi-step output structure. Figure 2 , Figure 2 Schematic diagrams of different model structures in the embodiments of the present invention are shown, which show different structures, wherein: Figure 2 (a) The single-step output structure receives a series of historical feature values ​​as input and outputs the slope prediction value of the next time step. At each moment, the model learns the rules and characteristics in the time series through the real data of the current time step and multiple previous moments. The single-step output structure model only outputs one prediction value at each time step, which is suitable for predicting the slope parameter at the next time point. In this embodiment, the learning feature length is set to 100. These feature values ​​constitute the feature sequence , and the corresponding label is the slope information of the next time step , the next moment is the feature sequence , the corresponding label is , and so on.

[0038] Compared with multi-step prediction, single-step prediction has the advantages of fast calculation speed and strong real-time performance. It is suitable for application scenarios that require fast response. By continuously updating the input features, the model can continuously generate predictions for subsequent time steps, improving the accuracy and continuity of the prediction.

[0039] Figure 2(b) The single-step output rolling iteration structure not only relies on historical real data at each time step, but also uses the previous prediction result as the input of the next time step, rolling iteratively in sequence, that is, the output of the model at the previous moment As the input for the next moment, the feature sequence is , the corresponding label is .

[0040] The single-step output rolling iteration structure model outputs a prediction value at each time step and uses the prediction value as the input of the next time step, and so on, to achieve rolling prediction. This method can maintain the continuity and real-time nature of the prediction when there is no complete real data. However, it can also easily lead to the gradual accumulation of prediction errors, thereby affecting the accuracy and stability of long-term predictions.

[0041] Figure 2 (c) The multi-step output structure predicts the results of multiple future time steps at one time by learning the feature sequence of historical time steps. The multi-step output structure model outputs the predicted values ​​of multiple time steps simultaneously in one forward propagation, which is usually implemented through a sequence-to-sequence architecture. In the specific embodiment, the feature sequence selection , and the corresponding label is ,The multi-step output structure can provide prediction information for a longer time range at the current moment.

[0042] S4, initialize the network structure and hyperparameters of each model, identify the model for each slope parameter, train the model using the training set and the validation set, update the model parameters, and improve the model fitting effect by adjusting the hyperparameters and using the optimization algorithm; For each slope parameter identification model, set the model's network layers, the number of neurons in each layer, the learning rate, the batch size, the optimizer type and other hyperparameters. These hyperparameters directly affect the complexity and training efficiency of the model and need to be continuously tuned in the subsequent back propagation process according to the characteristics of the data.

[0043] Among them, if RNN is used to establish the slope parameter identification model, the slope parameter identification model is composed of stacked standard recurrent layers and fully connected layers, including an input layer, three recurrent layers, an activation function Tanh layer, and an output layer; Considering the long-term dependency of time series data, if LSTM is used to establish a slope parameter identification model, the LSTM model consists of stacked LSTM layers and fully connected layers, and the number of LSTM layers can be appropriately increased according to the complexity of the problem and data to obtain a better fitting effect. In an implementation of the first embodiment of the present invention, the LSTM model includes an input layer, three layers of LSTM and Dropout layer, Dense layer, activation function Relu layer and output layer.

[0044] If GRU is used to establish the slope parameter identification model, the slope parameter identification model consists of stacked GRU layers and fully connected layers, including an input layer, three GRU layers and a Dropout layer, a Dense layer, an activation function Relu layer, and an output layer.

[0045] The method of training the model using the training set and the validation set, updating the model parameters, and improving the fitting effect of the model by adjusting the hyperparameters and using the optimization algorithm includes: The model is trained multiple times using the training set. The error between the predicted value and the actual value is calculated during forward propagation, and the model performance is evaluated using the defined loss function. In each round of training, the model parameters are updated through the optimizer to optimize the model's predictive ability. In the specific implementation process, a standard for measuring the model training progress and quality should be defined before training, that is, the loss function. In this embodiment, the road slope parameter identification is a regression problem, so the MSE loss function is used: ; in, n is the number of samples; is the true value; is the predicted value.

[0046] refer to Figure 3 The training process of the model includes: S41, initialize model weights and biases: Determine the input and output dimensions of each layer, and determine the weight initialization method based on the activation function. In this embodiment, a random initialization method is used, that is, a weight matrix is ​​generated using uniform distribution or normal distribution based on the input and output dimensions of the current layer.

[0047] The bias parameter is initialized to zero or a preset positive value, which is a small positive value to ensure that the symmetry of the network in the initial state is broken, so that each neuron learns in a different way.

[0048] S42, forward propagation, calculates the output of the hidden layer and the output layer: Perform forward propagation, perform linear transformation based on the input data and the initialized weights and biases, and calculate the input of the hidden layer; use the activation function to perform nonlinear transformation on the hidden layer input to obtain the hidden layer output; multiply the hidden layer output with the weights and bias of the output layer to calculate the input of the output layer; obtain the predicted value through the activation function of the output layer. This process is the core step of forward propagation, which passes the input data layer by layer and obtains the final output; During forward propagation, the model calculates the error between the predicted value and the actual value, and evaluates the model performance through the MSE loss function.

[0049] S43, back propagation and parameter update: During the training process, the results of the output layer are first calculated and compared with the true value; then the error is back-propagated to calculate the error of the hidden layer, and adjusted using the derivative of the activation function; the gradient of the loss function is calculated through the back-propagation algorithm, and the network weights and biases are updated based on the gradient; through the back-propagation process, the model uses the gradient descent method to continuously adjust parameters, reduce errors, and improve overall performance.

[0050] The model training process usually requires multiple rounds of iterations to train the model, and the validation set is used to monitor the performance of the model. After each iteration, the loss value of the validation set is calculated to determine the learning effect of the model. If the loss of the validation set continues to decrease, the model is underfitting, and training continues to improve the generalization ability of the model. When the loss of the validation set reaches the preset value and no longer decreases within the preset rounds, an early stopping mechanism is required to automatically stop training to avoid overfitting and improve the performance and stability of the final model.

[0051] According to the results of each round of iteration, the hyperparameters are continuously adjusted and the optimization algorithm is used to improve the fitting effect of the model. These hyperparameters include learning rate, batch size, number of hidden layers, number of neurons in each layer, etc. By systematically adjusting these hyperparameters, the optimal combination can be found to improve the training effect and generalization ability of the model. The parameter optimization results of this embodiment are shown in Fig.14 shown.

[0052] In addition, selecting a suitable optimization algorithm can accelerate convergence and improve the stability of the model. Common optimization algorithms include stochastic gradient descent (SGD), Adam, RMSprop, etc. In this embodiment, the Adam optimization algorithm is used, which combines adaptive learning rate and momentum strategy, and often shows better results when processing complex models.

[0053] By performing hyperparameter tuning and selecting appropriate optimization algorithms, the model can learn patterns in the training data more effectively and reduce training errors. This process usually involves techniques such as cross-validation to ensure the consistency and effectiveness of the selected hyperparameter combination on different data sets, thereby obtaining the best model fitting effect.

[0054] After completing the above model training and parameter algorithm optimization, the model framework structure is finally obtained. Figure 4 As shown in the schematic diagram of the LSTM model framework, the slope parameter identification model established by LSTM consists of an input layer, three layers of LSTM and Dropout layer, a Dense layer, an activation function Relu layer and an output layer.

[0055] S5, input the test set into each trained model to verify the accuracy and generalization ability of each model, and compare and analyze to obtain the best slope parameter identification model; Analyze the performance of the model on the test set, especially when the test set contains data different from the training set, input the test set data into each model, obtain the prediction results of each model, record the predicted value and actual value of each model, and select the model that can maintain high prediction accuracy under different conditions as the best slope parameter identification model. Specifically include: S51, input the test set into each trained model to obtain the prediction result of each model; S52, calculating the accuracy evaluation index of each model on the test set according to the prediction results, wherein the accuracy evaluation index includes mean square error (MSE), root mean square error (RMSE) and mean absolute error (MAE); S53, comparing the accuracy evaluation indicators of each model, and selecting the model with the smallest prediction error as the best slope parameter identification model.

[0056] The result evaluation criteria of the test set adopted three commonly used regression model evaluation indicators: mean square error (MSE), root mean square error (RMSE) and mean absolute error (MAE). These indicators can more intuitively understand the accuracy and deviation of the model when predicting new data.

[0057] After obtaining the road slope identification results, the regression model evaluation index is used to measure the performance of the model. In the specific embodiment, the accuracies of different neural network models RNN, LSTM, GRU and different prediction time lengths of 2s, 5s, 25s and different model structures on the test set are compared to identify the model with the best performance and the strongest generalization ability, and further analyze the advantages and disadvantages of each model.

[0058] Reference Figures 5 to 10 , Figures 5 to 10 is a comparison chart of the identification results of each model in the embodiment of the present invention, such as Figures 5 to 10 As shown, Figures 5 to 10 The road slope parameter identification results under various conditions are shown, and the performance of the model is evaluated more intuitively and specifically using three evaluation indicators. The specific evaluation indicator results are shown in Fig.15 , Fig.16 , Fig.17 .

[0059] Through these results, the characteristics of different models can be analyzed to provide a basis for subsequent model optimization and adjustment.

[0060] Looking at the experimental results of different models and prediction methods, we can see that: In terms of models: The LSTM model performs best when processing long time series data, and its three error values ​​are significantly lower than other models. This is because the memory unit of LSTM can effectively capture and maintain dependencies and trends in long time series, providing higher accuracy and stability. Among the three common recurrent network models, the LSTM model is suitable for recognition tasks that require high precision and long-term dependencies, while the GRU achieves a balance between computational complexity and accuracy, and the RNN is suitable for short time series prediction. The appropriate model should be selected based on specific task requirements and data characteristics.

[0061] In terms of methods: the method based on historical true values ​​adopts a single-step output or multi-step output structure, which can achieve continuous long-term identification, ensuring high accuracy and strong real-time performance. The autoregressive method based on model output values ​​adopts a single-step rolling structure. When there is a lack of historical true value data, it can identify the slope value in the short term in the future. Its error is the smallest among all methods, but the error value gradually accumulates over time.

[0062] The advantages and disadvantages of these two methods are complementary, and they can be flexibly selected and combined according to specific circumstances in practical applications to balance accuracy and time span. In summary, the LSTM model should be selected for the data features of this embodiment, and different prediction methods should be used in combination to optimize the prediction effect and meet the needs of different scenarios.

[0063] S6, using the optimal slope parameter identification model to obtain a vehicle road slope parameter identification result, and outputting a result set including slope value, slope change and slope feature segment information.

[0064] In this example, the vehicle road slope parameter identification results include slope value, slope change and slope characteristic segment information. Among them, the slope value indicates the slope size; the slope change includes the slope change amplitude, whether the slope increases, decreases or remains unchanged, etc.; the slope characteristic segment information refers to the parameter description of the road section with continuous or significant slope characteristics, including the slope of the starting and ending positions, the slope range, the trend and volatility and other characteristic information.

[0065] The best slope parameter identification model obtained through comparative analysis will be deployed in actual application scenarios, such as integration into the vehicle system or cloud server. The road slope data is obtained in real time through vehicle sensors or related data sources and input into the best model. The model generates a result set containing slope value, slope change and slope characteristic segment information based on the input data, and performs real-time slope parameter identification. These slope parameter identification results can be used for path planning of vehicle navigation system and decision making of intelligent driving assistance system.

[0066] Further, in an implementation manner of an embodiment of the present invention, after S6, using the optimal slope parameter identification model to obtain a vehicle road slope parameter identification result and outputting a result set including a slope value, a slope change and a slope feature segment information, the method further includes: Receive the model parameter and training strategy adjustment instructions input by the user according to the vehicle road slope parameter identification result, and optimize and adjust the current slope parameter identification model according to the adjustment instructions to obtain better parameter identification results. The adjustment instructions include adjusting the learning rate, changing the model structure, increasing training data, etc.

[0067] The road slope parameter identification method of the present invention can monitor and predict the road slope in real time, significantly improving the accuracy and real-time performance of road slope identification. The identification method adopts a recurrent neural network model, which can effectively capture the dynamic changes of road slope and has important practical application value in multiple fields. For example, in autonomous driving, accurate slope information helps vehicles make intelligent decisions and enhances handling stability; in intelligent transportation systems, real-time road slope changes can optimize traffic flow; in addition, dangerous areas can be identified in advance by analyzing slope data, thereby improving safety and bringing positive social and economic benefits.

[0068] Example 2: For the same inventive concept, a road slope parameter identification system based on a recurrent neural network is also provided in this embodiment to implement the above embodiments and preferred implementations, which have been described and will not be repeated. As used below, the terms "module" and "unit" can be a combination of software and / or hardware that implements a predetermined function. Although the system described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0069] Reference Fig.11 , Fig.11 FIG. 1 is a structural block diagram of a road slope parameter identification system based on a recurrent neural network in an embodiment of the present invention. Fig.11 As shown, the system includes: A data acquisition module, used to collect the slope data of the road slope that the vehicle passes through; A data processing module is used to divide the slope data into a training set, a validation set and a test set; preprocess the slope data, and convert the preprocessed slope data into a three-dimensional structure using a sliding window method; A model building module, used to establish slope parameter identification models with different structures by using different recurrent neural networks, wherein the different recurrent neural networks include RNN, LSTM and GRU, and the different structures include single-step output structure, single-step output rolling iteration structure and multi-step output structure; The model training and optimization module is used to initialize the network structure and hyperparameters of each model, identify the model for each slope parameter, train the model using the training set and validation set, update the model parameters, and improve the model fitting effect by adjusting the hyperparameters and using the optimization algorithm; The model verification module is used to input the test set into each trained model to verify the accuracy and generalization ability of each model, and to obtain the best slope parameter identification model through comparative analysis; A model output module, used to obtain a vehicle road slope parameter identification result using the optimal slope parameter identification model, and output a result set including slope value, slope change and slope feature segment information; The user control end is used to feed back the vehicle road slope parameter identification result, and receive the model parameter and training strategy adjustment instructions input by the user according to the vehicle road slope parameter identification result, and send the adjustment instructions to the model construction module and the model training and optimization module to optimize the slope parameter identification model.

[0070] In this embodiment, the road slope parameter identification system based on recurrent neural network adds a user control end, and the model application module feeds back the information output by the model to the user control end. The user can control the model construction module and the model training and optimization module according to the data effect, and flexibly adjust the model parameters and training strategies according to specific needs to obtain better parameter identification results.

[0071] In addition, the user control terminal may also include a visualization function. By visualizing the vehicle road slope parameter identification results, the user can view the slope prediction results more intuitively, better understand the operating status of the model, and dynamically adjust according to actual application needs, thereby improving the applicability and effectiveness of the model. This flexibility not only enhances the practicality of the system, but also promotes the further development of road slope parameter identification technology.

[0072] In this embodiment, the road slope parameter identification system based on recurrent neural network integrates data collection, processing, model training and verification modules and adds a user control terminal. Users can adjust model parameters according to needs and monitor the prediction effect in real time, which enhances the applicability and decision support capabilities of the system. The present invention improves the dynamic performance and driving control accuracy of engineering vehicles under complex terrain conditions, and provides effective support for the further development of intelligent driving.

[0073] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.

[0074] An embodiment of the present invention further provides a storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0075] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.

[0076] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0077] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0078] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A road slope parameter identification method based on recurrent neural network, characterized in that: include: Collecting slope data of the slope of the road that the vehicle passes through, and dividing the slope data into a training set, a validation set, and a test set; Preprocess the slope data and convert the preprocessed slope data into a three-dimensional structure using a sliding window method; Different recurrent neural networks are used to establish slope parameter identification models with different structures, wherein the different recurrent neural networks include RNN, LSTM and GRU, and the different structures include single-step output structure, single-step output rolling iteration structure and multi-step output structure; Initialize the network structure and hyperparameters of each model, identify the model for each slope parameter, train the model using the training set and validation set, update the model parameters, and improve the model fitting effect by adjusting the hyperparameters and using the optimization algorithm; The test set is input into each trained model to verify the accuracy and generalization ability of each model, and the best slope parameter identification model is obtained through comparative analysis; The optimal slope parameter identification model is used to obtain a vehicle road slope parameter identification result, and a result set including slope value, slope change and slope feature segment information is output.

2. The method for identifying road slope parameters based on recurrent neural network according to claim 1, characterized in that: The collecting of slope data of the slope of the road through which the vehicle passes, and dividing the slope data into a training set, a validation set and a test set comprises: Collecting slope data of the road slope passed by the vehicle at a preset sampling interval, wherein the collected slope data includes road slope, vehicle speed, travel distance and elevation; The slope dataset is constructed according to the chronological order of collection, and is divided into training set, validation set and test set according to the preset split ratio.

3. The method for identifying road slope parameters based on recurrent neural network according to claim 1, characterized in that: The preprocessing of the slope data and converting the preprocessed slope data into a three-dimensional structure using a sliding window method includes: Invalid and abnormal data in the slope data were removed, and the minimum-maximum normalization method was used to scale the characteristic value of each data to between 0 and 1 to eliminate the dimension difference; Set the size N and stride of the sliding window; Apply a sliding window to the normalized data, use the sliding window to segment the data, extract N consecutive time steps of data to generate input features, and record the corresponding target output label containing the future short-term slope value; The generated input feature samples are converted into a three-dimensional structure to adapt to the data format requirements of the recurrent neural network, wherein the three-dimensional structure refers to the structure of the data including three dimensions: sample size, time step and number of features.

4. The method for identifying road slope parameters based on recurrent neural network according to claim 1, characterized in that: The network structure and hyper parameters of each model are initialized as follows: If RNN is used to establish the slope parameter identification model, the slope parameter identification model consists of stacked standard recurrent layers and fully connected layers, including an input layer, three recurrent layers, an activation function Tanh layer, and an output layer; If LSTM is used to establish a slope parameter identification model, the slope parameter identification model consists of stacked LSTM layers and fully connected layers, including an input layer, three layers of LSTM and Dropout layers, a Dense layer, an activation function Relu layer, and an output layer; If GRU is used to establish the slope parameter identification model, the slope parameter identification model consists of stacked GRU layers and fully connected layers, including an input layer, three GRU layers and a Dropout layer, a Dense layer, an activation function Relu layer, and an output layer; For each slope parameter identification model, set the model's network layers, the number of neurons in each layer, the learning rate, the batch size, and the optimizer type.

5. The method for identifying road slope parameters based on recurrent neural network according to claim 1, characterized in that: The method of training the model using the training set and the validation set, updating the model parameters, and improving the fitting effect of the model by adjusting the hyperparameters and using the optimization algorithm includes: Model training: The model is trained multiple times using the training set. The error between the predicted value and the actual value is calculated during forward propagation, and the model performance is evaluated using the defined loss function. In each round of training, the model parameters are updated through the optimizer to optimize the model's predictive ability. Back propagation and parameter update: During the training process, the gradient of the loss function is calculated through the back propagation algorithm, and the network weights and biases are updated according to the gradient; the model is trained in multiple rounds of iterations, and the validation set is used to monitor the model performance. The loss value of the validation set is calculated after each iteration. If the loss of the validation set continues to decrease and the model is underfitting, continue training; when the loss of the validation set reaches the preset value and no longer decreases within the preset rounds, stop training to avoid overfitting.

6. The method for identifying road slope parameters based on recurrent neural network according to claim 5, characterized in that: The model is trained multiple times iteratively using the training set, the error between the predicted value and the actual value is calculated during forward propagation, and the model performance is evaluated through the defined loss function, including: Initialize model weights and biases: Determine the input and output dimensions of each layer, and determine the weight initialization method based on the activation function; the bias parameter is initialized to zero or a preset positive value to ensure that the symmetry of the network in the initial state is broken, prompting each neuron to learn in a different way; Forward propagation, calculate the output of the hidden layer and the output layer: Perform forward propagation, perform linear transformation based on the input data and the initialized weights and biases, and calculate the input of the hidden layer; use the activation function to perform nonlinear transformation on the hidden layer input to obtain the hidden layer output; multiply the hidden layer output with the weights and bias of the output layer to calculate the input of the output layer; obtain the predicted value through the activation function of the output layer; calculate the error between the predicted value and the actual value, and evaluate the model performance through the MSE loss function.

7. The method for identifying road slope parameters based on recurrent neural network according to claim 1, characterized in that: The test set is input into each trained model to verify the accuracy and generalization ability of each model, and the best slope parameter identification model obtained by comparative analysis includes: Input the test set into each trained model to obtain the prediction results of each model; Calculate the accuracy evaluation index of each model on the test set according to the prediction results, and the accuracy evaluation index includes mean square error (MSE), root mean square error (RMSE) and mean absolute error (MAE); The accuracy evaluation indicators of each model were compared, and the model with the smallest prediction error was selected as the optimal slope parameter identification model.

8. The method for identifying road slope parameters based on recurrent neural network according to claim 1, characterized in that: The single-step output structure receives a series of historical feature values ​​as input and outputs the slope prediction value of the next time step. At each moment, the model learns the rules and characteristics in the time series through the real data of the current time step and the previous multiple moments; The single-step output rolling iteration structure not only relies on historical real data at each time step, but also uses the previous prediction result as the input of the next time step; The multi-step output structure predicts the results of multiple future time steps at one time by learning the feature sequence of historical time steps.

9. A road slope parameter identification system based on recurrent neural network, characterized in that: include: A data acquisition module, used to collect the slope data of the road slope that the vehicle passes through; A data processing module, used for dividing the slope data into a training set, a validation set and a test set; Preprocess the slope data and convert the preprocessed slope data into a three-dimensional structure using a sliding window method; A model building module, used to establish slope parameter identification models with different structures by using different recurrent neural networks, wherein the different recurrent neural networks include RNN, LSTM and GRU, and the different structures include single-step output structure, single-step output rolling iteration structure and multi-step output structure; The model training and optimization module is used to initialize the network structure and hyperparameters of each model, identify the model for each slope parameter, train the model using the training set and validation set, update the model parameters, and improve the model fitting effect by adjusting the hyperparameters and using the optimization algorithm; The model verification module is used to input the test set into each trained model to verify the accuracy and generalization ability of each model, and to obtain the best slope parameter identification model through comparative analysis; A model output module, used to obtain a vehicle road slope parameter identification result using the optimal slope parameter identification model, and output a result set including slope value, slope change and slope feature segment information; The user control end is used to feed back the vehicle road slope parameter identification result, and receive the model parameter and training strategy adjustment instructions input by the user according to the vehicle road slope parameter identification result, and send the adjustment instructions to the model construction module and the model training and optimization module to optimize the slope parameter identification model.

10. A storage medium, characterized in that: The storage medium stores a computer program, which implements the steps of the method according to any one of claims 1 to 8 when executed by a processor.

Citation Information

Patent Citations

  • Cloud energy storage charging and discharging strategy forming method based on GRU multi-step prediction technology

    CN112217195A

  • Method for estimating road gradient of pure electric vehicle based on gating circulation unit

    CN116101296A

  • Slope adaptive prediction method and system, terminal and medium

    CN118484643A

  • Landslide surge height prediction method and system based on gating circulation unit

    CN119397895A

Cited By

  • Soil physical and chemical parameter inversion method based on artificial neural network

    CN121410817A