Research on Characteristics and Trends of Traffic Flow Based on Mixed Velocity Method and Background Difference Method

)is research is conducted on the characters and trends of traffic flow in highway maintenance work areas under typical maintenance work forms. In order to improve the safety of the highway maintenance work area, a data monitoring method based on the combination of mixed speed measurement and background difference method were developed. During the on-site detection, the starting point of the warning zone, the starting point of the upstream transition zone, the starting point of the working zone, themidpoint of the working zone, and the six speedmeasurement sections of the working zone were collected at the end point and the end zone. In the video detection, the background subtraction was used, and the morphological denotingmethod and the connected domain analysis method were used to retain the vehicle foreground. After analyzing the connection domain and removing the wrong target, the vehicle target area is extracted from research. )e research finally obtained the traffic flow characteristics of the start point of the warning zone, the start point of the upstream transition zone, the start point of the work zone, the midpoint of the work zone, the end point of the work zone, and the end point of the downstream transition zone. )e study also obtained the traffic volume and the change trend of headway. )e combination of mixed velocity method and background difference method is helpful for data monitoring in typical highway maintenance work areas. )e measured data results are helpful for studying the distribution characteristics and trends of traffic flow in typical highway maintenance work areas.


Introduction
e rapid development of the highway infrastructure network has provided a strong guarantee of the convenient travel of the broad masses of the people. Exchanges with regions are more frequent, and the volume of cargo transportation has continued to increase, which caused damage and aging of highway facilities to varying degrees. erefore, in order to ensure that the highway is always in good operating condition, large-scale maintenance work is required. In order to identify back-end conflicts in the work area of the expressway, the author has constructed a backend conflict recognition model based on the improved TTC algorithm. is article focuses on the characteristics of traffic flow under typical maintenance operations [1]. Research on highway maintenance work areas has been done since ancient times. In 1994, Niskanen conducted a questionnaire survey of 207 maintenance workers in nine different units to research the safety and organizational management of highway maintenance operations, personal factors, and special environment, which found that on-site organization and management, staff judgment and attention had a significant impact on the safety of maintenance operations [2]; in 1996, Dixon et al. used metric counters and classifiers in North Carolina Collecting traffic data from 24 freeway working areas in China; it was first proposed to use the speed-flow curve to define its capacity value [3]; In 2014, Ma et al. developed a traffic accident response system to solve traffic safety problems in response to traffic delays in downstream sections [4]; in 2014, Liang et al. established a cellular automata model of the off-ramp area by analyzing the car's following and lane changing behavior to evaluate the safety of the expressway work area [5]; in 2014, Ma et al. proposed an adaptive speed control method based on ITS in the working area of the expressway in order to reasonably control the speed of vehicles in the working area of the expressway and verify its effectiveness [6]; in 2015, Xie et al. assessed the quality of maintenance of highway safety facilities and converted the assessment scores of different safety facilities into total maintenance quality measurement; the result can reveal the overall facility maintenance quality of highway sections. It can be seen that the current research on highway maintenance safety has mostly focused on the forms and characteristics of maintenance safety accidents, the methods of traffic organization in maintenance work areas, the layout of maintenance work areas, and the analysis of traffic accidents in work areas [7]; in 2016, Waleczek et al. discussed the impact of reversible lane systems in maintenance work areas on traffic flow and road safety, and the results showed that similar to other highway work areas, the accident rate increased with different road works [8]; In 2016, Chen et al. used short-term traffic flow prediction methods to accurately predict the impact of traffic flow trends and mixed speeds on traffic flow [9]; in 2017, Li and Dong comprehensively analyzed the spatial characteristics of the merger decision and implementation of the workspace and found that the driver merger decision will be affected by the surrounding vehicle state and its own location [10]; in 2018, Ravani and Wang compared the effectiveness of work area safety by assessing methods including average speed reduction, speed change, 85% speed, and the proportion of high-speed vehicles and achieved significant results [11].
ere is less research on the traffic flow operation characteristics and change trends of highway maintenance operation areas under typical maintenance operations. Background differential method is a noncontact passive detection technology [12], which is widely used in target detection of traffic surveillance videos [13]. However, as far as we know, few works of the literature use a background difference method to study the typical highway maintenance operation area. erefore, this study attempts to fill this gap and study the traffic flow characteristics and trends of typical maintenance operation areas through the background difference method. e remainder of this paper is structured as follows: Section 2 introduces the location and time of data collection; Section 3 introduces the processing method of video data; Section 4 describes the results, including characteristics and trends of traffic flow in typical maintenance operation areas; finally, the conclusion and some limitations are introduced in Section 5.

