A refined identification method for traffic status at phase intersections

Through the refined identification method of traffic state at phased intersections, the RIME-FCM algorithm and BO-Xgboost model are used to finely identify the traffic state of roads near the intersection, solving the problem of traffic state errors in the prior art, and improving the accuracy and reliability of the identification.

CN119229653BActive Publication Date: 2025-03-14CCCC SECOND HIGHWAY CONSULTANTS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411732787.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-03-14
Estimated Expiration
2044-11-29

AI Technical Summary

Technical Problem

The prior art is difficult to refine the traffic status of nearby road sections affected by the intersection phase, resulting in errors in traffic status identification and affecting the accuracy of traffic management decisions.

Method used

The traffic state refinement identification method of phase-type intersections is adopted. By collecting traffic data at intersections, pre-processing is performed according to phase, the RIME-FCM algorithm is used to fuzzy division of traffic states, and the traffic state recognition classification training is performed based on the BO-Xgboost model, and the model is interpreted using SHAP.

Benefits of technology

The refined identification of traffic status in the road section near the intersection is achieved, the accuracy and reliability of traffic status identification is improved, and more accurate signal control strategies are provided for traffic managers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119229653B_ABST
    Figure CN119229653B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for fine-grained identification of traffic status at a phase-type intersection, and relates to the field of intelligent transportation technology. Compared with previous traffic status identification methods, the present invention solves the problem that the prior art generally studies the intersection as a node in the road network, or simply finds parameters representing the state at the intersection to divide the traffic status, and cannot finely identify the traffic status of nearby sections affected by the intersection phase; divides the traffic flow parameters under different phases, and then clusters the data under different phases using the RIME‑FCM model to achieve preliminary division of traffic flow parameters; optimizes the hyperparameters of the Xgboost model by Bayesian optimization, and performs traffic status identification classification training; and uses SHAP to interpret the model identification process to improve the reliability of congestion identification results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent traffic technology, and in particular to a method for finely identifying traffic conditions at a phased intersection. Background Art

[0002] Data show that by the beginning of 2023, my country's urbanization rate has reached 65.22%, inter-city travel demand continues to grow, and the number of motor vehicles has exceeded 400 million. In recent years, the traffic flow state in the connection area between urban roads and highways has been complex and congestion has been serious. As traffic demand continues to increase, the contradiction between traffic supply and demand at the intersection of urban and suburban road traffic connection areas has become increasingly prominent. Traffic congestion has become a serious hidden danger that restricts regional economic development, affects the quality of traffic services, and damages the regional ecological environment. Among them, the intersection of urban and suburban road traffic connection areas is an important node of the road traffic system. A large number of vehicles converge and interweave here, which is very likely to cause traffic congestion and limit the efficiency of road network operation. The structure, algorithm, communication and other technologies of traffic information processing and application are the key research objects in the field of modern intelligent transportation systems (ITS). At present, the traffic management department mainly uses the traffic guidance system and traffic control system of ITS to alleviate road congestion. If the traffic state changes of the basic sections near the intersection can be judged in a timely and accurate manner, the accuracy of traffic guidance and the effect of traffic control can be improved, and the reliability and effectiveness of urban and highway traffic can be improved at the same time.

[0003] At present, in the field of intelligent transportation system research, the identification of traffic operation status has become a research hotspot. Accurate and real-time traffic status identification helps traffic management departments to timely understand and grasp the traffic operation status. It also facilitates traffic management departments to predict and formulate traffic congestion diversion decision-making plans in advance, which is of great significance to alleviating traffic congestion. Therefore, many scholars at home and abroad have paid great attention to the research on traffic state identification.

[0004] Early traffic state identification mostly adopted a single principle design method, such as statistical analysis, comparison method and theoretical model. With the development of advanced technology in the field of transportation, the development direction of traffic state identification algorithms has changed from the improvement of a single method to the diversified development of methods and theories, and has achieved good results. However, the current main research focus is mainly on the road network as a whole or on congested sections. The intersection is generally studied as a node in the road network, or simply looking for parameters representing the state at the intersection to divide the traffic state. There are few studies on the refined identification of the traffic state of the nearby sections affected by the intersection phase. Since the sections near the intersection are affected by the phase of the traffic lights, if the traffic state under different phases is roughly divided uniformly, without considering the phenomenon of vehicle parking and queuing caused by the influence of the traffic lights under different phases, it is easy to misidentify the traffic state. For example, in the phase of the straight red light, the moving vehicles will slow down or stop due to the red light at the intersection. In this case, the cross-sectional traffic volume is low, the lane space occupancy rate is high, and the average driving speed is low. If the traditional identification method is used, it is easy to mistakenly identify this situation as a congestion state, together with the situation of low cross-section traffic volume, high lane space occupancy, and low average driving speed under the straight green light phase, without considering the influence of signal phase, which will mislead managers. At the same time, urban peripheral highways are often affected by the traffic of their connecting roads, especially the intersections in the urban and external road traffic connection areas, and there are few studies on the refined identification of traffic conditions in nearby sections affected by such intersections.

[0005] In this regard, the present invention proposes a refined discrimination method for the traffic status of the road section near the intersection under different phases, so as to realize the rapid discrimination of the traffic status of the intersection and provide a basis for traffic managers to formulate intersection signal control strategies. At the same time, when the traditional FCM algorithm is used to divide the traffic status, it is easy to cause misjudgment or wrong judgment due to the influence of the initial cluster center. Therefore, a FCM algorithm based on the frost optimization algorithm (RIME-FCM) is proposed to optimize the initial center point of the cluster, and accept the non-high-quality solution as the high-quality solution with a smaller probability. Therefore, SHAP is used to perform an explanatory analysis on the model to clarify how each traffic parameter affects the model identification.

[0006] In order to solve the above problems, the present invention proposes a method for fine-grained identification of traffic status at a phased intersection. Summary of the invention

[0007] The purpose of the present invention is to propose a method for fine-tuning the traffic state of a phased intersection to solve the problems raised in the background technology:

[0008] Existing technologies generally study intersections as nodes in a road network, or simply look for parameters that represent the state at the intersection and divide the traffic state, but are unable to finely identify the traffic state of nearby road sections affected by the intersection phase.

[0009] In order to achieve the above object, the present invention adopts the following technical solutions:

[0010] A method for fine-grained identification of traffic conditions at a phased intersection comprises the following steps:

[0011] S1: Collect intersection traffic data and perform preprocessing operations according to the phases at the intersection, dividing the intersection traffic data into data sets under different phases;

[0012] S2: Fuzzy division of traffic status is performed based on the RIME-FCM algorithm for data in different phases to obtain a data set containing traffic status labels;

[0013] S3: Traffic state recognition and classification training is performed based on the BO-Xgboost model, and the SHAP value is used to explain the model.

[0014] Preferably, in S1, three traffic parameters, namely, traffic volume, average travel speed of road section and space occupancy rate, are selected as identification indicators to form a traffic state identification indicator system.

[0015] Preferably, in S1, a relative metric standard for dividing the traffic status is set, and the traffic status is divided into four categories: smooth, stable, congested and blocked.

[0016] Preferably, the RIME-FCM algorithm in S2 is specifically as follows:

[0017] S2.1: Set initial parameters;

[0018] S2.2: Update the cluster center C and membership matrix U of the FCM algorithm;

[0019] S2.3: Define the fitness function. The fitness function Y is selected as: Among them, J FCM is the objective function; C is the cluster center; U is the membership matrix;

[0020] S2.4: Continuously update the values ​​of each dimension in the cluster center through the RIME algorithm, that is, the values ​​of the three identification indicators in each cluster center, corresponding to the particle;

[0021] S2.5: Update the global optimal individual and determine whether the maximum number of iterations has been reached. If so, proceed to S2.6, otherwise proceed to S2.2;

[0022] S2.6: The algorithm ends, and the individual with the largest particle fitness is taken as the initial clustering center of the FCM algorithm to divide the samples;

[0023] The FCM algorithm described in S2.2 is as follows:

[0024] S2.2.1: Get the initial cluster center based on the initial parameters set in S2.1 And calculate the initialization membership matrix U0;

[0025] S2.2.2: Calculate the cluster center C = {c1, c2, ..., c w} and update the membership matrix U; specifically as follows:

[0026] The cluster center c i The calculation is as follows:

[0027]

[0028] Where n is the number of samples; j is the sample number; w is the number of cluster centers; i is the cluster center number; m is the fuzzy index; u ij For sample x j The degree of membership to the i-th cluster center;

[0029] S2.2.3: Calculate the objective function J FCM , if |U t+1 -U t |≤ε or the maximum number of iterations is reached, the calculation is terminated, otherwise return to S2.2.3 to continue iteration; the details are as follows:

[0030] The data sample set in the feature space is X = {x1, x2, x3, ..., x n}∈R S ,C={c1,c2,...,c w} represents the cluster center, and the sum of the Euclidean distances from each sample to each cluster center is the objective function J FCM , as follows:

[0031]

[0032] The constraints are as follows:

[0033]

[0034] Where n is the number of samples; j is the sample number; w is the number of cluster centers; i is the cluster center number; m is the fuzzy index; u ij For sample x j The degree of membership to the i-th cluster center; d ij For sample x jTo cluster center c i The Euclidean distance of

[0035] The membership degree u ij The calculation is as follows:

[0036]

[0037] in, is the w0th cluster center;

[0038] The RIME algorithm described in S2.4 is as follows:

[0039] In the RIME algorithm, each frost individual is composed of several particles, and the frost population is composed of several individuals, as follows:

[0040] S k =[y k1 y k2 … y kl ]

[0041]

[0042] Where R is the frost population, represented as a matrix, each row represents an individual; y kl (k=1,...,K,l=1,...,D) is the lth particle of the kth frost individual, the value of the dimension corresponding to the particle is the value of the lth dimension of the solution, K is the number of frost individuals, that is, the population size, D is the number of dimensions of each individual, the dimension of each individual corresponds to the identification index, and the number of dimensions corresponds to the number of identification indicators; S k represents the kth frost individual, corresponding to the traffic state;

[0043] The optimization of frost individuals is performed based on the soft frost search strategy, as follows:

[0044]

[0045] in, is the new position of the particle after the soft frost search strategy is updated, corresponding to the vector coordinates composed of the variable values ​​of different particles; R best,l is the lth particle of the best individual in the frost population, calculated according to the fitness function; r1 is a random number in the range of [-1,1], which controls the direction of particle movement; θ and β represent the angle of particle movement and environmental factors, respectively; h is the adhesion coefficient, a random number in the range of [0,1], which controls the distance between the centers of two particles; U bkl is the upper bound of the lth particle of the kth frost individual; L bklis the lower bound of the lth particle of the kth frost individual; ξ is the adhesion coefficient; r2 is a random number in the range [0,1], which controls the condensation of particles; t is the current iteration number; T0 is the maximum iteration number; is the control value, used to control the number of steps of the step function;

[0046] The crossover behavior between frost individuals is simulated based on the frost penetration mechanism, as follows:

[0047]

[0048] in, Updated particle positions for the frost piercing mechanic; F normr (S k ) represents the normalized value of the current individual fitness value; r3 is a random number in the range of [-1,1];

[0049] The normalized value is calculated as follows:

[0050]

[0051] Among them, η' ψ is the ψth data after normalization, and its value range is [0,1]; η ψ is the ψth original input data; η max is the maximum value in the original data; η min is the minimum value in the original data;

[0052] The RIME algorithm is based on a greedy selection mechanism, as follows:

[0053] S2.4.1: Initialize the frost population R and related parameters;

[0054] S2.4.2: Get the current best individual and best fitness value;

[0055] S2.4.3: When t≤T0, perform steps A, B, and C in sequence:

[0056] Step A: If r2<ξ, update the individual positions of frost ice according to the soft frost search strategy;

[0057] Step B: If r3 <F normr (S k ), cross-renewal is carried out between individuals through the frost puncture mechanism;

