Road slope prediction method and device based on BP and CNN

The BP network model is used to perform scene classification on vehicle driving data, and combined with the CNN network model to extract the time series characteristics of road slope, which solves the problem of limited applicable scenarios for road slope prediction in the existing technology, achieves accurate slope prediction in different scenarios, and enhances The adaptability and prediction ability of the algorithm are improved.

CN118447469BActive Publication Date: 2024-10-22WEICHAI POWER CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410906243.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-08
Publication Date
2024-10-22
Estimated Expiration
2044-07-08

AI Technical Summary

Technical Problem

Existing road slope prediction solutions have limited applicable scenarios and weak generalization capabilities. Especially when satellite signals are poor or high-precision map update costs are high, it is difficult to achieve accurate predictions.

Method used

Using methods based on BP and CNN, a BP network model is constructed to classify vehicle driving data, and the corresponding CNN network model is selected according to the target driving scene to extract road slope time series features, and predict the slope data in the future time period, avoiding the need for Dependence on high-precision maps and GPS signals.

Benefits of technology

It improves the generalization ability of road slope prediction, can accurately predict longer-distance slope changes in different scenarios, reduces the dependence on GPS and high-precision maps, and enhances the adaptability and prediction accuracy of the algorithm.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118447469B_ABST
    Figure CN118447469B_ABST
Patent Text Reader

Abstract

The present application provides a method and device for predicting road slope based on BP and CNN. The method includes: constructing a BP network model, wherein the input of the BP network model is vehicle driving data, and the output of the BP network model is a driving scene; constructing a CNN network model; obtaining historical vehicle driving data, and using the BP network model to classify the historical vehicle driving data to obtain a target driving scene, and determining a CNN network model corresponding to the target driving scene; inputting the historical slope data into the CNN network model corresponding to the target driving scene, and predicting the predicted slope data within a preset time period starting from the current moment. The BP network model is used to classify the scenes, and then the CNN network is used to extract the local features of the road slope time series for the corresponding different scenes, so that the algorithm can adapt to different scenes and has stronger generalization ability, which solves the problem that the existing road slope prediction scheme has limited applicable scenes, that is, weak generalization ability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of predicting road slopes, and in particular to a method, device, storage medium and electronic device for predicting road slopes based on BP and CNN. Background Art

[0002] Road slope is an important basic parameter required for the application of modern vehicle intelligent control technology. Accurate prediction of road slope is of great significance to the realization of intelligent navigation.

[0003] There are currently several solutions for road slope prediction:

[0004] Solution 1: Map-based road slope prediction: Use GPS to obtain the current vehicle position and the location of several hundred meters ahead, and determine the future road slope information based on the high-precision map.

[0005] Solution 2: Based on a camera or other optical equipment, combined with image processing technology, the camera's pitch angle changes are obtained according to the changes in the lane lines in the captured image and the principle of optical imaging, and the numerical value of the slope of the road ahead is inferred.

[0006] Solution 3: Calculate the current road curvature based on historical information recorded by GPS, and predict the road slope based on the curvature.

[0007] The existing solutions have the following shortcomings:

[0008] For Solution 1: The location information recorded by GPS has large errors, which makes it difficult to use when the satellite signal is not good. In addition, high-precision maps need to be updated in a timely manner, and the cost of using high-precision maps is high;

[0009] For solution 2: Currently, there are not many vehicles equipped with high-definition cameras. Image processing methods require a lot of computing resources, which is not conducive to the execution of vehicle control strategies.

[0010] For option three: the road curvature can only predict the road slope over a shorter distance. In mountainous areas and other places where the road slope varies greatly, the estimation accuracy is poor.

[0011] In addition, the three existing solutions all have the defect of limited applicable scenarios, that is, weak generalization ability. Summary of the invention

[0012] The main purpose of the present application is to provide a method, device, storage medium and electronic device for predicting road slope based on BP and CNN, so as to at least solve the problem that the existing road slope prediction scheme has limited applicable scenarios, that is, weak generalization ability.

[0013] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a method for predicting road slope based on BP and CNN is provided, comprising: constructing a BP network model, wherein the input of the BP network model is vehicle driving data, and the output of the BP network model is a driving scene, wherein the vehicle driving data includes at least one of vehicle speed data, acceleration data, and slope data, and the driving scene includes a plain scene and a mountain scene; constructing a CNN network model, including a plurality of CNN network models under the driving scenes, wherein the driving scenes correspond one-to-one to the CNN network models; acquiring historical vehicle driving data, and using the BP network model to classify the historical vehicle driving data to obtain a target driving scene, and determining the CNN network model corresponding to the target driving scene; inputting the historical slope data into the CNN network model corresponding to the target driving scene, and predicting the predicted slope data within a preset time period starting from the current moment, wherein the historical slope data is the slope data acquired in the historical time period before the current moment.

[0014] Optionally, constructing a BP network model includes: obtaining training vehicle driving data, the training vehicle driving data is vehicle driving data obtained in a previous time period, and the previous time period is a time period earlier than the historical time period; dividing the training vehicle driving data into a plurality of travel segment data according to a preset time interval, and extracting characteristic driving parameters from each of the travel segment data, the characteristic driving parameters including at least one of the following: maximum speed, average speed, speed standard deviation, maximum acceleration, average acceleration, acceleration standard deviation, acceleration ratio, uniform speed ratio, idle ratio, maximum slope, average slope, and slope standard deviation; using the characteristic driving parameters and labels corresponding to the characteristic driving parameters to train the model to obtain the BP network model, wherein the labels are the driving scenarios corresponding to the characteristic driving parameters.

[0015] Optionally, after obtaining the training vehicle driving data, the method further includes: filtering and downsampling the training vehicle driving data to obtain processed training vehicle driving data; dividing the training vehicle driving data into a plurality of travel segment data according to a preset time interval, including: dividing the processed training vehicle driving data into a plurality of travel segment data according to the preset time interval.

