A slope adaptive prediction method, system, terminal and medium

By optimizing the multi-objective particle swarm optimization algorithm with long short-term memory network and adaptive mechanism, the problem of insufficient accuracy of traditional slope prediction in complex environments is solved, and high-precision slope prediction without the need for additional devices is achieved.

CN118484643BActive Publication Date: 2026-11-27SINO TRUK JINAN POWER CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410591172.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-13
Publication Date
2026-11-27
Estimated Expiration
2044-05-13

AI Technical Summary

Technical Problem

Traditional slope prediction methods struggle to accurately capture dynamic changes in slope under complex and ever-changing road conditions, and also increase costs.

Method used

By modeling with a Long Short-Term Memory (LSTM) network and optimizing it using an adaptive multi-objective particle swarm optimization algorithm, slope prediction can be achieved, reducing costs and improving prediction accuracy.

Benefits of technology

Without the need for additional visual sensors, it can adaptively adjust the network structure and parameters to achieve accurate prediction of complex and variable slopes, reducing costs and improving prediction accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118484643B_ABST
    Figure CN118484643B_ABST
Patent Text Reader

Abstract

The present application relates to the field of slope prediction, and specifically discloses a kind of slope adaptive prediction method, system, terminal and medium, according to the preset sampling interval from automatic gearbox collection historical slope data, using the historical slope data collected to construct training set;Using training set to train the long short-term memory network constructed, simultaneously, using the multi-objective particle swarm algorithm of adaptive mechanism to optimize the structure and parameter of long short-term memory network, obtain the long short-term memory network after training;According to the preset sampling frequency from automatic gearbox collection real-time slope data, after real-time slope data are smoothed, input into the long short-term memory network after training, obtain slope prediction value.The present application is modeled by long short-term memory network, realizes the slope prediction of time series, does not need to increase other devices, reduces the cost of slope prediction, and improves prediction accuracy by the multi-objective particle swarm algorithm of adaptive mechanism.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of slope prediction, specifically to a slope adaptive prediction method, system, terminal, and medium. Background Technology

[0002] In autonomous driving and intelligent vehicle control systems, accurate slope prediction is crucial for vehicle dynamics control, energy consumption optimization, and driving safety. Traditional slope prediction methods are typically based on physical models or simple statistical methods, which often fail to achieve satisfactory prediction results in complex and variable road environments. Especially when road slopes change frequently or exhibit nonlinear variations, traditional prediction methods often struggle to accurately capture the dynamic changes in slope.

[0003] Patent application CN114394081A discloses a road slope prediction and gear shifting assistance method based on image processing. It acquires real-time images of the road ahead of a vehicle, and obtains lane line prediction results based on the real-time images. Based on imaging principles, it calculates the first road surface slope prediction value based on the lane line prediction results. This method can accurately predict the road surface slope value ahead of the vehicle. Patent application CN112862890A discloses a road slope prediction method. It acquires road images using a camera; detects first and second image lane lines from the road images; sets multiple road image segmentation points along the road image centerline of the first and second image lane lines; determines the camera's pitch angle relative to the road plane at each road spatial segmentation point using the corresponding road image segmentation points; calculates the spatial coordinates of each road spatial segmentation point recursively based on the camera's intrinsic and extrinsic parameters and the pitch angle; and constructs a road model based on each spatial coordinate. This method enables the prediction of road slopes in a relatively simple way. However, both of these slope prediction methods require the addition of visual sensors to acquire images, which then process the images to predict the slope, increasing the cost of slope prediction. Summary of the Invention

[0004] To address the aforementioned issues, this invention provides a slope adaptive prediction method, system, terminal, and medium. By modeling with a long short-term memory network, it achieves slope prediction for time series without requiring additional components, thus reducing the cost of slope prediction. Furthermore, by optimizing the long short-term memory network using a multi-objective particle swarm optimization algorithm with an adaptive mechanism, the structure and parameters of the obtained long short-term memory network are made more consistent with actual operating conditions, thereby improving prediction accuracy.

[0005] In a first aspect, the technical solution of the present invention provides a slope adaptive prediction method, comprising the following steps:

[0006] Historical slope data is collected from the automatic transmission according to a preset sampling interval. The collected historical slope data is then smoothed to construct a training set.

[0007] The constructed Long Short-Term Memory (LSTM) network is trained using the training set. At the same time, the structure and parameters of the LSM network are optimized using an adaptive multi-objective particle swarm optimization algorithm to obtain an optimized LSM network.

[0008] Real-time slope data is collected from the automatic transmission according to the preset sampling frequency. After smoothing the real-time slope data, it is input into the trained long short-term memory network to obtain the slope prediction value.

[0009] In an optional implementation, an adaptive multi-objective particle swarm optimization algorithm is used to optimize the structure and parameters of the long short-term memory network, specifically including:

[0010] Step 1: Using the structure and parameter vectors of the Long Short-Term Memory (LSTM) network as the position vectors for the particle swarm optimization (PSO) algorithm, the optimization objective is to minimize the LSM root mean square error, the number of hidden layer neurons, and the norm of the weight matrix. This is expressed as:

[0011] min F(t)=[f1(t),f2(t),f3(t)]

[0012] Where f1(t) represents the root mean square error optimization objective of the multi-objective particle swarm optimization algorithm, f2(t) represents the hidden layer neuron number optimization objective of the multi-objective particle swarm optimization algorithm, and f3(t) represents the weight matrix norm optimization objective of the multi-objective particle swarm optimization algorithm.

[0013] The structure of a Long Short-Term Memory (LSTM) network is determined by the number of neurons in the hidden layers, and the parameters of an LSM network are weights and biases.

