Real-time decision modeling method for expressway open emergency channel based on KAN algorithm

By combining historical traffic flow data and KAN algorithms, real-time decision-making modeling of highway emergency channels is achieved, and the problem of unreasonable use of emergency channels in the existing technology is solved, and the traffic capacity and safety of highways are improved.

CN119479275AInactive Publication Date: 2025-02-18NANTONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411530475.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-30
Publication Date
2025-02-18
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art lacks theoretical basis when judging whether the expressway is opened for emergency channels, and it is difficult to evaluate the effect of alleviating congestion, resulting in the inadequate use of emergency lanes.

Method used

Real-time decision modeling method based on KAN algorithm is adopted to predict road congestion in the future through the combination of historical traffic flow data of highways and KAN algorithm, and to inform drivers in real time whether emergency lanes can be used through notice devices along the line.

Benefits of technology

Effectively predict road congestion, reduce human subjective judgments, improve the opening efficiency of emergency lanes, and enhance the traffic capacity and safety of highways.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119479275A_ABST
    Figure CN119479275A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of intelligent traffic engineering, in particular to a real-time decision modeling method for an expressway open emergency channel based on a KAN algorithm, which comprises the following steps of: 1, calculating the number of vehicles appearing in each frame according to a YOLOV8 algorithm, and counting non-repeated vehicles in all frames per second by taking second as a unit; 2, according to a YOLOv8 algorithm, the number of frames contained in each second is calculated with second as the unit, and the traffic flow, speed and density per second are calculated through a traffic flow parameter formula; 3, according to a KAN time sequence analysis prediction algorithm, taking flow, speed and density as an index input algorithm, training a TPI traffic congestion index per second, and predicting a TPI in a period of time in the future; and 4, determining a traffic flow threshold value and a speed threshold value of the highway in a certain time period based on historical data and algorithm data. The method can effectively predict the road congestion condition in a period of time in the future, gives an early warning in advance to open the emergency lane, and improves the traffic capacity of the road after the high-speed emergency lane is opened.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of intelligent traffic engineering, and in particular to a real-time decision modeling method for opening emergency channels of expressways based on a KAN algorithm. Background Art

[0002] The traffic volume on highways is increasing, and traffic congestion is becoming a hot topic in today's transportation field. How to maximize the use of resources to solve road congestion problems other than traffic accidents, considering only existing conditions, is now a top priority. Highway management departments have been committed to how to reasonably use emergency lanes to solve traffic congestion problems. At present, the traditional way to judge whether to open emergency lanes on highways is usually to use video surveillance of multiple sections and decide whether to allow temporary use of emergency lanes based on experience. On the one hand, this method lacks a theoretical basis, and on the other hand, it is difficult to evaluate the effect of alleviating congestion.

[0003] KAN (Kolmogorov-Arnold Network) is a model that can be used for time series data prediction. It can capture dynamic patterns in data and thus make predictions about the future. Compared with the LSTM (Long Short-Term Memory) model, which also processes and predicts time-based series data, KAN performs particularly well in specific motion analysis task design tasks that have professional domain knowledge as constraints.

[0004] Based on this, the present invention proposes a real-time decision modeling method for opening emergency lanes on highways based on the KAN algorithm, which aims to use the historical traffic flow data of highways and the KAN algorithm to model, analyze the congestion rate over a period of time, and realize the ability to notify drivers in real time whether the emergency lane is available through notice devices arranged along the highway. Summary of the invention

[0005] The purpose of the present invention is to solve the shortcomings existing in the prior art, and to propose a real-time decision-making modeling method for opening emergency lanes on highways based on the KAN algorithm, which can effectively predict road congestion in the future, give early warning for opening emergency lanes, and improve the traffic capacity of roads after the opening of emergency lanes on highways, meet the travel needs of the people, and ensure the safe, smooth and stable operation of highways.

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

[0007] A real-time decision modeling method for opening emergency channels on highways based on KAN algorithm includes the following steps:

[0008] Step 1: Calculate the number of cars appearing in each frame according to the YOLOV8 algorithm, and count the number of non-repeated vehicles in all frames per second;

[0009] Step 2: Calculate the number of frames per second based on the YOLOv8 algorithm, and use the traffic flow parameter formula to calculate the traffic volume, speed, and density per second;