[0016] Optionally, constructing a CNN network model includes: obtaining training slope data, the training slope data is slope data obtained in a previous time period, and the previous time period is a time period earlier than the historical time period; processing the training slope data into a training set according to a sliding window method, the training set includes multiple groups of training data, any group of the training data includes input slope data and output slope data that follows immediately, and the sum of the length of the input slope data and the length of the output slope data is equal to the width of the sliding window; and using the training set for training to obtain the CNN network model.

[0017] Optionally, the method further includes: determining the width of the sliding window according to the number of the training slope data.

[0018] Optionally, the CNN network model is a one-dimensional CNN network model, which includes a one-dimensional convolutional layer, a pooling layer and a fully connected layer.

[0019] Optionally, acquiring historical vehicle driving data includes at least one of the following: receiving historical vehicle speed data collected by a vehicle speed sensor; receiving historical acceleration data collected by an acceleration sensor; and receiving historical slope data collected by a road slope sensor set.

[0020] According to another aspect of the present application, a device for predicting road slope based on BP and CNN is provided, comprising: a first construction unit, for constructing a BP network model, wherein the input of the BP network model is vehicle driving data, the output of the BP network model is a driving scene, the vehicle driving data includes at least one of vehicle speed data, acceleration data, and slope data, and the driving scene includes a plain scene and a mountain scene; a second construction unit, for constructing a CNN network model, including a plurality of CNN network models under the driving scenes, wherein the driving scenes correspond one-to-one to the CNN network models; a processing unit, for acquiring historical vehicle driving data, and using the BP network model to classify the historical vehicle driving data to obtain a target driving scene, and determine the CNN network model corresponding to the target driving scene; a prediction unit, for inputting historical slope data into the CNN network model corresponding to the target driving scene, and predicting the predicted slope data within a preset time period starting from the current moment, wherein the historical slope data is the slope data acquired in the historical time period before the current moment.

[0021] According to another aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute any one of the road slope prediction methods based on BP and CNN.

[0022] According to another aspect of the present application, an electronic device is provided, comprising: one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include methods for executing any one of the road slope prediction methods based on BP and CNN.

[0023] Applying the technical solution of the present application, a BP network model is constructed, wherein the input of the BP network model is vehicle driving data, and the output of the BP network model is a driving scene, wherein the vehicle driving data includes at least one of vehicle speed data, acceleration data, and slope data, and the driving scenes include plain scenes and mountain scenes; a CNN network model is constructed, including CNN network models under multiple driving scenes, wherein the driving scenes correspond one-to-one to the CNN network models; historical vehicle driving data is obtained, and the BP network model is used to classify the historical vehicle driving data to obtain a target driving scene, and a CNN network model corresponding to the target driving scene is determined; the historical slope data is input into the CNN network model corresponding to the target driving scene, and the predicted slope data within a preset time period starting from the current moment is predicted, wherein the historical slope data is the slope data obtained in the historical time period before the current moment. This solution uses the BP network model to classify scenes, and then uses the CNN network model to extract the local time series features of road slopes in different corresponding scenes, so that the algorithm can adapt to different scenes and has stronger generalization ability. It does not need to use high-precision map information and will not be affected by GPS application conditions. The CNN network model has strong nonlinear fitting ability and can predict road slope changes at longer distances, solving the problem that existing road slope prediction solutions have limited applicable scenarios, i.e., weak generalization ability. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The drawings constituting part of the present application are used to provide a further understanding of the present application. The exemplary embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0025] Figure 1 A hardware structure block diagram of a mobile terminal for executing a method for predicting a road slope based on BP and CNN provided in an embodiment of the present application is shown;

[0026] Figure 2 A schematic flow chart of a method for predicting a road slope based on BP and CNN provided according to an embodiment of the present application is shown;

[0027] Figure 3 A specific road slope prediction flow chart based on BP and CNN provided according to an embodiment of the present application is shown;

[0028] Figure 4 A schematic diagram of a sliding window provided according to an embodiment of the present application is shown;

[0029] Figure 5 A schematic diagram of the structure of a CNN network model provided according to an embodiment of the present application is shown;

[0030] Figure 6 A structural block diagram of a road slope prediction device based on BP and CNN provided according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0031] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0032] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution 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 part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0033] 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 sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not 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.

[0034] As introduced in the background technology, the road slope prediction scheme in the prior art has limited applicability scenarios, that is, the generalization ability is weak. In order to solve the problem that the road slope prediction scheme in the prior art has limited applicability scenarios, that is, the generalization ability is weak, the embodiments of the present application provide a road slope prediction method, device, storage medium and electronic device based on BP and CNN.

[0035] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0036] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 1 is a hardware structure block diagram of a mobile terminal of a method for predicting road slope based on BP and CNN according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.

[0037] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the road slope prediction method based on BP and CNN in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the above network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof. The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0038] In this embodiment, a method for predicting road slope based on BP and CNN that runs on a mobile terminal, a computer terminal or a similar computing device is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in an order different from that shown here.

[0039] Figure 2 FIG. 1 is a flow chart of a method for predicting a road slope based on BP and CNN according to an embodiment of the present application. Figure 2 As shown, the method comprises the following steps:

[0040] Step S201, constructing a BP network model, wherein the input of the BP network model is vehicle driving data, and the output of the BP network model is a driving scene, the vehicle driving data includes at least one of vehicle speed data, acceleration data, and slope data, and the driving scene includes a plain scene and a mountain scene;

[0041] The vehicle speed data includes the maximum speed, average speed, and speed standard deviation; the acceleration data includes the maximum acceleration, average acceleration, standard deviation, acceleration ratio, uniform speed ratio, and idle speed ratio; the slope data includes the maximum slope, average slope, and standard deviation. Driving scenarios include plain scenarios, mountain scenarios, national highway scenarios, and other scenarios.