[0014] The formulas for calculating the three optimization objectives are as follows:

[0015]

[0016] f2(t)=J(t)

[0017] f3(t)=||w i (t)||+||w c (t)||+||w o (t)||

[0018] In the formula, y(t) represents the actual output of the short-term memory network at time t. Let J(t) represent the expected output of the Long Short-Term Memory (LSTM) network at time t, J(t) be the number of hidden layer neurons at time t, T represent the training iteration time of the LSM network, and |||| denote the norm; w iw represents the input gate weights. c w represents the candidate state weights. o Indicates the output gate weights;

[0019] Step 2: Set the particle swarm optimization population size N and the maximum number of iterations K. max The number of population iterations is denoted as k;

[0020] Step 3: Perform the population initialization process, randomly generate N particles, and calculate three optimization objective values. Use the initial position vectors of the N particles as the initial individual optimal solutions for the particles.

[0021] Step 4: Update the individual optimal solution by comparing the individual optimal solution with the target value of the corresponding particle and selecting the position vector with the best target value as the individual optimal solution. If two position vectors are non-dominated, randomly select one of the position vectors as the individual optimal solution.

[0022] Step 5: Update the global optimal solution. Through an adaptive mechanism, obtain the global optimal solution in the particle swarm optimization algorithm to achieve adaptive selection of the global optimal solution.

[0023] Step 6, the position and velocity update method for particle swarm optimization is as follows:

[0024] v n (k+1)=0.7·v n (k)+1.2·r1⊙(p n (k)-x n (k))+1.2·r2⊙(g(k)-x n (k))

[0025] x n (k+1)=x n (k)+v n (k+1)

[0026] Among them, v n (k) is the velocity vector of the nth particle in the kth generation; x n (k) is the position vector of the nth particle in the kth generation, composed of the weights and biases of the forget gate, input gate, candidate state, and output gate; p n g(k) is the individual optimal solution of the nth particle in the kth generation; g(k) is the global optimal solution of the population in the kth generation; r1 and r2 represent random vectors in the range [0, 1], and ⊙ is the Hadamard product;

[0027] Step 7: Perform population iteration, i.e., increment k by 1. If k <K max Then iterate.

[0028] Steps 4 through 7 are performed; otherwise, the location vector of the global optimal solution is output as the structure and parameters of the Long Short-Term Memory network.

[0029] In an optional implementation, the adaptive mechanism in step 5 includes:

[0030] Step 5.1, detect the population evolutionary status;

[0031] Step 5.2: Select the global optimal solution based on the evolutionary state.

[0032] In an optional implementation, step 5.1, detecting the population evolutionary state, includes establishing convergence and diversity indices, which are expressed as follows:

[0033]

[0034]

[0035] Where PC(k) is the population convergence index, PD(k) is the population diversity index, and CS... i (k) and DS i (k) represents the convergence and diversity of i particles in the k-th iteration, respectively;

[0036] The formula for calculating convergence is:

[0037]

[0038] Where, p i (k-1) represents the optimal solution for the i-th particle in the (k-1)-th generation, x i (k) is the position vector of the i-th particle in the k-th generation;

[0039] The formula for calculating diversity is:

[0040]

[0041] Where M is the number of optimization objectives, f i,m (k) represents the m-th target value of the i-th particle in the target space;

[0042] Convergence and diversity metrics are calculated after the fourth iteration, and the global optimal solution required for the first four iterations is randomly selected from the non-dominated solutions of the external archive.

[0043] In an optional implementation, step 5.2 selects the global optimal solution based on the evolutionary state, specifically including selecting the global optimal solution based on convergence and diversity indices, expressed as:

[0044]

[0045] Where g(k) is the globally optimal solution chosen in the kth generation, g D (k) represents a globally optimal solution with good diversity, g C (k) represents the global optimal solution with good convergence.

[0046] In an optional implementation, step 5.2, selecting the global optimal solution based on the evolutionary state, further includes:

[0047] (1) Selecting the globally optimal solution for diversity using Euclidean distance: Calculate the Euclidean distance between the non-dominated solution in the external archive and the non-dominated solution with the largest Euclidean distance, where the non-dominated solution with the largest Euclidean distance is selected as g. D (k);

[0048] (2) The globally optimal solution with convergence is selected by the density distance of the transformation. The density distance of the transformation is calculated as follows:

[0049]

[0050] Where A(k) is the number of non-dominated solutions in the k-th generation of external files, a h (k) represents the h-th non-dominated solution in the k-th generation of external files, a′ j (k) is a non-dominated solution a j The rotational state of (k) is defined as:

[0051]

[0052] Where, a′ j,m (k) is a j (k) Rotation value on the m-th target, a h,m (k) and a j,m (k) are the m-th objective values ​​of the h-th and j-th non-dominated solutions, respectively;

[0053] Choose the nondominated solution with the largest transformation-based density distance as g. C (k).

[0054] In one alternative implementation, the constructed long short-term memory network includes a forget gate, an input gate, and an output gate;

[0055] The forget gate's output at time t is described as follows:

[0056] f(t)=σ(w f [h(t-1),X(t)]+b f )

[0057] Where X(t) represents the system input at time t, is an n1×1 dimensional vector, and represents the slope from t-n1+1 seconds to t seconds, where n1 is the dimension of the input vector, and w f The weights of the forget gate are represented by an n2×n1 matrix, initialized as a random matrix in the range [0,1], where n2 is the dimension of the hidden layer vector, and b f The bias of the forget gate is represented by an n2×1 dimensional vector, initialized as a random vector in the range [0,1]. h(t-1) represents the output vector of the hidden layer at time t-1, which is an n2×1 dimensional vector. σ() represents the sigmoid function, and f(t) represents the output vector of the forget gate at time t, which is an n2×1 dimensional vector.