[0058] Step C: If Then use the active greedy selection mechanism to select the optimal solution and replace the suboptimal solution, specifically: compare the updated fitness value of the individual with the fitness value before the update, if the updated fitness value is better than the value before the update, replace the solutions of the two individuals; if the termination condition is met, execute S2.4.5, otherwise, execute S2.4.4;

[0059] S2.4.4: Increase the number of evolution iterations by 1 and go to S2.4.3;

[0060] S2.4.5: Output the global optimal value and the algorithm ends.

[0061] Preferably, the BO-Xgboost model process in S3 is as follows:

[0062] S3.1: Determine the optimization parameters and solution space of the Xgboost model according to the objective function and regularization strategy, and collect π parameter combinations in the solution space;

[0063] S3.2: Input π parameter combinations into the Xgboost model and obtain the objective function value, and take the parameter combination with the best output effect as the initial optimal solution;

[0064] S3.3: Use the Gaussian regression process model to fit the initial parameter combination and the objective function value, and preliminarily select the optimal parameter combination based on the comparison between the output value of the Gaussian regression process model and the preset value;

[0065] S3.4: Reselect several parameter combinations in the solution space based on the EI algorithm, and use the Gaussian process to predict the distribution mean and standard deviation of the selected parameter combinations;

[0066] S3.5: Use the mean and standard deviation of the acquisition function distribution to score and evaluate the effect of each parameter combination;

[0067] S3.6: Based on several evaluation indicators, the best parameter combination is selected as the optimal solution for this iteration;

[0068] S3.7: Replace the optimal solution of the previous iteration with the optimal solution of this iteration;

[0069] S3.8: Add the current optimal parameter combination and objective function value to the original π parameter combinations and update the Gaussian process fitting model;

[0070] S3.9: Determine whether the preset maximum number of iterations has been reached. If so, output the optimal solution as the optimal parameter combination of Xgboost; otherwise, go to step S3.4;

[0071] S3.10: Use the optimal parameter combination found to train the XGBoost model, then use the trained XGBoost model to predict the sample data, and judge the traffic status based on the prediction results output by the model.

[0072] Preferably, the construction of the Xgboost model is as follows:

[0073] The objective function P of the Xgboost model v The definition is as follows:

[0074]

[0075] Among them, z a Represents real data; is the sum of the predictions of the first v-1 learners and the prediction of the vth learner; L represents the model loss function; Ω(f v ) is the regularization strategy; c is a constant;

[0076] The second-order approximation formula of Taylor expansion is as follows:

[0077]

[0078] Among them, e represents the desired point;

[0079] The first-order derivative of the loss function g a and the second-order derivative h a They are defined as follows:

[0080]

[0081] Expand the objective function using Taylor expansion and replace it with the reciprocal form to obtain:

[0082]

[0083] Set the prediction value of the a-th decision tree leaf for the data to:

[0084] f v (e) = ω s(e)

[0085] Among them, s(e) represents the leaf node of sample data; ω s(e) represents the predicted data of the leaf;

[0086] Add a penalty on the number of leaf nodes in regularization:

[0087]

[0088] Among them, B is the number of leaf nodes; γ and λ are regularization parameters. The predicted value and regularization are brought into the objective function formula, the constant term c is omitted, and the error sum of the sample prediction is changed to the sum of the error of each leaf prediction value:

[0089]

[0090] Among them, p v is the set of all samples assigned to the bth leaf;

[0091] make For the objective function p v Derivation, that is, finding the minimum value of the objective function, obtains the optimal ω b Value

[0092]

[0093] Substituting into the objective function, we get:

[0094]

[0095] The information gain Gain is as follows:

[0096]

[0097] Among them, G R , H R is the value of the right leaf node; G L , H L The value of the left leaf node.

[0098] Preferably, the Gaussian regression process model in S3.3 is as follows:

[0099] The output Z of the Gaussian regression process model is set as follows:

[0100]

[0101] Among them, ζ is a Gaussian distribution N(0,δ 2 ) noise; is the objective function, which represents the true value or response value generated for the input q;