Survey Location
e field survey data in this research are from the maintenance operation area of Jiguang Expressway in Lu'an City, Anhui Province, as shown in Figure 1. e design speed of the Jiguang Expressway is 120 km/h, two-way four lanes, and the speed limit in the maintenance operation area is 40 km/h. From the maintenance operation area of Hurong Expressway in Lu'an City, Anhui Province, the design speed of Hurong Expressway is 120 km/h, two-way four lanes, and the speed limit in the maintenance operation area is 40 km/h. Determine the six velocity sections of the warning zone starting point (A), upstream transition zone starting point (B), construction zone starting point (D), construction zone midpoint (E), construction zone end point (G) [14], and termination zone end point (J), as shown in Figure 2.

Investigation Date and Time.
e survey date was August 20, 2019. e survey period was fine weather, relatively high visibility, light wind, dry roads, no accidents, or other special events. Combined with the traffic data in the highway information management system, the time-varying statistical analysis of the historical traffic volume shows that the highway traffic volume forms an obvious peak between 15 : 00 and 20 : 00. e traffic volume of the survey section continued to increase from 7 : 00 am to a steady state at 11 : 00 noon. After about 14 : 00, the traffic flow continued to climb until it reached the highest value of the day at 16 : 00 and 18 : 00, and then slowly decline. erefore, continuous observation is made on the three traffic periods of 12 : 00-13 : 00, 14 : 30-15 : 30, and 17 : 30-18 : 30 during the whole day. e field record is recorded by a combination of multifunction handheld traffic measuring instrument and multifunction vehicle detector. e field record is shown in Figure 3.

Video Capture Method
e video collection section is the section of the maintenance operation area of Jiguang Expressway. e basic principle of vehicle speed measurement based on video is the same; that is, the vehicle speed is equal to the distance traveled by the vehicle divided by the time the vehicle travels [15]. Here we consider the average speed in a short time as the detection speed of the vehicle. e calculation formula is as follows: erefore, the process of video speed measurement is the realization process of ΔT and ΔS. e video stream data is composed of time-series images [16]. At present, the performance of frame grabbers is already very powerful [17]. e interframe error in the external trigger acquisition mode can be accurate to the microsecond level. Generally applicable to highway video surveillance, the video frame rate is 25 pfs (PAL standard), and the time step (that is, the time difference between adjacent frames and frame images) is 40 ms. rough the frame-drawing experimental test, it was found that 25 samples of uniform samples can be obtained every second. erefore, as long as the frame number of the image sequence is obtained or the relative frame number difference is calculated statistically, the corresponding time difference ΔT can be determined. By collecting the vehicle time distance from the vehicle at a fixed section ΔS, the speed of the vehicle passing through the maintenance work area can be obtained. Since the current frame image and the background image are 3-channel RGB format images, in order to reduce the amount of calculation and subsequent processing, the current frame and background image are first converted to grayscale images, then the grayscale image is differentially processed, and finally the differential image A minimization process is performed to obtain a binary image.
ere are many forms for converting the RGB image to gray scale images [18]. is article uses the most common conversion algorithm with the formula: In the above formula, Gray(x, y) is the target gray value, and R, G, and B are the brightness values of the three channels.
Compared with the grayscale image, the binary image contains little difference in the vehicle area information, but the calculation amount will be much reduced. e minimization formula is as follows: In the formula, D(x, y) represent a binary image, I(x, y) represents a grayscale image of the current frame, B(x, y) represents a background grayscale image, threshold represents a minimization threshold, and the pixel value is 255. e points are white and the point 0 is black. e minimization threshold is selected by using the most common OTSU method [19]. Finally, a binary image of the vehicle target is obtained, and the effect image is shown in Figure 4: It can be seen from Figure 4(c) that the vehicle target in the binary image has been relatively completely extracted, but there are still some noise points due to the slight camera shake and the influence of pixel noise. So, for the next calculation, image denoting processing is needed. When the color of the vehicle is similar to the road surface or the background modeling effect is poor, the extraction of the vehicle may appear to be hollow or even split; due to the perspective camera and the reason that some vehicle bodies are larger, vehicles between different lanes may have body fusion. e existence of the above problems will increase the    calculation number of subsequent algorithms and bring a lot of error data. So corresponding algorithm processing must be performed.
Morphology analyzes the image based on geometry. It processes the image through some operation of objects and structural elements to obtain a clearer and more essential shape of the object, thereby improving the image quality. In recent years, morphological processing methods have been increasingly used in image processing, and gradually developed into a unique image analysis method and theory. Swelling and corrosion are the most basic operations in mathematical form. Corrosion is the process by which the boundary converges to the inside and can be used to eliminate small and meaningless objects. Let us set X to be the original image and set B to be the structural element, then the corrosion operation of B on X is recorded as and is defined as follows: Dilation is the opposite of erosion. It expands the boundary to the outside. e dilation operation is especially effective for filling the holes in the image. Let us set X to be the original image and set B to be the structural element. en, the expansion operation of B on A is written as follows: where the empty set is ⊘, the reflection set of set B is as follows: e open operation has a better effect on the separation of adhesion targets and the removal of background noise; the closed operation is a dual operation of the open operation; that is, the expansion is performed before the erosion. Closed operations are usually used to fill small holes inside the target and connect disconnected neighboring targets [21]. Figure 5 is the effect of morphological processing on the binary map.
It can be seen from Figure 5 that after morphological processing, the noise points in the binary map are basically removed, and the contour features of the vehicle are better retained. Although there are still a few holes in the body, it will not affect the vehicle. At this time, although the location of the vehicle can be easily judged from the visual effect, the computer needs to establish a reasonably connected domain data structure to describe the information of the area [22]. Generally speaking, the most intuitive way to measure whether two pixels belong to the same connected domain is to determine whether there is an accessible path between the two pixels.
ere are two commonly used judgment methods, four-connected and eight-connected, to describe whether the central pixel is located in a connected domain, as shown in Figure 6. e number of connected domains of the binary image after morphological denoting is limited, and the geometric characteristics of the connected domain can be well calculated by using the ergodic scanning method, including the area of the connected domain, the circumscribed rectangle, and the centroid. Each parameter is briefly described below [23]. e area of the connected domain is an important metric, and the area of the connected domain is the sum of the number of all white pixels in the connected domain.
In the formula, when the pixel value is 255, f(x, y) takes the value of 1 and the rest take the value of 0. e perimeter of the connected domain is recorded as the sum of the number of all white pixels at the outermost boundary of the connected domain.
In the detection of vehicles, the precise description of the boundary chain code is not concerned, and more attention is paid to the circumscribed rectangle and centroid information of the connected domain, which will be more helpful for error rejection and vehicle feature matching.
When traversing the pixels in all connected domains, the coordinate information about all pixels is counted. e circumscribed rectangle information only needs to mark the coordinates of two points of the diagonal. Mathematical Problems in Engineering After connecting to domain analysis and false target removal, the vehicle target area is extracted. e effect is shown in Figure 7.
It can be seen from Figure 7 that after analyzing the connection domain and removing the wrong target, the coordinates of the target area can be extracted. e position of the target area is calibrated in the form of a rectangular frame of the figure. After image processing, the vehicle target extraction is realized. e background difference method is used to select the image. For noise interference in the background difference image, the morphological denoting method and the connected domain analysis method are used to better retain the vehicle foreground. After the false target is removed, the vehicle target area is extracted to complete the video speed measurement.
is section collects data from typical highway maintenance work areas in Anhui Province.

