Urban road network vehicle path estimation method based on deep recursion Logit model
By performing parameter estimation in the deep recursive Logit model, the problem of parameter estimation complexity and utility function assumption linearity in vehicle path estimation is solved, and the path estimation accuracy and complex path modeling capabilities of the model are improved.
Patent Information
- Application Number
- CN202411995141.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2044-12-31
AI Technical Summary
The existing deep recursive Logit model has complex parameter estimation in vehicle path estimation, making it difficult to ensure the effective unique solutions of linear equations, resulting in failure when the model iterates to the optimal parameters, and the utility function is assumed to be a linear function, which limits the model's ability to model complex paths.
The vehicle path estimation method of urban road network based on the deep recursive Logit model is used. By obtaining the trajectory data of the vehicle in the city road network, initializing the iteration round and utility function parameters, calculating the loss function and using the L-BFGS algorithm for gradient calculation, updating the parameters until the convergence conditions are reached, and parameter estimation is performed using linear or nonlinear utility functions.
Improve the accuracy of vehicle path estimation, ensure parameter feasible domains, enable the model to model complex paths, improve path estimation accuracy under nonlinear utility functions, and maintain small calculation overhead.
Smart Images

Figure CN119851471A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of traffic system state perception, and in particular to a method for estimating vehicle paths in urban road networks based on a deep recursive Logit model. Background Art
[0002] In recent years, path choice modeling has been widely studied. It can analyze path / trajectory observation data and help people implement segment-level traffic planning, management and control in urban traffic systems. Among them, the segment-based deep recursive logit model (RL) has many advantages over the complete path-based selection model: it does not need to build a complex set of candidate paths; it can generate more continuous model outputs; it allows for more detailed modeling of segment-level features, etc. The specific meaning of parameter estimation of the RL model is to solve the coefficient of the utility function based on the observed path. It is a function of segment attributes and refers to the immediate utility obtained from entering the next adjacent state (generally referring to the segment) from one state.
[0003] Due to the complexity brought by the recursive structure, parameter estimation of RL models is a core problem. The current parameter estimation of RL models generally adopts the interior point method (outer layer), in which the quasi-Newton method and other solution algorithms can be used to calculate the gradient, and then the parameters are updated iteratively in steps, so that the parameters in each step gradually approach the optimal estimated value.
[0004] The inner calculation of RL model parameter estimation is to solve a linear equation system according to the current parameters in each iteration step. The physical meaning of the solution of the linear equation system is the downstream utility of each road segment to the destination. If there is no solution for the downstream utility, the model will fail, which will prevent the algorithm from iterating to the optimal parameter solution. Existing methods adopt the idea of restricting parameter values, but these methods often do not start from the necessary and sufficient conditions for solvability. Some methods still cannot guarantee that the linear equation system has a valid and unique solution, while some methods give too strict conditions, resulting in a reduction in the feasible domain of parameters and an inability to model more complex path selection behaviors.
[0005] In addition, in the real world, the relationship between utility and related attributes is often nonlinear, but the existing modeling method of the utility function assumes that it is a linear function, which will to some extent limit the model's ability to model complex paths. Summary of the invention
[0006] The purpose of the present invention is to provide a method for estimating vehicle paths in urban road networks based on a deep recursive Logit model, which improves the accuracy of vehicle path estimation.
[0007] The purpose of the present invention can be achieved by the following technical solutions:
[0008] A vehicle path estimation method for an urban road network based on a deep recursive Logit model comprises the following steps:
[0009] Step 1: Obtain trajectory data of vehicles on the urban road network;
[0010] Step 2: Initialize the parameters of the utility function in the iteration round and the deep recursive Logit model, wherein the initial parameters are within the feasible domain, and the utility function is a linear utility function or a nonlinear utility function;
[0011] Step 3: Calculate the loss function based on the trajectory data and parameters;
[0012] Step 4: Perform gradient calculation according to the loss function and the L-BFGS algorithm to obtain an update direction;
[0013] Step 5: Calculate the step size of the next round according to the update direction and parameters, and further update the parameters to obtain updated parameters;
[0014] Step 6: Determine whether the convergence condition is met. If so, output the updated parameters as the final optimal parameters. If not, return to step 2 for iterative calculation according to the step size of the next round until the convergence condition is met.
[0015] Step 7: According to the optimal parameters in the deep recursive Logit model, the vehicle path selection in the urban road network is estimated to obtain an estimation result.
[0016] Furthermore, the initial parameters are within the feasible region and must meet the following conditions:
[0017] ρ(M)<1
[0018] Where M is the exponential adjacency utility matrix, which is a variable with respect to the parameter, and ρ(·) represents the spectral radius of the matrix.
[0019] Furthermore, when the linear utility function is adopted, the process of constructing the loss function includes:
[0020] Define a linear utility function v(a|k) and an exponential adjacency utility matrix M, where M is a variable related to parameter β, denoted as M(β), and the linear utility function v(a|k) is expressed as:
[0021] v(a|k)=β0+β1X1+β b X b +…+β |B| X |B| =β T X
[0022] In the formula, k is the state, indicating that the vehicle is in a certain section k, a is the adjacent downstream state, indicating the section a adjacent to section k, β0, β1, β b , …, β |B| is a parameter, which indicates the influence weight of different attributes on utility, X1, X b , …, X |B| is the attribute value of selecting a, which represents the length and capacity of the road section. M indicates that there is an upstream and downstream relationship between state k and state a. Its elements are M ka represents the utility value from state k to state a, and v(a|k) represents the utility value of choosing a in state k;
[0023] According to the trajectory data, a log-likelihood objective function LL(β;ξ * ), in order to maximize LL(β;ξ * ) estimates the parameters, where the log-likelihood objective function LL(β;ξ * ) is expressed as:
[0024]
[0025] In the formula, ξ * is the trajectory data, N od is the number of paths observed between the starting and ending points od, T is the maximum number of sections of each path, From k t to k t+1 The state transition probability of
[0026] Introducing the necessary and sufficient condition ρ(M(β))<1, combined with the log-likelihood objective function LL(β;ξ * ), construct the final loss function Loss(β;ξ * ;γ), by minimizing Loss(β;ξ * ;γ) estimation parameters, where the loss function Loss(β;ξ * ; The expression of γ) is:
[0027]
[0028] Where ρ(·) represents the spectral radius of the matrix and γ is the weight.
[0029] Furthermore, when the linear utility function is adopted, the step of acquiring the update direction includes:
[0030] Based on the loss function, according to the chain rule of partial derivatives, we get:
[0031]
[0032] In the formula, Loss is the loss function, β is the parameter, is the state transition probability, v(a|k) is the linear utility function, k is the state, indicating that the vehicle is in a certain road section k, and a is the adjacent downstream state;
[0033] Differentiate equation (1) to obtain the gradient d′ of parameter β;
[0034] The L-BFGS algorithm is used to perform a second-order correction on the gradient d′ to obtain an updated direction d.
[0035] Furthermore, when the linear utility function is used, the step of obtaining the updated parameters includes:
[0036] Perform line search according to the update direction and parameters to obtain the step length of the next round that meets the conditions. The line search process includes:
[0037] If ρ(M(β i +t·d i ))≥1, then update t=t / 2 until ρ(M(β i +t·d i ))<1, get the final step size for the next round;
[0038] Update the parameters according to the step size and update direction of the next round to obtain the updated parameters β i+1 , expressed as:
[0039] β i+1 =β i +t·d i
[0040] In the formula, β i+1 is the updated parameter, indicating the parameter of the i+1th round, β i is the parameter of the i-th round, ρ(·) represents the spectral radius of the matrix, t is the step size, d i is the update direction of the i-th round.
[0041] Furthermore, the nonlinear utility function is constructed using a residual neural network, and the specific construction steps include:
[0042] Define the network layer f of the residual neural network (l) (h): For the input vector h of the neural network layer, use the linear weight W (l) , b (l) Transform h and use the activation function σ (l) Output the final vector result, neural network layer f (l) (h) The expression is:
[0043] f (l) (h)=σ(l) (W (l) h+b (l) )
[0044] Where l is the lth network layer;
[0045] Definition of residual neural network: According to the network layer f (l) (h) constructing a residual neural network, including an input layer, an intermediate layer and an output layer;
[0046] Constructing a nonlinear utility function: For the input vector X of the residual neural network, it is transformed in turn through the input layer, the intermediate layer and the output layer, and finally the scalar utility function output by the output layer is used as the nonlinear utility function v θ (a|k), the nonlinear utility function v θ (a|k) is expressed as:
[0047] v θ (a|k)=f (out) (h (L) )
[0048] Among them, the transformation expression of the input layer is:
[0049] h (in) =f (in) (X)
[0050] The transformation expression of the intermediate layer is:
[0051] h (1) =f (1) (h (in) )+h (in) ,...,h (L) =f (L) (h (L-1) )+h (L-1)
[0052] Where, θ={W (in) ,b (in) ,W (l) ,b (l) ,W (out) ,b (out)} is a parameter, W (in) ,b (in) ,W (l) ,b (l) ,W (out) ,b (out) They are respectively the input layer linear weight, the input layer linear bias, the middle layer linear weight, the middle layer linear bias, the output layer linear weight, and the output layer linear bias. k is the state, indicating that the vehicle is in a certain section k. a is the adjacent downstream state, indicating that the section a is adjacent to the section k. f (out) (h(L) ) is the output vector of the output layer, L is the total number of network layers, f (in) (X) is the calculation result of the input layer, h (in) is the calculation result of the input layer, f (1) (h (in) ) is the calculation result of the first intermediate layer, h (1) It is the calculation result of the first intermediate layer. The input vector X represents the attribute vector in the nonlinear utility function.
[0053] Furthermore, when the nonlinear utility function is adopted, the step of acquiring the update direction includes:
[0054] Based on the loss function, the residual neural network is back-propagated, and further differential calculation is performed to obtain the gradient d′ of the parameter θ;
[0055] The L-BFGS algorithm is used to perform a second-order correction on the gradient d′ to obtain an updated direction d.
[0056] Furthermore, when the nonlinear utility function is adopted, the process of constructing the loss function includes:
[0057] Define the exponential adjacency utility matrix M, where M is a variable related to the parameter θ, denoted as M(θ);
[0058] According to the trajectory data, a log-likelihood objective function LL(θ; ξ * ), in order to maximize LL(θ;ξ * ) estimates the parameters, where the log-likelihood objective function LL(θ; ξ * ) is expressed as:
[0059]
[0060] In the formula, ξ * is the trajectory data, N od The number of paths observed between the starting and ending points od, T is the maximum number of sections of each path, From k t to k t+1 The state transition probability of
[0061] Introducing the necessary and sufficient condition ρ(M(θ))<1, combined with the log-likelihood objective function LL(θ; ξ * ), construct the final loss function Loss(θ;ξ * ;γ) to minimize Loss(θ;ξ * ;γ) estimation parameters, wherein the objective loss function Loss(θ;ξ * ; The expression of γ) is:
[0062]
[0063] Where ρ(·) represents the spectral radius of the matrix and γ is the weight.
[0064] Furthermore, when the nonlinear utility function is adopted, the step of obtaining the updated parameters includes:
[0065] Perform line search according to the update direction and parameters to obtain the step length of the next round that meets the conditions. The line search process includes:
[0066] If ρ(M(θ i +t·d i ))≥1, then update t=t / 2 until ρ(M(θ i +t·d i ))<1, get the final step size for the next round;
[0067] Update the parameters according to the step size and update direction of the next round to obtain the updated parameters θ i+1 , expressed as:
[0068] θ i+1 =θ i +t·d i
[0069] In the formula, θ i+1 is the updated parameter, indicating the parameter of the i+1th round, θ i The parameters of the i-th round, ρ(·) represents the spectral radius of the matrix, t is the step size, d i is the update direction of the i-th round.
[0070] Furthermore, the step of obtaining the estimation result includes:
[0071] Given a starting point o and an end point d, based on the optimal parameters, the state transition probability of the deep recursive Logit model is calculated to estimate the vehicle path result between the starting point and the end point;
[0072] The step of constructing the state transition probability includes:
[0073] In the section k, the next state a is selected according to probability in the downstream adjacent state set A(k), and the Bellman equation is constructed. The expression is:
[0074]
[0075] Where V d (k) is the downstream expected utility from state k to d, V d (k) is the downstream expected utility from state a to d, μ is the parameter coefficient of the extreme value Gumbel distribution, Vd (d) is the downstream expected utility from state d to d, which defaults to 0. is the expectation, ε(a|k) is the immediate utility v ′ The error component in (a|k), v(a|k) is the immediate utility v ′ The deterministic component of (a|k) is the utility function, including linear utility function and nonlinear utility function, k is the state, indicating that the vehicle is in a certain section k, a is the adjacent downstream state, indicating the section a adjacent to the section k;
[0076] Assume that ε(a|k) obeys the extreme value Gumbel distribution with parameters (0,μ), expressed as:
[0077]
[0078] According to formula (1) and (2), we can get:
[0079]
[0080] make Elements of the exponential adjacency utility matrix M get:
[0081]
[0082] In the formula, δ ka are the elements of the adjacency matrix δ, is the index of downstream expected utility from state a to d;
[0083] Assuming that all states k can reach the end point d through any path and any number of steps, equation (4) can be rewritten as:
[0084] z d =(δ⊙M)z d +b d (5)
[0085] Where b d is a unit vector, z d is the exponential vector of downstream expected utilities of all states to d
[0086] Transforming formula (5), we get:
[0087] z d =(I-δ⊙M) -1 b d (6)
[0088] Where I is a unit vector;
[0089] Set z d There is a unique non-negative solution. Solving equation (6) yields the state transition probability, which is expressed as:
[0090]
[0091] In the formula, p d (a|k) is the state transition probability from k to a.
[0092] Compared with the prior art, the present invention has the following beneficial effects:
[0093] (1) The present invention adopts a deep recursive Logit model to simulate the probability of selecting different paths on a road section. In the deep recursive Logit model, a utility function is used to represent the utility value of each selection scheme of the road section, and parameters in the utility function are used to characterize the influence weights of adjacent road sections. The present invention calculates and updates the parameters through continuous iteration to obtain the optimal parameters and the optimal influence weights, thereby improving the estimation accuracy of the vehicle path.
[0094] (2) The present invention performs parameter estimation calculation based on the necessary and sufficient conditions for the solvability of the deep recursive Logit model, thereby ensuring the feasible domain of parameters to the greatest extent possible, so that it can model complex paths.
[0095] (3) The present invention utilizes the universal approximation principle of any nonlinear continuous function of the residual neural network to model the nonlinear utility function, which can greatly improve the model's ability to model complex paths and improve the estimation accuracy of the vehicle path under the nonlinear utility function.
[0096] (4) Compared with some technologies that ensure the solvability of the model by changing the architecture of the deep recursive Logit model, the present invention does not change the overall architecture of the original model, and the deep recursive Logit model does not need to construct a complex set of candidate paths, and the additional computational overhead required is very small. BRIEF DESCRIPTION OF THE DRAWINGS
[0097] Figure 1 It is a schematic diagram of the method flow of the present invention;
[0098] Figure 2 It is the overall framework of the present invention;
[0099] Figure 3 is the relationship of the solvability conditions of the present invention. DETAILED DESCRIPTION
[0100] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. This embodiment is implemented based on the technical solution of the present invention, and provides a detailed implementation method and specific operation process, but the protection scope of the present invention is not limited to the following embodiments.
[0101] This embodiment provides a method for estimating a vehicle path in an urban road network based on a deep recursive Logit model. The symbols involved in the method include definitions:
[0102] Definition of road network G: Consider a connected directed graph G(N,L) with possible cycles, where N and L represent the set of nodes and the set of road segments in the graph, respectively.
[0103] Definition of state k: According to most deep recursive logit model theories, the state is defined as the traveler / vehicle being at a certain road section k.
[0104] Definition of action / edge k→a: According to most deep recursive logit model theories, an action / edge is defined as a transition from state k to the adjacent downstream state a.
[0105] Definition of the adjacency matrix δ: If state k is adjacent to state a in an upstream and downstream relationship, then the element δ in the kth row and ath column of the matrix δ is ij =1, otherwise δ ij =0.
[0106] The definition of origin and destination points: starting point section o and ending point section d respectively.
[0107] Instant Utility ′ Definition of (a|k): The utility obtained from state k to the adjacent downstream state a. Utility v ′ (a|k) contains a deterministic component v(a|k) and an error component ε(a|k).
[0108] Downstream Utility V d Definition of (k): Given a destination d, the total utility expected to be obtained by starting from state k and reaching d (via various different paths), where the utility from d to d is 0 (boundary condition).
[0109] Definition of Type I Extreme Value Distribution: Also known as Gumbel distribution, it is a probability distribution used to describe the distribution of extreme values (such as maximum or minimum values) of a random variable. In statistics, it is often used to model the occurrence of extreme events, such as the maximum water level of a flood, the maximum magnitude of an earthquake, etc. The probability density function (PDF) of the Gumbel distribution is usually expressed as: Where e is the base of the natural logarithm, parameter α is the location parameter, which represents the center of the distribution; μ is the scale parameter, which controls the width of the distribution.
[0110] The definition of the exponential adjacency utility matrix M is: if state k has an upstream and downstream adjacency relationship with state a, then the element in the kth row and ath column of the matrix δ is
[0111] Exponential downstream utility vector z dDefinition of vector z d The kth element of
[0112] State transition probability p d Definition of (a|k): For each given destination d, there is a state transition probability p d (a|k) represents the probability (between 0 and 1) of any transition from state k to the adjacent downstream state a.
[0113] In the Deep Recursive Logit Model, the state transition probabilities are derived from the following three steps / assumptions.
[0114] (1) Bellman equation: At road segment k, assume that the decision maker (traveler) probabilistically selects the next state a from the downstream adjacent state set A(k) to maximize the immediate utility v ′ (k|k) and the expected downstream utility V at the destination (absorption state) d (a) The sum.
[0115]
[0116] Where v(a|k) is the utility function, including linear utility function and nonlinear utility function.
[0117] (2) Type I extreme value distribution: Assume that ε(a|k) obeys an extreme value Gumbel distribution with parameters (0, μ).
[0118] ε(a│k)~Gumbel(0,μ) (2)
[0119] According to formulas (1) and (2), we can get formula (3).
[0120]
[0121] make We can get formula (4).
[0122]
[0123] (3) No path set constraint assumption: It is assumed that all states k can reach d via any path and any number of steps. This assumption is the core assumption of the deep recursive logit model and avoids the construction of a complex candidate path set. Therefore, formula (4) can be rewritten as a vector form formula (5). Where b d is a unit vector whose dth element has a value of 1, and ⊙ is the Hadamard product.
[0124] z d =(δ⊙M)z d +b d(5)
[0125] Formula (5) can be transformed into formula (6).
[0126] z d =(I-δ⊙M) -1 b d (6)
[0127] If d There is a unique non-negative solution (the exponential downstream utility must be non-negative to have physical meaning), then the state transition probability p can be solved d (a|k).
[0128]
[0129] From formula (6), we can see that δ⊙M needs to be controlled to ensure that z d There is a unique non-negative solution, and since the adjacency matrix δ is fixed, the elements of M and δ have the same position, and the problem is transformed into controlling M. In order to explain the innovation of the present invention, a sufficient condition (8) for solvability in an existing method is introduced for comparison.
[0130]
[0131] The present invention is based on the necessary and sufficient condition (9) for solvability, where ρ(·) means the spectral radius of the matrix.
[0132] ρ(M)<1 (9)
[0133] The relationship between each condition and the solvable model is shown in the attached figure. Figure 3 As shown in . It can be concluded that the sufficient condition (7) is too strict and may impose unnecessary restrictions on the value of M, while the necessary and sufficient condition (9) is just right.
[0134] Since the value of M is related to the utility function v(a|k), the parameter estimation process of the RL model will be explained below based on the linearity / nonlinearity of the utility function.
[0135] like Figure 2 As shown, the estimation method of the present invention is combined with a deep recursive Logit model for estimation. The utility function in the deep recursive Logit model can be a linear utility function or a nonlinear utility function. By estimating the parameters in the linear or nonlinear utility function, the parameter values are used as the weights of the effects of different attributes on the utility, thereby estimating a more accurate vehicle path. Figure 1 and Figure 2 , the overall algorithm steps of the estimation method are:
[0136] S1. Obtain vehicle trajectory data of urban road network;
[0137] S2, initialize the model parameters to ensure that they fall within the feasible region;
[0138] S3, calculating the loss function based on the model parameters and the observation path;
[0139] S4, performing gradient calculation according to the loss function and L-BFGS algorithm;
[0140] S5, perform line search according to the gradient and parameters to obtain a step length that meets the conditions;
[0141] S6. Update parameters according to the final step size;
[0142] S7, determine whether the convergence condition is met, otherwise return to S3;
[0143] S8. Estimate the vehicle path using the estimated model parameters.
[0144] (I) Parameter estimation method based on linear utility function RL (M1)
[0145] The definition of the linear utility function v(a|k), so M is a variable related to β, denoted as M(β):
[0146]
[0147] According to the above formula, when some observation paths ξ in the road network are obtained * , we can give the log-likelihood objective function LL(β;ξ * ), by maximizing LL(β;ξ * ) to estimate the optimal parameters.
[0148]
[0149] The present invention adds the necessary and sufficient condition (9) to the estimation process. First, for the objective function, log-bound is used so that when ρ(M) is close to 1, a relatively large penalty will be obtained. This is a relatively "soft" constraint. γ is the weight, which can be set as needed, or multiple rounds of iterations can be performed to obtain the optimal result. Therefore, the final overall objective function is shown in formula (12), which is obtained by minimizing Loss(β; ξ * ; γ) to estimate the optimal parameters.
[0150]
[0151] In addition to the "soft" constraints, the present invention also adds a line search mechanism to the algorithm to ensure that the parameter β of each step satisfies the condition ρ(M(β))<1.
[0152] According to the above algorithm steps, the steps of estimating using the linear utility function include:
[0153] S1. Obtain vehicle trajectory data of urban road network;
[0154] S21, Initialize model parameters β 0 , so that it is guaranteed to fall within the feasible region. Specifically, β1=β2=…=β |B| Set to 0, and set β0 to a small negative number such as β0 = -10. At this time, the elements on the exponential adjacency utility matrix M will be positive numbers close to 0, and obviously satisfy the sufficient condition (8). According to the relationship between conditions (8) and (9), it is also clear that condition (9) is satisfied, that is, the initial parameters fall within the feasible domain;
[0155] S22, initializing iteration round i=0;
[0156] S31, initialization step length t=1;
[0157] S32, calculate the loss function Loss(β i ξ * ;γ);
[0158] S4. Perform gradient calculation based on the loss function and L-BFGS algorithm to obtain the update direction d i ;
[0159] S5. Perform line search based on gradient and parameters (here we take the binary search method as an example) to obtain the step length that meets the conditions. The specific method is as follows: if ρ(M(β i +t·d i ))≥1, then update t=t / 2 until ρ(M(β i +t·d i ))<1;
[0160] S6. Update parameter β according to the final step size i+1 =β i +t·d i ;
[0161] S7, determine whether the convergence condition is met, if converged, return β i+1 , otherwise return to S22 and update i=i+1;
[0162] S8. Use the estimated model parameters to estimate the vehicle path. Specifically, given the starting and ending points od, the state transition probability p is calculated according to formula (7) d (a|k), starting from the starting point o, N paths are sampled to reach the end point d, and the final path distribution is obtained, that is, the vehicle path estimation result.
[0163] (II) Parameter Estimation Method Based on Nonlinear Generalized Utility Function RL (M2)
[0164] For the modeling of nonlinear generalized utility functions, according to the principle of universal approximation of any nonlinear continuous function by neural networks, the present invention adopts a residual neural network-based approach.
[0165] Neural network layer f (l) Definition of (h): For an input vector h, the neural network layer uses linear weights W (l) , b (l) Transform h and then use the activation function σ (l) Output the final result vector, as shown in formula (13).
[0166]
[0167] Definition of residual neural network: For an input vector X (same meaning as X in formula 9), it first passes through the transformation of the input layer, as shown in formula (14), then passes through the intermediate layer, as shown in formula (15), and finally passes through the transformation of the output layer, as shown in formula (16). Note that the forward propagation of the intermediate layer will transform the input vector and then add the input vector itself again. The final output is the scalar utility v θ (a|k).
[0168] h (in) =f (in) (X) (14)
[0169] h (1) =f (1) (h (in) )+h (in) ,...,h (L) =f (L) (h (L-1) )+h (L-1) (15)
[0170] v θ (a|k)=f (out) (h (L) ) (16)
[0171] Nonlinear utility function v θ (a|k), the construction of the loss function is almost exactly the same as the linear function v(a|k), except that the parameter is changed from β to θ. The log-likelihood formula is shown in formula (17), where Calculated by formula (7) (v(a|k) is replaced by v θ (a|k)). The total loss function is shown in formula (18).
[0172]
[0173]
[0174] The parameters θ that need to be estimated for the nonlinear residual neural network include The algorithm involved is back propagation.
[0175] The update of θ at each step in the parameter estimation process involves Loss(θ;ξ * ;γ) For the gradient calculation of the parameter θ, the algorithm involved is back propagation, which can be calculated using the automatic differentiation function of tools or platforms such as PyTorch and MATLAB to obtain the gradient d′ of the parameter θ. The existing L-BFGS algorithm can perform a second-order correction on the gradient d′ to speed up the convergence speed and finally obtain the update direction d.
[0176] S1. Obtain vehicle trajectory data of urban road network;
[0177] S21, initialize model parameters θ 0 , so that it is guaranteed to fall within the feasible region. Specifically, W (in) ,b (in) ,W (l) ,b (l) Initialize randomly (cannot be initialized to 0, otherwise the gradient cannot be updated), and set W (out) Set to 0, and b (out) Set to a small negative number, such as b (out) = -10. At this time, the elements on the exponential adjacency utility matrix M will be positive numbers close to 0, and obviously satisfy the sufficient condition (8). According to the relationship between condition (8) and condition (9), it also satisfies condition (9), that is, the initial parameters fall within the feasible domain;
[0178] S22, initializing iteration round i=0;
[0179] S31, initialization step length t=1;
[0180] S32, calculate the loss function Loss(θ according to the model parameters and observation path i ξ * ;γ);
[0181] S4. Perform gradient calculation based on the loss function and L-BFGS algorithm to obtain the update direction d i ;
[0182] S5. Perform line search based on gradient and parameters (here we take the binary search method as an example) to obtain the step length that meets the conditions. The specific method is as follows: if ρ(M(θ i +t·d i ))≥1, then update t=t / 2 until ρ(M(θ i +t·d i ))<1
[0183] S6. Update parameter θ according to the final step size i+1 =θ i +t·d i ;
[0184] S7, determine whether the convergence condition is met, if converged, return θ i+1 , otherwise return to S22 and update i=i+1;
[0185] S8. Use the estimated model parameters to estimate the vehicle path. Specifically, given the starting and ending points od, the state transition probability p is calculated according to formula (7) d (a|k), starting from the starting point o, N paths are sampled to reach the end point d, and the final path distribution is obtained, that is, the vehicle path estimation result.
[0186] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0187] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A vehicle path estimation method for urban road networks based on a deep recursive Logit model, characterized in that: The following steps are involved: Step 1: Obtain trajectory data of vehicles on the urban road network; Step 2, initializing the parameters of the utility function in the iteration round and the deep recursive Logit model, wherein the initial parameters are within the feasible domain, and the utility function is a linear utility function or a nonlinear utility function; Step 3: Calculate the loss function based on the trajectory data and parameters; Step 4: Perform gradient calculation according to the loss function and L-BFGS algorithm to obtain the update direction; Step 5: Calculate the step size of the next round according to the update direction and parameters, and further update the parameters to obtain updated parameters; Step 6: Determine whether the convergence condition is met. If so, output the updated parameters as the final optimal parameters. If not, return to step 2 for iterative calculation according to the step size of the next round until the convergence condition is met. Step 7: Estimate the vehicle paths in the urban road network according to the optimal parameters in the deep recursive Logit model to obtain an estimation result.
2. According to claim 1, a method for estimating vehicle paths in urban road networks based on a deep recursive Logit model is characterized in that: The initial parameters are within the feasible region and the following conditions must be met: ρ(M)<1 Where M is the exponential adjacency utility matrix, which is a variable with respect to the parameter, and ρ(·) represents the spectral radius of the matrix.
3. The method for estimating vehicle paths in urban road networks based on a deep recursive Logit model according to claim 1, characterized in that: When the linear utility function is used, the process of constructing the loss function includes: Define a linear utility function v(a|k) and an exponential adjacency utility matrix M, where M is a variable related to parameter β, denoted as M(β), and the linear utility function v(a|k) is expressed as: In the formula, k is the state, indicating that the vehicle is in a certain section k, a is the adjacent downstream state, indicating the section a adjacent to section k, β0, β1, β b , …, β |B| is a parameter, which indicates the influence weight of different attributes on utility, X1, X b , …, X |B| is the attribute value of selecting a, which represents the length and capacity of the road section. M indicates that there is an upstream and downstream relationship between state k and state a. Its elements are M ka represents the utility value from state k to state a, and v(a|k) represents the utility value of choosing a in state k; According to the trajectory data, a log-likelihood objective function LL(β;ξ * ), in order to maximize LL(β;ξ * ) estimates the parameters, where the log-likelihood objective function LL(β;ξ * ) is expressed as: In the formula, ξ * is the trajectory data, N od is the number of paths observed between the starting and ending points od, T is the maximum number of sections of each path, From k t to k t+1 The state transition probability of Introducing the necessary and sufficient condition ρ(M(β))<1, combined with the log-likelihood objective function LL(β;ξ * ), construct the final loss function Loss(β;ξ * ;γ), by minimizing Loss(β;ξ * ;γ) estimation parameters, where the loss function Loss(β;ξ * ; The expression of γ) is: Where ρ(·) represents the spectral radius of the matrix and γ is the weight.
4. The method for estimating vehicle paths in urban road networks based on a deep recursive Logit model according to claim 3, characterized in that: When the linear utility function is used, the step of acquiring the update direction includes: Based on the loss function, according to the chain rule of partial derivatives, we get: In the formula, Loss is the loss function, β is the parameter, is the state transition probability, v(a|k) is the linear utility function, k is the state, indicating that the vehicle is in a certain road section k, and a is the adjacent downstream state; Differentiate equation (1) to obtain the gradient d′ of parameter β; The L-BFGS algorithm is used to perform a second-order correction on the gradient d′ to obtain an updated direction d.
5. The method for estimating vehicle paths in urban road networks based on a deep recursive Logit model according to claim 1, characterized in that: When the linear utility function is used, the step of obtaining the updated parameters includes: Perform line search according to the update direction and parameters to obtain the step length of the next round that meets the conditions. The line search process includes: If ρ(M(β i +t·d i ))≥1, then update t=t / 2 until ρ(M(β i +t·d i ))<1, get the final step size for the next round; Update the parameters according to the step size and update direction of the next round to obtain the updated parameters β i+1 , expressed as: b i+1 =b i +t·d i In the formula, β i+1 is the updated parameter, indicating the parameter of the i+1th round, β i is the parameter of the i-th round, ρ(·) represents the spectral radius of the matrix, t is the step size, d i is the update direction of the i-th round.
6. The method for estimating vehicle paths in urban road networks based on a deep recursive Logit model according to claim 1, characterized in that: The nonlinear utility function is constructed using a residual neural network, and the specific construction steps include: Define the network layer f of the residual neural network (l) (h): For the input vector h of the neural network layer, use the linear weight W (l) 、b (l) Transform h and use the activation function σ (l) Output the final vector result, neural network layer f (l) (h) The expression is: f (l) (h)=σ (l) (W (l) h+b (l) ) Where, l is the,th network layer; Definition of residual neural network: According to the network layer f (l) (h) constructing a residual neural network, including an input layer, an intermediate layer and an output layer; Constructing a nonlinear utility function: For the input vector X of the residual neural network, it is transformed in turn through the input layer, the intermediate layer and the output layer, and finally the scalar utility function output by the output layer is used as the nonlinear utility function v θ (a|k), the nonlinear utility function v θ (a|k) is expressed as: v θ (a|k)=f (out) (h (L) ) Among them, the transformation expression of the input layer is: h (in) =f (in) (X) The transformation expression of the intermediate layer is: h (1) =f (1) (h (in) )+h (in) ,...,h (L) =f (L) (h (L-1) )+h (L-1) Where, θ={W (in) , b (in) , W (l) , b (l) , W (out) , b (out) } is a parameter, W (in) , b (in) , W (l) , b (l) , W (out) , b (out) They are respectively the input layer linear weight, the input layer linear bias, the middle layer linear weight, the middle layer linear bias, the output layer linear weight, and the output layer linear bias. k is the state, indicating that the vehicle is in a certain section k. a is the adjacent downstream state, indicating that the section a is adjacent to the section k. f (out) (h (L) ) is the output vector of the output layer, L is the total number of network layers, f (in) (X) is the calculation result of the input layer, h (in) is the calculation result of the input layer, f (1) (h (in) ) is the calculation result of the first intermediate layer, h (1) It is the calculation result of the first intermediate layer. The input vector X represents the attribute vector in the nonlinear utility function.
7. The method for estimating vehicle paths in urban road networks based on a deep recursive Logit model according to claim 6, characterized in that: When the nonlinear utility function is adopted, the step of acquiring the update direction includes: Based on the loss function, the residual neural network is back-propagated, and further differential calculation is performed to obtain the gradient d′ of the parameter θ; The L-BFGS algorithm is used to perform a second-order correction on the gradient d′ to obtain an updated direction d.
8. The method for estimating vehicle paths in urban road networks based on a deep recursive Logit model according to claim 1, characterized in that: When the nonlinear utility function is used, the process of constructing the loss function includes: Define the exponential adjacency utility matrix M, where M is a variable related to the parameter θ, denoted as M(θ); According to the trajectory data, a log-likelihood objective function LL(θ; ξ * ), in order to maximize LL(θ;ξ * ) estimates the parameters, where the log-likelihood objective function LL(θ; ξ * ) is expressed as: In the formula, ξ * is the trajectory data, N od The number of paths observed between the starting and ending points od, T is the maximum number of sections of each path, From k t to k t+1 The state transition probability of Introducing the necessary and sufficient condition ρ(M(θ))<1, combined with the log-likelihood objective function LL(θ; ξ * ), construct the final loss function Loss(θ;ξ * ;γ) to minimize Loss(θ;ξ * ;γ) estimation parameters, wherein the objective loss function Loss(θ;ξ * ; The expression of γ) is: Where ρ(·) represents the spectral radius of the matrix and γ is the weight.
9. The method for estimating vehicle paths in urban road networks based on a deep recursive Logit model according to claim 1, characterized in that: When the nonlinear utility function is used, the step of obtaining updated parameters includes: Perform line search according to the update direction and parameters to obtain the step length of the next round that meets the conditions. The line search process includes: If ρ(M(θ i +t·d i ))≥1, then update t=t / 2 until ρ(M(θ i +t·d i ))<1, get the final step size for the next round; Update the parameters according to the step size and update direction of the next round to obtain the updated parameters θ i+1 , expressed as: i i+1 =θ i +t·d i In the formula, θ i+1 is the updated parameter, indicating the parameter of the i+1th round, θ i The parameters of the i-th round, ρ(·) represents the spectral radius of the matrix, t is the step size, d i is the update direction of the i-th round.
10. The method for estimating vehicle paths in urban road networks based on a deep recursive Logit model according to claim 1, characterized in that: The step of obtaining the estimation result comprises: Given a starting point o and an end point d, based on the optimal parameters, the state transition probability of the deep recursive Logit model is calculated to estimate the vehicle path result between the starting point and the end point; The step of constructing the state transition probability includes: In the section k, the next state a is selected according to probability in the downstream adjacent state set A(k), and the Bellman equation is constructed. The expression is: Where V d (k) is the downstream expected utility from state k to d, V d (k) is the downstream expected utility from state a to d, μ is the parameter coefficient of the extreme value Gumbel distribution, V d (d) is the downstream expected utility from state d to d, which defaults to 0. is the expectation, ε(a|k) is the error component in the instantaneous utility v′(a|k), v(a|k) is the deterministic component of the instantaneous utility v′(a|k), that is, the utility function, including linear utility function and nonlinear utility function, k is the state, indicating that the vehicle is in a certain section k, a is the adjacent downstream state, indicating the section a adjacent to the section k; Assume that ε(a|k) obeys the extreme value Gumbel distribution with parameters (0, μ), expressed as: ε(a|k)~Gumbel(0,μ) (2) According to equations (1) and (2), we get: make Elements of the exponential adjacency utility matrix M get: In the formula, δ ka are the elements of the adjacency matrix δ, is the index of downstream expected utility from state a to d; Assuming that all states k can reach the end point d through any path and any number of steps, equation (4) can be rewritten as: z d =(δ⊙M)z d +b d (5) Where b d is a unit vector, z d is the exponential vector of downstream expected utilities of all states to d Transforming formula (5), we get: z d =(I-δ⊙M) -1 b d (6) Where I is a unit vector; Set z d There is a unique non-negative solution. Solving equation (6) yields the state transition probability, which is expressed as: In the formula, p d (a|k) is the state transition probability from k to a.
Citation Information
Patent Citations
Method for estimating average vehicle flow of highway section and OD demands
CN109461307A
Traffic mode selection prediction method based on computational graph
CN113326919A
Urban road network OD estimation method based on trajectory reconstruction
CN113420488A
Urban road network path planning method based on reinforcement learning strategy iteration technology
CN115574825A
Urban activity prediction method based on deep learning
CN116933089A