Highway traffic state estimation method based on networked vehicle density data accuracy classification
By combining the classification of connected vehicle density data and the multi-task shared neural network, the error and uncertainty problems of connected vehicle collection density data in highway traffic state estimation are solved, and more efficient and accurate traffic state estimation is achieved, especially on ramp intersection sections.
Patent Information
- Application Number
- CN202510354662.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-25
- Publication Date
- 2025-06-13
AI Technical Summary
In the prior art, when using density data collected by connected vehicles to conduct highway traffic state estimation, there are large errors and uncertainties, especially on ramp intersection sections, it is difficult to achieve accurate traffic state estimation.
The classification method based on connected vehicle density data is adopted, and the density data is accurately classified through the CART decision tree model, and a multi-task shared neural network traffic state estimation network is constructed. Combined with the traffic flow conservation model, backpropagation training is carried out to improve the estimation accuracy.
It effectively reduces the impact of density data error on the results, improves the availability of density data collected by connected vehicles and the accuracy and efficiency of traffic state estimation, especially on ramp intersection sections.
Smart Images

Figure CN120148240A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a method for estimating highway traffic state based on the accuracy classification of connected vehicle density data. It uses the surrounding vehicle trajectory data collected by connected vehicles to estimate the highway traffic state, providing effective and accurate data support for traffic control and decision-making, and belongs to the field of intelligent transportation technology. Background Art
[0002] Highway traffic state estimation refers to the process of inferring traffic state variables including flow, density, speed, and other equivalent variables on a road section using partial and noisy traffic data observed by traffic detection devices on the highway. Accurate and real-time traffic state estimation can provide data support for traffic planning, help traffic management departments reasonably allocate resources, adjust the layout of traffic facilities, and improve the service level of roads. However, improper configuration of fixed detectors and high maintenance costs affect the efficiency of highway information collection.
[0003] With the development of intelligent connected technology, connected vehicles equipped with detectors have been gradually put into use, making it more efficient and convenient to collect information on the road. Therefore, using connected vehicles to replace fixed detectors to collect data has great prospects. In order to use connected vehicle data for traffic state estimation, existing research has developed corresponding solutions. However, considering that the density data collected by sparse connected vehicles has certain errors and uncertainties, existing technical methods cannot fully use and estimate road density at a high spatio-temporal resolution, making the estimated traffic state difficult to utilize in actual traffic control. In addition, traditional model estimation methods will inevitably introduce errors because they need to discretize the traffic flow conservation model, and spatio-temporal grid division needs to follow certain constraints to ensure the stability of the model. Existing methods combine the traffic flow model with neural networks to calculate the partial derivatives in the traffic flow conservation model through automatic differentiation, avoiding the constraint conditions during discretization and achieving better estimation results in the case of sparse data, providing a new research idea for traffic state estimation. However, on sections with ramps, due to the discontinuous problem of the traffic model at the road section intersection, the applicability of this method is limited. Summary of the Invention
[0004] In order to overcome the deficiencies of the prior art, the present invention proposes a method for estimating highway traffic state based on the accuracy classification of connected vehicle density data, aiming to reduce the adverse effects of density data with large deviations on the results, improve the usability of the density data collected by connected vehicles, and make the traffic state estimation on sections with ramp intersections more accurate and efficient.
[0005] The specific implementation manner of the method adopted by the present invention is as follows:
[0006] The characteristics of a method for estimating highway traffic status based on the classification of connected vehicle density data in the present invention are as follows, and the method is carried out according to the following steps:
[0007] Step 1: Discretize the road section and time period to obtain a spatio-temporal grid set ; where represents the th sub-road section in the th time period, is the total number of sub-road sections, is the total number of time periods; let represent the position at the end of the th sub-road section, represent the end time of the th time period;
[0008] Step 2: Obtain the connected vehicles and the collected vehicle trajectory data in each spatio-temporal grid, and calculate the traffic status data according to the vehicle trajectory data in each spatio-temporal grid, including: the density and average speed of each spatio-temporal grid;
[0009] Step 3: Extract the vehicle feature variables and their labels for each lane in each spatio-temporal grid according to the density of each spatio-temporal grid, and input them into the decision tree for training to obtain a density data accuracy classification model; the vehicle feature variables include: the number of vehicles, the number of trajectory points, the average speed, the speed variance, the average headway and the variance for each lane in each spatio-temporal grid; the label variable is whether the density in each spatio-temporal grid reaches the threshold , if it reaches, the label of the corresponding spatio-temporal grid is set to 1, otherwise, the label of the corresponding spatio-temporal grid is set to 0;
[0010] Step 4: Use the neighborhood filling method to estimate the traffic speed for the missing average speed in to obtain the filled average speed;
[0011] Step 5: Construct a multi-task shared neural network traffic status estimation network, and use the density classification result output by the density data accuracy classification model as the true density label of the multi-task shared neural network traffic status estimation network, and input the positions at the ends of all sub-road sections and the end times of all time periods in into the multi-task shared neural network traffic status estimation network for processing to obtain the traffic density prediction values of all spatio-temporal grids in ;
[0012] Step 6: Based on the traffic density prediction value and the true density label, construct a loss function based on the traffic flow conservation model , and perform backpropagation training on the neural network traffic state estimation network to obtain an optimal neural network traffic state estimation model for predicting the optimal traffic density values of all spatio-temporal grids.
[0013] Another feature of the freeway traffic state estimation method based on connected vehicle density data classification according to the present invention is that in step two, equations (3) and (4) are used to calculate the density and average speed of each spatio-temporal grid respectively:
[0014] (1)
[0015] (2)
[0016] In equations (1) and (2), represents the density of the th sub-section in the th time period, represents the density of the th lane on the th sub-section in the th time period, is the number of effective lanes for calculating the density, , represents the total number of lanes on the sub-section, represents the average speed of the th sub-section in the th time period, represents the speed of the th vehicle at the th trajectory point on represents the total number of vehicles on represents the total number of trajectory points of the th vehicle on , is the total number of trajectory points of all vehicles on
[0017] (3)
[0018] In equation (3), is the total spatio-temporal area enclosed by the driving trajectory of the th vehicle on and the driving trajectory of the leading vehicle of the th vehicle; is the total driving time of the th vehicle on , and there is:
[0019] (4)
[0020] In formula (4), is the end driving time of the th vehicle on ; is the initial driving time of the th vehicle.
[0021] Furthermore, step five includes:
[0022] Step 5.1: Construct a neural network traffic state estimation network for multi-task sharing, including: a multi-sharing network module layer , a gated network module , and a task sub-network . ;
[0023] Step 5.2: Define the multi-sharing network module layer , where represents the sth shared network; S represents the total number of shared networks;
[0024] Take the end time of the th time period and the position at the end of the th sub-road segment as the input feature vector and input it into each shared network of for processing to obtain S spatio-temporal feature vectors ; where represents the sth spatio-temporal feature vector of the position at the end of the th time period under the th sub-road segment; represents the transpose;
[0025] Step 5.3: Define the gated network module is composed of a fully connected layer and a softmax layer; among them, the fully connected layer contains S neurons;
[0026] Input into the gated network module for processing and output the weight vector ; where represents the weight vector of the position at the end of the th time period under the th sub-road segment, and , represents the The end time of a time period The Position at the end of the Weight obtained after processing the output of the s-th neuron through the softmax layer;
[0027] Step 5.4, calculate the end time of the time period using Equation (5) The position at the end of the shared spatio-temporal feature vector ;
[0028] (5)
[0029] Step 5.5, divide the road section into the first area , the second area , the third area at the intersection of the ramp and the road section, and denote any area as the e-th area , ; Define an independent task sub-network for the e-th area ; ;
[0030] Input into the corresponding task sub-network for processing, and calculate the density prediction value of the end time of the output at the end of the time period The position at the end of the sub-road section ;
[0031] Furthermore, in Step 6, the loss function based on the traffic flow conservation model is constructed using Equation (6) :
[0032] (6)
[0033] In Equation (6), is the observation loss, is the boundary loss, is the model loss, is the initial condition loss, , , , respectively represent the weight coefficients of the 4 losses, and there is:
[0034] (7)
[0035] (8)
[0036] (9)
[0037] (10)
[0038] In Equation (7), represents the set of spatio-temporal grids with all labels being 1, which forms the filtered spatio-temporal grid set, and , represents the number of grids included in is the true density label at the end position of the -th sub-segment at the end time of the -th time period; is the density prediction value at the end position of the -th sub-segment at the end time of the -th time period output by the three task sub-networks, and there is:
[0039] (11)
[0040] In Equation (11), , , respectively represent the density prediction values output by the three task sub-networks; and respectively represent the positions at the intersections of the on-ramp and off-ramp with the road segment, and ;
[0041] In Equation (8), , , respectively represent the boundary losses at the upstream, on-ramp and off-ramp, and there is:
[0042] (12)
[0043] (13)
[0044] (14)
[0045] In Equation (12), is the true density label at the initial position of the road segment at the end time of the -th time period; The end time of the th time period output by the first task subnet; The initial position of the downstream section The density prediction value;
[0046] In formula (13), The end time of the th time period output by the first task subnet The position of the intersection of the downstream on-ramp and the section The density prediction value; Is the th time period end time The position of the intersection of the downstream on-ramp and the section The average speed; The end time of the th time period output by the second task subnet The position of the intersection of the downstream on-ramp and the section The density prediction value; Represents the th time period end time The flow rate of the downstream on-ramp;
[0047] In formula (14), The end time of the th time period output by the second task subnet The position of the intersection of the downstream off-ramp and the section The density prediction value; Is the th time period end time The position of the intersection of the downstream off-ramp and the section The average speed; The end time of the th time period output by the third task subnet The position of the intersection of the downstream off-ramp and the section The density prediction value; Represents the th time period end time The flow rate of the downstream off-ramp;
[0048] In formula (9), Represents A partial set of spatio-temporal grids randomly selected from Is The number of grids included in Is the th time period end time The The position at the end of the sub - section The average speed, and there is:
[0049] (15)
[0050] In formula (15), respectively represent the end time of the th time period output by the three task sub - networks considering the discontinuity of the boundaries of the three regions at the position at the end of the sub - section and the density prediction value;
[0051] In formula (10), is the initial time at the position at the end of the sub - section and the true density label; is the initial time output by the three task sub - networks at the position at the end of the sub - section and the density prediction value.
[0052] An electronic device according to the present invention includes a memory and a processor, characterized in that the memory is used to store a program for supporting the processor to execute the highway traffic state estimation method, and the processor is configured to execute the program stored in the memory.
[0053] A computer - readable storage medium according to the present invention, characterized in that a computer program stored on the computer - readable storage medium executes the steps of the highway traffic state estimation method when run by a processor.
[0054] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0055] 1. The present invention takes into account the problem that the density data collected by sparse connected vehicles has certain errors and uncertainties, and uses the relevant characteristics of the density data, adopts a CART decision tree model for binary classification, accurately screens out the data that meets the accuracy threshold requirements, thereby effectively improving the usability of the density data collected by connected vehicles and improving the accuracy and reliability of traffic state estimation.
[0056] 2. The present invention selects a physics - informed neural network as the main estimation model, considers the boundary discontinuity problem of the traffic flow conservation model at the internal intersections of the road section, divides the road section into three regions, trains with a multi - task sub - network, and constructs a shared network module to extract the spatio - temporal correlation features between different regions, thereby improving the robustness of the model and making the traffic state estimation on the ramp intersection section more accurate and efficient. Brief Description of the Drawings
[0057] Figure 1 It is a flowchart of the method according to an embodiment of the present invention;
[0058] Figure 2 It is a road section structure diagram in an embodiment of the present invention;
[0059] Figure 3 It is a calculation schematic diagram of traffic flow data in an embodiment of the present invention;
[0060] Figure 4 It is a structure diagram of a neural network traffic state estimation model with multi-task sharing in an embodiment of the present invention. Detailed Embodiment
[0061] In this embodiment, as Figure 1 shown, a freeway traffic state estimation method based on the accuracy classification of connected vehicle density data is to classify the density data by using a CART decision tree model and construct a neural network traffic state estimation model with multi-task sharing for estimation, so as to reduce the adverse impact of density data with large deviations on the results, improve the usability of the density data collected by connected vehicles, and make the traffic state estimation on the ramp intersection section more accurate and efficient. Specifically, the method is carried out according to the following steps:
[0062] Step 1: Discretize the road section and time period. The road section cut-off points include the intersections of ramps and road sections, so as to obtain a set of spatio-temporal grids ; where represents the th sub-road section in the th time period, is the total number of sub-road sections, is the total number of time periods; let represent the position at the end of the th sub-road section, represent the end time of the th time period;
[0063] Let be the spatial length of the th sub-road section, and , where represents the position at the end of the th sub-road section, represents the position at the end of the th sub-road section; let be the time interval, and , where represents the end time of the th time period, represents the The end time of a time period; Indicates the initial position of the road section, Indicates the initial time of the time period;
[0064] In the embodiment of the present invention, as Figure 2 shown, the entire road section has 3 lanes in total, and is divided into 9 sub-road sections, each section with a length of 140 m, the total length is 1260 m, and the time period is divided into 5 s, the entrance ramp is located at the boundary between the 4th and 5th sub-road sections, and the exit ramp is located at the boundary between the 7th and 8th sub-road sections, is 9, is 600.
[0065] Step 2: Obtain the connected vehicles and the collected vehicle trajectory data in each spatio-temporal grid, and calculate the traffic state data according to the vehicle trajectory data in each spatio-temporal grid, including: the density and average speed of each spatio-temporal grid;
[0066] Calculate the density and average speed of each spatio-temporal grid by using Equation (1) and Equation (2) respectively:
[0067] (1)
[0068] (2)
[0069] In Equation (1) and Equation (2), represents the density of the th time period and the th sub-road section, represents the density of the th time period, the th sub-road section, and the rd lane, is the effective number of lanes for obtaining the density, , represents the total number of lanes on the sub-road section, which is 3 in the embodiment, represents the average speed of the th time period and the th sub-road section, represents the speed of the th vehicle at the rd trajectory point on represents the total number of vehicles on represents the th vehicle at the total number of trajectory points on is The total number of trajectory points of all vehicles above, and there is:
[0070] (3)
[0071] In formula (3), is the th vehicle's driving trajectory on and the th vehicle's leading vehicle's driving trajectory enclosed total spatio-temporal area; is the th vehicle's total driving time on , and there is:
[0072] (4)
[0073] In formula (4), is the th vehicle's end driving moment on , is the th vehicle's initial driving moment on
[0074] In the embodiment of the present invention, as Figure 3 shown, the dot is the vehicle trajectory point, each line is the driving trajectory curve of each vehicle, and the spatio-temporal area enclosed by each vehicle and its leading vehicle in the spatio-temporal grid is the shaded part. A relatively low connected vehicle penetration rate of 5% is selected.
[0075] Step 3: According to the density of each spatio-temporal grid, extract the vehicle characteristic variables and their labels of each lane in each spatio-temporal grid, and input them into the decision tree for training to obtain a density data accuracy classification model; the vehicle characteristic variables include: the number of vehicles, the number of trajectory points, the average speed, the speed variance, the average headway and the variance of each lane in each spatio-temporal grid; the label variable is whether the density of each spatio-temporal grid reaches the threshold , calculated according to formula (5). If it reaches, the label of the corresponding spatio-temporal grid is set to 1, otherwise, the label of the corresponding spatio-temporal grid is set to 0; in the embodiment of the present invention, is 0.1;
[0076] (5)
[0077] In formula (5), represents 's absolute relative error of density, represents the spatio-temporal grid true density value.
[0078] Training is carried out using the CART decision tree, and the specific implementation steps are as follows:
[0079] Step 3.1: Let the set composed of the obtained feature variables be the feature set in the decision tree model, and the corresponding error index be the label set, jointly constituting the training sample set ; Set the decision tree depth with the maximum decision tree depth threshold being and the node sample threshold ; In the embodiment of the present invention, set to be 40, to be 5, and the number of feature variables is 18;
[0080] Step 3.2: Initialize ; Input the training sample set , the maximum decision tree depth threshold into the CART decision tree model;
[0081] Step 3.3: The CART decision tree uses the Gini coefficient as the basis for determining whether to branch the decision tree, establishes a binary decision tree model, and divides the training sample set into a first subset and a second subset according to the feature value splitting point , and obtains the Gini coefficient of the feature value splitting point using Equation (6) :
[0082] (6)
[0083] In Equation (6), , and respectively represent the number of samples included in the training sample set , the first subset and the second subset ;
[0084] represents the Gini index of the first subset , and there is:
[0085] (7)
[0086] In Equation (7), and respectively represent the probabilities of the samples with labels 0 and 1 appearing in the first subset ;
[0087] In Equation (6), represents the second subset The Gini index, and there is:
[0088] (8)
[0089] In formula (8), and respectively represent the probabilities of the samples with labels 0 and 1 appearing in the second subset .
[0090] Step 3.4, traverse the splitting points of each feature value in the feature set , and calculate the Gini index of each splitting point of the feature value; select the feature value corresponding to the minimum Gini index in the feature set and its corresponding splitting point , and divide the training sample set into two subsets and , then allocate the subsets and to two child nodes with the training sample set as the parent node respectively;
[0091] Step 3.5, if the decision tree depth is equal to the maximum decision tree depth threshold or the number of samples in all child nodes is less than the node sample threshold , then stop splitting and output the final binary decision tree; otherwise, continue splitting.
[0092] Step 3.6, according to the trained binary decision tree model, input the measured data features in a certain spatio-temporal grid, and predict whether the spatio-temporal grid is less than the density accuracy threshold , and classify the density data of all spatio-temporal grids accordingly; let represent the set of spatio-temporal grids whose density meets the threshold requirements after classification, and it contains grid numbers; in the embodiment of the present invention, is 1824.
[0093] Step Four, use the neighborhood filling method to estimate the traffic speed of the missing average speed in , so as to obtain the filled average speed;
[0094] According to the speed uniformity hypothesis, at the moment , the average speed value of the sub-road section can be approximated as the average speed extracted from the trajectories collected by the connected vehicles in this spatio-temporal grid 。When the penetration rate of connected vehicles is small, there may be missing values in the average speed of some spatio-temporal grids. The missing values can be filled with the known average speeds in the surrounding spatio-temporal grids. Let the spatio-temporal grid with missing values be and the set of spatio-temporal grids with known average speeds in the surrounding area be , and fill it using Equation (9)
[0095] (9)
[0096] In Equation (9), is the spatio-temporal grid with missing values The average speed after filling, represents The number of grids included in.
[0097] Step 5: Construct a neural network traffic state estimation network shared by multiple tasks, and use the density classification result output by the density data accuracy classification model as the true density label of the neural network traffic state estimation network shared by multiple tasks. Input the positions at the ends of all sub-sections and the end times of all time periods in into the neural network traffic state estimation network shared by multiple tasks for processing, and obtain The traffic density prediction values of all spatio-temporal grids in;
[0098] Traditional model estimation methods will inevitably introduce errors because they need to discretize the traffic flow conservation model, and the spatio-temporal grid division needs to follow certain constraints to ensure the stability of the model. Therefore, in this example, a neural network model is used to calculate the partial derivatives in the traffic flow conservation model through automatic differentiation, avoiding the discretization constraint conditions. However, when this method involves ramp intersection sections, the discontinuity of the internal boundary needs to be considered. Therefore, the road section is divided into three regions, and independent task sub-networks are used for modeling respectively. In addition, considering the common spatio-temporal features of the three regions, a multi-shared network structure is further proposed to extract spatio-temporal correlations, which can reduce the total number of model parameters and improve the efficiency of the model. The specific algorithm steps are as follows:
[0099] Step 5.1: In the embodiment of the present invention, as Figure 4 shown, construct a neural network traffic state estimation network shared by multiple tasks, including: multi-shared network module layer , gated network module , task sub-network , ;
[0100] Step 5.2: Define the multi-shared network module layer , where represents the s-th shared network, and S represents the total number of shared networks; in the embodiment, A fully connected layer with a unified setting of 3 layers and 10 neurons in each layer, where S = 3.
[0101] At the end time of the th time period and at the position at the end of the th sub - road segment are used as the input feature vector and input into each shared network for processing, obtaining S spatio - temporal feature vectors ; where, represents the end time of the th time period and the position at the end of the th sub - road segment of the s - th spatio - temporal feature vector; represents transpose.
[0102] Step 5.3: Define the gated network module It is composed of a fully connected layer and a softmax layer; among them, the fully connected layer contains S neurons;
[0103] Input into the gated network module for processing, and output the weight vector ; where, represents the weight vector at the end of the th time period and at the end of the th sub - road segment , and , represents the weight obtained after the output of the s - th neuron in the fully connected layer of the gated network passes through the softmax layer at the end of the th time period and at the end of the th sub - road segment ; in a specific example, the softmax layer is calculated according to Equation (10);
[0104] (10)
[0105] In Equation (10), is the output of the s - th neuron in the fully connected layer of the gated network, and the result is mapped to the interval [0, 1] through Equation (10).
[0106] Step 5.4: Calculate the value at the end of the th time period and at the end of the th sub - road segment using Equation (11) Shared spatio-temporal feature vector ;
[0107] (11)
[0108] Step 5.5: Divide the road section into a first area, a second area, and a third area at the intersection of the ramp and the road section. Denote any area as the e-th area , ; Define an independent task sub-network for the e-th area ; In the embodiment, it is uniformly set as a fully connected layer with 5 layers and 8 neurons in each layer.
[0109] Input into the corresponding task sub-network for processing, and calculate the density prediction value at the end of the -th time period output at the end of the -th sub-road section . .
[0110] Step Six: Construct a loss function based on the traffic flow conservation model based on the traffic density prediction value and the true density label , and perform backpropagation training on the neural network traffic state estimation network, so as to obtain an optimal neural network traffic state estimation model for predicting the optimal traffic density value of all spatio-temporal grids.
[0111] In the embodiment of the present invention, as Figure 4 shown, use Equation (12) to construct a loss function based on the traffic flow conservation model :
[0112] (12)
[0113] In Equation (12), is the observation loss, is the boundary loss, is the model loss, is the initial condition loss, , , , respectively represent the weight coefficients of the 4 losses, and there is:
[0114] (13)
[0115] (14)
[0116] (15)
[0117] (16)
[0118] In Equation (13), represents the set of spatio-temporal grids with all labels being 1, which constitutes the filtered spatio-temporal grid set, and , represents the number of grids included in is the end time of the th time period at the end position of the th sub-section true density label; is the density prediction value at the end position of the th time period at the end position of the th sub-section and there is:
[0119] (17)
[0120] In Equation (17), , , respectively represent the density prediction values output by the three task sub-networks; and respectively represent the positions at the intersections of the on-ramp and off-ramp with the road section, and .
[0121] In Equation (14), , , respectively represent the boundary losses at the upstream, on-ramp and off-ramp, and there is:
[0122] (18)
[0123] (19)
[0124] (20)
[0125] In Equation (18), is the end time of the th time period at the initial position of the road section true density label; The end time of the th time period output by the first task sub-network The initial position of the downstream section The density prediction value;
[0126] In Equation (19), The end time of the th time period output by the first task sub-network The position of the intersection of the downstream on-ramp and the section The density prediction value; Is the th time period end time The position of the intersection of the downstream on-ramp and the section The average speed; The end time of the th time period output by the second task sub-network The position of the intersection of the downstream on-ramp and the section The density prediction value; Indicates the th time period end time The flow rate of the downstream on-ramp;
[0127] In Equation (20), The end time of the th time period output by the second task sub-network The position of the intersection of the downstream off-ramp and the section The density prediction value; Is the th time period end time The position of the intersection of the downstream off-ramp and the section The average speed; The end time of the th time period output by the third task sub-network The position of the intersection of the downstream off-ramp and the section The density prediction value; Indicates the th time period end time The flow rate of the downstream off-ramp.
[0128] In Equation (15), Indicates A randomly selected subset of spatio-temporal grid sets in Is The number of grids included in, in a specific example, Random sampling of 30% of spatio-temporal grids Is obtained; Is the The end time of a time period The Position at the end of the average speed, and there is:
[0129] (21)
[0130] In formula (21), respectively represent the end time of the time period output by the three task sub-networks considering the discontinuity of the three regional boundaries The position at the end of the density prediction value.
[0131] In formula (16), is the initial time The position at the end of the true density label; is the density prediction value at the initial time output by the three task sub-networks The position at the end of the sub-segment;
[0132] The hyperbolic tangent function tanh is used as the activation function for each hidden neuron; the Adam and L-BFGS optimization algorithms are used for sequential iterative training, and the iteration stops when the maximum number of iterations is reached. The network hyperparameters and loss function weights are tuned using grid search, and finally the traffic density prediction values for all spatio-temporal grids are obtained.
[0133] In this embodiment, an electronic device includes a memory and a processor. The memory is used to store a program that supports the processor to execute the above method, and the processor is configured to execute the program stored in the memory.
[0134] In this embodiment, a computer-readable storage medium stores a computer program, and when the computer program is run by a processor, it executes the steps of the above method.
Claims
1. A highway traffic state estimation method based on connected vehicle density data classification, characterized in that: The steps are as follows: Step 1: Discretize the road sections and time periods to obtain a set of space-time grids ;in, Indicates The first Sub-sections, is the total number of sub-segments, is the total number of time periods; Indicates The position at the end of the sub-segment, Indicates The end time of a time period; Step 2: Obtain the connected vehicles and their collected vehicle trajectory data in each spatiotemporal grid, and calculate the traffic status data based on the vehicle trajectory data in each spatiotemporal grid, including: the density and average speed of each spatiotemporal grid; Step 3: According to the density of each spatiotemporal grid, extract the vehicle characteristic variables and their labels of each lane in each spatiotemporal grid, and input them into the decision tree for training to obtain the density data accuracy classification model; the vehicle characteristic variables include: the number of vehicles in each lane in each spatiotemporal grid, the number of trajectory points, the mean speed, the speed variance, the mean and variance of the headway; the label variable is whether the density in each spatiotemporal grid reaches the threshold , if it is reached, let the label of the corresponding space-time grid be 1, otherwise, let the label of the corresponding space-time grid be 0; Step 4: Use the neighborhood filling method to The missing average speed is used to estimate the traffic speed, thus obtaining the filled average speed; Step 5: Build a multi-task shared neural network traffic state estimation network, and use the density classification result output by the density data accuracy classification model as the true density label of the multi-task shared neural network traffic state estimation network. The positions at the end of all sub-segments and the end time of all time periods are input into the multi-task shared neural network traffic state estimation network for processing, and the obtained Traffic density prediction values for all spatiotemporal grids; Step 6: Based on the traffic density prediction value and the actual density label, construct a loss function based on the traffic flow conservation model , and the neural network traffic state estimation network is back-propagated and trained to obtain the optimal neural network traffic state estimation model, which is used to predict the optimal traffic density values of all spatiotemporal grids.
2. According to claim 1, a highway traffic state estimation method based on networked vehicle density data classification is characterized in that: In step 2, the density and average velocity of each space-time grid are calculated using equations (3) and (4): (1) (2) In formula (1) and formula (2), Indicates The next time period The density of the sub-segments, Indicates The next time period Sub-section The density of lanes, To get the effective number of lanes for density, , represents the total number of lanes on the sub-segment, Indicates The next time period The average speed of the sub-segment, Indicates A car in The velocity of the oth trajectory point, express Total number of vehicles on board; Indicates A car in The total number of points on the trajectory, for The total number of trajectory points of all vehicles on the network, and: (3) In formula (3), For the A car in The driving track on With The trajectory of the vehicle in front of the vehicle The total space-time area enclosed; For the A car in The total time of driving is: (4) In formula (4), For the A car in The end time of driving on For the The initial driving moment of the vehicle.
3. The highway traffic state estimation method based on networked vehicle density data classification according to claim 1 is characterized in that: The step five comprises: Step 5.1: Construct a multi-task shared neural network traffic state estimation network, including: multiple shared network module layers , Gated Network Module , Task sub-network , ; Step 5.2: Define multiple shared network module layers ,in, represents the sth shared network; S represents the total number of shared networks; The first End time of the time period and The position at the end of the sub-segment As input feature vector and enter In each shared network, S spatiotemporal feature vectors are obtained. ;in, Indicates End time of the time period Next The position at the end of the sub-segment The s-th spatiotemporal eigenvector of ; represents transpose; Step 5.3: Define the gated network module It consists of a fully connected layer and a softmax layer; the fully connected layer contains S neurons; Will Input Gating Network Module Processed in, output weight vector ;in, Indicates End time of the time period Next The position at the end of the sub-segment The weight vector of , Indicates End time of the time period Next The position at the end of the sub-segment The weight obtained by processing the output of the sth neuron through the softmax layer; Step 5.4: Use formula (5) to calculate the End time of the time period Next The position at the end of the sub-segment The shared spatiotemporal feature vector ; (5) Step 5.5: Divide the road section into the first area from the intersection of the ramp and the road section , Second Area , the third area , record any region as the e-th region , ; is the e-th region Define an independent task subnetwork ; Will Input to Corresponding task subnetwork Processing and calculation Output End time of the time period Next The position at the end of the sub-segment The density prediction value .
4. The highway traffic state estimation method based on connected vehicle density data classification according to claim 3 is characterized in that: In step 6, the loss function based on the traffic flow conservation model is constructed using formula (6): : (6) In formula (6), is the observation loss, is the boundary loss, is the model loss, is the initial condition loss, , , , Respectively represent the weight coefficients of the four losses, and have: (7) (8) (9) (10) In formula (7), Indicates that all space-time grids with label 1 constitute the filtered space-time grid set, and , express The number of grids contained in ; For the End time of the time period Next The position at the end of the sub-segment The true density label of The output of the three task sub-networks End time of the time period Next The position at the end of the sub-segment The density prediction value is: (11) In formula (11), , , Respectively represent the density prediction values output by the three task sub-networks; and denote the locations where the entrance ramp and exit ramp meet the road segment, respectively, and ; In formula (8), , , denote the boundary losses at upstream, on-ramp, and off-ramp, respectively, and have: (12) (13) (14) In formula (12), For the End time of the time period Initial position of the lower segment The true density label of The output of the first task sub-network End time of the time period Initial position of the lower segment The density prediction value of In formula (13), The output of the first task sub-network End time of the time period Location of the intersection between the off-ramp and the road segment The density prediction value of For the End time of the time period Location of the intersection between the off-ramp and the road segment Average speed; The output of the second task sub-network End time of the time period Location of the intersection between the off-ramp and the road segment The density prediction value of Indicates End time of the time period flow rate at the off-ramp; In formula (14), The output of the second task sub-network End time of the time period Location of the intersection between the off-ramp and the road segment The density prediction value of For the End time of the time period Location of the intersection between the off-ramp and the road segment Average speed; The output of the third task sub-network End time of the time period Location of the intersection between the off-ramp and the road segment The density prediction value of Indicates End time of the time period the volume of the exit ramp; In formula (9), express A set of randomly selected space-time grids in for The number of grids contained in For the End time of the time period Next The position at the end of the sub-segment The average speed is: (15) In formula (15), They represent the outputs of the three task sub-networks considering the discontinuity of the boundaries of the three regions. End time of the time period Next The position at the end of the sub-segment The density prediction value of In formula (10), For the initial moment Next The position at the end of the sub-segment The true density label of The initial moment of the output of the three task sub-networks Next The position at the end of the sub-segment The predicted value of density.
5. An electronic device, comprising a memory and a processor, characterized in that: The memory is used to store a program that supports the processor to execute the highway traffic state estimation method according to any one of claims 1 to 4, and the processor is configured to execute the program stored in the memory.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the highway traffic state estimation method according to any one of claims 1 to 4 are executed.
Citation Information
Cited By
Hybrid traffic state estimation method based on vehicle-road integration
CN120356342A