[0058] The output of the input gate is:

[0059] i(t)=σ(w i [h(t-1),X(t)]+b i )

[0060] Where i(t) represents the output of the input gate at time t, which is an n2×1 dimensional vector, and w i The weights of the input gate are represented by an n²×n² matrix, initialized as random matrices in the range [0,1]. i The bias of the input gate is represented by an n2×1 dimensional vector, initialized as a random vector in the range [0,1].

[0061] The candidate state intersecting with the input gate is represented as:

[0062]

[0063] in, Let w represent the candidate state at time t, which is an n2×1 dimensional vector. tanh() represents the hyperbolic tangent function. c The weights representing the candidate states are n²×n² matrices, initialized as random matrices within the range [0,1]. c The bias representing the candidate state is an n2×1 dimensional vector, initialized as a random vector in the range [0,1].

[0064] Based on the candidate state and the input gate, the cell state is updated in the following way:

[0065]

[0066] Where c(t) represents the cell state at time t, and is an n2×1 dimensional vector;

[0067] The output of the output gate is:

[0068] o(t)=σ(w o [h(t-1),X(t)]+bo )

[0069] Where o(t) represents the output of the output gate at time t, and is an n2×1 dimensional vector, w o The weights of the output gate are represented by an n²×n² matrix, initialized as random matrices within the range [0,1]. o The bias of the output gate is represented by an n2×1 dimensional vector, initialized as a random vector in the range [0,1].

[0070] The output of the hidden layer is represented as:

[0071] h(t)=o(t)⊙tanh(c(t))

[0072] The output of a Long Short-Term Memory (LSTM) network is represented as follows:

[0073] y(t)=σ(w y ·h(t))

[0074] Where y(t) represents the output of the Long Short-Term Memory network at time t, and is an n3×1 dimensional vector, representing the slope from the next 1 second to n3 seconds, w y The connection weights between the hidden layer and the output of the Long Short-Term Memory network are represented by an n3×n2 matrix, initialized as a random matrix in the range [0,1].

[0075] Secondly, the technical solution of the present invention provides a slope adaptive prediction system, comprising the following steps:

[0076] Training set construction module: Collects historical slope data from the automatic transmission according to the preset sampling frequency, and constructs the training set after smoothing the collected historical slope data;

[0077] Model optimization and training module: The constructed long short-term memory network is trained using the training set. At the same time, the structure and parameters of the trained long short-term memory network are optimized using an adaptive multi-objective particle swarm optimization algorithm to obtain the trained long short-term memory network.

[0078] Slope prediction module: Collects real-time slope data from the automatic transmission according to a preset sampling frequency, smooths the real-time slope data, and then inputs it into the trained long short-term memory network to obtain the slope prediction value.

[0079] Thirdly, the technical solution of the present invention provides a terminal, comprising:

[0080] Memory is used to store the slope adaptive prediction program;

[0081] A processor for implementing the steps of the slope adaptive prediction method as described in any of the preceding claims when executing the slope adaptive prediction program.

[0082] Fourthly, the present invention provides a computer-readable storage medium storing a slope adaptive prediction program, wherein the slope adaptive prediction program, when executed by a processor, implements the steps of the slope adaptive prediction method as described in any of the preceding claims.

[0083] This invention provides a slope adaptive prediction method, system, terminal, and medium, which, compared to existing technologies, has the following advantages: First, historical slope data is collected to train a Long Short-Term Memory (LSTM) network. Simultaneously, an adaptive multi-objective particle swarm optimization (MPS) algorithm is used to optimize and train the LSTM network. Finally, the trained LSTM network is used for real-time prediction. This invention can predict slopes by collecting slope data from an automatic transmission, eliminating the need for additional components and reducing the cost of slope prediction. Furthermore, by using an LSTM network to model and predict slope data, it can fully capture the temporal dependence and nonlinear changes in the slope data, thereby improving the accuracy and precision of the prediction. In addition, the adaptive MPS algorithm optimizes the structure and parameters of the LSTM network, enabling the network to adaptively adjust its structure and parameters according to slope changes under different road conditions, thus achieving accurate prediction of complex and variable slopes. Attached Figure Description

[0084] To more clearly illustrate the technical solutions of the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0085] Figure 1 This is a schematic diagram of a slope adaptive prediction method provided in an embodiment of the present invention.

[0086] Figure 2 This is a schematic block diagram of a slope adaptive prediction system provided in an embodiment of the present invention.

[0087] Figure 3 This is a schematic diagram of the structure of a terminal provided in an embodiment of the present invention. Detailed Implementation

[0088] To enable those skilled in the art to better understand the present invention, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are merely some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0089] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.

[0090] Figure 1 This is a schematic diagram of a slope adaptive prediction method provided by an embodiment of the present invention. The method establishes a future slope prediction model based on a long short-term memory (LSTM) network, and uses a multi-objective particle swarm optimization algorithm based on an adaptive mechanism to adjust the results and parameters of the LSM network, thereby achieving future slope prediction. Figure 1 The executing entity can be a slope adaptive prediction system. The slope adaptive prediction method provided in this embodiment of the invention is executed by a computer device, and correspondingly, the slope adaptive prediction system runs on the computer device. Depending on different requirements, the order of the steps in this flowchart can be changed, and some steps can be omitted.

[0091] like Figure 1 As shown, the method includes the following steps.

[0092] S1: Collect historical slope data from the automatic transmission according to the preset sampling interval, and construct a training set after smoothing the collected historical slope data.