[0010] Step 3: Based on the KAN time series analysis and prediction algorithm, the flow, speed, and density are used as indicators to input the algorithm, train the TPI traffic congestion index per second, and predict the TPI for a period of time in the future;

[0011] Step 4: Based on historical data and KAN algorithm data, the traffic flow threshold and speed threshold of the highway in a certain period of time are determined, and an optimization model for the best opening of the emergency lane is established. The congestion rate is used as an indicator to make real-time decisions on whether the emergency lane should be opened / closed. At the same time, this model can set different traffic flow and speed thresholds according to different time periods, such as morning and evening rush hours, to adjust the congestion rate and decide whether to open a temporary emergency lane.

[0012] Preferably, in step 1, computer vision technology is used to calculate the number of cars in each frame, count the number of non-repeated vehicles in all frames per second, and count the number of non-repeated vehicles in all frames per second in units of seconds. Here, the YOLOv8 algorithm is used to record the traffic flow over a period of time in real time, and generate traffic history data in frames as a data reference.

[0013] Preferably, in step 2, the YOLOv8 algorithm is used in combination with the traffic flow parameter calculation formula to obtain the vehicle flow, speed and density per second, which are used to analyze the relationship between the three over time.

[0014] Preferably, in step three, the TPI index is calculated every second based on the KAN algorithm in combination with historical traffic flow parameter data, and the future TPI index and traffic congestion conditions are predicted based on the TPI index; at the same time, the traffic flow threshold and speed threshold of the time period can be determined.

[0015] Preferably, in step 4, the vehicle flow and speed thresholds obtained by the KAN algorithm are used to establish an optimization model for the best opening of the emergency lane, with whether the minimum congestion rate is exceeded as the objective function, the time interval as the decision variable, and the set vehicle flow threshold and speed threshold as the constraint condition. At the same time, this model can set different vehicle flow and speed thresholds according to different time periods, such as morning and evening peak hours, to adjust the congestion rate and decide whether to open the temporary emergency lane. It can determine in real time whether the emergency lane should be opened / closed, reduce the subjectivity in operation, and increase the driving safety of vehicles on the highway.

[0016] Compared with the prior art, the present invention has the following beneficial effects:

[0017] 1. The present invention combines computer vision technology to monitor and record traffic conditions on highways in real time, and obtains traffic flow parameters over a period of time through traffic flow calculation formulas, which are used as historical data to help better predict future traffic congestion.

[0018] 2. The KAN time series algorithm used in the present invention can capture dynamic patterns in data, thereby making predictions for the future. Compared with the LSTM (Long Short-Term Memory) model, which also processes and predicts time-based series data, KAN has outstanding performance in the design of specific motion analysis tasks with professional domain knowledge as constraints. The KAN algorithm has great advantages in modeling and prediction of physical motion, especially in the analysis of the transportation field. It can use physical models and data-driven methods to improve the flexibility of training methods. It can better calculate and predict traffic congestion index in real time.

[0019] 3. Compared with the traditional method of opening / closing the emergency lane, the present invention is more feasible and objective, reduces human subjective judgment, and prevents improper use of the emergency lane. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 This is a basic flow chart of using YOLOv8 to analyze and obtain data in the present invention;

[0021] Figure 2 It is a schematic diagram of some real-time processes using the YOLOv8 algorithm in the present invention;

[0022] Figure 3 is a basic flow chart of the KAN algorithm used in the present invention;

[0023] Figure 4 A schematic diagram of basic conditions of lane data of a certain highway used in an embodiment of the present invention;

[0024] Figure 5 It is a flow chart of the present invention. DETAILED DESCRIPTION

[0025] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings, so that those skilled in the art can better understand the advantages and features of the present invention, thereby making a clearer definition of the protection scope of the present invention. The embodiments described in the present invention are only a part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present invention.

[0026] Example:

[0027] A real-time decision modeling method for opening emergency channels on highways based on KAN algorithm includes the following steps:

[0028] Step 1: Calculate the number of cars appearing in each frame according to the YOLOV8 algorithm, and count the number of non-repeated vehicles in all frames per second;

[0029] Step 2: Calculate the number of frames per second based on the YOLOv8 algorithm, and use the traffic flow parameter formula to calculate the traffic volume, speed, and density per second;

