DAS-based traffic flow prediction method, system and device, and medium
By collecting vehicle vibration signals through the DAS system, constructing a spatiotemporal response map and combining it with ARIMA and LSTM models, it solves the problem of low accuracy in traffic flow prediction, achieves real-time and future accurate prediction of traffic flow, and improves the intelligence of traffic monitoring. and preventive capabilities.
Patent Information
- Application Number
- CN202410639141.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-22
- Publication Date
- 2024-09-10
AI Technical Summary
The existing technology lacks deep mining and intelligent analysis capabilities in traffic flow forecasting, resulting in low forecast accuracy, difficulty in capturing the trend and seasonality of data, and inability to take preventive measures in advance to deal with traffic congestion and accidents.
The traffic flow prediction method based on DAS is used to collect vehicle vibration signals through a distributed optical fiber sensing system to construct a spatiotemporal response map. Combined with Hough transform and time series decomposition technology, the ARIMA and LSTM models are used to predict the linear and nonlinear parts respectively to achieve Accurate long- and short-term predictions of traffic flow.
It achieves real-time estimation of traffic flow and accurate future prediction, improves the intelligent perception capability of DAS traffic monitoring, improves prediction accuracy, and can prevent traffic congestion and accidents in advance.
Smart Images

Figure CN118629199A
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of distributed optical fiber sensing and its application, and relates to a prediction of traffic flow, and in particular to a method, system, device and medium for predicting traffic flow based on DAS. Background Art
[0002] With the advancement of urbanization, the number of motor vehicles in my country has continued to rise. The number of motor vehicles has jumped to the first place in the world, and traffic congestion has gradually become one of the major social problems. The application and development of intelligent transportation systems can help alleviate traffic congestion, and the prediction of traffic flow is one of the keys to ensure the effectiveness of intelligent transportation systems. Accurate traffic flow prediction, especially long-term prediction, can help travelers obtain future traffic information in advance and make better travel plans on the one hand; on the other hand, it can help managers formulate reasonable traffic induction plans, improve traffic operation efficiency, and thus alleviate traffic congestion. Therefore, accurate long-term traffic flow prediction is crucial.
[0003] The prediction of traffic volume still needs to be based on the existing traffic volume data of the road. The collection of traffic volume data on existing roads mostly relies on sensors. The distributed fiber acoustic / vibration sensing (DAS) system based on the principle of phase-sensitive optical time-domain reflectometry (Φ-OTDR) can use widely laid communication optical cables to provide a high-density, low-cost sensing network over a large area. In recent years, DAS systems have been widely used in the fields of seismic wave detection in the oil and gas industry, perimeter security intrusion detection, urban communication cables and traffic monitoring, forming a new type of fiber-optic Internet of Things for ground monitoring applications.
[0004] In the field of traffic monitoring, the application of DAS technology is becoming more and more extensive, providing traffic management departments with new monitoring methods and data support. Traditional traffic monitoring systems are often limited by the location of equipment and the limitations of monitoring range, making it difficult to achieve all-round and efficient monitoring. After the introduction of DAS technology, real-time monitoring and analysis of road traffic conditions can be achieved, which not only covers a wider range, but also has higher monitoring accuracy and stronger real-time performance. By analyzing the propagation characteristics of acoustic signals in optical fibers, DAS technology can monitor and analyze key data such as vehicle speed, density, and traffic volume.
[0005] After obtaining the traffic flow data of the road, the traffic flow prediction methods are mainly divided into three categories: time series analysis methods, machine learning methods and deep learning methods. Since traffic flow data is continuous time series data generated by the deployed detectors at fixed time intervals. In the early days, time series analysis methods such as autoregressive integrated moving average (ARIMA) and Kalman filtering were mainly used for prediction. However, they are all based on linear assumptions and require the data to be smooth. However, actual traffic flow data is usually nonlinear, which makes it difficult for time series analysis methods to obtain satisfactory results.
[0006] Machine learning methods such as vector autoregression (VAR) and support vector regression (SVR) perform feature engineering modeling on traffic data, revealing nonlinear relationships in the data, and then continuously adjusting and optimizing model parameters to predict traffic trends. However, machine learning modeling requires professional design and is somewhat difficult. Moreover, the above two methods only consider time information and ignore the importance of spatial information for accurate prediction.
[0007] Deep learning can automatically extract more complex features and has attracted widespread attention in traffic flow prediction. Existing studies have shown that methods based on recurrent neural networks (RNNs), such as long short-term memory networks (LSTMs), have achieved better results than the above-mentioned time series analysis methods and machine learning methods. In order to simultaneously learn the spatiotemporal correlation of traffic data, the method of fusing convolutional neural networks (CNNs) and RNNs is adopted. However, CNNs cannot process non-Euclidean data, resulting in the loss of spatial information contained in the road network. Therefore, the spatiotemporal graph convolutional network framework is widely used in traffic flow prediction. Among them, the nodes of the graph are traffic detectors, and the edges and weights are determined by the connectivity and Euclidean distance between the detectors. To this end, some scholars have proposed introducing graph convolutional networks (GCNs) into the field of traffic flow prediction, using spatiotemporal convolutions to simultaneously capture spatiotemporal correlations. Other scholars have further captured spatial correlations by constructing an adaptive adjacency matrix, and used temporal convolutional networks (TCNs) to capture temporal correlations.
[0008] The invention patent application with application number 202210009238.5 discloses a traffic flow prediction method based on the Transformer spatiotemporal graph convolutional network, which includes the following steps: construct a static adjacency matrix based on the detectors deployed on the road network and the connectivity and Euclidean distance between them; merge the original traffic flow data collected by the detectors at specified time intervals; normalize the data set using the maximum and minimum method, and construct a traffic flow spatiotemporal graph, and divide the data set into a training set and a test set; construct a prediction model based on the Transformer spatiotemporal graph convolutional network; use the training set data as input to train the prediction model; use the trained spatiotemporal graph convolutional network prediction model to predict the traffic flow of the test set, and evaluate and analyze the prediction error based on the prediction results and actual traffic data. Compared with traditional methods, this method can effectively extract the spatiotemporal correlation in traffic flow data, more fully mine the information in traffic flow data, and improve its prediction accuracy.
[0009] However, although the existing DAS technology has made some progress in traffic data collection and analysis, the existing DAS technology still has some limitations, mainly limited to simple statistical analysis of historical data, lacking the ability to conduct in-depth mining and intelligent analysis of data, and the ability to predict future trends. This limitation has led to traffic management departments often being able to respond passively when faced with challenges such as traffic congestion and accident prevention, and unable to take preventive measures in advance. In addition, although the existing prediction methods based on deep learning can better handle nonlinear relationships and long-term dependencies in data, it is difficult to capture the trend and seasonality of data, making the network / model's prediction accuracy for traffic flow data low. Summary of the invention
[0010] The purpose of the present invention is to solve the technical problems in the prior art of lacking the ability to conduct deep mining and analysis of data and the low accuracy of network / model prediction of traffic flow, and to provide a DAS-based traffic flow prediction method, system, equipment and medium, which can realize real-time collection, analysis and estimation of traffic flow around the clock through DAS, and realize long-term and short-term prediction of traffic flow by using innovative prediction algorithms, with high prediction accuracy.
[0011] In order to achieve the above-mentioned purpose, the present invention specifically adopts the following technical solutions:
[0012] A traffic flow prediction method based on DAS includes the following steps:
[0013] Step S1, DAS data collection and space-time response diagram creation;
[0014] Use the distributed optical fiber sensing DAS system to collect the vibration signal of the vehicle when it is driving, accumulate the vibration signal in the time domain to form a time-space response diagram, and then segment the time-space response diagram to form a segmented time-space response diagram reflecting each road section;
[0015] Step S2, trajectory enhancement and vehicle flow estimation;
[0016] The vibration response generated by the passing of vehicles in the segmented space-time response graph is enhanced to obtain the enhanced segmented space-time response graph; the parameters in the enhanced segmented space-time response graph are detected using Hough transform, and the traffic flow data is estimated based on the parameters;
[0017] Step S3, traffic flow data prediction;
[0018] Use time series decomposition to split the traffic flow data into linear and nonlinear parts. Use the ARIMA model to predict the linear part, and use the LSTM model to predict the nonlinear part. Combine the prediction results of the ARIMA model and the LSTM model as the final prediction result.
[0019] A traffic flow prediction system based on DAS, comprising:
[0020] The DAS data acquisition and spatiotemporal response diagram creation module is used to use the distributed optical fiber sensing DAS system to collect the vibration signal of the vehicle when it is driving, accumulate the vibration signal in the time domain to form a spatiotemporal response diagram, and segment the spatiotemporal response diagram to form a segmented spatiotemporal response diagram reflecting each road section;
[0021] The trajectory enhancement and vehicle flow estimation module is used to enhance the vibration response generated by the passing of vehicles in the segmented space-time response graph to obtain the enhanced segmented space-time response graph; use Hough transform to detect the parameters in the enhanced segmented space-time response graph, and estimate the traffic flow data based on the parameters;
[0022] The vehicle flow data prediction module is used to use time series decomposition to split the traffic flow data into linear and nonlinear parts, use the ARIMA model to predict the linear part, use the LSTM model to predict the nonlinear part, and combine the prediction results of the ARIMA model and the LSTM model as the final prediction result.
[0023] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the above method.
[0024] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor is caused to execute the steps of the above method.
[0025] The beneficial effects of the present invention are as follows:
[0026] 1. In the present invention, based on the data collected by DAS, not only the real-time estimation of traffic flow is realized, but also the future traffic flow is accurately predicted by using data prediction algorithm, which further enhances the intelligent perception ability of DAS traffic monitoring.
[0027] 2. In the present invention, an algorithm flow of data decomposition-different model prediction-result integration is adopted to achieve accurate prediction of traffic flow data. This algorithm design enables the ARIMA model and the LSTM model to play their respective advantages and improve the prediction accuracy of traffic flow. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 It is a schematic diagram of the process of the present invention; Figure 2 A typical configuration of a DAS system based on a phase-sensitive optical time domain reflectometer (Ф-OTDR) of the present invention; Figure 3 is the time-space correspondence matrix corresponding to the vehicle vibration signal collected by the DAS in the present invention; Figure 4 It is the division of the time-space correspondence matrix in the present invention; Figure 5 The vehicle driving trajectory diagram in the present invention: (a) the effect diagram of binarization using the OTSU method; (b) the effect diagram of expansion; (c) the effect diagram of corrosion; (d) the effect diagram after median filtering; Figure 6 The mapping principle of Hough transform from rectangular coordinate system to polar coordinate system in the vehicle flow parameter estimation of the present invention; Figure 7 It is a schematic diagram of calculating the headway distance in the vehicle flow parameter estimation of the present invention; Figure 8 The effect diagram of Hough transform in the present invention: (a) moving vehicle trajectory diagram; (b) two-dimensional accumulation array effect diagram of parameter space after Hough transform of the trajectory diagram; (c) vehicle trajectory detected by Hough transform; Fig. 9 The experimental data set A selected by the present invention for predicting the traffic flow data for the next day; Fig.10 The experimental data set B selected by the present invention for predicting the traffic flow data for the next week; Fig.11 The decomposition results of the data set A using the time series decomposition method in the present invention are as follows: (a) original data of traffic flow; (b) trend item data of traffic flow; (c) seasonal item data of traffic flow; (d) residual item data of traffic flow; Fig.12 The decomposition results of the data set B using the time series decomposition method in the present invention are as follows: (a) original data of traffic flow; (b) trend item data of traffic flow; (c) seasonal item data of traffic flow; (d) residual item data of traffic flow; Fig.13This is the construction process of the ARIMA model in the present invention; Fig.14 This is the way to divide the data set in the data preparation stage of the present invention; Fig.15 Model parameter settings for the ARIMA model, LSTM model, and ARIMA-LSTM combined model in the present invention; Fig.16 The prediction results of the ARIMA-LSTM combined model of the present invention for different components of the traffic flow data for the next day: (a) the prediction results of the ARIMA model for linear data; (b) the prediction results of the LSTM model for nonlinear data; (c) the prediction results of the ARIMA-LSTM combined model; Fig.17 The prediction results of the ARIMA-LSTM combined model of the present invention for different components of the traffic flow data for the next week: (a) the prediction results of the ARIMA model for linear data; (b) the prediction results of the LSTM model for nonlinear data; (c) the prediction results of the ARIMA-LSTM combined model; Fig.18 This is the construction process of the LSTM model in the present invention; Fig.19 The following are the prediction results of the three prediction models used in the present invention for two different test scenarios: (a) predicting the traffic flow data for the next day; (b) predicting the traffic flow data for the next week; Fig. 20 The evaluation results of the three prediction models using the three evaluation indicators used in the present invention are as follows: (a) the evaluation result of the RMSE value; (b) the evaluation result of the MAPE value; (c) R 2 The evaluation result of the value. DETAILED DESCRIPTION
[0029] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments.
[0030] Therefore, based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative work shall fall within the scope of protection of the present invention.
[0031] Example 1
[0032] This embodiment provides a traffic flow prediction method based on DAS, taking the traffic monitoring application based on communication optical cable as an example, refer to Figure 2The DAS system based on phase-sensitive optical time-domain reflectometry (Ф-OTDR) requires connecting the optical signal demodulation equipment to the communication optical fiber buried under the green belt of the highway. The optical signal demodulation equipment periodically transmits coherent pulse light into the optical fiber. The vibration signal generated when the vehicle passes by is transmitted to the optical fiber through the soil. The vibration source (moving vehicle) can be located in real time based on the principle of phase-sensitive optical time-domain reflectometry (Φ-OTDR).
[0033] The specific traffic flow prediction method is as follows: Figure 1 As shown, the specific steps include:
[0034] Step S1, DAS data collection and space-time response diagram creation;
[0035] For the sensing optical fiber laid on the green belt of the highway, a distributed optical fiber acoustic wave sensor is used to collect the vibration signal generated by the vehicle when it is driving. The signal received by the device is a phase-demodulated optical time domain reflection signal, which is accumulated in the time domain to form a two-dimensional time-space response diagram, and the trajectory diagram is segmented on the spatial axis to form a segmented time-space response diagram reflecting each section of the highway.
[0036] Step S2, trajectory enhancement and vehicle flow estimation;
[0037] Through image preprocessing operations such as binarization, dilation and corrosion in image morphology processing, and denoising, the vibration response generated by the passing of vehicles in the segmented spatiotemporal response map is enhanced to obtain the enhanced vehicle driving trajectory map. The straight line parameters of the vehicle driving trajectory are detected by Hough transform, and the traffic flow data is estimated based on the trajectory parameters.
[0038] Step S3, traffic flow data prediction;
[0039] Perform preprocessing operations such as cleaning, resampling, and selection on traffic flow data. Build a prediction algorithm based on sequence decomposition and ARIMA-LSTM combined model: Use time series decomposition to split traffic flow data into linear and nonlinear parts; use the ARIMA model to predict the linear part, and the LSTM model to predict the nonlinear part; combine the prediction results of the ARIMA model and the LSTM model as the prediction result of the final algorithm.
[0040] Both the ARIMA model and the LSTM model adopt the existing model structure and can be trained using existing methods.
[0041] Example 2
[0042] Based on Example 1, the specific method of forming the segmented spatiotemporal response graph is as follows:
[0043] When light is transmitted in the optical fiber, once a vehicle passes by the highway, the detection optical fiber will vibrate, and the shape and refractive index of the optical fiber will change accordingly, and finally the phase and intensity of the backward Rayleigh scattered light wave will change. The sensing hardware system uses a periodic trigger pulse as a signal acquisition cycle. The signal collected in this time unit is an exponentially decaying OTDR track distributed along the detection optical cable. The signal collected in the kth trigger pulse cycle is expressed as:
[0044] L k ={t ki (i=1,2,…,N)}=[t k1 , t k2 ,…,t kN ] ()
[0045] The acquisition pulse period triggers the spatially distributed OTDR traces to be periodically refreshed. As the trigger pulse period k increases, M acquired original OTDR traces are continuously accumulated to construct a space-time signal response matrix LT with N spatial dimensions and M temporal dimensions:
[0046] LT={t ki (k=1,2,…,M; i=1,2,…,N)) (2)
[0047] Therefore, the time response signal T of the i-th spatial acquisition point is i It is expressed as:
[0048] T i ={t ki (k=1, 2, ..., M)} (3)
[0049] Where i represents the spatial acquisition point number, N represents the total number of acquisition points, M represents the total number of trigger pulse cycles, and t ki Represents the signal of the ith acquisition point in the kth trigger pulse cycle;
[0050] Horizontal space sequence L k It can represent the spatial sequence signal of each spatial point at the same time. The amplitude of each point in the spatial sequence corresponds to the information of the corresponding spatial point. If a point in space vibrates, the amplitude of the corresponding point in the spatial sequence becomes larger. i Represents the corresponding time series signal of a certain point in space. If a certain point in space vibrates at a certain moment, then the amplitude of the corresponding longitudinal time series at a certain moment will suddenly increase, that is, the time series will suddenly have an impact at a certain moment. The space-time response matrix of the entire system is as follows: Figure 3 shown.
[0051] Due to the lateral spatial sequence L kBy performing a simple amplitude judgment on the physical information of each spatial point on the optical cable at a certain moment, the current position of the vehicle can be located.
[0052] When actually collecting data, the acquisition card collects the original time series signal, but the host computer processes the time series signals of adjacent spatial points by difference through the program, so the data actually saved is the difference time series signal of adjacent spatial points. The signal processing object of the present invention is the space-time response diagram formed by the accumulation of difference signals. The space-time response diagram processed by the present invention is not the original signal, but the difference signal after difference.
[0053] The space-time signal response matrix with N dimensions in space and M dimensions in time is segmented in the space dimension (along the direction of the optical cable), for example, one kilometer is used as a unit. The unit length is adjusted according to the application needs. The space-time signal response matrix of vehicle driving can be segmented to obtain the space-time response diagram of vehicle driving in different monitoring sections within the time period, such as Figure 4 shown.
[0054] Example 3
[0055] On the basis of the above embodiments, the segmented spatiotemporal response map of each section of the entire highway obtained in Example 2 is subjected to image preprocessing operations such as binarization, dilation and corrosion in image morphological processing, and denoising to enhance the vibration response generated by the passing of vehicles in the segmented spatiotemporal response map, thereby obtaining an enhanced vehicle driving trajectory map.
[0056] First, the segmented spatiotemporal response map is enhanced to obtain an enhanced segmented spatiotemporal response map; wherein the enhancement method is binarization; the specific method of binarization is:
[0057] According to the amplitude difference between the vibration response caused by vehicle driving and the background noise response, the OTSU method is used to adaptively calculate the threshold value, and the segmented spatiotemporal response generated by the vehicle passing by is converted into Figure 2 Now arbitrarily select a gray value t and divide the histogram of the segmented spatiotemporal response map into two parts: A and B, corresponding to the foreground and background colors of the map. The pixel averages of these two parts are MA and MB respectively. The proportion of the number of pixels in part A to the total number of pixels is recorded as PA, and the proportion of the number of pixels in part B to the total number of pixels is recorded as PB. According to the inter-class variance function given by Nobuyuki Otsu, it is expressed as:
[0058] ICV=PA×(MA-t) 2 +PB×(MB-t) 2 (4)
[0059] Update t in sequence, so that the gray value t corresponding to the maximum ICV is the optimal binary gray threshold Q obtained by the maximum inter-class variance method; where the part of the gray value greater than Q in the segmented spatiotemporal response map is 1 in the binary map, and the part less than Q is 0 in the binary map;
[0060] The OTSU method is used to obtain the binary segmented spatiotemporal response map of each monitoring section. The vibration response caused by the vehicle passing is usually strong, which is the foreground color 1 in the binary map; the vibration response caused by the background noise is weak, which is the background color 0 in the binary map. The binarization effect is as follows: Figure 5 (a) shown.
[0061] After the binary enhancement process, image morphological processing is also performed. Image morphological processing mainly includes dilation, erosion, and the combination of the two opening and closing operations. Its main function is to segment independent image elements, connect adjacent image elements, and eliminate noise. Dilation and erosion in binary images are for the foreground color (white) of the image. Dilation is to "expand" the foreground color. The effect image after dilation has more white area than the original image. Erosion is to "eat away" the foreground color of the original image. The effect image after erosion has less white area than the original image.
[0062] The dilation operation is to find the local maximum value of the original image. The local shape and size are determined by the structure element. The structure element is usually a square or disk with a reference point. When performing the dilation operation, the original image is convolved with the structure element, and the maximum value of the pixels in the area covered by the kernel (structure element) is calculated. Finally, this maximum value is assigned to the pixel specified by the reference point.
[0063] The structure element SE is used to dilate and corrode the binary segmented spatiotemporal response map I, respectively, which can be expressed as:
[0064]
[0065] Among them, the structure element SE is used to perform an expansion operation on the binary segmented spatiotemporal response map I, which is specifically expressed as:
[0066]
[0067] The structure element SE is used to perform the corrosion operation on the binary segmented spatiotemporal response map I, which is specifically expressed as:
[0068]
[0069] Where I′ represents the binary segmented spatiotemporal response map after dilation and corrosion operations, and D I represents the domain of the binary segmented spatiotemporal response map I, D SErepresents the domain of the structural element, (s, t) represents the pixel position in the output image, (x, y) represents the coordinates in the structural element SE, I(s+x, t+y) represents the pixel value of the binary segmented spatiotemporal response map I at the position (s+x, t+y), SE(x, y) represents the structural element D SE The pixel value at position (x, y), (s+x, t+y)∈D I Indicates that the pixel position in the output image is within the domain of the input image, (x, y)∈D SE Indicates that the pixel position in the structuring element is within the domain of the structuring element.
[0070] The structural element SE is a 3×3 rectangular module. The main function of dilation and corrosion is to eliminate the narrow discontinuities in the foreground color of the binary segmented spatiotemporal response map and connect the vehicle trajectories in the binary segmented spatiotemporal response map. The effect of dilation and corrosion is shown in the figure below. Figure 5 (b) and (c) show that Figure 5 (a) Compared with the previous figure, some small discontinuous points of the vehicle trajectory in the binary segmented spatiotemporal response image after morphological processing have been connected together, which is convenient for subsequent trajectory detection.
[0071] After the dilation and corrosion enhancement processing, denoising is also performed to obtain the enhanced segmented spatiotemporal response map, which is expressed as:
[0072] Select a 3×3 template, that is, sort the 9 adjacent pixels from small to large, and replace the original pixel value with the value in the middle. The weight coefficient matrix template is:
[0073]
[0074] The median filtering process can be expressed as:
[0075] g(X,Y)=median{f(J,K), (J=X-1,X,X+1;K=Y-1,Y,Y+1)} (9)
[0076] in, Represents the original pixel grayscale value in the binary segmented spatiotemporal response image I′, represents the gray value of the pixel after median filtering, (X, Y) represents the pixel position in the output image, that is, the position of the current pixel to be calculated, (J, K) represents the pixel position in the input image, that is, the pixel position in the original image to be processed; (J=X-1, X, X+1; K=Y-1, Y, Y+1) represents a 3x3 area centered on the current pixel (X, Y), including its adjacent pixels above, below, left, right and on the diagonal.
[0077] Median filtering can filter out isolated foreground points in the binary segmented spatiotemporal response graph. These isolated foreground points are interference noise. After median filtering and denoising, the vehicle driving trajectory map of the monitoring section is obtained. The effect diagram is shown in the figure below. Figure 5 (d) The white track is the vibration response generated by the vehicle passing through the monitoring section. Since the vehicle can be approximately regarded as traveling at a constant speed in each monitoring section during the observation period, the displacement of the vehicle is linearly related to time, and the track is approximately a straight line.
[0078] Example 4
[0079] Based on the above embodiment, Hough transform is used to detect the straight line parameters of the trajectory of the moving vehicle. Figure 6 As shown, Hough transform converts the straight line in the image coordinate system into the parameter space (ρ, θ). The equation for converting the straight line in the image coordinate system to the polar coordinate system is:
[0080] ρ=x`*cosθ+y,*sinθ (10)
[0081] Among them, ρ represents the vertical distance from the origin to the straight line, θ represents the angle between the horizontal axis and the perpendicular line of the straight line, and (x`, y`) represents the coordinates of the point on the straight line.
[0082] In this way, every straight line in the image coordinate system (x', y') plane can be represented by a set of parameters (ρ, θ) in polar coordinates. The (ρ, θ) plane is called the parameter space of Hough transform. All straight lines passing through a point (x'0, y'0) in the image coordinate system are mapped to a corresponding curve in the (ρ, θ) parameter space. When multiple points in the rectangular coordinate system are collinear, their common straight lines have the same parameters in the (ρ, θ) parameter space, which is set to (ρ o ,θ o ), in parameter space, this point corresponds to the common intersection of multiple curves. Therefore, the problem of detecting straight lines (multiple points collinear) in a rectangular coordinate system can be transformed into the problem of finding the intersection of curves in parameter space.
[0083] According to the intersection of the curves in the parameter space (ρ, θ), the straight line parameters of the moving vehicle trajectory are obtained.
[0084] Figure 8 (a) is a trajectory diagram of multiple vehicles passing by, where black is the background color, which means that the optical fiber does not detect disturbance, and white is the vibration response generated when the vehicle passes by. The horizontal direction of the figure is along the distribution direction of the optical fiber, representing the response signals of various spatial positions along the distribution of the optical fiber, and the vertical direction is the accumulation of signals at different time points. When the vehicle passes through this section, its displacement is approximately linear with time.
[0085] When Hough transform maps the trajectory map to parameter space, Figure 8As shown in (b), red represents the number of collinear points with the same parameters in the parameter space. The lighter the color, the more collinear points there are. The six points circled by the blue box are the extreme points in the parameter space, that is, the six straight line parameters detected by the Hough transform. The Hough transform detection results are plotted in the vehicle trajectory diagram as shown in Figure 8 As shown in (c), the red line is the detected moving vehicle trajectory and the green endpoints are the trajectory endpoints.
[0086] The six sets of trajectory parameter trajectories obtained by Hough transform are shown in Table 1, where ρ is the distance from the trajectory to the origin. The origin here is in the upper left corner of the image. The distances from the two trajectories in the lower left corner to the origin are negative, corresponding to the two trajectories numbered 1 and 2 in Table 1; θ is the angle of rotation of the trajectory normal from the positive direction of the x-axis (the positive direction of the x-axis is the horizontal right direction). The angle is positive when it is clockwise and negative when it is counterclockwise. The six trajectory normals in the figure need to rotate counterclockwise, so the angles are all negative.
[0087] Table 1 Hough transform detection results
[0088]
[0089] Example 5
[0090] On the basis of the above embodiment, the traffic flow data is estimated according to the straight line parameters of the moving vehicle trajectory. The specific method is as follows:
[0091] Calculate the intersection of each vehicle trajectory and its extension line with the zero axis of space, set as t l , by t l Constitute the set W, then:
[0092]
[0093] Among them, t l represents the time point when the lth trajectory corresponds to the vehicle passing through the zero axis of space, (ρ l ,θ l ) is the parameter corresponding to the lth trajectory line;
[0094] When the intersection t of the extension line of a trajectory line with the zero axis of space exceeds the observation time period, such as Figure 5 As shown in t3 and t4, they are not included in the traffic flow counting range of this time period, and they will be detected in the segmented space-time response diagram of the next time period; let the set of intersection points after screening be Then we have:
[0095]
[0096] Among them, P represents the number of remaining trajectories after screening, t pIndicates the time point when the vehicle corresponding to the pth trajectory passes through the zero axis of the space;
[0097] The same method is used to estimate the number of vehicles in different observation time windows to obtain the time series data of traffic flow.
[0098] According to the Hough transform detection results in Table 1, the traffic flow data of the road section can be calculated. The accumulation time of the section is 20 seconds, and the section length is 1000 meters. According to the six groups of (ρ, θ) parameters, the first column is the time zero axis t0, and the first line is the space zero axis s0. The traffic flow data in the current 20 seconds is 2 vehicles. In the same way, the traffic flow data in different time windows are calculated and accumulated on the time axis to obtain the time series data of the traffic flow in the section.
[0099] Example 6
[0100] Based on the above embodiment, the traffic flow data obtained in Example 5 is predicted using the prediction algorithm based on sequence decomposition and ARIMA-LSTM combined model. The test scenarios include using the traffic flow data of the past fourteen days to achieve short-term prediction for the next day (24 hours), and using the traffic flow data of the past eight weeks to achieve long-term prediction for the next week (7 days). The specific method steps are as follows:
[0101] 1. Data preprocessing: supplement the missing values in the traffic flow data and remove the existing duplicate values; the data sampling rate is per minute, and the data sampling rate can be changed according to actual needs; select a data set of appropriate length according to the data set size required by the prediction algorithm.
[0102] 2. Time series decomposition: Decompose the preprocessed data into linear and nonlinear parts.
[0103] 3. Linear model prediction: Use the linear prediction model to predict the decomposed linear part data.
[0104] 4. Nonlinear model prediction: Use nonlinear prediction model to predict the nonlinear part of the decomposed data.
[0105] 5. Prediction item merging: Merge the prediction results of the linear model and the prediction results of the nonlinear model.
[0106] Example 7
[0107] This embodiment further optimizes the present invention based on Embodiment 6. Based on the traffic flow data obtained through parameter estimation, data preprocessing is performed on it, including: data preparation, data cleaning, resampling, data set selection and other operations.
[0108] The traffic flow data is stored in a csv file. The data contains two columns: the time index column and the traffic flow value corresponding to the timestamp. When cleaning the traffic flow data, delete the data at repeated times. Since the data collected through the DAS may be lost, resulting in missing values in the data set, the measurement value of the moment before the missing moment is copied to supplement it. Considering that the time interval of the collected traffic flow data is every minute, it is necessary to resample according to the specific test scenario. For the data prediction of the next day, the time interval of the data should be adjusted to hours; for the data prediction of the next week, the time interval of the data should be adjusted to days. Finally, when selecting the experimental data segment: for the data prediction of the next day, select the data segment with a length of fifteen days (360 data points) in the data set, defined as data set A, such as Fig. 9 As shown in the figure, fourteen days of data are used to train the model, and one day of data is used to evaluate the prediction results. For the prediction of the data for the next week, a data segment with a length of nine weeks (63 data points) is selected from the data set and defined as data B, as shown in the figure. Fig.10 As shown, eight weeks of data are used to train the model and one week of data is used to evaluate the prediction results.
[0109] Example 8
[0110] This embodiment further optimizes the present invention based on Embodiment 7, and mainly introduces the decomposition process of traffic flow data using the time series decomposition method.
[0111] The present invention selects the classical decomposition method to decompose the traffic flow data. This method can effectively decompose the time series data into three main components: trend term, seasonal term and residual term. Its decomposition models include: additive model and multiplicative model. The main difference between the two models is the relationship between the trend component and the seasonal component. The additive model assumes that they are in an additive relationship, while the multiplicative model assumes that they are in a multiplicative relationship. By observing and analyzing data sets A and B, it can be found that the data trend is not obvious, and the data is less affected by other factors, and the data randomness is not obvious. However, data set A takes one day (24 data points) as a cycle, and data set B takes one week (7 data points) as a cycle, showing a more obvious seasonal feature. Therefore, the selection of the multiplicative model is more suitable for in-depth analysis of the structure and characteristics of the data.
[0112] The decomposition results of the multiplication model of the classical decomposition method for data sets A and B are as follows Fig.11 , Fig.12As shown. Observing the decomposition results, it is found that the trend term mainly contains a large number of linear dependencies, so it is classified as linear data. The residual term contains more nonlinear dependencies, so it is classified as nonlinear data. As for the seasonal term, although its linear dependency is not as significant as the trend term, it is more appropriate to use a linear model for prediction because it shows an obvious periodic change pattern, so it is also classified as linear data. In terms of model selection, the ARIMA model is a classic method in traditional statistical models. It is good at capturing linear relationships in data and is usually used to predict linear data. The LSTM model is a mainstream technology in the field of deep learning. It is based on the assumption that there is a connection between data and has the ability to "remember" historical data, so that it performs well in processing nonlinear data. In view of these characteristics, the present invention uses the ARIMA model to predict linear data (the product of the trend term and the seasonal term), and the LSTM model predicts nonlinear data (residual term).
[0113] Example 9
[0114] This embodiment is based on the embodiment 8, and further optimizes the present invention, mainly introducing the prediction process of the linear data of traffic flow using the ARIMA model, such as Fig.13 shown.
[0115] (1) Data preparation: Before training the linear data of traffic flow, the data needs to be divided into training and testing segments. Assume that the total length of the data is L, the length of the data training segment is N, and the length of the data testing segment is M, satisfying the constraint condition L = N + M, where N >> M. The data segment is represented as [X1 X2 … X L ], the divided training data segment [X1 X2 … X N ] is used for model training and testing data segment [X N+1 X N+2 … X N+M ] is used for model prediction and evaluation. For dataset A and dataset B, the training data segments are divided as follows Fig.14 As shown;
[0116] (2) Stationarity test: Use ADF (Augmented Dickey-Fuller) unit root test to test the training data segment [X1 X2 … X N ] to perform a stationary test. If the data is non-stationary, it is necessary to perform a d-order difference operation on the data until the data is converted into a stationary series.
[0117] (3) Confirm model parameters: Calculate the autocorrelation coefficient (ACF) and partial autocorrelation coefficient (PACF) of the obtained stationary time series, and determine the order (p, q) of the ARIMA model by analyzing the ACF and PACF graphs. Fit the ARIMA model according to the determined order and estimate the model parameters. After determining the model parameters, observe whether the model residuals conform to the white noise sequence. If they do, the model prediction can be performed. Otherwise, the parameters are re-determined. The ARIMA model parameters after confirmation are as follows: Fig.15 As shown, p, d, and q correspond to the autoregression (AR), difference (I), and moving average (MA) parts respectively.
[0118] (4) Model prediction: During testing, the training data segment [X1 X2 … X N ] input the model, and the output of the model is [Y N+1 Y N+2 … Y N+M ], and then compare the output result with the measured data segment [X N+1 X N+2 … X N+M ]Compare.
[0119] The linear data prediction results of the ARIMA model for the traffic flow in the next day are as follows: Fig.16 As shown in (a), the linear data prediction results of traffic flow in the next week are as follows Fig.17 (a) shown.
[0120] Example 10
[0121] This embodiment further optimizes the present invention on the basis of Embodiment 8, and mainly introduces the prediction process of nonlinear data using the LSTM model. Fig.18 shown.
[0122] (1) Data preparation: Before training the nonlinear data of traffic flow, the data needs to be normalized and divided into training and test segments according to the format of LSTM model input data. In order to avoid the influence of different magnitude measurements on the convergence speed of the prediction model, normalization processing is required before prediction. By applying normalization technology, the learning efficiency of the model can be effectively improved, its prediction accuracy can be enhanced, and the convergence process of the model can be accelerated. Here, the linear function normalization method is adopted. The normalization formula is as follows:
[0123]
[0124] In the formula, X represents the actual value; X min Indicates the minimum value in the data segment; X max Indicates the maximum value in the data segment; X normRepresents the normalized value. After normalization, it still follows Fig.14 The data is divided into training and test data segments in a way. The data segment is represented as [X1 X2 … X L ], the divided training data segment [X1 X2 … X N ] is used for model training and testing data segment [X N+1 X N+2 … X N+M ] is used for predictive evaluation of the model.
[0125] (2) Model construction: Before starting to train the model, the model is initialized. The model constructed by the present invention includes an LSTM layer, which is subsequently connected to a fully connected layer. The number of input neurons in the LSTM layer is set to in, and the number of output neurons in the fully connected layer is set to out (out = M). The number of hidden neurons in the LSTM layer is set within the numerical range of in and out. For the two test scenarios of predicting one day and predicting one week, the model parameters are set as follows Fig.15 As shown, input_size corresponds to the number of neurons in the input layer of LSTM; hidden_size corresponds to the number of neurons in the hidden layer of LSTM; output_size corresponds to the number of neurons in the output layer of LSTM.
[0126] (3) Model training: Before training the model, the divided data segments are regularized to construct a supervised data set, including the input of the training set. x And output train y When the data is normalized, from the training data [X1 X2 … X N ]Starting from the first data and ending at the inth data, it is train x The first row of the data set corresponds to the train y The first row of the data set starts from the in+1th data and ends at the in+outth data. The same goes for the other rows until the train x The last row of data is [X N-in-out+1 X N-in-out+2 … X N-out ] until now. At this time, train y The last line of [X N-out+1 X N-out+2 … X N ], the training data segment is used up. The input train of the constructed training set x And the corresponding measured value train y as follows:
[0127]
[0128]
[0129] When training the model, x Input the initialized LSTM model and calculate the prediction result:
[0130]
[0131] Compare it with the measured value train y By comparison, the error coefficient of the model is calculated through the loss function MSE, and the weight is updated using the Adam optimization algorithm, with the goal of minimizing the loss function. Through continuous iteration, the model training and optimization are gradually realized. The number of model training times is as follows Fig.14 As shown in the figure, epoch corresponds to the number of LSTM training times.
[0132] (4) Model prediction: During testing, the test data segment test x =[X N-in+1 X N-in+2 … X N ], input the model, and the output of the model is predict = [Y A+1 Y N+2 … Y N+out ], and then compare the output result with the measured data segment test y =[X N+1 X N+2 … X N+out ] before comparison. Before comparison, the two sets of data should be denormalized to restore the original magnitude of the data. The denormalization formula is as follows:
[0133] X inver =X norm *(X max -X min )+X min (17)
[0134] Where, X inver represents the data after denormalization; the other parameters are the same as those in formula (7).
[0135] The LSTM model predicts the nonlinear data of traffic flow in the next day as follows: Fig.16 (b) shows the nonlinear data prediction results of traffic flow in the next week. Fig.17 (b) As shown. Combining the prediction results of the ARIMA model, the prediction results of the ARIMA-LSTM combined model are as follows: Fig.16 (c) Fig.17 (c) as shown.
[0136] Embodiment 11
[0137] This embodiment is based on the embodiment 10, and further optimizes the present invention. For the prediction results of the ARIMA-LSTM combination model obtained in embodiment 10, the evaluation indicators are selected: RMSE, MAPE and R 2 Conduct an assessment.
[0138] RMSE measures the deviation between the predicted value and the true value, and is sensitive to outliers in the data. It has the same measurement unit as the original data. The lower the RMSE value, the smaller the deviation between the predicted value and the actual value, which reflects the higher accuracy of the prediction. The calculation formula is as follows:
[0139]
[0140] MAPE is a relative measure of the degree of deviation between the predicted value and the actual value. The smaller the MAPE value, the better the prediction effect. MAPE less than 10% is generally considered a good prediction model. Between 10%-20%, it means that the prediction accuracy is acceptable, but it means there are some errors. More than 20% means that the prediction effect is not ideal, which indicates that there may be major problems with the prediction model. The calculation formula is as follows:
[0141]
[0142] R 2 It measures the linear correlation between two variables. Its value range is between 0 and 1. 2 When it is close to 1, it indicates that the independent variables in the model have a high degree of explanation for the dependent variables and the model has a good fitting effect; 2 When it is close to 0, it means that the model's ability to explain the variables is weak. The calculation formula is as follows:
[0143]
[0144] In the above formula, N represents the total number of predicted target data, y i represents the true value of the i-th sample, and y i ′ represents the predicted value of the i-th sample, Represents the mean of all samples.
[0145] Example 12
[0146] This embodiment further optimizes the present invention based on Embodiment 11.
[0147] The prediction method based on time series decomposition and ARIMA-LSTM combined model was constructed to conduct online testing and performance evaluation on the traffic flow data obtained by DAS in traffic monitoring. It was also compared with the ARIMA model and LSTM model that were trained and verified under the same conditions (same experimental data, same test scenario) (model parameter settings are as follows Fig.16 The prediction results of the three prediction models are shown in Fig.19 The evaluation results of the three prediction models are shown in Table 2. Fig. 20 shown.
[0148] Table 2 Comparison of prediction results of three prediction models
[0149]
[0150] From the data fitting curve of the prediction results and the evaluation index results, it can be seen that the ARIMA-LSTM combination model combines the advantages of the ARIMA model for linear data and the advantages of the LSTM model for nonlinear data. Compared with using the ARIMA model or LSTM model alone, the ARIMA-LSTM combination model performs better in prediction effect. From the degree of curve fitting, in the prediction of traffic flow data for one day and one week, the prediction results of the combination model are consistent with the overall trend of the actual traffic flow data, and the fitting effect is better than the single ARIMA model and LSTM model. From the evaluation index R 2 For the test scenario of predicting one day, the R 2 The value is 0.897, which is higher than 0.807 of the ARIMA model and 0.806 of the LSTM model. For the test scenario of predicting one week, the R 2 The value is 0.941, which is higher than 0.816 of the ARIMA model and 0.868 of the LSTM model. Analysis of the evaluation indicators RMSE and MAPE also shows that the prediction effect of the combined model is better than that of the ARIMA model and the LSTM model. In addition, in the test scenario of predicting one day, the MAPE value of the ARIMA-LSTM combined model is 14.855%, which is lower than 20%. This shows that although there are certain errors, the model can still achieve relatively accurate predictions. In practical applications, such an error level is acceptable, especially in complex time series analysis such as short-term traffic flow prediction that is affected by multiple factors. In the test scenario of predicting one week, the MAPE value of the model is 2.509%, which is lower than 10%, indicating that the ARIMA-LSTM combined model has excellent prediction effect on this time scale. This low error rate shows that the model can capture the long-term dependencies and periodic patterns in the time series, thereby making very accurate predictions of traffic flow changes in the next week.
[0151] By making short-term predictions of traffic volume in the coming day, the short-term management efficiency and responsiveness of urban traffic can be greatly improved. This fine-grained prediction allows traffic management departments and service providers to have a clear understanding of upcoming traffic conditions, so as to make quick decisions at critical moments. By making long-term predictions of traffic volume in the coming week, a solid data foundation is provided for the medium- and long-term planning and strategic deployment of urban traffic, revealing the traffic patterns and trends on different days of the week, which is crucial for balancing the traffic load throughout the week.
[0152] In summary, for the traffic flow data collected by the DAS system in traffic monitoring, the present invention proposes a prediction method based on time series decomposition and ARIMA-LSTM combined model. It can realize real-time estimation of traffic flow around the clock, and use the prediction algorithm to realize long-term and short-term reliable prediction of traffic flow.
[0153] Embodiment 13
[0154] This embodiment provides a traffic flow prediction system based on DAS, including:
[0155] The DAS data acquisition and spatiotemporal response diagram creation module is used to use the distributed optical fiber sensing DAS system to collect the vibration signal of the vehicle when it is driving, accumulate the vibration signal in the time domain to form a spatiotemporal response diagram, and segment the spatiotemporal response diagram to form a segmented spatiotemporal response diagram reflecting each road section;
[0156] The trajectory enhancement and vehicle flow estimation module is used to enhance the vibration response generated by the passing of vehicles in the segmented space-time response graph to obtain the enhanced segmented space-time response graph; use Hough transform to detect the parameters in the enhanced segmented space-time response graph, and estimate the traffic flow data based on the parameters;
[0157] The vehicle flow data prediction module is used to use time series decomposition to split the traffic flow data into linear and nonlinear parts, use the ARIMA model to predict the linear part, use the LSTM model to predict the nonlinear part, and combine the prediction results of the ARIMA model and the LSTM model as the final prediction result.
[0158] Embodiment 14
[0159] A computer device includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of a traffic flow prediction method based on DAS.
[0160] The computer device may be a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with the user through a keyboard, a mouse, a remote control, a touch pad, or a voice control device.
[0161] The memory includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or D interface display memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory can be an internal storage unit of the computer device, such as a hard disk or memory of the computer device. In other embodiments, the memory can also be an external storage device of the computer device, such as a plug-in hard disk equipped on the computer device, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Of course, the memory can also include both the internal storage unit of the computer device and its external storage device. In this embodiment, the memory is often used to store the operating system and various application software installed on the computer device, such as the program code of the traffic flow prediction method based on DAS, etc. In addition, the memory can also be used to temporarily store various types of data that have been output or are to be output.
[0162] The processor may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip in some embodiments. The processor is generally used to control the overall operation of the computer device. In this embodiment, the processor is used to run the program code stored in the memory or process data, such as running the program code of the DAS-based traffic flow prediction method.
[0163] Embodiment 15
[0164] A computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the processor executes the steps of a traffic flow prediction method based on DAS.
[0165] The computer-readable storage medium stores an interface display program, and the interface display program can be executed by at least one processor so that the at least one processor executes the steps of the above-mentioned DAS-based traffic flow prediction method.
[0166] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment method can be implemented by means of software plus a necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, disk, CD), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server or network device, etc.) to execute the DAS-based traffic flow prediction method described in the embodiment of the present application.
Claims
1. A traffic flow prediction method based on DAS, characterized in that: The following steps are involved: Step S1, DAS data collection and space-time response diagram creation; Use the distributed optical fiber sensing DAS system to collect the vibration signal of the vehicle when it is driving, accumulate the vibration signal in the time domain to form a time-space response diagram, and then segment the time-space response diagram to form a segmented time-space response diagram reflecting each road section; Step S2, trajectory enhancement and vehicle flow estimation; Enhance the vibration response caused by the vehicle passing by in the segmented time-space response diagram to obtain an enhanced segmented time-space response diagram; Hough transform is used to detect parameters in the enhanced segmented spatiotemporal response map, and traffic flow data is estimated based on the parameters; Step S3, traffic flow data prediction; Use time series decomposition to split the traffic flow data into linear and nonlinear parts. Use the ARIMA model to predict the linear part, and use the LSTM model to predict the nonlinear part. Combine the prediction results of the ARIMA model and the LSTM model as the final prediction result.
2. A DAS-based traffic flow prediction method as claimed in claim 1, characterized in that: In step S1, the specific method of forming the segmented spatiotemporal response map is: Taking the periodic trigger pulse as a signal acquisition cycle, the signal collected in this time unit is an exponentially decaying OTDR track distributed along the detection optical cable. The signal collected in the kth trigger pulse cycle is expressed as: L k ={t ki (i=1,2,…,N)}=[t k1 ,t k2 ,…,t kN ] The time response signal T of the i-th spatial acquisition point i It is expressed as: T i ={t ki (k=1,2,…,M)} Where i represents the spatial acquisition point number, N represents the total number of acquisition points, M represents the total number of trigger pulse cycles, and t ki Represents the signal of the ith acquisition point in the kth trigger pulse cycle; The optical time domain reflectometer is periodically refreshed by the periodic triggering of the acquisition pulse. As the trigger pulse period k increases, M acquired original OTDR tracks are continuously accumulated to construct a space-time signal response matrix LT with N spatial dimensions and M temporal dimensions: LT={t ki (k=1,2,…,M;i=1,2,…,N)} The spatiotemporal signal response matrix LT with N spatial dimensions and M temporal dimensions is segmented in the spatial dimension to obtain the spatiotemporal response diagram of vehicles traveling on different monitored sections within the time period, that is, the segmented spatiotemporal response diagram of each section.
3. A DAS-based traffic flow prediction method as claimed in claim 1, characterized in that: In step S2, the segmented spatiotemporal response map is enhanced to obtain an enhanced segmented spatiotemporal response map; wherein the enhancement method is binarization; The specific method of binarization is: Arbitrarily select a gray value t, and divide the histogram of the segmented spatiotemporal response map into two parts: A and B, corresponding to the foreground color and background color of the segmented spatiotemporal response map; the pixel averages of A and B are MA and MB respectively, the proportion of the number of pixels in part A to the total number of pixels is recorded as PA, and the proportion of the number of pixels in part B to the total number of pixels is recorded as PB; According to the inter-class variance function, t is updated in sequence so that the gray value t corresponding to the maximum ICV is the optimal binary gray threshold Q required by the maximum inter-class variance method; where the inter-class variance function is expressed as: ICV=PA×(MA-t) 2 +PB×(MB-t) 2 The grayscale value of the segmented spatiotemporal response map greater than Q is 1 in the binary map, and the grayscale value less than Q is 0 in the binary map; The OTSU method was used to obtain the binary segmented spatiotemporal response map of each monitoring section.
4. A DAS-based traffic flow prediction method as claimed in claim 3, characterized in that: In step S2, after the binarization enhancement process, the dilation and corrosion process in the image morphology process is also performed to obtain the enhanced segmented spatiotemporal response map, which is expressed as: The structure element SE is used to dilate and corrode the binary segmented spatiotemporal response map I, respectively, which can be expressed as: Among them, the structure element SE is used to perform an expansion operation on the binary segmented spatiotemporal response map I, which is specifically expressed as: The structure element SE is used to perform the corrosion operation on the binary segmented spatiotemporal response map I, which is specifically expressed as: Where I′ represents the binary segmented spatiotemporal response map after dilation and corrosion operations, and D I represents the domain of the binary segmented spatiotemporal response map I, D SE represents the domain of the structural element, (s, t) represents the pixel position in the output image, (x, y) represents the coordinates in the structural element SE, I(s+x, t+y) represents the pixel value of the binary segmented spatiotemporal response map I at the position (s+x, t+y), SE(x, y) represents the structural element D SE The pixel value at position (x, y), (s+x, t+y)∈D I Indicates that the pixel position in the output image is within the domain of the input image, (x, y)∈D SE Indicates that the pixel position in the structuring element is within the domain of the structuring element.
5. A DAS-based traffic flow prediction method as claimed in claim 4, characterized in that: In step S2, after the dilation and corrosion enhancement processing, denoising processing is also performed to obtain an enhanced segmented spatiotemporal response map, which is expressed as: The median filtering method is used to denoise the binary segmented spatiotemporal response image I′. The median filtering process can be expressed as: g(X,Y)=median{f(J,K),(J=X-1,X,X+1;K=Y-1,Y,Y+1)} in, Represents the original pixel grayscale value in the binary segmented spatiotemporal response image I′, represents the gray value of the pixel after median filtering, (X, Y) represents the pixel position in the output image, that is, the position of the current pixel to be calculated, (J, K) represents the pixel position in the input image, that is, the pixel position in the original image to be processed; (J=X-1, X, X+1; K=Y-1, Y, Y+1) represents a 3x3 area centered on the current pixel (X, Y), including its adjacent pixels above, below, left, right and on the diagonal.
6. The DAS-based traffic flow prediction method according to claim 1, characterized in that: In step S2, the straight line parameters of the moving vehicle trajectory are detected using Hough transform, specifically: The straight line in the image coordinate system of the segmented spatiotemporal response map is transformed into the parameter space (ρ, θ), and the transformation equation is: ρ=x`*coSθ+y`*sinθ Among them, ρ represents the vertical distance from the origin to the straight line, θ represents the angle between the horizontal axis and the perpendicular line of the straight line, and (x`, y`) represents the coordinates of the point on the straight line; According to the intersection of the curves in the parameter space (ρ, θ), the straight line parameters of the moving vehicle trajectory are obtained.
7. A DAS-based traffic flow prediction method as claimed in claim 6, characterized in that: The traffic flow data is estimated based on the straight line parameters of the moving vehicle trajectory. The specific method is as follows: Calculate the intersection of each vehicle trajectory and its extension line with the zero axis of space, set as t l , by t l Constitute the set W, then: Among them, t l represents the time point when the lth trajectory corresponds to the vehicle passing through the zero axis of space, (ρ l ,θ l ) is the parameter corresponding to the lth trajectory line; When the intersection t of the extension line of a trajectory line and the space zero axis exceeds the observation time period, it is not included in the vehicle flow counting range of this time period; let the intersection set after screening be Then we have: Among them, P represents the number of remaining trajectories after screening, t p Indicates the time point when the vehicle corresponding to the pth trajectory passes through the zero axis of the space; The same method is used to estimate the number of vehicles in different observation time windows to obtain the time series data of traffic flow.
8. A traffic flow prediction system based on DAS, characterized in that: include: The DAS data acquisition and spatiotemporal response diagram creation module is used to use the distributed optical fiber sensing DAS system to collect the vibration signal of the vehicle when it is driving, accumulate the vibration signal in the time domain to form a spatiotemporal response diagram, and segment the spatiotemporal response diagram to form a segmented spatiotemporal response diagram reflecting each road section; The trajectory enhancement and vehicle flow estimation module is used to enhance the vibration response caused by the passing of vehicles in the segmented time-space response diagram to obtain the enhanced segmented time-space response diagram; Hough transform is used to detect parameters in the enhanced segmented spatiotemporal response map, and traffic flow data is estimated based on the parameters; The vehicle flow data prediction module is used to use time series decomposition to split the traffic flow data into linear and nonlinear parts, use the ARIMA model to predict the linear part, use the LSTM model to predict the nonlinear part, and combine the prediction results of the ARIMA model and the LSTM model as the final prediction result.
9. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: A computer program is stored, and when the computer program is executed by a processor, the processor is caused to perform the steps of the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Traffic flow prediction method based on Transform space-time diagram convolutional network
CN114330671A
Cited By
Unsupervised distributed aerial optical cable anomaly detection method
CN119519827A
Vehicle flow statistical method, device and equipment based on vibration signals and storage medium
CN119832750A
Traffic flow counting method and device based on vibration signal, equipment and storage medium
CN119832750B
Road traffic flow situation detection method and system
CN121708740A
A highway traffic flow state detection method and system
CN121708740B