[0093] In this embodiment, the slope data comes from the automatic transmission of a commercial vehicle. A preset sampling interval is used to obtain several historical slope data points, and a training set is constructed using the historical slope data.

[0094] For example, slope data is collected every second, and the slope data from the previous 20 seconds is used to predict the slope for the next 5 seconds. The 20 seconds of slope data serve as the input for network training. To improve prediction accuracy, a moving average method is used to smooth the slope data, thereby removing noise and obtaining processed data. The processed data is then used to construct a training set.

[0095] For example, the moving average method is represented as

[0096]

[0097] Where X(t) represents the current slope after data smoothing, and x(t) represents the slope value collected by the vehicle's automatic transmission.

[0098] S2 uses the training set to train the constructed Long Short-Term Memory (LSTM) network. At the same time, an adaptive multi-objective particle swarm optimization algorithm is used to optimize the structure and parameters of the trained LSM network to obtain the trained LSM network.

[0099] In this embodiment, by using an LSTM network to model and predict slope data, the temporal dependence and nonlinear changes in the slope data can be fully captured, thereby improving the accuracy and precision of the prediction. An adaptive multi-objective particle swarm optimization algorithm is employed to optimize the structure and parameters of the LSTM network, enabling the network to adaptively adjust its structure and parameters according to slope changes under different road environments, thus achieving accurate prediction of complex and variable slopes.

[0100] S3 collects real-time slope data from the automatic transmission according to the preset sampling frequency, smooths the real-time slope data, and then inputs it into the trained long short-term memory network to obtain the slope prediction value.

[0101] The slope data is collected in real time from the automatic transmission by a preset sampling frequency, and after smoothing, it is input into the optimized LSTM network for prediction, which ensures the real-time performance and effectiveness of the prediction results.

[0102] To further understand the present invention, the construction and optimization of the long short-term memory network in this embodiment are described in further detail below.

[0103] (1) Construction of Long Short-Term Memory Network.

[0104] The Long Short-Term Memory (LSTM) network in this embodiment includes three gates: a forget gate, an input gate, and an output gate.

[0105] The forget gate's output at time t is described as follows:

[0106] f(t)=σ(w f [h(t-1),X(t)]+b f )

[0107] Where X(t) represents the system input at time t, is an n1×1 dimensional vector, and represents the slope from t-n1+1 seconds to t seconds, where n1 is the dimension of the input vector, and w f The weights of the forget gate are represented by an n2×n1 matrix, initialized as a random matrix in the range [0,1], where n2 is the dimension of the hidden layer vector, and b f Let f(t) represent the bias of the forget gate, which is an n2×1 dimensional vector initialized as a random vector in the range [0,1]. h(t-1) represents the output vector of the hidden layer at time t-1, which is an n2×1 dimensional vector. σ() represents the sigmoid function, and f(t) represents the output vector of the forget gate at time t, which is an n2×1 dimensional vector.

[0108] The output of the input gate is:

[0109] i(t)=σ(w i [h(t-1),X(t)]+b i )

[0110] Where i(t) represents the output of the input gate at time t, which is an n2×1 dimensional vector, and w i The weights of the input gate are represented by an n²×n² matrix, initialized as random matrices in the range [0,1]. i The bias of the input gate is represented by an n2×1 dimensional vector, initialized as a random vector in the range [0,1].

[0111] The candidate state intersecting with the input gate is represented as:

[0112]

[0113] in, Let w represent the candidate state at time t, which is an n2×1 dimensional vector. tanh() represents the hyperbolic tangent function. c The weights representing the candidate states are n²×n² matrices, initialized as random matrices within the range [0,1]. c The bias representing the candidate state is an n2×1 dimensional vector, initialized as a random vector in the range [0,1].

[0114] Based on the candidate state and the input gate, the cell state is updated in the following way:

[0115]

[0116] Where c(t) represents the cell state at time t, is an n2×1 dimensional vector, and ⊙ is the Hadamard product.

[0117] The output of the output gate is:

[0118] o(t)=σ(w o [h(t-1),X(t)]+b o )

[0119] Where o(t) represents the output of the output gate at time t, and is an n2×1 dimensional vector, w o The weights of the output gate are represented by an n²×n² matrix, initialized as random matrices within the range [0,1]. o The bias of the output gate is represented by an n2×1 dimensional vector, initialized as a random vector in the range [0,1].

[0120] The output of the hidden layer is represented as:

[0121] h(t)=o(t)⊙tanh(c(t))

[0122] The output of a Long Short-Term Memory (LSTM) network is represented as follows:

[0123] y(t)=σ(w y *h(t))

[0124] Where y(t) represents the output of the Long Short-Term Memory network at time t, and is an n3×1 dimensional vector, representing the slope from the next 1 second to n3 seconds, w y The connection weights between the hidden layer and the output of the Long Short-Term Memory network are represented by an n3×n2 matrix, initialized as a random matrix in the range [0,1].

[0125] This embodiment predicts the slope over the next 5 seconds using 20 seconds of slope data, i.e., n1 = 20 and n3 = 5. Of course, the specific values ​​of the input and output time lengths can be set according to requirements. The weights, biases, and n2 in the model are initialized with random values. n2 represents the structure described below and is initialized as an integer in the range [10, 20]. The multi-objective particle swarm optimization algorithm, discussed later, is used to optimize these parameters during training to obtain an optimal neural network.

[0126] (2) Design an adaptive multi-objective particle swarm optimization algorithm to adjust the structure and parameters of the long short-term memory network.

[0127] Step 1: Using the structure and parameter vectors of the Long Short-Term Memory (LSTM) network as the position vectors for the particle swarm optimization (PSO) algorithm, the optimization objective is to minimize the LSM root mean square error, the number of hidden layer neurons, and the norm of the weight matrix. This is expressed as:

[0128] min F(t)=[f1(t),f2(t),f3(t)]

[0129] Where f1(t) represents the first optimization objective of the multi-objective particle swarm optimization algorithm, namely the root mean square error optimization objective; f2(t) represents the second optimization objective of the multi-objective particle swarm optimization algorithm, namely the number of hidden layer neurons optimization objective; and f3(t) represents the third optimization objective of the multi-objective particle swarm optimization algorithm, namely the weight matrix norm optimization objective.

[0130] The structure of a Long Short-Term Memory (LSTM) network is represented by the number of neurons in the hidden layers, which has the same dimension as the hidden layer vector. The parameters of an LSM network are weights and biases.

[0131] The formulas for calculating the three optimization objectives are as follows:

[0132]

[0133] f2(t)=J(t)

[0134] f3(t)=||w i (t)||+||w c (t)||+||w o (t)||

[0135] In the formula, y(t) represents the actual output of the short-term memory network at time t. Let J(t) represent the expected output of the Long Short-Term Memory network at time t, J(t) be the number of hidden layer neurons at time t, T represent the training iteration time of the Long Short-Term Memory network, and |||| represent the norm.

[0136] Step 2: Set the particle swarm optimization population size N and the maximum number of iterations K. max The number of population iterations is denoted as k.

[0137] For example, N=50, K max =100.

[0138] Step 3: Perform the population initialization process, randomly generate N particles, and calculate three optimization objective values. Use the initial position vectors of the N particles as the initial individual optimal solutions for the particles.

[0139] Step 4: Update the individual optimal solution by comparing the individual optimal solution with the target value of the corresponding particle. Select the position vector with the best target value as the individual optimal solution. If two position vectors are not dominated, randomly select one of the position vectors as the individual optimal solution.

[0140] Step 5: Update the global optimal solution. Through an adaptive mechanism, obtain the global optimal solution in the particle swarm optimization algorithm to achieve adaptive selection of the global optimal solution.

[0141] The adaptive mechanism consists of two steps: first, detecting the population's evolutionary state; and second, selecting the global optimal solution based on the evolutionary state. This achieves closed-loop feedback of information, allowing for planned adjustments to the flight direction of particles in the population, thereby improving the population's diversity and convergence.

[0142] Step 5.1, detect the population evolution status.

[0143] The evolutionary state detection mechanism needs to establish convergence and diversity indices, which are expressed as follows:

[0144]

[0145]

[0146] Where PC(k) is the population convergence index, PD(k) is the population diversity index, and CS... i (k) and DS i (k) represents the convergence and diversity of i particles in the kth iteration, respectively.

[0147] The formula for calculating convergence is:

[0148]

[0149] Where, p i (k-1) represents the optimal solution for the i-th particle in the (k-1)-th generation, x i (k) is the position vector of the i-th particle in the k-th generation.

[0150] The formula for calculating diversity is:

[0151]

[0152] Where M is the number of optimization objectives, f i,m (k) represents the m-th target value of the i-th particle in the target space.

[0153] It should be noted that the convergence and diversity indices are calculated after the fourth iteration, and the global optimal solution required for the first four iterations is randomly selected from the non-dominated solutions of the external archive.

[0154] Step 5.2: Select the global optimal solution based on the evolutionary state.

[0155] The global optimal solution is selected based on convergence and diversity indices, expressed as:

[0156]

[0157] Where g(k) is the globally optimal solution chosen in the kth generation, g D (k) represents a globally optimal solution with good diversity, g C (k) represents the global optimal solution with good convergence.

[0158] g D (k) and g C (k) The selection is made by using the Euclidean distance of the non-dominated solution in the target space and the density distance based on the transformation, and g is chosen. D (k) and g C (k), the selection method based on the two distances can be described as the following process.

[0159] 1) Selecting the globally optimal solution for diversity using Euclidean distance: Calculate the Euclidean distance between a non-dominated solution in the external archive and its nearest Euclidean distance, where the non-dominated solution with the largest Euclidean distance is selected as g. D (k).

[0160] 2) The globally optimal solution with convergence is selected by the density distance of the transformation. The density distance of the transformation is calculated as follows:

[0161]

[0162] Where A(k) is the number of non-dominated solutions in the k-th generation of external files, a h (k) represents the h-th non-dominated solution in the k-th generation of external files, a′ j (k) is a non-dominated solution a j The rotational state of (k) is defined as:

[0163]

[0164] Where, a′ j,m (k) is a j (k) Rotation value on the m-th target, a h,m (k) and a j,m (k) represents the m-th objective value of the h-th and j-th non-dominated solutions, respectively.

[0165] Choose the nondominated solution with the largest transformation-based density distance as g. C (k).

[0166] Step 6, the position and velocity update method for particle swarm optimization is as follows:

[0167] v n (k+1)=0.7·v n (k)+1.2·r1⊙(p n (k)-x n (k))+1.2·r2⊙(g(k)-x n (k))

[0168] x n (k+1)=x n (k)+v n (k+1)

[0169] Among them, v n (k) is the velocity vector of the nth particle in the kth generation; x n (k) is the position vector of the nth particle in the kth generation, composed of the weight matrix and bias matrix of the forget gate, input gate, candidate state, and output gate; p n g(k) is the individual optimal solution of the nth particle in the kth generation; g(k) is the global optimal solution of the population in the kth generation; r1 and r2 represent random vectors in the range [0, 1].

[0170] Step 7: Perform population iteration, i.e., increment k by 1. If k <K max If the condition is met, then iterate through steps 4 to 7; otherwise, output the position vector of the global optimal solution as the structure and parameters of the long short-term memory network.