[0030] Step 3: Based on the KAN time series analysis and prediction algorithm, the flow, speed, and density are used as indicators to input the algorithm, train the TPI traffic congestion index per second, and predict the TPI for a period of time in the future;

[0031] Step 4: Based on historical data and KAN algorithm data, the traffic flow threshold and speed threshold of the highway in a certain period of time are determined, and an optimization model for the best opening of the emergency lane is established. The congestion rate is used as an indicator to make real-time decisions on whether the emergency lane should be opened / closed. At the same time, this model can set different traffic flow and speed thresholds according to different time periods, such as morning and evening rush hours, to adjust the congestion rate and decide whether to open a temporary emergency lane.

[0032] In step 1, computer vision technology is used to calculate the number of cars in each frame, count the number of non-repeated vehicles in all frames per second, and count the number of non-repeated vehicles in all frames per second in units of seconds. Here, the YOLOv8 algorithm is used to record the traffic flow over a period of time in real time, and generate traffic history data in frames as a data reference.

[0033] In step 2, the YOLOv8 algorithm is used in combination with the traffic flow parameter calculation formula to obtain the vehicle flow, speed and density per second, which are used to analyze the relationship between the three over time.

[0034] In step three, the TPI index is calculated every second based on the KAN algorithm in combination with the historical traffic flow parameter data, and the future TPI index and traffic congestion situation are predicted based on the TPI index; at the same time, the traffic flow threshold and speed threshold of the time period can be determined.

[0035] In step 4, the traffic volume and speed thresholds obtained by the KAN algorithm are used to establish an optimization model for the best opening of the emergency lane, with whether the minimum congestion rate is exceeded as the objective function, the time interval as the decision variable, and the set traffic volume threshold and speed threshold as the constraint conditions. At the same time, this model can set different traffic volume and speed thresholds according to different time periods, such as morning and evening peak hours, to adjust the congestion rate and decide whether to open the temporary emergency lane. It can determine in real time whether the emergency lane should be opened / closed, reduce the subjectivity in operation, and increase the driving safety of vehicles on the highway.

[0036] In this embodiment, first, the YOLOv8 algorithm needs to extract the number of frames from the video, and input the obtained frame number picture into the algorithm; the picture will pass through the backbone network, which contains a series of C2f modules and convolution blocks. These modules will extract the features of the input picture, extract features through multiple convolution layers, from low-level feature recognition to high-level features, and encode different features in the image, and finally gradually form the vehicle feature quantity in the picture in the backbone network.

[0037] Secondly, a series of data obtained from the backbone network is transmitted to the neck network. In the neck network, there are still a series of convolution blocks and C2f modules to further process and fuse the obtained features; through the connection operation of connet, the features of different levels are merged to detect vehicles of different sizes and shapes. After that, in this network layer, sampling operation is performed to restore the low-resolution feature map to a higher frame rate, which is conducive to detecting small-sized vehicles.

[0038] Finally, the features processed in the neck network layer are input into different detection heads. The detection heads will analyze and identify the input data, including the location and category of the vehicle; after the detection is completed, the detection results will be output and the number of vehicles will be counted, thus achieving the goal.

[0039] Traffic flow refers to the number of vehicles passing a certain point in a unit of time at a certain moment. The YOLOv8 algorithm can number the cars that appear in each frame and record all the frames in which each car exists. Therefore, the VOLO algorithm can record the number of non-repeated cars that appear in each second in units of seconds.

[0040] Speed ​​refers to the speed of traffic passing a certain point at a certain time. First, due to the uncertainty of the video surveillance installation range, it is necessary to know the distance the vehicle travels from entering the surveillance to leaving the surveillance. After obtaining the distance data, the speed of each vehicle per second can be calculated in seconds to calculate the average speed. The formula is as follows:

[0041]

[0042] In formula (1), is the average speed of all vehicles at the tth second; N(t) is the total number of vehicles that appear in the tth second; v i (t) is the speed of the i-th vehicle in the t-th second.

[0043] Density refers to the number of vehicles per unit length at a certain time and place, and the calculation formula is:

[0044]

[0045] In formula (2), ρ(t) is the density at the monitoring point at time t, c(t) is the number of cars passing through the path at the monitoring point at time t; L is the path length (distance) at the monitoring point.