[0042] Among them, the BP network model is an artificial neural network model. The BP network model is a forward feedback network. By continuously adjusting the connection weights in the network, the network output is made as close as possible to the expected output of the training data, thereby realizing the training and learning of the model. The BP network model is often used in pattern recognition, classification, regression and other fields.

[0043] Step S202, constructing a CNN network model, including CNN network models under multiple driving scenarios, wherein the driving scenarios correspond to the CNN network models one by one;

[0044] For example, the driving scenes include plain scenes, mountain scenes, and national highway scenes, and the CNN network models include plain CNN network models, mountain CNN network models, and national highway CNN network models.

[0045] Among them, the CNN network model is a deep learning algorithm that can achieve prediction tasks through training of data sets.

[0046] Step S203, obtaining historical vehicle driving data, and using the BP network model to classify the historical vehicle driving data to obtain a target driving scene, and determining a CNN network model corresponding to the target driving scene;

[0047] Specifically, the BP network model has the following advantages: 1) The BP network model is highly efficient in processing classification tasks and can quickly learn and classify samples; 2) The BP network model is highly robust in processing classification tasks and can handle a certain degree of noise and interference; 3) The BP network model can adaptively adjust the network structure and parameters according to the characteristics of the input data to improve classification performance; 4) The training process of the BP network model is relatively simple, and the back propagation algorithm can be used to update and optimize the parameters; 5) The structure of the BP network model is relatively simple, and the classification results of the model can be explained by weights and bias values.

[0048] Step S204, inputting the historical slope data into the CNN network model corresponding to the target driving scenario, and predicting the predicted slope data within a preset time period starting from the current moment, wherein the historical slope data is the slope data obtained in the historical time period before the current moment.

[0049] Specifically, the BP network model is used to classify the scenes, and then the CNN network model is used to extract the local temporal features of the road slope for the corresponding different scenes, so that the algorithm can adapt to different scenes and have stronger generalization ability.

[0050] Through this embodiment, a BP network model is constructed, wherein the input of the BP network model is vehicle driving data, the output of the BP network model is a driving scene, the vehicle driving data includes at least one of vehicle speed data, acceleration data, and slope data, and the driving scenes include plain scenes and mountain scenes; a CNN network model is constructed, including CNN network models under multiple driving scenes, wherein the driving scenes correspond to the CNN network models one by one; historical vehicle driving data is obtained, and the BP network model is used to classify the historical vehicle driving data to obtain a target driving scene, and a CNN network model corresponding to the target driving scene is determined; the historical slope data is input into the CNN network model corresponding to the target driving scene, and the predicted slope data within a preset time period starting from the current moment is predicted, wherein the historical slope data is the slope data obtained in the historical time period before the current moment. This solution uses the BP network model to classify scenes, and then uses the CNN network model to extract the local time series features of road slopes in different corresponding scenes, so that the algorithm can adapt to different scenes and has stronger generalization ability. It does not need to use high-precision map information and will not be affected by GPS application conditions. The CNN network model has strong nonlinear fitting ability and can predict road slope changes at longer distances, solving the problem that existing road slope prediction solutions have limited applicable scenarios, i.e., weak generalization ability.

[0051] In the specific implementation process, a BP network model is constructed, including: obtaining training vehicle driving data, the training vehicle driving data is the vehicle driving data obtained in a previous time period, and the previous time period is a time period earlier than the historical time period; dividing the training vehicle driving data into multiple travel segment data according to a preset time interval, and extracting characteristic driving parameters from each travel segment data, the characteristic driving parameters including at least one of the following: maximum speed, average speed, speed standard deviation, maximum acceleration, average acceleration, acceleration standard deviation, acceleration ratio, uniform speed ratio, idle ratio, maximum slope, average slope, and slope standard deviation; using the characteristic driving parameters and labels corresponding to the characteristic driving parameters to train the model to obtain a BP network model, wherein the labels are driving scenarios corresponding to the characteristic driving parameters.

[0052] The training vehicle driving data is divided into training set, validation set and test set. The training set is used to train the BP network model, the validation set is used to verify the BP network model, and the test set is used to test the BP network model. The functions and division methods of these three parts are as follows:

[0053] 1) Training Set: The training set is the data used to train the model. The model performs feature recognition and parameter adjustment by learning samples in the training set. Usually, the training set accounts for about 70% of the entire data set.

[0054] 2) Validation Set: The validation set is used to adjust model parameters, such as hyperparameters, during model training. It helps us monitor the generalization ability of the model during training and prevent overfitting. The validation set usually accounts for 10% to 15% of the entire dataset.

[0055] 3) Test Set: The test set is used to evaluate the performance of the model in practical applications. The performance of the model on the test set is usually regarded as the final performance of the model. The test set should be completely independent of the training set and the validation set to avoid data leakage. The test set usually accounts for 15% to 20% of the entire dataset.

[0056] Among them, the preset time interval can be set to 0.5 hours, 1 hour, 1.5 hours, etc.

[0057] The method divides vehicle driving data into multiple travel segment data at preset time intervals, classifies and labels the driving segment data according to the characteristic driving data, and classifies the driving segment data under different driving scenarios for label training of the BP network model. The trained BP network model can perform scene classification according to the characteristics of the driving data.

[0058] Specifically, after obtaining the training vehicle driving data, the method also includes: filtering and downsampling the training vehicle driving data to obtain processed training vehicle driving data; dividing the training vehicle driving data into multiple travel segment data according to a preset time interval, including: dividing the processed training vehicle driving data into multiple travel segment data according to a preset time interval.

[0059] The method performs filtering processing on the training vehicle driving data to remove noise in the data and make the data smoother and more stable. Common filtering methods include low-pass filtering, mean filtering, median filtering, Gaussian filtering, etc. The scheme of the present application preferably adopts low-pass filtering, and the data after filtering processing is more suitable for subsequent analysis and processing. Downsampling processing refers to reducing high-frequency data to a lower sampling rate to reduce the amount of data and the amount of calculation. Downsampling can improve the processing efficiency of data while retaining the main features of the data. Common downsampling methods include average sampling, maximum sampling, minimum sampling, etc. Filtering and downsampling processing on the training vehicle driving data can effectively remove noise and redundant information, improve the quality and processing efficiency of the data, and the processed data is easier to analyze and apply.