[0171] The above text provides a detailed description of an embodiment of an adaptive slope prediction method. Based on the adaptive slope prediction method described in the above embodiment, this invention also provides an adaptive slope prediction device corresponding to the method.

[0172] Figure 2 This is a schematic block diagram of a slope adaptive prediction system provided in an embodiment of the present invention. In this embodiment, the slope adaptive prediction system 200 can be divided into multiple functional modules according to its functions, such as... Figure 2 As shown. The functional modules may include: a training set construction module 210, a model optimization and training module 220, and a slope prediction module 230. The module referred to in this invention is a series of computer program segments that can be executed by at least one processor and perform a fixed function, and which are stored in memory.

[0173] Training set construction module 210: Collects historical slope data from the automatic transmission according to the preset sampling frequency, and constructs a training set after smoothing the collected historical slope data.

[0174] Model optimization training module 220: The constructed long short-term memory network is trained using the training set. At the same time, the structure and parameters of the trained long short-term memory network are optimized using an adaptive multi-objective particle swarm optimization algorithm to obtain the trained long short-term memory network.

[0175] Slope prediction module 230: Collects real-time slope data from the automatic transmission according to a preset sampling frequency, smooths the real-time slope data, and inputs it into the trained long short-term memory network to obtain the slope prediction value.

[0176] The slope adaptive prediction system of this embodiment is used to implement the aforementioned slope adaptive prediction method. Therefore, the specific implementation of this system can be found in the embodiment section of the slope adaptive prediction method above. Thus, the specific implementation can be referred to the description of the corresponding embodiments, and will not be elaborated here.

[0177] Furthermore, since the slope adaptive prediction system in this embodiment is used to implement the aforementioned slope adaptive prediction method, its function corresponds to the function of the above method, and will not be described again here.

[0178] Figure 3 A schematic diagram of a terminal 300 provided in an embodiment of the present invention includes: a processor 310, a memory 320, and a communication unit 330. The processor 310 is used to implement the following steps when executing the slope adaptive prediction program stored in the memory 320:

[0179] Historical slope data is collected from the automatic transmission according to a preset sampling interval. The collected historical slope data is then smoothed to construct a training set.

[0180] The constructed Long Short-Term Memory (LSTM) network is trained using the training set. At the same time, the structure and parameters of the trained LSM network are optimized using an adaptive multi-objective particle swarm optimization algorithm to obtain the trained LSM network.

[0181] Real-time slope data is collected from the automatic transmission according to the preset sampling frequency. After smoothing the real-time slope data, it is input into the trained long short-term memory network to obtain the slope prediction value.

[0182] The terminal 300 includes a processor 310, a memory 320, and a communication unit 330. These components communicate via one or more buses. Those skilled in the art will understand that the server structure shown in the figure does not constitute a limitation of the present invention. It can be a bus topology or a star topology, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0183] The memory 320 can be used to store the execution instructions of the processor 310. The memory 320 can be implemented by any type of volatile or non-volatile memory terminal or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. When the execution instructions in the memory 320 are executed by the processor 310, the terminal 300 is able to perform some or all of the steps in the above method embodiments.

[0184] The processor 310 serves as the control center of the storage terminal, connecting various parts of the electronic terminal via various interfaces and lines. It executes software programs and / or modules stored in the memory 320, and calls data stored in the memory to perform various functions of the electronic terminal and / or process data. The processor can be composed of integrated circuits (ICs), such as a single packaged IC or multiple packaged ICs with the same or different functions connected together. For example, the processor 310 may consist only of a central processing unit (CPU). In this embodiment of the invention, the CPU may have a single processing core or include multiple processing cores.

[0185] The communication unit 330 is used to establish a communication channel, enabling the storage terminal to communicate with other terminals. It can receive user data sent by other terminals or send user data to other terminals.

[0186] The present invention also provides a computer storage medium, which may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM), etc.

[0187] The computer storage medium stores a slope adaptive prediction program, which, when executed by a processor, performs the following steps:

[0188] Historical slope data is collected from the automatic transmission according to a preset sampling interval. The collected historical slope data is then smoothed to construct a training set.

[0189] The constructed Long Short-Term Memory (LSTM) network is trained using the training set. At the same time, the structure and parameters of the trained LSM network are optimized using an adaptive multi-objective particle swarm optimization algorithm to obtain the trained LSM network.

[0190] Real-time slope data is collected from the automatic transmission according to the preset sampling frequency. After smoothing the real-time slope data, it is input into the trained long short-term memory network to obtain the slope prediction value.

[0191] Those skilled in the art will clearly understand that the techniques in the embodiments of the present invention can be implemented using software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solutions in the embodiments of the present invention, or the parts that contribute to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, or any other medium capable of storing program code. It includes several instructions to cause a computer terminal (which may be a personal computer, a server, or a second terminal, a network terminal, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention.

[0192] In the embodiments provided by this invention, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0193] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0194] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0195] The above-disclosed embodiments are merely preferred embodiments of the present invention, but the present invention is not limited thereto. Any non-creative variations that can be conceived by those skilled in the art, as well as any improvements and modifications made without departing from the principles of the present invention, should fall within the protection scope of the present invention.

Claims