Speed Characteristics.
e driving speed parameters of different vehicle types were collected on the spot in the warning area, upstream transition area, work area, and termination area of the maintenance operation area of the Jiguang Expressway in Lu'an City, Anhui Province. e actual survey speed of each cross section surveyed is statistically sorted to obtain the average speed of each speed survey cross section by vehicle type (the average speed is the average speed of the same vehicle type of each cross section). e models are divided according to minibus, coach, small truck, medium truck, and large truck. e specific distribution of investigation values is shown in Figure 8.

Start Speed Statistics in Warning Area.
e total length of the maintenance area of Jinan Guangzhou Expressway is 1600 m; there is no lane change in this area, so the vehicle speed in the warning area tends to be the same basically, without too much obvious fluctuation, as we can see the following from Figure 8: At the starting point of the warning area, the speed of passenger cars and freight cars is about 75 km/h, the traffic flow is in the free flow state, the driving is comfortable, and there is no traffic jam At the starting point of the warning area, the speed difference between the passenger car and the freight car is about 10 km/h, which shows that there is less conflict between different models

Start Speed Statistics in Upstream Transition Area.
e total length of the upstream transition zone set in the maintenance section of Jinan Guangzhou Expressway is 200 m. We can see the following from

Mathematical Problems in Engineering
At the starting point of the upstream transition zone, the driving speed of various models can be kept within the normal speed range

Vehicle Speed Statistics in Working Area.
Comparison of the driving speed parameters of different vehicle types at the starting point of the road maintenance working area and the upstream transition area can be seen from Figure 8; e speed distribution of all types of vehicles in the working area is uniform, and the driving state is the same.
ere is a big difference between the speed in the working area and the speed in the upstream transition area. Due to the influence of following state traffic flow, the speed reduction of medium and large trucks also reduces the running speed of buses.
From the above analysis, it can be seen that due to the influence of large trucks and other large vehicles, their lower driving speed affects the normal traffic operation of the work area in the expressway maintenance work area, so in this case, the impact of the proportion of large trucks on the traffic capacity of the working area should be considered.