[0060] More specifically, constructing a CNN network model includes: obtaining training slope data, the training slope data is slope data obtained in a previous time period, and the previous time period is a time period earlier than the historical time period; processing the training slope data into a training set according to a sliding window method, the training set includes multiple groups of training data, any group of training data includes input slope data and output slope data that follows immediately, and the sum of the length of the input slope data and the length of the output slope data is equal to the width of the sliding window; using the training set for training to obtain a CNN network model.

[0061] After obtaining the training slope data, the method filters and downsamples the training slope data, and then divides the training slope data into a training set, a validation set, and a test set for training, validation, and testing of the CNN network model.

[0062] Furthermore, the method further includes: determining the width of the sliding window according to the number of training slope data. For example, when the number of training slope data is large, the width of the sliding window can be set wider, and when the number of training slope data is small, the width of the sliding window can be set narrower, that is, the number of training slope data and the width of the sliding window can be set to a preset ratio.

[0063] The width of the sliding window is the sum of the length of the input slope data and the length of the output slope data. Figure 3As shown in the figure, when predicting the slope value of the next 5 seconds through the slope value of 10 seconds, the size of the sliding window is 15. At this time, the first 10 data are used as input samples, and the last 5 data are used as output regression targets. Then the window is slid to the right to obtain the second input sample and output target, and this operation is repeated until the sliding window traverses the data.

[0064] Furthermore, the CNN network model is a one-dimensional CNN network model, which includes a one-dimensional convolutional layer, a pooling layer, and a fully connected layer.

[0065] Among them, the structure of the CNN network model is as follows Figure 4 As shown in the figure, in the one-dimensional convolution layer, the convolution kernel is convolved with the input data of the training set label to realize feature extraction. The number of input channels, the number of output channels, the convolution kernel size, the stride, and the boundary padding parameters of the one-dimensional convolution layer are (h, j, h×1, 1, 0), respectively, where h is the number of input data elements in the label, and j is set according to the actual situation. In the pooling layer, the extracted features are downsampled to reduce the amount of calculation in the training process and avoid overfitting in the training process. In the fully connected layer, the extracted feature data is nonlinearly combined. The number of input channels and the number of output channels of the fully connected layer are (j, k), where k represents the number of elements in the output data in the label.

[0066] Specifically, obtaining historical vehicle driving data includes at least one of the following: receiving historical vehicle speed data collected by a vehicle speed sensor; receiving historical acceleration data collected by an acceleration sensor; and receiving historical slope data collected by a road slope sensor set.

[0067] In order to enable those skilled in the art to more clearly understand the technical solution of the present application, the implementation process of the road slope prediction method based on BP and CNN of the present application will be described in detail below in combination with specific embodiments.

[0068] The existing technical solutions include estimating the road slope based on the BP network model, whose network input is engine speed, torque, vehicle speed, acceleration, and output is the estimated slope. This BP network model fits the mapping relationship between input and output parameters to achieve the effect of slope estimation; there is also a radial neural network based slope prediction, whose network input is vehicle mass, torque, vehicle speed, acceleration, and output is slope. Similar to the BP network model, it also finds the mapping relationship between input and output parameters to achieve slope estimation. That is, the existing road slope prediction solutions have limited applicable scenarios and weak generalization capabilities.

[0069] The embodiment of the present application adopts a convolutional neural network to predict the slope. The idea is to regard the slope data as a time series, and use the unique advantage of one-dimensional convolutional neural network in processing time series to realize the prediction of the slope. The input of the convolutional neural network is the slope collected by the sensor, and the output is the predicted slope. In addition, some prior arts propose to classify the slope into three types: transverse slope, longitudinal slope, and combined slope, and divide the BP network model into three corresponding structures. Some prior arts propose to update and adjust the network according to the actual operating parameters of the vehicle using the parameter update rules in the adaptive learning rate algorithm. The prior arts all have the characteristics of adapting to certain scenarios. Different from this scheme, this scheme is based on the good effect of the BP network model in classification problems, and divides the driving scenes into plains, mountainous areas, national highways and other scenes. This classification method is more in line with the actual situation and has a high accuracy rate. Then, different network structures and parameters are selected for different usage scenarios to achieve accurate prediction of the slope.

[0070] This embodiment relates to a specific method for predicting road slope based on BP and CNN. This method can adapt to convolutional neural networks in different scenarios to predict time series slope. Specifically, the driving scenes are classified into three categories: plains, mountainous areas, and national highways according to the BP network model. BP is selected because it has a good effect on classification problems. Then, different convolutional neural network structures and parameters are selected for different scenes such as plains, mountainous areas, and national highways to achieve more accurate prediction of slopes in different scenarios. The convolutional neural network proposed in this application has unique advantages in time series processing. Due to the characteristics of convolution and pooling of convolutional neural networks, it can effectively capture local patterns and features in the input data, with high computational efficiency and strong generalization ability. Figure 5 As shown, it specifically includes the following contents:

[0071] 1) Obtain real vehicle driving data with a sampling frequency of 10 Hz on multiple road spectra in plains, national highways and mountainous areas, including vehicle speed, acceleration, and slope, perform noise reduction on the data based on a low-pass filter, and convert the data into 1 Hz based on downsampling;

[0072] 2) Divide the data set into travel segments. Specifically, divide the travel segments according to fixed time intervals. The selected feature parameters include: maximum speed, average speed, speed standard deviation, maximum acceleration, average acceleration, acceleration standard deviation, acceleration ratio, uniform speed ratio, idle speed ratio, maximum slope, average slope, and slope standard deviation;

[0073] 3) Based on the divided travel segments, the BP network model is trained with labels such as plain, mountainous area, and national highway to obtain the trained BP network model;

