A method and system for grading and predicting highway traffic blockage status
Through the combination method of entropy weight TOPSIS method, K-Medoids clustering and LightGBM algorithm, the problem of comprehensive evaluation and prediction of traffic blockage status is solved, the classification and prediction of highway traffic blockage status are realized, and the highway management department is provided with reliable information. Based on the reference basis, the emergency response capability has been improved.
Patent Information
- Application Number
- CN202410816151.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-24
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2044-06-24
AI Technical Summary
The existing traffic blockage evaluation indicators cannot comprehensively evaluate the traffic blockage status, lack grading and prediction methods, and are difficult to provide a reference basis for emergency rush operations for highway management departments.
The entropy weight TOPSIS method is used to evaluate the traffic blockage status, combined with the K-Medoids clustering algorithm for classification, and the LightGBM algorithm is used to construct a traffic blockage status level prediction model, and the data are processed through forwarding and standardization to eliminate dimensional effects. Achieve comprehensive evaluation and prediction.
It achieves comprehensive, objective classification and efficient prediction of highway traffic blockage status, provides a reliable reference for highway management departments, and improves the decision-making ability of emergency traffic.
Smart Images

Figure CN118397843B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of traffic safety, and in particular to a method and system for grading and predicting highway traffic blocking states. Background Art
[0002] Highway traffic blockage information includes highway traffic interruption information and traffic congestion information. Traffic interruption refers to the state where a highway is impassable or forced to be closed due to some reason (including measures such as full closure of the highway, closure of some lanes, limited closure, closure of toll booths, main line diversion, suspension of construction, etc.); traffic congestion refers to the state where vehicles on the highway are abnormally dense or concentrated in a certain section of the road due to some reason (including control measures such as patrol control, intermittent release, release by vehicle type, flow restriction and speed restriction), resulting in the subsequent vehicles driving at a low speed, stopping or even stranded.
[0003] At present, the evaluation indicators of traffic blockage are traffic blockage duration, traffic blockage mileage and traffic blockage severity. The above indicators are quantitative indicators, which can only evaluate traffic blockage from a single dimension and cannot comprehensively evaluate the traffic blockage status. There is a lack of grading and prediction methods for traffic blockage status, which makes it difficult to provide a reference for emergency clearance by highway management departments after blockage. Summary of the invention
[0004] The purpose of the present invention is to overcome the problem that the existing traffic blockage evaluation indicators are unable to comprehensively evaluate the traffic blockage status, and lack a grading and prediction method for the traffic blockage status, making it difficult to provide a reference basis for emergency clearance by highway management departments, and to provide a grading and prediction method and system for highway traffic blockage status.
[0005] In order to achieve the above-mentioned object of the invention, the present invention provides the following technical solutions:
[0006] A method for grading and predicting highway traffic blockage states comprises the following steps:
[0007] S1. Perform positive and standardized processing on traffic blockage event data;
[0008] S2. Based on the traffic blockage event data processed by S1, the entropy weight TOPSIS method is used to evaluate the traffic blockage status;
[0009] S3. Based on the evaluation of traffic blockage status in S2, the K-Medoids clustering algorithm is used to classify the traffic blockage status;
[0010] S4. Based on the classification of traffic blockage status in S3, the LightGBM algorithm is used to build a traffic blockage status level prediction model;
[0011] S5. Input the data to be predicted into the traffic blockage status level prediction model and output the prediction result.
[0012] Optionally, S1 includes the following steps:
[0013] S11. Arrange traffic blockage event data, which includes traffic blockage event serial number, traffic blockage duration, traffic blockage mileage, and traffic blockage severity, where traffic blockage duration, traffic blockage mileage, and traffic blockage severity are parameter indicators;
[0014] S12.
[0015] The parameter index is processed positively, and the original parameter index value is used as the value after positive processing, that is:
[0016]
[0017] In the formula, X ij is the original parameter index value, is the parameter index value after positive transformation, i is the sequence number of the traffic blocking event, i=1,2…m , j is the parameter index, j=1,2,3 ;
[0018] Standardize the parameter index values after positive transformation:
[0019]
[0020] In the formula, mean(X j ) is the average value of the parameter index after the jth forward transformation;
[0021] std(X j ) is the standard deviation of the parameter index after the jth positive transformation;
[0022] is the parameter index value after positive transformation and standardization.
[0023] Optionally, S2 uses the entropy weight TOPSIS method to evaluate the traffic blocking state, including the following steps:
[0024] S211. Calculate the weight of the normalized and standardized parameter index:
[0025]
[0026] Where P ij is the proportion of the jth parameter index after positive transformation and standardization in the i-th traffic blocking event;
[0027] m is the number of traffic blocking events;
[0028] S212. Calculate the information entropy of the parameter index after normalization and standardization:
[0029]
[0030] In the formula, E j is the information entropy of the jth parameter index after normalization and standardization, 0≤E j ≤1
[0031] S213. Calculate the utility value of the parameter index after positive and normalization:
[0032] D j =1- E j
[0033] Where D j is the utility value of the jth parameter index after positive and normalization;
[0034] S214. Calculate the normalized and standardized parameter index weights:
[0035]
[0036] Where W j is the weight of the jth parameter index after positive and normalization, n=3;
[0037] S221. Calculate the maximum value of each parameter index after normalization and standardization in the traffic blockage event data weighted by the entropy weight method:
[0038]
[0039] In the formula, , i=1,2…m , is the traffic blockage event data weighted by the entropy weight method. The traffic blockage event data weighted by the entropy weight method constitutes the data matrix , the data matrix R includes the weighted, normalized and standardized parameter indicators;
[0040] It is the maximum value of each parameter index after normalization and standardization in the traffic blockage event data weighted by the entropy weight method;
[0041] S222. Calculate the minimum value of each parameter index after normalization and standardization in the traffic blockage event data weighted by the entropy weight method:
[0042]
[0043] In the formula, It is the minimum value of each parameter index after normalization and standardization in the traffic blockage event data weighted by the entropy weight method;
[0044] S223. Calculate the maximum distance between the i-th traffic blocking event and the weighted parameter index:
[0045]
[0046] In the formula, is the distance between the ith traffic blocking event and the maximum value of the weighted parameter index;
[0047] S224. Calculate the minimum distance between the i-th traffic blocking event and the weighted parameter index:
[0048]
[0049] In the formula, is the distance between the ith traffic blocking event and the minimum value of the weighted parameter index;
[0050] S225. Calculate the score of each traffic blockage event:
[0051]
[0052] In the formula, Score i is the score of the ith traffic blockage event, 0≤Score i ≤100.
[0053] Optionally, S3 includes the following steps:
[0054] S31. Classify traffic blockage status into 5 levels;
[0055] From all Score i Randomly select 5 points from as the initial cluster center set;
[0056] Calculate the Euclidean distance between the remaining data objects and the center point, and assign the Euclidean distance to the nearest cluster to generate an initial clustering result;
[0057] Iterate, for each non-center point object, replace one of the center points with the current point, and calculate the resulting cost function. If the cost value is negative, replace it; if the cost value is non-negative, keep the original center point.
[0058] Finally, a better set of center points is obtained;
[0059] S32. Use the clustering silhouette coefficient indicator to evaluate the clustering effect and conduct grading effect evaluation.
[0060] Optionally, in S31, the criterion function of the K-Medoids clustering algorithm is:
[0061]
[0062] In the formula, k is the number of categories, k=5;
[0063] p is any point in space;
[0064] o i Representative cluster C i The center point of
[0065] After a new round of iteration, represents the clusters divided by the new center set, represents the original cluster, then the criterion function of the cluster divided by the new center set is:
[0066]
[0067] The criterion function of the original cluster is:
[0068]
[0069] The cost function is Cost = E new -E old .
[0070] Optionally, in S32,
[0071] Calculate the average distance between each traffic blockage event and other points in the same cluster, denoted as a(i);
[0072] Calculate the average distance between each traffic blockage event and all the nearest points that do not belong to the same cluster, denoted as b(i);
[0073] The silhouette coefficient of the i-th traffic blocking event is
[0074]
[0075] Calculate the average value of the silhouette coefficients of all traffic blockage events, which is the silhouette coefficient of the cluster.
[0076] Optionally, in S4, the independent variable indicators of the traffic blockage state level prediction model include traffic operation data, disaster occurrence data, and highway grade data, and the dependent variable indicator of the traffic blockage state level prediction model is the traffic blockage state grade;
[0077] The traffic operation data includes traffic volume and vehicle type ratio. The traffic volume is obtained by converting different vehicle types into equivalent traffic volume. The reduction coefficient of passenger cars is 1, the reduction coefficient of medium-sized cars is 1.5, the reduction coefficient of large cars is 2.5, the reduction coefficient of automobile trains is 4, the reduction coefficient of motorcycles is 0.5, and the reduction coefficient of tractors is 4.
[0078] The disaster data are classified at least according to mudslide, snow accumulation, landslide, traffic accident, traffic control, infrastructure damage, and landslide, and each traffic blockage event corresponds to a disaster type;
[0079] The highway grade data are divided into five grades: expressway, first-class highway, second-class highway, third-class highway and fourth-class highway, and each traffic blocking event corresponds to a highway grade type.
[0080] Optionally, after constructing the traffic blockage state level prediction model, the XGBoost algorithm is further used to obtain the contribution rate of each variable indicator.
[0081] Optionally, in the traffic blockage status level prediction model, 80% of the data is used as a training set, 20% of the data is used as a test set, 3-fold cross validation is used, and the optimal learning rate is set to 0.1.
[0082] A system for grading and predicting highway traffic blockage status includes at least one processor and a memory in communication with the at least one processor; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned method for grading and predicting highway traffic blockage status.
[0083] Compared with the prior art, the present invention has the following beneficial effects:
[0084] 1. The classification and prediction method of highway traffic blockage status provided by the present invention firstly performs positive and standardized processing on the traffic blockage event data to eliminate the influence of data dimension; the entropy weight TOPSIS method in S2 combines the advantages of the entropy weight method and the TOPSIS method, and is a comprehensive evaluation method. The entropy weight method is used to determine the parameter index weight. The entropy weight method is an objective weighting method, which mainly determines the weight according to the variation degree (such as variance) of the index. The index with a large variation degree contains more information, so the weight is also larger; the traffic blockage status is evaluated by using the TOPSIS method. The TOPSIS method evaluates the pros and cons by calculating the distance between each evaluation object and the idealized solution (the best solution and the worst solution), and its result can accurately reflect the gap between each evaluation solution; after obtaining the quantitative value in S3, the K-Medoids clustering algorithm is further used to classify the traffic blockage status. The K-Medoids clustering algorithm, that is, the K-center clustering algorithm, is an improved algorithm based on the K-Means clustering algorithm. The center point selected in K-Means is the centroid of all points in the current class; while the center point selected by the K-Medoids method is any point in the current class, and the criterion function is the minimum sum of the distances from all other points in the current class to the center point, which weakens the influence of outliers to a certain extent; finally, the LightGBM algorithm is used to construct a traffic blockage status level prediction model. The LightGBM algorithm is an evolutionary version of the GBDT algorithm, which mainly adds optimization algorithms such as the gradient-based one-side sampling algorithm (GOSS), the growth strategy construction tree based on the Leaf-wise algorithm, and the exclusive feature bundling algorithm (EFB). Therefore, compared with the traditional GBDT framework, LightGBM has the advantages of saving memory, fast speed, and good generalization ability; in general, the classification and prediction method of highway traffic blockage status of the present invention is complete, comprehensive, objective, and has high prediction efficiency and accuracy, and has strong feasibility and practicality. BRIEF DESCRIPTION OF THE DRAWINGS
[0085] Figure 1 A flow chart of the classification and prediction method of highway traffic blockage status;
[0086] Figure 2 This is a graph showing the scoring results of 429 traffic blockage events in Example 3;
[0087] Figure 3 The grading result diagram of 429 traffic blocking events in Example 3;
[0088] Figure 4 This is a clustering contour coefficient curve diagram of the 429 traffic blockage events in Example 3. DETAILED DESCRIPTION
[0089] The present invention is further described in detail below in conjunction with test examples and specific implementation methods. However, this should not be understood as the scope of the above subject matter of the present invention being limited to the following embodiments, and all technologies realized based on the content of the present invention belong to the scope of the present invention.
[0090] Unless otherwise specified, in the description of the specific embodiments of the present invention, the terms indicating the orientation or position relationship such as "up", "down", "left", "right", "center", "inside", "outside", etc. are all expressions based on the orientation or position relationship shown in the drawings, or the orientation or position relationship when the invented product / equipment / device is usually used. These terms of orientation or position relationship are only for the convenience of describing the scheme of the present invention or simplifying the description in the specific embodiments, so as to facilitate the technicians to quickly understand the scheme, rather than indicating or implying that a specific device / component / element must have a specific orientation, or be constructed and operated in a specific position relationship, and therefore cannot be understood as a limitation on the present invention.
[0091] In addition, if the terms "horizontal", "vertical", "overhanging", "parallel" and the like appear, it does not mean that the corresponding devices / components / elements are required to be absolutely horizontal or vertical or overhanging or parallel, but may be slightly tilted or have deviations. For example, "horizontal" only means that its direction is more horizontal than "vertical", and does not mean that the structure must be completely horizontal, but may be slightly tilted. Alternatively, it can be simplified to mean that the corresponding devices / components / elements are set in directions such as "horizontal", "vertical", "overhanging", "parallel", etc., and can have an error / deviation of ±10% relative to the corresponding direction setting, more preferably an error / deviation within ±8%, more preferably an error / deviation within ±6%, more preferably an error / deviation within ±5%, and more preferably an error / deviation within ±4%. As long as the corresponding device / component / element is within the error / deviation range, it can still achieve its role in the scheme of the present invention.
[0092] In addition, the expressions “first”, “second”, “third”, etc. that appear in the terms are merely descriptions used to distinguish the same or similar components and should not be understood as emphasizing or implying the relative importance of specific components.
[0093] In addition, in the description of the embodiments of the present invention, "several", "plurality" and "a number" represent at least 2. It can be any number such as 2, 3, 4, 5, 6, 7, 8, 9, and even more than 9.
[0094] In addition, in the description of the technical solution of the present invention, unless otherwise clearly specified / defined / restricted, the terms "set", "install", "connect", "connected", "provided with", "laid", and "arranged" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection, and can be welding, riveting, bolting, threading, and other commonly used connection means in the field. This connection can be a mechanical connection, an electrical connection, or a communication connection; it can be a direct connection, or an indirect connection through an intermediate medium, and it can be the internal connection of two elements.
[0095] Example 1
[0096] like Figure 1 As shown, this embodiment provides a method for grading and predicting highway traffic blockage status, comprising the following steps:
[0097] S1. Perform positive and standardized processing on traffic blockage event data;
[0098] Further traffic blockage event data may include traffic blockage event data, traffic operation data, disaster occurrence data and highway grade data.
[0099] Traffic blockage event data may specifically include traffic blockage duration (h), traffic blockage mileage (km), and traffic blockage severity (h·km); the traffic blockage duration and traffic blockage mileage are data directly recorded by the highway management department, and the traffic blockage severity is the product of the traffic blockage duration and the traffic blockage mileage.
[0100] Traffic operation data may include traffic volume (pcu / h) and vehicle type ratio (%). The vehicle type classification is divided according to Table 1, and the vehicle type conversion coefficient is calculated according to Table 2.
[0101] Traffic volume (pcu / h) is the equivalent traffic volume converted from different vehicle types, as shown in Table 2. The reduction coefficient for passenger cars is 1, the reduction coefficient for medium-sized cars is 1.5, the reduction coefficient for large cars is 2.5, the reduction coefficient for trains is 4, the reduction coefficient for motorcycles is 0.5, and the reduction coefficient for tractors is 4.
[0102] The disaster data shall be classified at least according to mudslide, snow accumulation, landslide, traffic accident, traffic control, infrastructure damage and landslide, and each traffic blockage event shall correspond to a disaster type;
[0103] Highway grade data can be divided into five grades: expressway, first-class highway, second-class highway, third-class highway and fourth-class highway. Each traffic blockage incident corresponds to a highway grade type.
[0104] Table 1 Vehicle classification standards
[0105]
[0106] Table 2 Conversion coefficients for various vehicle models
[0107]
[0108] Further, S1 may include the following steps:
[0109] S11. Arrange the traffic blockage event data, which include the traffic blockage event serial number, traffic blockage duration, traffic blockage mileage, and traffic blockage severity; wherein the traffic blockage duration, traffic blockage mileage, and traffic blockage severity are parameter indicators; specifically, the traffic blockage duration may be the first parameter indicator, the traffic blockage mileage may be the second parameter indicator, and the traffic blockage severity may be the third parameter indicator.
[0110] S12. The parameter index is processed positively. Since the larger the values of the above three parameter indexes are, the larger the traffic blocking state value is, the original parameter index values can be used as the values after positive processing, that is:
[0111]
[0112] In the formula, X ij is the original parameter index value, is the parameter index value after positive transformation, i is the sequence number of the traffic blocking event, i=1,2…m , j is the parameter index, j=1,2,3 ;
[0113] Standardize the parameter index values after positive transformation:
[0114]
[0115] In the formula, mean(X j ) is the average value of the parameter index after the jth forward transformation;
[0116] std(X j ) is the standard deviation of the parameter index after the jth positive transformation;
[0117] is the parameter index value after positive transformation and standardization.
[0118] S2. Based on the traffic blockage event data processed by S1, the entropy weight TOPSIS method is used to evaluate the traffic blockage status;
[0119] The entropy weight TOPSIS method combines the advantages of the entropy weight method and the TOPSIS method, and is a comprehensive evaluation method. Among them, the entropy weight method is an objective weighting method, which mainly determines the weight according to the degree of variation of parameter indicators (such as variance). Parameter indicators with large degree of variation often contain more information, so the weight is also larger; while the TOPSIS rule evaluates the pros and cons by calculating the distance between each evaluation object and the idealized solution (the best solution and the worst solution), and its results can accurately reflect the gap between each evaluation solution.
[0120] Specifically, S2 uses the entropy weight TOPSIS method to evaluate the traffic blockage status, including the following steps:
[0121] Use the entropy weight method to determine the parameter index weights:
[0122] S211. Calculate the weight of the normalized and standardized parameter index:
[0123]
[0124] Where P ij is the proportion of the jth parameter index after positive transformation and standardization in the i-th traffic blocking event;
[0125] m is the number of traffic blocking events;
[0126] S212. Calculate the information entropy of the normalized and standardized parameter index:
[0127]
[0128] In the formula, E j is the information entropy of the jth parameter index after normalization and standardization, 0≤E j ≤1
[0129] S213. Calculate the utility value of the parameter index after positive and normalization:
[0130] D j =1- E j
[0131] Where D j is the utility value of the jth parameter index after positive and normalization;
[0132] S214. Calculate the normalized and standardized parameter index weights:
[0133]
[0134] Where W j is the weight of the jth parameter index after positive and normalization, n=3;
[0135] The TOPSIS method is used to evaluate the traffic blockage status, including the following steps:
[0136] S221. Calculate the maximum value of each parameter index after normalization and standardization in the traffic blockage event data weighted by the entropy weight method:
[0137]
[0138] In the formula, , i=1,2…m , is the traffic blockage event data weighted by the entropy weight method. The traffic blockage event data weighted by the entropy weight method constitutes the data matrix , the data matrix R includes the weighted, normalized and standardized parameter indicators;
[0139] It is the maximum value of each parameter index after normalization and standardization in the traffic blockage event data weighted by the entropy weight method, that is, the maximum value of each column of the data matrix R;
[0140] S222. Calculate the minimum value of each parameter index after normalization and standardization in the traffic blockage event data weighted by the entropy weight method:
[0141]
[0142] In the formula, It is the minimum value of each parameter index after normalization and standardization in the traffic blockage event data weighted by the entropy weight method, that is, the minimum value of each column of the data matrix R;
[0143] S223. Calculate the maximum distance between the i-th traffic blocking event and the weighted parameter index:
[0144]
[0145] In the formula, is the distance between the ith traffic blocking event and the maximum value of the weighted parameter index;
[0146] S224. Calculate the minimum distance between the i-th traffic blocking event and the weighted parameter index:
[0147]
[0148] In the formula, is the distance between the ith traffic blocking event and the minimum value of the weighted parameter index;
[0149] S225. Calculate the score of each traffic blockage event:
[0150]
[0151] In the formula, Score i is the score of the ith traffic blockage event, 0≤Score i ≤100.
[0152] S3. Based on the evaluation of traffic blockage status in S2, the K-Medoids clustering algorithm is used to classify the traffic blockage status;
[0153] K-Medoids clustering algorithm, also known as K-center clustering algorithm, is an improved algorithm based on K-Means clustering algorithm. The center point selected in K-Means is the centroid of all points in the current class; while the center point selected by K-Medoids method is any point in the current class, and the criterion function is the minimum sum of the distances from all other points in the current class to the center point, which weakens the influence of outliers to a certain extent.
[0154] Specifically, S3 includes the following steps:
[0155] S31. After obtaining the score of each traffic blockage event according to step S225, define the number of categories as 5, that is, classify the traffic blockage status into 5 levels;
[0156] Randomly select 5 points from all data objects (all traffic blockage event scores) as the initial cluster center set; calculate the Euclidean distance between the remaining data objects and the center point, and assign it to the nearest cluster to produce the initial clustering result; iterate, for each non-center point object, replace one of the center points with the current point, and calculate the resulting cost function. If the cost value is negative, replace it, otherwise keep the original center point; finally, get a better set of center points.
[0157] Among them, the criterion function of the K-Medoids clustering algorithm is:
[0158]
[0159] In the formula, k is the number of categories, k=5;
[0160] p is any point in space;
[0161] o i Representative cluster C i The center point of
[0162] After a new round of iteration, represents the clusters divided by the new center set, represents the original cluster, then the criterion function of the cluster divided by the new center set is:
[0163]
[0164] The criterion function of the original cluster is:
[0165]
[0166] The cost function is Cost = E new -E old .
[0167] If the cost function value is negative after replacing the original center point, it means that after replacement, the differences between objects in the cluster are smaller.
[0168] S32. Use the clustering silhouette coefficient indicator to evaluate the clustering effect and conduct grading effect evaluation.
[0169] Specifically, in S32, the clustering effect is evaluated by using the clustering silhouette coefficient, which combines the two factors of cohesion and separation. The value of the clustering silhouette coefficient is between [-1, 1]. The closer the value is to 1, the better the clustering result is. The closer the value is to -1, the worse the clustering result is. The value close to 0 indicates that the sample data overlaps or the number of samples is small.
[0170] Specifically, for each traffic blocking event, the average distance between it and other points in the same cluster is calculated, recorded as a(i), and then the average distance between it and all points in the nearest neighbor that do not belong to the same cluster can be calculated, recorded as b(i). The silhouette coefficient is
[0171]
[0172] For the entire data set, the average value of the silhouette coefficients of all traffic blockage events is calculated, which is the silhouette coefficient of the cluster.
[0173] S4. Based on the classification of traffic blockage status in S3, the LightGBM algorithm is used to build a traffic blockage status level prediction model.
[0174] GBDT (Gradient Boosting Decision Tree), full name Gradient Boosting Decision Tree, is an iterative decision tree algorithm that builds a set of weak learners (i.e., decision trees) and accumulates the results of these trees as the final prediction output. The core idea of GBDT is gradient boosting, which gradually fits the residual of the training data by continuously optimizing the negative gradient of the loss function, thereby gradually reducing the overall prediction error.
[0175] LightGBM is a variant of the gradient boosting tree algorithm and an evolutionary version of GBDT. It mainly adds optimization algorithms such as gradient-based one-side sampling algorithm (GOSS), growth strategy tree construction based on Leaf-wise algorithm, and exclusive feature bundling algorithm (EFB). Therefore, compared with the traditional GBDT framework, LightGBM has the advantages of saving memory, fast speed and good generalization ability.
[0176] The objective function is as follows, which means finding a suitable tree Make the value of the objective function minimum.
[0177]
[0178] Where: is the true value of the label;
[0179] For the front The regularization term and the number of trees;
[0180] It is -1 learning result;
[0181] K is the total number of trees;
[0182] S is the sample number;
[0183] Ω(f K ) is the penalty term in the objective function;
[0184] L is the calculated value of the model error;
[0185] It is the objective function of the LightGBM algorithm.
[0186] S4 specifically builds a traffic blockage state level prediction model based on the LightGBM algorithm after completing the traffic blockage state evaluation in S2 and grading the traffic blockage state in S3. Among them, the independent variable indicators of the traffic blockage state level prediction model include traffic operation data (traffic volume and vehicle type ratio), disaster data, and highway grade data. The vehicle type ratio can include the proportion of small cars, medium-sized cars, large cars, cars and trains, motorcycles, and tractors. The dependent variable indicator of the traffic blockage state level prediction model is the traffic blockage state level.
[0187] S5. Input the data to be predicted into the traffic blockage status level prediction model and output the prediction result.
[0188] The LightGBM model was implemented using the Scikit-learn tool library. After data set division, model training, verification, testing, and automatic parameter adjustment, the prediction results were output. In the traffic blockage status level prediction model constructed by the LightGBM algorithm, 80% of the data was used as a training set and 20% of the data was used as a test set. A 3-fold cross-validation was used, and the optimal learning rate was set to 0.1.
[0189] After constructing the traffic blockage state level prediction model, the XGBoost algorithm can be further used to determine the importance of each variable index in the traffic blockage state level prediction model and obtain the contribution rate of each variable index. The XGBoost algorithm uses a distributed forward additive model to generate weak learners by optimizing the structured loss function, uses pre-sorting, weighted quantile and other technologies to improve algorithm performance, and adds a regularization term loss function to effectively reduce the risk of overfitting.
[0190] The method for grading and predicting highway traffic blockage status provided in this embodiment first performs positive and normalized processing on traffic blockage event data to eliminate the impact of data dimension;
[0191] The entropy weight TOPSIS method in S2 combines the advantages of the entropy weight method and the TOPSIS method, and is a comprehensive evaluation method. The entropy weight method is used to determine the weight of the parameter index. The entropy weight method is an objective weighting method, which mainly determines the weight based on the degree of variation of the index (such as variance). The index with a large degree of variation contains more information, so the weight is also larger;
[0192] The TOPSIS method is used to evaluate the traffic blockage status. The TOPSIS method evaluates the pros and cons by calculating the distance between each evaluation object and the idealized solution (the best solution and the worst solution). The result can accurately reflect the gap between the evaluation solutions.
[0193] After obtaining the quantitative value in S3, the K-Medoids clustering algorithm is further used to classify the traffic blockage status. The K-Medoids clustering algorithm, namely the K-center clustering algorithm, is an improved algorithm based on the K-Means clustering algorithm. The center point selected in K-Means is the centroid of all points in the current class; while the center point selected by the K-Medoids method is any point in the current class, and the criterion function is the minimum sum of the distances from all other points in the current class to the center point, which weakens the influence of outliers to a certain extent;
[0194] Finally, the LightGBM algorithm is used to build a traffic blockage status level prediction model. The LightGBM algorithm is an evolutionary version of the GBDT algorithm, which mainly adds optimization algorithms such as the gradient-based one-side sampling algorithm (GOSS), the growth strategy tree construction based on the Leaf-wise algorithm, and the exclusive feature bundling algorithm (EFB). Therefore, compared with the traditional GBDT framework, LightGBM has the advantages of saving memory, fast speed, and good generalization ability;
[0195] In summary, the method for grading and predicting highway traffic blockage status of the present invention is complete, comprehensive, and objective, with high prediction efficiency and accuracy, and has strong feasibility and practicability.
[0196] Example 2
[0197] This embodiment provides a system for grading and predicting highway traffic blockage status, including at least one processor and a memory communicatively connected to the at least one processor; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method for grading and predicting highway traffic blockage status provided in Example 1.
[0198] Example 3
[0199] This embodiment uses the classification and prediction method of highway traffic blockage status provided in Example 1, and collects a total of 429 traffic blockage events on a certain highway. Due to the large amount of data, only 32 items of detailed data are shown as examples for illustration as shown in Table 3. As shown in Table 3, each traffic blockage event includes traffic blockage duration (h), traffic blockage mileage (km) and traffic blockage severity (h km). The traffic blockage event data shown in Table 3 are the data after positive and normalization.
[0200] Table 3 Data of 32 traffic blockage incidents among 429 traffic blockage incidents on a certain highway
[0201]
[0202] The entropy weight method is used to determine the parameter index weights, and the TOPSIS method is used to evaluate the traffic blockage status. Each traffic blockage event corresponds to a traffic blockage event score value, as shown in Table 4. The score results of 429 traffic blockage events are as follows: Figure 2 shown.
[0203] Table 4 Scoring table of 32 traffic blockage incidents
[0204]
[0205] The K-Medoids clustering algorithm is used to classify the traffic blockage status. The classification results are shown in Table 5. Figure 3 As shown, the clustering silhouette coefficient curve is as follows Figure 4 shown.
[0206] Table 5 Classification table of 32 traffic blockage incidents
[0207]
[0208] like Figure 4 As shown in the figure, when the traffic blockage state is defined as level 5, the clustering silhouette coefficient is 0.945, and the classification effect is ideal.
[0209] After completing the evaluation of the traffic blockage status and grading the traffic blockage status, a traffic blockage status level prediction model based on the LightGBM algorithm is constructed. Table 6 shows some of the data before prediction after sorting.
[0210] Table 6 Data table of 32 traffic blockage events before prediction
[0211]
[0212] In Table 6, the disaster type value 1 represents debris flow, the disaster type value 2 represents snow accumulation, 3 represents landslide, 4 represents traffic accident, 5 represents traffic control, 6 represents infrastructure damage, and 7 represents landslide. In actual situations, values can be assigned according to the prone disaster types, and the values are only used to distinguish different disaster types.
[0213] Highway grade 2 is represented as a Class 2 highway. In actual situations, values can be assigned according to the highway grade, and the values are only used to distinguish different highway grades.
[0214] The classification results predicted by the traffic blockage status level prediction model are shown in Table 7.
[0215] Table 7 Prediction results of 32 traffic blockage events
[0216]
[0217] The output results of the traffic blockage status level prediction model based on the LightGBM algorithm are shown in Table 8. Table 8 shows the prediction evaluation indicators of the cross-validation set, training set, and test set, and uses quantitative indicators to measure the prediction effect of LightGBM.
[0218] Table 8 Output results of traffic blockage status level prediction model
[0219]
[0220] In Table 8, the accuracy rate represents the proportion of correctly predicted samples to the total samples. The larger the accuracy rate, the higher the prediction accuracy.
[0221] The recall rate represents the proportion of predicted positive samples among the results that are actually positive samples. The larger the recall rate, the higher the prediction accuracy.
[0222] The precision rate represents the proportion of positive samples in the results predicted as positive samples. The larger the precision rate, the higher the prediction accuracy.
[0223] F1 is the harmonic mean of precision and recall. Precision and recall affect each other. Although it is an ideal situation for both to be high, in reality, it is often the case that precision is high and recall is low, or recall is low and precision is high. If you need to take both into account, then you can use the F1 indicator.
[0224] It can be seen from Table 8 that the accuracy of the test set reaches 0.965 and the F1 value is 0.951, which proves the accuracy of the traffic blockage state level prediction model constructed in this embodiment.
[0225] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for grading and predicting highway traffic blockage status, characterized in that: The following steps are involved: S1. Perform positive and standardized processing on traffic blockage event data; S11. Arrange traffic blockage event data, which includes traffic blockage event serial number, traffic blockage duration, traffic blockage mileage, and traffic blockage severity, wherein traffic blockage duration, traffic blockage mileage, and traffic blockage severity are parameter indicators; S12. Perform positive processing on the parameter index, and use the original parameter index value as the value after positive processing, that is: In the formula, X ij is the original parameter index value, is the parameter index value after positive transformation, i is the sequence number of the traffic blocking event, i=1,2…m , j is the parameter index, j=1,2,3 ; Standardize the parameter index values after positive transformation: In the formula, mean(X j ) is the average value of the parameter index after the jth forward transformation; std(X j ) is the standard deviation of the parameter index after the jth positive transformation; is the parameter index value after positive and normalization; S2. Based on the traffic blockage event data processed by S1, the entropy weight TOPSIS method is used to evaluate the traffic blockage status; S211. Calculate the weight of the normalized and standardized parameter index: Where P ij is the proportion of the jth parameter index after positive transformation and standardization in the i-th traffic blocking event; m is the number of traffic blocking events; S212. Calculate the information entropy of the parameter index after normalization and standardization: In the formula, E j is the information entropy of the jth parameter index after normalization and standardization, 0≤E j ≤1 S213. Calculate the utility value of the parameter index after positive and normalization: D j =1- E j Where D j is the utility value of the jth parameter index after positive and normalization; S214. Calculate the normalized and standardized parameter index weights: Where W j is the weight of the jth parameter index after positive and normalization, n=3; S221. Calculate the maximum value of each parameter index after normalization and standardization in the traffic blockage event data weighted by the entropy weight method: In the formula, , i=1,2…m , is the traffic blockage event data weighted by the entropy weight method. The traffic blockage event data weighted by the entropy weight method constitutes the data matrix , the data matrix R includes the weighted, normalized and standardized parameter indicators; It is the maximum value of each parameter index after normalization and standardization in the traffic blockage event data weighted by the entropy weight method; S222. Calculate the minimum value of each parameter index after normalization and standardization in the traffic blockage event data weighted by the entropy weight method: In the formula, It is the minimum value of each parameter index after normalization and standardization in the traffic blockage event data weighted by the entropy weight method; S223. Calculate the maximum distance between the i-th traffic blocking event and the weighted parameter index: In the formula, is the distance between the ith traffic blocking event and the maximum value of the weighted parameter index; S224. Calculate the minimum distance between the i-th traffic blocking event and the weighted parameter index: In the formula, is the distance between the ith traffic blocking event and the minimum value of the weighted parameter index; S225. Calculate the score of each traffic blockage event: In the formula, Score i is the score of the ith traffic blockage event, 0≤Score i ≤100; S3. Based on the evaluation of traffic blockage status in S2, the K-Medoids clustering algorithm is used to classify the traffic blockage status; S31. Classify traffic blockage status into 5 levels; From all Score i Randomly select 5 points from as the initial cluster center set; Calculate the Euclidean distance between the remaining data objects and the center point, and assign the Euclidean distance to the nearest cluster to generate an initial clustering result; Iterate, for each non-center point object, replace one of the center points with the current point, and calculate the resulting cost function. If the cost value is negative, replace it; if the cost value is non-negative, keep the original center point. Finally, a better set of center points is obtained; In S31, the criterion function of the K-Medoids clustering algorithm is: In the formula, k is the number of categories, k=5; p is any point in space; o i Representative cluster C i The center point of After a new round of iteration, represents the clusters divided by the new center set, represents the original cluster, then the criterion function of the cluster divided by the new center set is: The criterion function of the original cluster is: The cost function is Cost = E new -E old ; S32. Use the clustering silhouette coefficient index to evaluate the clustering effect and conduct classification effect evaluation; In S32, Calculate the average distance between each traffic blockage event and other points in the same cluster, denoted as a(i); Calculate the average distance between each traffic blockage event and all the nearest points that do not belong to the same cluster, denoted as b(i); The silhouette coefficient of the i-th traffic blocking event is Calculate the average value of the silhouette coefficients of all traffic blockage events, which is the silhouette coefficient of the cluster; S4. Based on the classification of traffic blockage status in S3, the LightGBM algorithm is used to build a traffic blockage status level prediction model; S5. Input the data to be predicted into the traffic blockage status level prediction model and output the prediction result.
2. A method for grading and predicting highway traffic blockage status according to claim 1, characterized in that: In S4, the independent variable indicators of the traffic blockage state level prediction model include traffic operation data, disaster occurrence data, and highway grade data, and the dependent variable indicator of the traffic blockage state level prediction model is the traffic blockage state grade; The traffic operation data includes traffic volume and vehicle type ratio. The traffic volume is obtained by converting different vehicle types into equivalent traffic volume. The reduction coefficient of passenger cars is 1, the reduction coefficient of medium-sized cars is 1.5, the reduction coefficient of large cars is 2.5, the reduction coefficient of automobile trains is 4, the reduction coefficient of motorcycles is 0.5, and the reduction coefficient of tractors is 4. The disaster data are classified at least according to mudslide, snow accumulation, landslide, traffic accident, traffic control, infrastructure damage, and landslide, and each traffic blockage event corresponds to a disaster type; The highway grade data are divided into five grades: expressway, first-class highway, second-class highway, third-class highway and fourth-class highway, and each traffic blocking event corresponds to a highway grade type.
3. A method for grading and predicting highway traffic blockage status according to claim 2, characterized in that: After constructing the traffic blockage status level prediction model, the XGBoost algorithm is further used to obtain the contribution rate of each variable indicator.
4. A method for grading and predicting highway traffic blockage status according to claim 2, characterized in that: In the traffic blockage status level prediction model, 80% of the data is used as a training set, 20% of the data is used as a test set, 3-fold cross validation is used, and the optimal learning rate is set to 0.
1.
5. A highway traffic blockage classification and prediction system, characterized in that: It includes at least one processor and a memory that is communicatively connected to the at least one processor; the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method for grading and predicting highway traffic blockage status as described in any one of claims 1-4.