[0046] By substituting this into the data of a certain highway, we can get the traffic flow, density and average speed in each frame, and thus calculate the data per second.

[0047] Table 1 shows the flow, density and average speed of vehicles per second calculated based on the number of frames:

[0048]

[0049]

[0050] The basic principle of the KAN network is the Kolmogorow-Arnold representation theorem, that is, if the function f is a multivariable continuous function on a finite boundary, then it can be considered that the function f can be obtained by the binary summation operation of a finite number of single-variable continuous functions, and its formula is as follows:

[0051]

[0052] For the neural network, in formula (3), p corresponds to the input id; q corresponds to the output id, φ q Indicates the cardinality of the spline.

[0053] The average speed, density and traffic volume of vehicles are used as input feature data of the KAN model, and the traffic performance index TPI is used as the target variable of the training model. Then a large amount of data is divided into training set and test set in a ratio of 7:3. Call the python library to read the traffic flow data stored in excel, set CCC_loss (ConcordanceCorrelation Coefficient Loss) as the loss function of the traffic flow data prediction model of the present invention. Compared with the traditional mean square error MSE, CCC_loss is less affected by the deviation of the model prediction value. For unbalanced data, CCC_loss can better capture the consistency between the true value and the predicted value, making it more comprehensive when evaluating the prediction ability of the model. Then call the KAN model for training, and set epoch=50.

[0054] Table 2 shows the TPI values ​​per second obtained according to the KAN algorithm.

[0055] Table 2:

[0056]

[0057]

[0058] The predicted data is compared with the actual data of the training set and the training data of the test set. Through training with a large amount of data, the accuracy of the KAN-based traffic flow data prediction model in the training set and the test set is 98.3% and 90.7% respectively, which can be considered to have achieved good prediction results.

[0059] Based on the TPI obtained from the existing data and predicted data obtained by the KAN algorithm, it is determined that the traffic flow threshold and speed threshold of the highway during this period are 20 vehicles / s and 40km / s respectively.

[0060] Therefore, combined with the data obtained by KAN, it can be found that: when the vehicle speed is less than a certain threshold (≤40) and the traffic volume reaches a certain threshold (≥20) and lasts for a period of time, traffic congestion will occur, and the emergency lane needs to be opened. On the contrary, if either of the two does not reach the threshold, the traffic congestion can still be considered to be smooth, and the emergency lane does not need to be opened. According to facts, it is not necessary to open the emergency lane when the traffic volume is too high and the speed is too low. At this time, it is also necessary to consider the possible congestion time. If the congestion time is too long, it means that the emergency lane must be opened; if the congestion time is too short, such as only 3s, then the emergency lane can be considered not to be opened. Then we can find the proportion of the time when congestion occurs in a period of time. When the proportion exceeds a certain coefficient (hereinafter referred to as the traffic congestion rate, denoted as G), it means that the probability of traffic congestion on this section of road is high, and the emergency lane needs to be opened.

[0061] Take 100 seconds as a unit and divide 100 seconds into 100 equal parts, denoted as x i (y) ,i=1,2,...,100. Then x i (y) represents the i-th time interval starting from the y-th second. i (y) Variables are defined as 0-1 variables:

[0062]

[0063] Formula (4)c y (y+i) represents the traffic flow in the y+ith second; Represents the average speed of the vehicle in the y+i second.

[0064] The shortest congestion time before opening the emergency lane is taken as the objective function, and x i As the decision variable, with the speed threshold and traffic flow threshold as constraints, an optimization model for opening the emergency lane can be established. The model formula is as follows:

[0065]

[0066] Formula (5): T(w) is the total duration of the video captured by the surveillance camera; G y Indicates the congestion rate starting from the yth second.

[0067] For this optimization model, as long as the corresponding emergency lane opening time is found according to historical data, and the interval from 200 seconds before the lane opening to 20 seconds after the lane closing is calculated, the minimum value of the congestion rate can be determined as the basis for determining whether to open the emergency lane after this period. The data used in the present invention is a video of a highway, in which the emergency lane is opened at around the 372th second and lasts until the end of the video. Then the minimum value of y at this time can be taken as 172.

[0068] Table 3 shows the real-time calculation of the congestion rate in the next 100 seconds based on different initial time periods, with data from 172s and 173s to 392s.