[0074] 4) Based on the different scenes of plains, mountains and national highways in the data set, the corresponding CNN network model is trained until the training effect is the best and the trained model is saved; the method of constructing and training the CNN network model is:

[0075] First, we obtain the road slope data with a sampling frequency of 10 Hz on multiple road spectra of plains, national highways and mountainous areas, perform noise reduction on the data based on a low-pass filter, and convert the data into 1 Hz based on downsampling. Then we use the sliding window method to process the original slope sequence and obtain the training set label. The training set label includes input and target, such as Figure 3 As shown in the figure, the size of the sliding window is the sum of the sample length and the prediction time step. For example, when predicting the slope value of the next 5 seconds through the slope value of 10 seconds, the size of the sliding window is 15. At this time, the first 10 data are used as input samples, and the last 5 data are used as output regression targets. Then the window is slid to the right to obtain the second input sample and output target. This operation is repeated until the sliding window traverses the data. Then the linear normalization method is used to process the data to achieve normalization, and then a CNN neural network is constructed. The structure of the CNN neural network is as follows: Figure 4 As shown, a), one-dimensional convolution layer, the convolution kernel and the input data of the training set label are convolved to realize feature extraction. The input channel number, output channel number, convolution kernel size, step size, and boundary filling parameters of the one-dimensional convolution layer are (h, j, h×1, 1, 0), where h is the number of input data elements in the label, and j is set according to the actual situation; b), pooling layer, downsample the extracted features to reduce the amount of calculation in the training process and avoid overfitting in the training process; c), fully connected layer, nonlinear combination of the extracted feature data, the input channel number and output channel number of the fully connected layer are (j, k), where k represents the number of elements of the output data in the label. Then the gradient descent method is used to train the network, and RMSE (Root Mean Square Error) is used as the loss function of the network. The calculation formula of RMSE is: , where RMSE is the loss function, is the actual observed value, is the predicted value, and n is the number of samples.

[0076] 5) According to the BP scene classification results, the corresponding trained CNN network model is selected to achieve slope prediction that adapts to the scene.

[0077] This embodiment will not be affected by GPS application conditions and does not require the use of high-precision map information. The CNN network has strong nonlinear fitting capabilities and can predict road slope changes at longer distances. By using the BP network model to classify scenes, the CNN network extracts local features of road slope time series for different scenes, making the algorithm adaptable to different scenes and more generalizable.

[0078] This embodiment uses a time series prediction method to predict the road slope, which facilitates the synchronization of the predicted slope information with other vehicle sensor information in time series. The collected slope time series data is denoised based on a low-pass filter, and the data is converted to 1HZ using a time synchronization method, which reduces the amount of computation for network training and reasoning. The BP network is used to classify the scene, and the corresponding one-dimensional convolutional layer is used to extract the local features of the road slope time series based on the classification results, which enhances the generalization ability of the network.

[0079] The embodiment of the present application also provides a prediction device for the road slope based on BP and CNN. It should be noted that the prediction device for the road slope based on BP and CNN in the embodiment of the present application can be used to execute the prediction method for the road slope based on BP and CNN provided in the embodiment of the present application. The device is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the device 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 conceived.

[0080] The following introduces the road slope prediction device based on BP and CNN provided in an embodiment of the present application.

[0081] Figure 6 is a schematic diagram of a road slope prediction device based on BP and CNN according to an embodiment of the present application. Figure 6 As shown, the device includes: a first construction unit 61, a second construction unit 62, a processing unit 63, and a prediction unit 64;

[0082] A first construction unit 61 is used to construct a BP network model, wherein the input of the BP network model is vehicle driving data, and the output of the BP network model is a driving scene, the vehicle driving data includes at least one of vehicle speed data, acceleration data, and slope data, and the driving scene includes a plain scene and a mountain scene;

[0083] Among them, the BP network model is an artificial neural network model. The BP network model is a forward feedback network. By continuously adjusting the connection weights in the network, the network output is made as close as possible to the expected output of the training data, thereby realizing the training and learning of the model. The BP network model has a wide range of applications in pattern recognition, classification, regression and other fields.

[0084] A second construction unit 62 is used to construct a CNN network model, including CNN network models under multiple driving scenarios, wherein the driving scenarios correspond to the CNN network models one by one;

[0085] Among them, the CNN network model is a deep learning algorithm that can achieve prediction tasks through training of data sets.

[0086] The processing unit 63 is used to obtain historical vehicle driving data, classify the historical vehicle driving data using a BP network model to obtain a target driving scene, and determine a CNN network model corresponding to the target driving scene;

[0087] Specifically, the BP network model has the following advantages: 1) The BP network model is highly efficient in processing classification tasks and can quickly learn and classify samples; 2) The BP network model is highly robust in processing classification tasks and can handle a certain degree of noise and interference; 3) The BP network model can adaptively adjust the network structure and parameters according to the characteristics of the input data to improve classification performance; 4) The training process of the BP network model is relatively simple, and the back propagation algorithm can be used to update and optimize the parameters; 5) The structure of the BP network model is relatively simple, and the classification results of the model can be explained by weights and bias values.

[0088] The prediction unit 64 is used to input the historical slope data into the CNN network model corresponding to the target driving scene, and predict the predicted slope data within a preset time period starting from the current moment, wherein the historical slope data is the slope data obtained in the historical time period before the current moment.

[0089] Specifically, the BP network model is used to classify the scenes, and then the CNN network is used to extract the local temporal features of the road slope in the corresponding different scenes, so that the algorithm can adapt to different scenes and have stronger generalization ability.