1. A slope adaptive prediction method, characterized in that, Includes the following steps: Historical slope data is collected from the automatic transmission according to a preset sampling interval. The collected historical slope data is then smoothed to construct a training set. The constructed Long Short-Term Memory (LSTM) network is trained using the training set. At the same time, the structure and parameters of the LSM network are optimized using an adaptive multi-objective particle swarm optimization algorithm to obtain the trained LSM network. Real-time slope data is collected from the automatic transmission according to the preset sampling frequency. After the real-time slope data is smoothed, it is input into the trained long short-term memory network to obtain the slope prediction value. The structure and parameters of Long Short-Term Memory (LSTM) networks are optimized using an adaptive multi-objective particle swarm optimization algorithm, specifically including: Step 1: Using the structure and parameter vectors of the Long Short-Term Memory (LSTM) network as the position vectors for the particle swarm optimization (PSO) algorithm, the optimization objective is to minimize the LSM root mean square error, the number of hidden layer neurons, and the norm of the weight matrix. This is expressed as: in, This represents the root mean square error optimization objective of the multi-objective particle swarm optimization algorithm. This represents the objective of optimizing the number of hidden layer neurons in a multi-objective particle swarm optimization algorithm. The weight matrix norm optimization objective is represented by the multi-objective particle swarm optimization algorithm. The structure of a Long Short-Term Memory (LSTM) network is represented by the number of neurons in the hidden layer, and the parameters of an LSM network are weights and biases. The formulas for calculating the three optimization objectives are as follows: In the formula, express t The actual output of the time-length short-term memory network. express t The expected output of the time-short-term memory network. for t The number of neurons in the hidden layer at any given time. T Let || denote the training iteration time of the Long Short-Term Memory network, and || denote the norm. Indicates the input gate weights. Represents the weight of the candidate state. Indicates the output gate weights; Step 2, set the population size of the particle swarm. N Set the maximum number of iterations for particle swarm optimization to 0. K max The number of population iterations is expressed as k ; Step 3: Perform the population initialization process and randomly generate... N 100 particles, and calculate three optimization objective values, with the initial 0.5 particles. N The position vector of each particle is used as the initial individual optimal solution for the particle; Step 4: Update the individual optimal solution by comparing the individual optimal solution with the target value of the corresponding particle. Select the position vector with the best target value as the individual optimal solution. If two position vectors are non-dominated, randomly select one of the position vectors as the individual optimal solution. Step 5: Update the global optimal solution. Through an adaptive mechanism, obtain the global optimal solution in the particle swarm optimization algorithm to achieve adaptive selection of the global optimal solution. Step 6, the position and velocity update method for particle swarm optimization is as follows: in, For the first n The particle in the first k The velocity vector of the generation; For the first n The particle in the first k The position vector of the generation consists of the weights and biases of the forget gate, input gate, candidate state, and output gate; For the first n The particle in the first k The individual optimal solution of the generation; For the population in the first k The global optimal solution of the generation; and Represents a random vector in the range [0, 1]. For Hadamard product; Step 7, perform population iteration, i.e. k Increase by 1, if k < K max If the condition is met, then iterate through steps 4 to 7; otherwise, output the position vector of the global optimal solution as the structure and parameters of the long short-term memory network.

2. The slope adaptive prediction method according to claim 1, characterized in that, The adaptive mechanism in step 5 includes: Step 5.1, detect the population evolutionary status; Step 5.2: Select the global optimal solution based on the evolutionary state.

3. The slope adaptive prediction method according to claim 2, characterized in that, Step 5.1 Detecting the population's evolutionary state includes establishing convergence and diversity indices, which are expressed as follows: in, As an indicator of population convergence, As an indicator of population diversity, and They are respectively for i The particle in the first k Convergence and diversity during the iteration process; The formula for calculating convergence is: in, For the first i The particle in the first k The optimal solution for an individual in generation -1. For the first i The particle in the first k The position vector of the substitute; The formula for calculating diversity is: in, M To optimize the target quantity, For the first i The nth particle in the target space m One target value; Convergence and diversity metrics are calculated after the fourth iteration, and the global optimal solution required for the first four iterations is randomly selected from the non-dominated solutions of the external archive.

4. The slope adaptive prediction method according to claim 3, characterized in that, Step 5.2 Selecting the global optimal solution based on the evolutionary state, specifically including selecting the global optimal solution based on convergence and diversity indices, expressed as: in, For the first k The globally optimal solution chosen by substitution. This represents a globally optimal solution with good diversity. This represents the globally optimal solution with good convergence.

5. The slope adaptive prediction method according to claim 4, characterized in that, Step 5.2, selecting the global optimal solution based on the evolutionary state, also includes: (1) Selecting the globally optimal solution for diversity using Euclidean distance: Calculate the Euclidean distance between the non-dominated solution in the external archive and the non-dominated solution with the closest Euclidean distance. The non-dominated solution with the largest Euclidean distance is selected as the optimal solution. ; (2) The globally optimal solution with convergence is selected by the density distance of the transformation. The density distance of the transformation is calculated as follows: in, For the first k The number of non-dominated solutions in the external archive. For the first k The first in the external archives h A non-dominated solution, Non-dominated solution The rotational state is defined as: in, yes In the m Rotation values ​​on each target and They are the first h The and the first j The first nondominated solution m One target value; Choose the nondominated solution with the largest transformation-based density distance as .