[0069] Table 3:

[0070]

[0071] After calculation, minG y The value of is 0.60, and the value of y is 241, 242, 243.

[0072] Therefore, it can be judged that when the congestion rate exceeds 0.60, the emergency lane needs to be opened; and when the emergency lane is opened for a longer time, the congestion rate will naturally decrease over time until it is less than 0.60, at which time the emergency lane needs to be closed. Moreover, the model monitors the changes in the congestion rate over a continuous period of time in real time, and can promptly reflect whether the traffic volume decreases and the speed of the car increases after the emergency lane is opened.

[0073] According to special periods such as morning and evening peaks, holidays, etc., different traffic flow thresholds and speed thresholds can be set in combination with the characteristics of different time periods of the highway to adjust different congestion rates, which is more humane. Table 4 shows the value of the congestion rate changed by adjusting the traffic flow threshold when the speed threshold is constant.

[0074] Table 4:

[0075]

[0076] It can be clearly found that as the traffic flow threshold increases, the congestion rate gradually decreases. When the traffic flow threshold is greater than 29, the congestion rate is 0. This means that when the traffic flow exceeds a certain value, the emergency lane needs to be opened immediately, otherwise traffic congestion will occur immediately. When the traffic flow threshold becomes smaller, it means that the time required for judgment is longer, and the traffic flow needs to remain constant and not decrease before the emergency lane is enabled.

[0077] In addition, the basic symbols in the embodiments of the present invention are explained as follows:

[0078]

[0079]

[0080] In summary, the present invention can effectively predict future traffic congestion through innovative modeling and optimization schemes, and make real-time decisions to determine whether to open / close the emergency channel of the highway.

[0081] The description and practice disclosed in the present invention are easy to think and understand for ordinary technicians in the technical field, and several improvements and modifications can be made without departing from the principles of the present invention. Therefore, modifications or improvements made without departing from the spirit of the present invention should also be regarded as the protection scope of the present invention.

Claims

1. A real-time decision modeling method for opening emergency channels on highways based on KAN algorithm, characterized in that: The steps include: Step 1: Calculate the number of cars appearing in each frame according to the YOLOV8 algorithm, and count the number of non-repeated vehicles in all frames per second; Step 2: Calculate the number of frames per second based on the YOLOv8 algorithm, and use the traffic flow parameter formula to calculate the traffic volume, speed, and density per second; Step 3: Based on the KAN time series analysis and prediction algorithm, the flow, speed, and density are used as indicators to input the algorithm, train the TPI traffic congestion index per second, and predict the TPI for a period of time in the future; Step 4: Based on historical data and KAN algorithm data, determine the traffic flow threshold and speed threshold of the highway in a certain period of time, and establish an optimization model for the best opening of the emergency lane. Use the congestion rate as an indicator to make real-time decisions on whether to open / close the emergency lane.

2. According to claim 1, a real-time decision modeling method for opening emergency channels on highways based on the KAN algorithm is characterized in that: In step 1, computer vision technology is used to calculate the number of cars in each frame, count the non-repeating vehicles in all frames per second, and count the non-repeating vehicles in all frames per second in units of seconds.

3. The real-time decision modeling method for opening emergency channels on highways based on the KAN algorithm according to claim 2 is characterized in that: In step 2, the YOLOv8 algorithm is used in combination with the traffic flow parameter calculation formula to obtain the vehicle flow, speed and density per second, which are used to analyze the relationship between the three over time.

4. The real-time decision modeling method for opening emergency channels on highways based on the KAN algorithm according to claim 3 is characterized in that: In step three, the TPI index is calculated every second based on the KAN algorithm in combination with the historical traffic flow parameter data, and the future TPI index and traffic congestion situation are predicted based on the TPI index; at the same time, the traffic flow threshold and speed threshold of the time period can be determined.

5. The real-time decision modeling method for opening emergency channels on highways based on the KAN algorithm according to claim 4 is characterized in that: In step 4, the traffic flow and speed thresholds obtained by the KAN algorithm are used to establish an optimization model for the best opening of the emergency lane, taking whether the minimum congestion rate is exceeded as the objective function, the time interval as the decision variable, and the set traffic flow threshold and speed threshold as constraints.