[0090] In this embodiment, a first construction unit is used to construct a BP network model, wherein the input of the BP network model is vehicle driving data, the output of the BP network model is a driving scene, the vehicle driving data includes at least one of vehicle speed data, acceleration data, and slope data, and the driving scenes include plain scenes and mountain scenes; a second construction unit is used to construct a CNN network model, including CNN network models under multiple driving scenes, wherein the driving scenes correspond to the CNN network models one by one; a processing unit is used to obtain historical vehicle driving data, and use the BP network model to classify the historical vehicle driving data to obtain a target driving scene, and determine a CNN network model corresponding to the target driving scene; a prediction unit is used to input historical slope data into the CNN network model corresponding to the target driving scene, and predict the predicted slope data within a preset time period starting from the current moment, wherein the historical slope data is the slope data obtained in the historical time period before the current moment. The BP network model is used to classify the scenes, and then the CNN network is used to extract the local time series features of the road slope for different corresponding scenes, so that the algorithm can adapt to different scenes and has stronger generalization ability. It does not need to use the information of high-precision maps and will not be affected by GPS application conditions. The CNN network model has strong nonlinear fitting ability and can predict the changes in road slopes at longer distances, which solves the problem that the existing road slope prediction scheme has limited applicable scenarios, that is, weak generalization ability.

[0091] As an optional solution, the first construction unit includes a first acquisition module, a division module, and a first training module; the first acquisition module is used to acquire training vehicle driving data, the training vehicle driving data is vehicle driving data acquired in a previous time period, and the previous time period is a time period earlier than the historical time period; the division module is used to divide the training vehicle driving data into multiple travel segment data according to a preset time interval, and extract characteristic driving parameters from each travel segment data, the characteristic driving parameters include at least one of the following: maximum speed, average speed, speed standard deviation, maximum acceleration, average acceleration, acceleration standard deviation, acceleration ratio, uniform speed ratio, idle ratio, maximum slope, average slope, and slope standard deviation; the first training module is used to use the characteristic driving parameters and labels corresponding to the characteristic driving parameters to train the model to obtain a BP network model, wherein the label is a driving scene corresponding to the characteristic driving parameters.

[0092] Specifically, the vehicle driving data is divided into multiple travel segment data at preset time intervals, the driving segment data is classified and labeled according to the characteristic driving data, and the driving segment data under different driving scenarios are labeled and classified for training the BP network model. The trained BP network model can perform scene classification according to the characteristics of the driving data.

[0093] In an optional solution, the first construction unit also includes a first processing module, which is used to filter and downsample the training vehicle driving data after acquiring the training vehicle driving data to obtain the processed training vehicle driving data; the division module includes a division sub-module, which is used to divide the training vehicle driving data into multiple travel segment data according to a preset time interval, including: dividing the processed training vehicle driving data into multiple travel segment data according to the preset time interval.

[0094] Specifically, filtering and downsampling the training vehicle driving data can effectively remove noise and redundant information, improve data quality and processing efficiency, and make the processed data easier to analyze and apply.

[0095] An optional solution, the second construction unit includes a second acquisition module, a second processing module and a second training module; the second acquisition module is used to acquire training slope data, the training slope data is the slope data acquired in a previous time period, and the previous time period is a time period earlier than the historical time period; the second processing module is used to process the training slope data into a training set according to a sliding window method, the training set includes multiple groups of training data, any group of training data includes input slope data and output slope data that follows immediately, and the sum of the length of the input slope data and the length of the output slope data is equal to the width of the sliding window; the second training module is used to use the training set for training to obtain a CNN network model.

[0096] Specifically, after obtaining the training slope data, the training slope data is filtered and downsampled, and then the training slope data is divided into a training set, a validation set, and a test set for training, validation, and testing of the CNN network model.

[0097] In an optional solution, the second construction unit further includes a determination module for determining the width of the sliding window according to the number of training slope data.

[0098] Specifically, the width of the sliding window is the sum of the length of the input slope data and the length of the output slope data, such as Figure 3 As shown in the figure, when predicting the slope value of the next 5 seconds through the slope value of 10 seconds, the size of the sliding window is 15. At this time, the first 10 data are used as input samples, and the last 5 data are used as output regression targets. Then the window is slid to the right to obtain the second input sample and output target, and this operation is repeated until the sliding window traverses the data.

[0099] An optional solution is that the CNN network model is a one-dimensional CNN network model, and the one-dimensional CNN network model includes a one-dimensional convolutional layer, a pooling layer and a fully connected layer.

[0100] In the one-dimensional convolution layer, the convolution kernel is convolved with the input data of the training set label to realize feature extraction. The number of input channels, the number of output channels, the convolution kernel size, the stride, and the boundary padding parameters of the one-dimensional convolution layer are (h, j, h×1, 1, 0), respectively, where h is the number of input data elements in the label, and j is set according to the actual situation. In the pooling layer, the extracted features are downsampled to reduce the amount of calculation in the training process and avoid overfitting in the training process. In the fully connected layer, the extracted feature data is nonlinearly combined. The number of input channels and the number of output channels of the fully connected layer are (j, k), where k represents the number of elements in the output data in the label.

[0101] An optional solution, the processing unit includes a first receiving module, a second receiving module, and a third receiving module; the first receiving module is used to receive historical vehicle speed data collected by the vehicle speed sensor; the second receiving module is used to receive historical acceleration data collected by the acceleration sensor; the third receiving module is used to receive historical slope data collected by the road slope sensor set.

[0102] The road slope prediction device based on BP and CNN includes a processor and a memory, wherein the first construction unit, the second construction unit, the processing unit, the prediction unit, etc. are all stored in the memory as program units, and the processor executes the program units stored in the memory to implement corresponding functions. The above modules are all located in the same processor; or, the above modules are located in different processors in any combination.

[0103] The processor includes a kernel, which retrieves the corresponding program unit from the memory. One or more kernels can be set, and the problem of limited applicable scenarios of existing road slope prediction schemes, i.e., weak generalization ability, can be solved by adjusting kernel parameters.

[0104] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0105] An embodiment of the present invention provides a computer-readable storage medium, which includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute the road slope prediction method based on BP and CNN.

[0106] Specifically, the road slope prediction method based on BP and CNN includes:

[0107] Step S201, constructing a BP network model, wherein the input of the BP network model is vehicle driving data, and the output of the BP network model is a driving scene, the vehicle driving data includes at least one of vehicle speed data, acceleration data, and slope data, and the driving scene includes a plain scene and a mountain scene;

[0108] Step S202, constructing a CNN network model, including CNN network models under multiple driving scenarios, wherein the driving scenarios correspond to the CNN network models one by one;

[0109] Step S203, obtaining historical vehicle driving data, and using the BP network model to classify the historical vehicle driving data to obtain a target driving scene, and determining a CNN network model corresponding to the target driving scene;

[0110] Step S204, inputting the historical slope data into the CNN network model corresponding to the target driving scenario, and predicting the predicted slope data within a preset time period starting from the current moment, wherein the historical slope data is the slope data obtained in the historical time period before the current moment.

[0111] An embodiment of the present invention provides a processor, which is used to run a program, wherein the road slope prediction method based on BP and CNN is executed when the program is running.

[0112] Specifically, the road slope prediction method based on BP and CNN includes:

[0113] Step S201, constructing a BP network model, wherein the input of the BP network model is vehicle driving data, and the output of the BP network model is a driving scene, the vehicle driving data includes at least one of vehicle speed data, acceleration data, and slope data, and the driving scene includes a plain scene and a mountain scene;

[0114] Step S202, constructing a CNN network model, including CNN network models under multiple driving scenarios, wherein the driving scenarios correspond to the CNN network models one by one;

[0115] Step S203, obtaining historical vehicle driving data, and using the BP network model to classify the historical vehicle driving data to obtain a target driving scene, and determining a CNN network model corresponding to the target driving scene;

[0116] Step S204, inputting the historical slope data into the CNN network model corresponding to the target driving scenario, and predicting the predicted slope data within a preset time period starting from the current moment, wherein the historical slope data is the slope data obtained in the historical time period before the current moment.

[0117] An embodiment of the present invention provides a device, the device including a processor, a memory, and a program stored in the memory and executable on the processor, and when the processor executes the program, at least the following steps are implemented:

[0118] Step S201, constructing a BP network model, wherein the input of the BP network model is vehicle driving data, and the output of the BP network model is a driving scene, the vehicle driving data includes at least one of vehicle speed data, acceleration data, and slope data, and the driving scene includes a plain scene and a mountain scene;

[0119] Step S202, constructing a CNN network model, including CNN network models under multiple driving scenarios, wherein the driving scenarios correspond to the CNN network models one by one;

[0120] Step S203, obtaining historical vehicle driving data, and using the BP network model to classify the historical vehicle driving data to obtain a target driving scene, and determining a CNN network model corresponding to the target driving scene;

[0121] Step S204, inputting the historical slope data into the CNN network model corresponding to the target driving scenario, and predicting the predicted slope data within a preset time period starting from the current moment, wherein the historical slope data is the slope data obtained in the historical time period before the current moment.

[0122] The devices in this article can be servers, PCs, PADs, mobile phones, etc.

[0123] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program for initializing at least the following method steps:

[0124] Step S201, constructing a BP network model, wherein the input of the BP network model is vehicle driving data, and the output of the BP network model is a driving scene, the vehicle driving data includes at least one of vehicle speed data, acceleration data, and slope data, and the driving scene includes a plain scene and a mountain scene;

[0125] Step S202, constructing a CNN network model, including CNN network models under multiple driving scenarios, wherein the driving scenarios correspond to the CNN network models one by one;

[0126] Step S203, obtaining historical vehicle driving data, and using the BP network model to classify the historical vehicle driving data to obtain a target driving scene, and determining a CNN network model corresponding to the target driving scene;

[0127] Step S204, inputting the historical slope data into the CNN network model corresponding to the target driving scenario, and predicting the predicted slope data within a preset time period starting from the current moment, wherein the historical slope data is the slope data obtained in the historical time period before the current moment.

[0128] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0129] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0130] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0131] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0132] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0133] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0134] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0135] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0136] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0137] From the above description, it can be seen that the above embodiments of the present application achieve the following technical effects:

[0138] 1) A method for predicting a road slope based on BP and CNN of the present application comprises: constructing a BP network model, wherein the input of the BP network model is vehicle driving data, the output of the BP network model is a driving scene, the vehicle driving data comprises at least one of vehicle speed data, acceleration data, and slope data, and the driving scene comprises a plain scene and a mountain scene; constructing a CNN network model, comprising CNN network models under multiple driving scenes, wherein the driving scenes correspond one to one with the CNN network models; obtaining historical vehicle driving data, and using the BP network model to classify the historical vehicle driving data to obtain a target driving scene, and determining a CNN network model corresponding to the target driving scene; inputting the historical slope data into the CNN network model corresponding to the target driving scene, and predicting the predicted slope data within a preset time period starting from the current moment, wherein the historical slope data is the slope data obtained in the historical time period before the current moment. The BP network model is used to classify the scenes, and then the CNN network is used to extract the local time series features of the road slope for different corresponding scenes, so that the algorithm can adapt to different scenes and has stronger generalization ability. It does not need to use the information of high-precision maps and will not be affected by GPS application conditions. The CNN network model has strong nonlinear fitting ability and can predict the changes in road slopes at longer distances, which solves the problem that the existing road slope prediction scheme has limited applicable scenarios, that is, weak generalization ability.