[0102] Using Gaussian process The function is described, and the prior distribution is determined by its mean function σ(q) and covariance function P(q,q');

[0103] For data Q = {q1, ..., q τ}, τ is the number of data, distribution function The multivariate Gaussian distribution of is:

[0104] F~N(σ(q),P(q,q'))

[0105] in, and is a matrix element of τ×τ, where T is the transpose of the vector;

[0106] The Gaussian regression process model built based on the above steps returns The mean and variance of the Gaussian distribution of the predicted value of q in the function.

[0107] Preferably, the EI algorithm in S3.4 is specifically as follows:

[0108]

[0109] Where EI(q) is the maximum expected improvement; E[·] is the expected value; Indicates the optimal hyperparameter combination currently found by the algorithm; is the predicted distribution mean of the new input point; μ(q) represents the currently known optimal objective function value; δ(q) represents the standard deviation of the new input point; M is the substitution function; Γ(M) represents the cumulative distribution function of the standard normal distribution; ρ(M) represents the probability density function of the standard normal distribution.

[0110] Preferably, in S3.4, a parameter combination is selected in the solution space based on the EI algorithm in the following manner:

[0111] For a given sample data q, the Gaussian regression process model is used to update The posterior expectation of a function;

[0112] Find the data Q with the largest EI value in the EI algorithm new , let Q new =arcmaxEI(q);

[0113] And calculate the data point Q new of Function value;

[0114] The above calculation process is repeated until the algorithm stopping threshold is reached.

[0115] Preferably, the SHAP value in S3 is calculated as follows;

[0116] For each prediction example, the SHAP model generates a Shapley value, which is the sum of the values ​​assigned to each feature, interpreted as:

[0117]

[0118] Among them, θ is the explanatory model of each variable; is the joint vector; O is the maximum joint scale; Ψo ∈R is the characteristic attribute of feature o.

[0119] Compared with the prior art, the present invention provides a method for fine-grained identification of traffic conditions at a phased intersection, which has the following beneficial effects:

[0120] The present invention divides the traffic flow parameters under different phases, and then clusters the data under different phases respectively using the RIME-FCM model to avoid particles from gathering too quickly at the current optimal solution and falling into local extreme values; realizes the preliminary division of traffic flow parameters; optimizes the hyperparameters of the Xgboost model by Bayesian optimization, and performs traffic state recognition and classification training; overcomes the problem that the current Xgboost traffic recognition algorithm training process cannot be observed, and the results are difficult to explain, which affects the reliability of the results; and also uses SHAP to perform explanatory analysis on the model recognition process to improve the reliability of congestion recognition results. BRIEF DESCRIPTION OF THE DRAWINGS

[0121] Figure 1 This is a flow chart of the method mentioned in Example 1 of the present invention;

[0122] Figure 2 This is a flow chart of the FCM algorithm mentioned in Example 1 of the present invention;

[0123] Figure 3 It is a convergence algebra comparison diagram of the FCM and RIME-FCM algorithms mentioned in Example 1 of the present invention;

[0124] Figure 4 The local explanation diagram for traffic flow state identification mentioned in Embodiment 1 of the present invention;

[0125] Figure 5 This is a global explanation diagram of the traffic flow state identification mentioned in Example 1 of the present invention. DETAILED DESCRIPTION

[0126] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.

[0127] The present invention divides the traffic flow parameters under different phases, and then clusters the data under different phases respectively using the RIME-FCM model to avoid particles from gathering too quickly at the current optimal solution and falling into local extreme values; realizes the preliminary division of traffic flow parameters; optimizes the hyperparameters of the Xgboost model by Bayesian optimization, and performs traffic state recognition and classification training; overcomes the problem that the current Xgboost traffic recognition algorithm training process cannot be observed, and its results are difficult to explain, which affects the reliability of the results; and uses SHAP to interpret the model recognition process and improve the reliability of congestion recognition results. Specifically, it includes the following contents.

[0128] Embodiment 1:

[0129] See also Figure 1-5 The present invention provides a method for finely identifying the traffic state of a phased intersection, comprising the following steps:

[0130] S1: Collect intersection traffic data and perform preprocessing operations according to the phases at the intersection, dividing the intersection traffic data into data sets under different phases; the details are as follows:

[0131] The data collection section is Jiangcheng Avenue, and the intersection is the intersection of Jiangcheng Avenue and Taizihu North Road. This section is close to the Dongfeng Avenue Elevated Road and the Third Ring Road, and is located in the connection area between urban roads and highways. Because the section is north-south, there will be traffic only when the phase is north-south straight and north-south left turn. Therefore, the data is divided into three parts according to each phase time: north-south straight, north-south left turn, and others.

[0132] There are many identification indicators used to describe the traffic status of urban roads, such as arrival rate, average delay time, queue length, average running speed, saturation, headway, etc. In order to comprehensively identify the traffic status of road sections near the road, it is necessary to select reasonable identification indicators, but it does not mean that the more identification indicators selected, the better, but it is necessary to consider that the selected identification indicators can be sensitive to the status of road sections near the road and are easy to obtain. Therefore, this embodiment selects three traffic parameters, namely traffic volume, average travel speed of road sections, and space occupancy, as identification indicators to form a road traffic status identification indicator system.

[0133] Whether the traffic state classification standard adopted is reasonable or not largely determines the effectiveness of traffic state identification. This embodiment takes into account the influencing factors such as road environment, traffic, weather and holidays based on the relative metric standard, and uses the actual existing traffic history data of the road section to objectively describe the traffic operation status of the basic section of the highway in a specific time and space. The traffic state is divided into four categories: "smooth", "stable", "congested" and "blocked".

[0134] The “smooth” traffic state corresponds to the following conditions: low occupancy, little interference between vehicles, and vehicles can move almost freely and at high speeds.

[0135] The "smooth" traffic state corresponds to the following conditions: the occupancy rate increases, the interference between vehicles also increases, vehicles begin to follow each other, the continuity of traffic flow increases, and traffic runs smoothly.

[0136] The corresponding condition of "congested" traffic state is: the occupancy rate further increases, the interference between vehicles intensifies, the speed decreases faster, and then the flow increases slowly until it stops.

[0137] The "blocked" traffic state corresponds to the following conditions: occupancy rate increases sharply, there is serious interference between vehicles, speed drops significantly, traffic flow decreases, and traffic operation is extremely unstable.

[0138] S2: Fuzzy division of traffic status is performed based on the RIME-FCM algorithm for data in different phases to obtain a data set containing traffic status labels; the details are as follows:

[0139] The traditional FCM algorithm mainly realizes the clustering and classification of traffic status through two modules: fuzzy clustering and classification decision. The fuzzy clustering module can obtain four types of traffic status data sets, providing a relative standard for the state identification of traffic flow operation data. The classification decision module can use the optimal cluster center and the principle of minimum Euclidean distance to identify the traffic status attributes of a set of measured traffic flow data. The process of the FCM algorithm can refer to Figure 2 Among them, the fuzzy clustering module can realize the division of traffic status, and the classification decision module can realize the identification of traffic status based on the fuzzy clustering module. That is, through the fuzzy clustering module, the traffic flow data samples can be divided into four categories, and the membership of each group of data to each traffic status category can be obtained to determine the data set samples and their corresponding traffic status values, providing data for subsequent research on traffic status identification. The classification decision module can be used to identify the traffic status attributes of the measured data.

[0140] The traditional FCM algorithm is affected by the initial cluster center, which can easily lead to misjudgment or wrong judgment. Therefore, changing the initialization strategy of the initial clustering and improving the quality of the cluster center are the research directions that need to be studied in the field of fuzzy clustering. Therefore, a FCM algorithm based on the frost optimization algorithm (RIME-FCM) is proposed to optimize the initial center point of the cluster, and make the algorithm have a certain "inclusiveness" for particles that are not currently optimal, and accept non-high-quality solutions as high-quality solutions with a small probability, so as to avoid particles from gathering too quickly at the current optimal solution and falling into local extreme values.

[0141] The FCM algorithm based on the frost optimization algorithm is as follows: first, the data set is preprocessed, and the missing data and abnormal data are judged and removed without affecting the overall situation; second, the RIME algorithm is used to optimize the sorted data and find the initial clustering center that meets the termination conditions; finally, the RIME algorithm is used to obtain a set of better clustering centers as the initial clustering centers of FCM for clustering. The study shows that the RIME-FCM clustering algorithm can optimize the quality of the initial clustering centers of FCM, effectively improve the clustering accuracy, and the clustering effect is relatively satisfactory.

[0142] The specific process is:

[0143] S2.1: Set initial parameters;

[0144] S2.2: Update the cluster center C and membership matrix U of the FCM algorithm;

[0145] S2.3: Define the fitness function. The fitness function Y is selected as: Among them, J FCM is the objective function; C is the cluster center; U is the membership matrix;

[0146] S2.4: Continuously update the values ​​of each dimension in the cluster center through the RIME algorithm, that is, the values ​​of the three identification indicators in each cluster center, corresponding to the particle;

[0147] S2.5: Update the global optimal individual and determine whether the maximum number of iterations has been reached. If so, proceed to S2.6, otherwise proceed to S2.2;

[0148] S2.6: The algorithm ends, and the individual with the largest particle fitness is taken as the initial clustering center of the FCM algorithm to divide the samples;

[0149] Set the relevant parameters of the RIME-FCM algorithm. For details, refer to Table 1:

[0150] Table 1 RIME-FCM algorithm parameters

[0151]

[0152] According to the set parameters, the three parts of data are clustered respectively. The cluster centers of the four traffic states are:

[0153]

[0154] [o1,o2,o3,o4] represent the traffic status centers of smooth, stable, congested and blocked respectively. The first column of the matrix represents the travel speed, the second column represents the traffic volume, and the third column represents the space occupancy rate.

[0155] Comparing the convergence speed of FCM algorithm and RIME-FCM algorithm, please refer to Figure 3 , the objective function value can be found in Table 2:

[0156] Table 2 Objective function values ​​of FCM and RIME-FCM algorithms

[0157] Iterations FCM objective function value RIME-FCM objective function value 1 50998.63148 51494.03848 2 39002.25526 38577.73595 …… …… …… 12 6582.68822 6513.849579 13 6581.851655 6513.769915 …… …… 51 6513.76991 52 6513.76991

[0158] In the comparison of the objective function values ​​of the RIME-FCM algorithm and the traditional FCM algorithm, it can be found that the RIME-FCM algorithm obtained the optimal clustering after 13 iterations from the initial value of 51494.03848, and the FCM algorithm reached the optimal clustering after 52 iterations from the initial value of 50998.63148. From the comparison between the RIME-FCM algorithm and the FCM algorithm, it can be seen that the RIME-FCM algorithm has an advantage over the traditional FCM algorithm in terms of convergence speed and can quickly find the optimal clustering division.

[0159] The two algorithms were run 10 times on the simulation platform, and the experimental data comparison is shown in Table 3:

[0160] Table 3 Comparison of FCM and RIME-FCM algorithm operation

[0161]

[0162] It can be seen that the final values ​​of the objective function of the RIME-FCM algorithm are the same, and the final values ​​of the objective function of the FCM algorithm are higher than those of the RIME-FCM algorithm. In convergence algebra, the RIME-FCM algorithm can achieve faster convergence than the FCM algorithm. The RIME-FCM algorithm has better stability and convergence than the traditional FCM algorithm.

[0163] S3: Traffic state recognition and classification training is performed based on the BO-Xgboost model, and the SHAP value is used to explain the model. The details are as follows:

[0164] Xgboost is an improved algorithm of GBDT algorithm. Based on the traditional boosting tree algorithm, Xgboost algorithm adds decision trees for feature splitting to prevent overfitting. The added tree fits the residual of the previous model prediction, customizes the objective function, and uses regularization to prevent overfitting and parallel algorithm design. The biggest difference between Xgboost and GBDT lies in the definition of the objective function. The Xgboost model adds weights to the number of leaf nodes in regularization to prevent model overfitting and reduce model complexity. The model decision tree selects the point with the largest split gain as the splitting point of the model leaf, and introduces the second-order derivative to retain more data information. Like traditional machine learning algorithms, Xgboost has many parameters, and parameter selection has a greater impact on the application effect of the model. Model hyperparameter optimization is the focus of research. Considering that the Bayesian optimization method can be fully applied to historical search data and the parameter optimization efficiency is high, this embodiment uses the Bayesian optimization method to optimize the hyperparameter selection of the Xgboost algorithm to form a BO-Xgboost traffic state recognition model.

[0165] The traffic state recognition model (BO-Xgboost) of Bayesian Optimization (BO) Xgboost hyperparameters is constructed. The BO algorithm is used to optimize the hyperparameters of the XGBoost model, such as the number of decision trees (n_estimators), the minimum number of samples for node re-division (min_samples_split), the maximum number of features for division (max_features), the maximum depth of the tree (max_depth), and the minimum child node weight (min_child_weight). The purpose is to find a suitable set of hyperparameter combinations, optimize the generalization ability of the model, and improve the prediction accuracy and stability of the XGBoost model. In the initial stage, BO will randomly select a set of hyperparameter combinations to train a basic XGBoost model and evaluate its performance through cross-validation and other means. Then, BO uses the Bayesian theorem, combines the performance of the current model and the prior distribution of the hyperparameters, and calculates a potential candidate hyperparameter combination. This candidate combination is used to train a new XGBoost model and evaluate its performance again. This iterative process will continue, and each iteration will update the posterior distribution of the hyperparameters according to the new observations, thereby gradually focusing on the optimal performance area. Finally, this process will continue until the preset number of iterations or the performance reaches the convergence standard. In this way, BO efficiently finds the best combination of XGBoost models in the huge hyperparameter space and significantly improves the prediction ability of the model. The process is roughly as follows:

[0166] S3.1: Determine the optimal parameters and solution space of the Xgboost model and collect π parameter combinations;

[0167] S3.2: Input π parameter combinations into the Xgboost model and obtain the objective function value, and take the parameter combination with the best output effect as the initial optimal solution;

[0168] S3.3: Use the Gaussian regression process model to fit the initial parameter combination and the objective function value:

[0169] S3.4: Reselect several parameter combinations in the solution space and use the Gaussian process to predict the distribution mean and standard deviation;

[0170] S3.5: Use the mean and standard deviation of the acquisition function distribution to score and evaluate the effect of each parameter combination;

[0171] S3.6: Select the parameter combination with the best effect as the optimal solution for this iteration;

[0172] S3.7: Replace the optimal solution of the previous iteration with the optimal solution of this iteration;

[0173] S3.8: Add the current optimal parameter combination and objective function value to the original π parameter combinations and update the Gaussian process fitting model;

[0174] S3.9: Determine whether the maximum number of iterations has been reached. If so, output the optimal solution as the optimal parameter combination for Xgboost; otherwise, go to step S3.4.

[0175] The Bayesian optimization method is used to optimize the hyperparameters of the Xgboost algorithm. According to the five set parameters, the hyperparameter optimization space is set as shown in Table 4:

[0176] Table 4 Parameter search space

[0177] parameter Parameter Description Search Space n_estimators Number of decision trees (10,250) min_samples_split Minimum number of samples for node redivision (2,25) max_features Maximum number of features to partition (1,10) max_depth Maximum depth of the tree (0.1,0.999) min_child_weight Minimum child node weight (0,100)

[0178] The Xgboost and BO-Xgboost models were run five times respectively. The Xgboost model used for comparison adopted the default parameters. The AUC values ​​obtained are shown in Table 5. Compared with the default Xgboost model, the AUC values ​​of the BO-Xgboost model were improved.

[0179] Table 5 Bayesian optimization hyperparameter comparison

[0180] Iter Target n_estimators min_samples_split max_features max_depth min_child_weight 1 0.8902 3.97 6.57 45.2 12.4 2.5 2 0.921 12.1 22.97 141.5 34.1 4.3 …… …… …… …… …… …… …… 120 0.972 476.0 13.1 480.0 53.0 1.2 121 0.971 421.5 22.6 460.2 54.9 1.5

[0181] The hyperparameter optimization of the BO-Xgboost model found the best hyperparameter combination in the 120th iteration, and obtained an AUC score of 0.977 on the test set. The best combination of hyperparameters of the BO-Xgboost model was (476.0, 13.1, 480.0, 53.0, 1.2).

[0182] The road traffic status data set includes three parameters: traffic flow, space occupancy, and average driving speed. In order to ensure the accuracy of the traffic status identification model, the experiment randomly shuffled the data order, using the first 80% as the training set and the last 20% as the test set. The comparison algorithms used Random Forest (RF), GradientBoosting Decision Tree (GBDT), and K-Nearest Neighbor (KNN), each running 10 times. The classification algorithm accuracy is shown in Table 6.

[0183] Table 6 Comparison of model recognition accuracy

[0184] Number of runs XGboost SVM RF KNN 1 99.87% 96.85% 99.74% 98.43% 2 99.87% 96.33% 99.89% 98.56% 3 99.74% 96.19% 100% 98.56% 4 100.00% 96.06% 100% 98.81% 5 99.87% 95.27% 99.86% 98.29% 6 99.87% 96.98% 99.74% 97.24% 7 100.00% 97.11% 99.73% 98.95% 8 100.00% 95.67% 99.87% 97.64% 9 99.87% 97.24% 100% 98.82% 10 99.87% 95.80% 99.86% 98.95% Average accuracy 99.90% 96.35% 99.82% 98.43%

[0185] It can be seen that the classification and recognition effects of the four traffic state recognition models are all above 97%, and the average accuracy of the BO-Xgboost model is 99.90%, which is higher than the average accuracy of the RF, SVM, and KNN models, and has better stability.

[0186] As can be seen from Table 7, BO-Xgboost has the shortest average running time of 3.4429 seconds, which is comparable to the average running time of KNN, and RF has the longest average running time. Compared with RF, GBDT, and KNN algorithms, the BO-Xgboost algorithm used in this experiment has the highest average accuracy and short running time in the experimental test, showing good traffic state judgment and recognition performance.

[0187] Table 7 Comparison of model running time

[0188] Number of runs XGboost SVM RF KNN 1 3.4203 3.7893 4.0683 3.6223 2 3.8697 3.9229 4.2164 3.4100 3 3.8481 3.5913 3.8408 3.4030 4 3.5395 3.6462 4.6383 3.3543 5 3.4687 3.5126 3.7416 3.3560 6 3.5136 3.5495 3.6792 3.5585 7 3.4587 3.6128 4.0333 3.4358 8 3.8966 3.6382 3.6862 3.4109 9 3.4637 3.5286 4.0974 3.4877 10 3.4501 3.5368 3.6880 3.4309 Average running time 3.4429 3.6328 3.9689 3.4469

[0189] The properties of each variable in a SHAP model generally depend on three choices: the number of times a feature is used to split the feature space across all trees, the split counts weighted by the number of instances that underwent these splits, and the total training loss reduction obtained when using a feature for splits.

[0190] The interpretation based on SHAP values ​​enables us to examine the statistical features that are important in identifying traffic states and provides insights into how to improve the identification procedure. The predictions of the model are interpreted at both local and global levels. First, for each traffic flow parameter at each moment, the contribution of each statistical feature to the identification result is visualized through the SHAP value at the local level. Figure 4The explanation of the traffic flow state identification results of the 1021st and 2101st samples of the dataset is given. In the figure, the SHAP value of the feature with increased identification is represented by a black bar, while the SHAP value of the feature with reduced identification is represented by a gray bar. In addition, the base value represents the baseline prediction value of the model, that is, the average of all prediction values. For this dataset, the traffic state of the 1021st sample is identified as congestion. XGBoost estimates that the traffic state at this moment is congested. The "speed" feature of the 1021st sample contributes the most to the estimated value of the model and has a positive impact in the 1021st sample. The traffic state of the 2101st sample is identified as congestion. XGBoost estimates that the traffic state at this moment is stable. The "speed" feature of the 2101st sample contributes the most to the estimated value of the model and has a negative impact in the 2101st sample. Among them, the first-order difference of the identification state of the 1021th sample caused the model to estimate the traffic flow state of the sample to be lower than the baseline prediction value, while the first-order difference of the identification state of the 2102th sample caused the model to estimate the traffic flow state of the sample to be higher than the baseline prediction value. This observation shows that the same feature has different directions of influence on the model at different moments. In addition, we also studied how these features affect the model's prediction according to the trend of the SHAP value at the global level. Figure 5 The SHAP value distribution of statistical features sorted by their absolute SHAP values ​​is given, and the influence of the features can be clearly shown by comparison. Figure 5 In the figure, data samples are represented by black to gray points in the order of the original values ​​of the statistical features. In general, the "speed" feature has the greatest impact on state identification. As mentioned above, the traffic parameters in different phases vary greatly, which plays an important role in traffic flow state identification. Rough division of traffic states can easily have a negative impact on state identification. Applying SHAP to analyze the feature importance of each traffic parameter provides key insights into the components of traffic state identification.

[0191] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

Claims

1. A method for fine-grained identification of traffic conditions at a phased intersection, characterized in that: The steps include: S1: Collect intersection traffic data and perform preprocessing operations according to the phases at the intersection, dividing the intersection traffic data into data sets under different phases; S2: Based on the RIME-FCM algorithm, fuzzy classification of traffic status is performed for data in different phases to obtain a data set containing traffic status labels; S3: Traffic state recognition and classification training is performed based on the BO-Xgboost model, and the SHAP value is used to explain the model.

2. The method for fine-tuning traffic status identification of a phased intersection according to claim 1 is characterized in that: In S1, three traffic parameters, namely, traffic volume, average travel speed of road section and space occupancy rate, are selected as identification indicators to form a traffic state identification indicator system.

3. The method for fine identification of traffic status at a phased intersection according to claim 1, characterized in that: In S1, a relative metric standard for classifying traffic status is set, and the traffic status is divided into four categories: smooth, stable, congested and blocked.

4. The method for fine-tuning traffic status identification of a phased intersection according to claim 1 is characterized in that: The RIME-FCM algorithm in S2 is specifically as follows: S2.1: Set initial parameters; S2.2: Update the cluster center C and membership matrix U of the FCM algorithm; S2.3: Define the fitness function. The fitness function Y is selected as: Among them, J FCM is the objective function; C is the cluster center; U is the membership matrix; S2.4: Continuously update the values ​​of each dimension in the cluster center through the RIME algorithm, that is, the values ​​of the three identification indicators in each cluster center, corresponding to the particle; S2.5: Update the global optimal individual and determine whether the maximum number of iterations has been reached. If so, proceed to S2.6, otherwise proceed to S2.2; S2.6: The algorithm ends, and the individual with the largest particle fitness is taken as the initial clustering center of the FCM algorithm to divide the samples; The FCM algorithm described in S2.2 is as follows: S2.2.1: Get the initial cluster center based on the initial parameters set in S2.1 And calculate the initialization membership matrix U0; S2.2.2: Calculate the cluster center C = {c1, c2, ..., c w } and update the membership matrix U; specifically as follows: The cluster center c i The calculation is as follows: Where n is the number of samples; j is the sample number; w is the number of cluster centers; i is the cluster center number; m is the fuzzy index; u ij For sample x j The degree of membership to the i-th cluster center; S2.2.3: Calculate the objective function J FCM , if |U t+1 -U t |≤ε or the maximum number of iterations is reached, the calculation is terminated, otherwise return to S2.2.3 to continue iteration; the details are as follows: The data sample set in the feature space is X = {x1, x2, x3, ..., x n }∈R S ,C={c1,c2,...,c w } represents the cluster center, and the sum of the Euclidean distances from each sample to each cluster center is the objective function J FCM , as follows: The constraints are as follows: Where n is the number of samples; j is the sample number; w is the number of cluster centers; i is the cluster center number; m is the fuzzy index; u ij For sample x j The degree of membership to the i-th cluster center; d ij For sample x j To cluster center c i The Euclidean distance of The membership degree u ij The calculation is as follows: in, is the w0th cluster center; The RIME algorithm described in S2.4 is as follows: In the RIME algorithm, each frost individual is composed of several particles, and the frost population is composed of several individuals, as follows: S kl =[and k1 and k2 ...and kl ] Where R is the frost population, represented as a matrix, each row represents an individual; y kl (k=1,...,K,l=1,...,D) is the lth particle of the kth frost individual, the value of the dimension corresponding to the particle is the value of the lth dimension of the solution, K is the number of frost individuals, that is, the population size, D is the number of dimensions of each individual, the dimension of each individual corresponds to the identification index, and the number of dimensions corresponds to the number of identification indicators; S k represents the kth frost individual, corresponding to the traffic state; The optimization of frost individuals is performed based on the soft frost search strategy, as follows: in, is the new position of the particle after the soft frost search strategy is updated, corresponding to the vector coordinates composed of the variable values ​​of different particles; R best,l is the lth particle of the best individual in the frost population, calculated according to the fitness function; r1 is a random number in the range of [-1,1], which controls the direction of particle movement; θ and β represent the angle of particle movement and environmental factors, respectively; h is the adhesion coefficient, a random number in the range of [0,1], which controls the distance between the centers of two particles; U bkl is the upper bound of the lth particle of the kth frost individual; L bkl is the lower bound of the lth particle of the kth frost individual; ξ is the adhesion coefficient; r2 is a random number in the range [0,1], which controls the condensation of particles; t is the current iteration number; T0 is the maximum iteration number; is the control value, used to control the number of steps of the step function; The crossover behavior between frost individuals is simulated based on the frost penetration mechanism, as follows: in, Updated particle positions for the frost piercing mechanic; F normr (S k ) represents the normalized value of the current individual fitness value; r3 is a random number in the range of [-1,1]; The normalized value is calculated as follows: Among them, η' ψ is the ψth data after normalization, and its value range is [0,1]; η ψ is the ψth original input data; η max is the maximum value in the original data; η min is the minimum value in the original data; The RIME algorithm is based on a greedy selection mechanism, as follows: S2.4.1: Initialize the frost population R and related parameters; S2.4.2: Get the current best individual and best fitness value; S2.4.3: When t≤T0, perform steps A, B, and C in sequence: Step A: If r2<ξ, update the individual positions of frost ice according to the soft frost search strategy; Step B: If r3 <F normr (S k ), cross-renewal is carried out between individuals through the frost puncture mechanism; Step C: If Then use the active greedy selection mechanism to select the optimal solution and replace the suboptimal solution, specifically: compare the updated fitness value of the individual with the fitness value before the update, if the updated fitness value is better than the value before the update, replace the solutions of the two individuals; if the termination condition is met, execute S2.4.5, otherwise, execute S2.4.4; S2.4.4: Increase the number of evolution iterations by 1 and go to S2.4.3; S2.4.5: Output the global optimal value and the algorithm ends.

5. The method for fine identification of traffic status at a phased intersection according to claim 1, characterized in that: The BO-Xgboost model process in S3 is as follows: S3.1: Determine the optimization parameters and solution space of the Xgboost model according to the objective function and regularization strategy, and collect π parameter combinations in the solution space; S3.2: Input π parameter combinations into the Xgboost model and obtain the objective function value, and take the parameter combination with the best output effect as the initial optimal solution; S3.3: Use the Gaussian regression process model to fit the initial parameter combination and the objective function value, and preliminarily select the optimal parameter combination based on the comparison between the output value of the Gaussian regression process model and the preset value; S3.4: Reselect several parameter combinations in the solution space based on the EI algorithm, and use the Gaussian process to predict the distribution mean and standard deviation of the selected parameter combinations; S3.5: Use the mean and standard deviation of the acquisition function distribution to score and evaluate the effect of each parameter combination; S3.6: Based on several evaluation indicators, the best parameter combination is selected as the optimal solution for this iteration; S3.7: Replace the optimal solution of the previous iteration with the optimal solution of this iteration; S3.8: Add the current optimal parameter combination and objective function value to the original π parameter combinations and update the Gaussian process fitting model; S3.9: Determine whether the preset maximum number of iterations has been reached. If so, output the optimal solution as the optimal parameter combination of Xgboost; otherwise, go to step S3.4; S3.10: Use the optimal parameter combination found to train the XGBoost model, then use the trained XGBoost model to predict the sample data, and judge the traffic status based on the prediction results output by the model.

6. The method for fine identification of traffic status at a phased intersection according to claim 1, characterized in that: The construction of the Xgboost model is as follows: The objective function P of the Xgboost model v The definition is as follows: Among them, z a Represents real data; is the sum of the predictions of the first v-1 learners and the prediction of the vth learner; L represents the model loss function; Ω(f v ) is the regularization strategy; c is a constant; The second-order approximation formula of Taylor expansion is as follows: Among them, e represents the desired point; The first-order derivative of the loss function g a and the second-order derivative h a They are defined as follows: Expand the objective function using Taylor expansion and replace it with the reciprocal form to obtain: Set the prediction value of the a-th decision tree leaf for the data to: f v (e)=ω s(e) Among them, s(e) represents the leaf node of sample data; ω s(e) represents the predicted data of the leaf; Add a penalty on the number of leaf nodes in regularization: Among them, B is the number of leaf nodes; γ and λ are regularization parameters. The predicted value and regularization are brought into the objective function formula, the constant term c is omitted, and the error sum of the sample prediction is changed to the sum of the error of each leaf prediction value: Among them, p v is the set of all samples assigned to the bth leaf; make For the objective function p v Derivation, that is, finding the minimum value of the objective function, obtains the optimal ω b Value Substituting into the objective function, we get: The information gain Gain is as follows: Among them, G R , H R is the value of the right leaf node; G L , H L The value of the left leaf node.

7. The method for fine identification of traffic status at a phased intersection according to claim 5, characterized in that: The Gaussian regression process model in S3.3 is as follows: The output Z of the Gaussian regression process model is set as follows: Among them, ζ is a Gaussian distribution N(0,δ 2 ) noise; is the objective function, which represents the true value or response value generated for the input q; Using Gaussian process The function is described, and the prior distribution is determined by its mean function σ(q) and covariance function P(q,q'); For data Q = {q1, ..., q τ }, τ is the number of data, distribution function The multivariate Gaussian distribution of is: F~N(σ(q),P(q,q')) in, and is a matrix element of τ×τ, where T is the transpose of the vector; The Gaussian regression process model built based on the above steps returns The mean and variance of the Gaussian distribution of the predicted value of q in the function.

8. The method for fine identification of traffic status at a phased intersection according to claim 7, characterized in that: The EI algorithm in S3.4 is as follows: Where EI(q) is the maximum expected improvement; E[·] is the expected value; Indicates the optimal hyperparameter combination currently found by the algorithm; is the predicted distribution mean of the new input point; μ(q) represents the currently known optimal objective function value; δ(q) represents the standard deviation of the new input point; M is the substitution function; Γ(M) represents the cumulative distribution function of the standard normal distribution; ρ(M) represents the probability density function of the standard normal distribution.

9. The method for fine identification of traffic status at a phased intersection according to claim 8, characterized in that: In S3.4, the parameter combination is selected in the solution space based on the EI algorithm in the following manner: For a given sample data q, the Gaussian regression process model is used to update The posterior expectation of a function; Find the data Q with the largest EI value in the EI algorithm new , let Q new =arcmaxEI(q); And calculate the data point Q new of Function value; The above calculation process is repeated until the algorithm stopping threshold is reached.

10. The method for fine identification of traffic status at a phased intersection according to claim 1, characterized in that: The SHAP value in S3 is calculated as follows; For each prediction example, the SHAP model generates a Shapley value, which is the sum of the values ​​assigned to each feature, interpreted as: Among them, θ is the explanatory model of each variable; is the joint vector; O is the maximum joint scale; Ψ o ∈R is the characteristic attribute of feature o.

Citation Information

Patent Citations

  • Traffic volume prediction method based on Xgboost algorithm

    CN110555989A

  • Traffic state discrimination method and system, storage medium, computer equipment, and application of system

    CN112085951A