Vehicle Speed Statistics in Termination
Area. It can be seen from the speed distribution of the termination area that at the end of the termination area, the travel speed of the small bus increases to 92.571 km/h, and the travel speed of the large bus increases to 89.825 km/h, indicating that the vehicles in the end area are basically not affected by the work area, the speed of various vehicles in this area returns to normal speed.

Traffic Volume Time Characteristics in Operation Area.
Based on the field inspection of the maintenance area of Ji Guang Expressway and the maintenance area of Hu Rong Expressway in Liu'an City, Anhui Province, continuous traffic volume parameters from 8 : 00 to 12 : 00 and from 14 : 00 to 18 : 00 in the operation area are collected. Specific statistical results are shown in Table 1 and  Table 2.
It can be seen from the survey results that the maximum one-way peak hour traffic volume in the maintenance area of Jinan Guangzhou Expressway occurs from 16 : 00 to 17 : 00, reaching 1282 pcu/h, while the minimum traffic volume occurs from 8 : 00 to 9 : 00, reaching 544 pcu/h. e pressure of afternoon traffic volume in the operation area is greater than that in the morning, and the change rate of traffic volume is relatively stable. e change of hourly traffic volume in the maintenance area is shown in Figure 9. e maximum one-way peak hour traffic volume in the maintenance area of Shanghai Chengdu expressway is from 13 : 00 to 14 : 00, reaching 1646 pcu/h, while the minimum traffic volume is from 8 : 00 to 9 : 00, reaching 893 pcu/h. It can be seen that the traffic volume in the operation area is larger than that in the morning, and the traffic volume change rate is relatively stable. e hourly traffic volume change in the maintenance operation area is shown in Figure 10.

Vehicle Headed Time Distance Characteristics
Analyzation. Vehicle headed time distance is one of the important indexes reflecting the safety of expressway driving. In order to ensure the safe driving of the road, vehicle headed time distance should be large enough for the driver to have sufficient response time. Compared with other conditions, the road environment in the expressway maintenance area is more complex, so the vehicle headed time distance will also be greatly changed. In order to further  research the vehicle headed time distance changes and rules after vehicles enter the working area from the normal section, the headway parameter data of Changling Guandong section expressway in the normal section and the work area section is collected by using the video acquisition method. And through data sorting, the headway distribution characteristics and frequency characteristics are shown in Figures 11 and 12.
Generally speaking, at the 95% confidence level, the vehicle headed time distance distribution of the normal road section and the overtaking road is approximately similar, which should conform to the negative index distribution of displacement, and the vehicle headed time distance of the 50% position is approximately the same, the lane is 4.35 s, and the overtaking road is 2.89 s. In view of the current situation of expressway operation in our country, some large vehicles occupy the overtaking lane for a long time, which leads to the failure of normal overtaking of other vehicles with better performance (small buses, large buses); at this time, the overtaking lane cannot be fully utilized; even the   Mathematical Problems in Engineering vehicles with better performance can only follow at low speed, resulting in the functional confusion of the carriageway and overtaking lane. e cumulative frequency distribution curve of overtaking lane in the maintenance area section is relatively gentle, which shows that the apparent distance of the head of the construction area section is large, and this section is the uphill section of the construction area. Because the climbing speed of the large car is slower than that of the small car; the small car and other fast cars may also be disturbed by the large car when climbing the slope.

Conclusion
In this paper, it is proposed to use the mixed velocity method and background difference method to study the characteristics of traffic flow in the maintenance operation area of typical highways, in order to enhance the safety of public transportation by reducing the number of traffic accidents. Taking the highway maintenance area of Anhui Province as the research object, the characteristics and trends of traffic flow in the highway maintenance operation area with typical maintenance operations are explored. e method of combining field detection and video detection is adopted. In the field detection, six speed measurement sections are collected, including the starting point of the warning area, the starting point of the upstream transition area, the starting point of the work area, the middle point of the work area, the end point of work area, and the end point of the end area. In the video detection, the background checks method, morphological denoting method, and connected area analysis method are used to better retain the vehicle prospect and connect. After domain analysis and pseudotarget removal, the vehicle target region is extracted. Based on the collected traffic data, the traffic flow characteristics of warning area starting point, upstream transition area starting point, work area starting point, work area middle point, work area end point, and end point of Anhui typical expressway maintenance area are obtained, respectively; and the time characteristics of the traffic volume of the typical highway maintenance area in Anhui and the headway timed characteristics of the typical highway maintenance area are   Data Availability e video parameter data used to support the results of this study are included in this article and have been provided and uploaded.

Conflicts of Interest
e authors declare that they have no conflicts of interest.