6. The slope adaptive prediction method according to any one of claims 1-5, characterized in that, The constructed long short-term memory network includes a forget gate, an input gate, and an output gate; The Gate of Oblivion is Time t The output description is as follows: in, express t The time system input is... n A 1×1 dimensional vector represents t - n 1+1 seconds to arrive t The slope in seconds, n 1 represents the dimension of the input vector. The weight of the forget gate is denoted as . n 2× n A 1-dimensional matrix, initialized as a random matrix in the range [0,1]. n 2 represents the dimension of the hidden layer vector. The bias of the forget gate is represented as follows: n A 2×1 dimensional vector, initialized as a random vector in the range [0,1]. express t The output vector of the hidden layer at time -1 is n 2×1 dimensional vector, This represents the sigmoid function. express t The output vector of the forget gate at each time step is: n 2×1 dimensional vector; The output of the input gate is: in, express t The output of the input gate at any time is... n 2×1 dimensional vector, The weights of the input gates are represented as follows: n 2× n A 2D matrix, initialized as a random matrix in the range [0,1]. This represents the bias of the input gate, which is... n A 2×1 dimensional vector, initialized as a random vector in the range [0,1]. The candidate state intersecting with the input gate is represented as: in, express t The candidate states at time t are n A 2×1 dimensional vector, where tanh() represents the hyperbolic tangent function. The weights of the candidate states are: n 2× n A 2D matrix, initialized as a random matrix in the range [0,1]. The bias representing the candidate state is: n A 2×1 dimensional vector, initialized as a random vector in the range [0,1]. Based on the candidate state and the input gate, the cell state is updated in the following way: in, express t The cell state at any given moment is... n 2×1 dimensional vector; The output of the output gate is: in, express t The output of the output gate at any time is... n 2×1 dimensional vector, The weights of the output gates are represented as follows: n 2× n A 2D matrix, initialized as a random matrix in the range [0,1]. This represents the bias of the output gate, which is... n A 2×1 dimensional vector, initialized as a random vector in the range [0,1]. The output of the hidden layer is represented as: The output of a Long Short-Term Memory (LSTM) network is represented as follows: in, express t The output of the time-length short-term memory network is... n A 3×1 dimensional vector representing the next 1 second to... n A 3-second slope This represents the connection weights between the hidden layer and the output of the Long Short-Term Memory network. n 3× n A 2D matrix, initialized as a random matrix in the range [0,1].

7. A slope adaptive prediction system, characterized in that, Includes the following steps: Training set construction module: Collects historical slope data from the automatic transmission according to the preset sampling frequency, and constructs the training set after smoothing the collected historical slope data; Model optimization and training module: The constructed long short-term memory network is trained using the training set. At the same time, the structure and parameters of the long short-term memory network are optimized using an adaptive multi-objective particle swarm optimization algorithm to obtain the trained long short-term memory network. Slope prediction module: Collects real-time slope data from the automatic transmission according to the preset sampling frequency, smooths the real-time slope data and inputs it into the trained long short-term memory network to obtain the slope prediction value; The structure and parameters of Long Short-Term Memory (LSTM) networks are optimized using an adaptive multi-objective particle swarm optimization algorithm, specifically including: Step 1: Using the structure and parameter vectors of the Long Short-Term Memory (LSTM) network as the position vectors for the particle swarm optimization (PSO) algorithm, the optimization objective is to minimize the LSM root mean square error, the number of hidden layer neurons, and the norm of the weight matrix. This is expressed as: in, This represents the root mean square error optimization objective of the multi-objective particle swarm optimization algorithm. This represents the objective of optimizing the number of hidden layer neurons in a multi-objective particle swarm optimization algorithm. The weight matrix norm optimization objective is represented by the multi-objective particle swarm optimization algorithm. The structure of a Long Short-Term Memory (LSTM) network is represented by the number of neurons in the hidden layer, and the parameters of an LSM network are weights and biases. The formulas for calculating the three optimization objectives are as follows: In the formula, express t The actual output of the time-length short-term memory network. express t The expected output of the time-short-term memory network. for t The number of neurons in the hidden layer at any given time. T Let || denote the training iteration time of the Long Short-Term Memory network, and || denote the norm. Indicates the input gate weights. Represents the weight of the candidate state. Indicates the output gate weights; Step 2, set the population size of the particle swarm. N Set the maximum number of iterations for particle swarm optimization to 0. K max The number of population iterations is expressed as k ; Step 3: Perform the population initialization process and randomly generate... N 100 particles, and calculate three optimization objective values, with the initial 0.5 particles. N The position vector of each particle is used as the initial individual optimal solution for the particle; Step 4: Update the individual optimal solution by comparing the individual optimal solution with the target value of the corresponding particle. Select the position vector with the best target value as the individual optimal solution. If two position vectors are non-dominated, randomly select one of the position vectors as the individual optimal solution. Step 5: Update the global optimal solution. Through an adaptive mechanism, obtain the global optimal solution in the particle swarm optimization algorithm to achieve adaptive selection of the global optimal solution. Step 6, the position and velocity update method for particle swarm optimization is as follows: in, For the first n The particle in the first k The velocity vector of the generation; For the first n The particle in the first k The position vector of the generation consists of the weights and biases of the forget gate, input gate, candidate state, and output gate; For the first n The particle in the first k The individual optimal solution of the generation; For the population in the first k The global optimal solution of the generation; and Represents a random vector in the range [0, 1]. For Hadamard product; Step 7, perform population iteration, i.e. k Increase by 1, if k < K max If the condition is met, then iterate through steps 4 to 7; otherwise, output the position vector of the global optimal solution as the structure and parameters of the long short-term memory network.

8. A terminal, characterized in that, include: Memory is used to store the slope adaptive prediction program; A processor, configured to implement the steps of the slope adaptive prediction method as described in any one of claims 1-6 when executing the slope adaptive prediction program.

9. A computer-readable storage medium, characterized in that, The readable storage medium stores a slope adaptive prediction program, which, when executed by a processor, implements the steps of the slope adaptive prediction method as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Road slope prediction method and device and storage medium

    CN112862890A

  • Road gradient prediction and auxiliary gear shifting method and system based on image processing

    CN114394081A

  • Gradient recognition method, device and equipment and computer readable storage medium

    CN117272111A

  • Strip mine area vehicle low-carbon scheduling optimization method, system and equipment based on data driving and medium

    CN117787623A