[0139] 2) A road slope prediction device based on BP and CNN of the present application comprises: a first construction unit, used to construct a BP network model, wherein the input of the BP network model is vehicle driving data, the output of the BP network model is a driving scene, the vehicle driving data includes at least one of vehicle speed data, acceleration data, and slope data, and the driving scene includes a plain scene and a mountain scene; a second construction unit, used to construct a CNN network model, including CNN network models under multiple driving scenes, wherein the driving scenes correspond to the CNN network models one by one; a processing unit, used to obtain historical vehicle driving data, and use the BP network model to classify the historical vehicle driving data to obtain a target driving scene, and determine the CNN network model corresponding to the target driving scene; a prediction unit, used to input the historical slope data into the CNN network model corresponding to the target driving scene, and predict the predicted slope data within a preset time period starting from the current moment, wherein the historical slope data is the slope data obtained in the historical time period before the current moment. The BP network model is used to classify the scenes, and then the CNN network is used to extract the local time series features of the road slope for different corresponding scenes, so that the algorithm can adapt to different scenes and has stronger generalization ability. It does not need to use the information of high-precision maps and will not be affected by GPS application conditions. The CNN network model has strong nonlinear fitting ability and can predict the changes in road slopes at longer distances, which solves the problem that the existing road slope prediction scheme has limited applicable scenarios, that is, weak generalization ability.

[0140] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A road slope prediction method based on BP and CNN, characterized in that: include: Constructing a BP network model, wherein the input of the BP network model is vehicle driving data, and the output of the BP network model is a driving scene, wherein the vehicle driving data includes at least one of vehicle speed data, acceleration data, and slope data, and the driving scene includes a plain scene and a mountain scene; Constructing a CNN network model, including a plurality of CNN network models under the driving scenarios, wherein the driving scenarios correspond to the CNN network models one by one; Wherein, constructing the CNN network model comprises: acquiring training slope data for each of the driving scenarios, the training slope data being slope data acquired in a previous time period, the previous time period being a time period earlier than the historical time period; processing the training slope data into a training set according to a sliding window method, the training set comprising a plurality of groups of training data, any group of training data comprising input slope data and output slope data immediately following the input slope data, the sum of the length of the input slope data and the length of the output slope data being equal to the width of the sliding window; and using the training set for training to obtain the CNN network model corresponding to each of the driving scenarios; The method of using the training set to train the CNN network model corresponding to each driving scene comprises: normalizing any group of the training data in the training set, using the normalized data to train the CNN network model corresponding to each driving scene, and using RMSE as a loss function during the training process, and minimizing the loss function using a gradient descent method; Acquire historical vehicle driving data, and classify the historical vehicle driving data using the BP network model to obtain a target driving scene, and determine the CNN network model corresponding to the target driving scene; The historical slope data is input into the CNN network model corresponding to the target driving scenario, and the predicted slope data within a preset time period starting from the current moment is predicted, wherein the historical slope data is the slope data obtained in the historical time period before the current moment.

2. The method according to claim 1, characterized in that Construct BP network model, including: Acquire training vehicle driving data, where the training vehicle driving data is vehicle driving data acquired in a previous time period, where the previous time period is a time period earlier than the historical time period; Dividing the training vehicle driving data into a plurality of travel segment data according to a preset time interval, and extracting characteristic driving parameters from each of the travel segment data, wherein the characteristic driving parameters include at least one of the following: maximum speed, average speed, speed standard deviation, maximum acceleration, average acceleration, standard deviation of acceleration, acceleration ratio, uniform speed ratio, idle speed ratio, maximum slope, average slope, and standard deviation of slope; The characteristic driving parameters and labels corresponding to the characteristic driving parameters are used to train the model to obtain the BP network model, wherein the labels are the driving scenarios corresponding to the characteristic driving parameters.

3. The method according to claim 2, characterized in that After obtaining the training vehicle driving data, the method further includes: performing filtering and downsampling processing on the training vehicle driving data to obtain processed training vehicle driving data; Dividing the training vehicle driving data into a plurality of travel segment data according to a preset time interval includes: dividing the processed training vehicle driving data into a plurality of travel segment data according to the preset time interval.

4. The method according to claim 1, characterized in that The method further comprises: The width of the sliding window is determined according to the number of the training slope data.

5. The method according to claim 1, characterized in that The CNN network model is a one-dimensional CNN network model, which includes a one-dimensional convolutional layer, a pooling layer and a fully connected layer.

6. The method according to claim 1, characterized in that Obtaining historical vehicle driving data includes at least one of the following: Receive historical vehicle speed data collected by a vehicle speed sensor; Receive historical acceleration data collected by the acceleration sensor; Receive historical slope data obtained by a road slope sensor set.

7. A road slope prediction device based on BP and CNN, characterized in that: include: A first construction unit is used to construct a BP network model, wherein the input of the BP network model is vehicle driving data, and the output of the BP network model is a driving scene, wherein the vehicle driving data includes at least one of vehicle speed data, acceleration data, and slope data, and the driving scene includes a plain scene and a mountain scene; A second construction unit is used to construct a CNN network model, including a plurality of CNN network models under the driving scenarios, wherein the driving scenarios correspond to the CNN network models one by one; A processing unit, used to obtain historical vehicle driving data, and classify the historical vehicle driving data using the BP network model to obtain a target driving scene, and determine the CNN network model corresponding to the target driving scene; A prediction unit, configured to input historical slope data into the CNN network model corresponding to the target driving scenario, and predict the predicted slope data within a preset time period starting from the current moment, wherein the historical slope data is the slope data obtained in the historical time period before the current moment; Wherein, the second construction unit is used to obtain training slope data for each of the driving scenarios, the training slope data is the slope data obtained in the previous time period, and the previous time period is a time period earlier than the historical time period; the training slope data is processed into a training set according to the sliding window method, the training set includes multiple groups of training data, any group of training data includes input slope data and output slope data immediately following it, and the sum of the length of the input slope data and the length of the output slope data is equal to the width of the sliding window; the training set is used for training to obtain the CNN network model corresponding to each of the driving scenarios; wherein, the training set is used for training to obtain the CNN network model corresponding to each of the driving scenarios, including: normalizing any group of the training data in the training set, using the normalized data for training to obtain the CNN network model corresponding to each of the driving scenarios, and using RMSE as the loss function during the training process, and minimizing the loss function using the gradient descent method.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the road slope prediction method based on BP and CNN as described in any one of claims 1 to 6.

9. An electronic device, characterized in that: include: One or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include a method for executing the road slope prediction method based on BP and CNN as described in any one of claims 1 to 6.