Method and system for determining optimal aggregation interval for inter-urban intermittent traffic flow prediction
The optimal aggregation interval was calculated by using Fourier transform and autocorrelation analysis, which solved the problem of discontinuity and periodicity caused by signal control in urban traffic flow prediction and improved the prediction accuracy.
Patent Information
- Application Number
- CN202310476486.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-28
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2043-04-28
AI Technical Summary
Existing urban short-term traffic flow prediction models fail to effectively consider the intermittency and periodicity caused by factors such as signal control when processing urban traffic flow data, resulting in insufficient prediction accuracy.
The optimal aggregation interval is calculated using Fourier transform and autocorrelation analysis. The frequency-amplitude plot is obtained through Fourier transform, and the top m peak values are selected as candidate optimal aggregation intervals. The optimal aggregation interval is then determined through autocorrelation analysis, which reduces the volatility of traffic flow data and improves the accuracy of prediction.
It enables automated optimization calculation of traffic flow data, improving the accuracy of urban intermittent traffic flow prediction.
Smart Images

Figure CN116704749B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method for determining the optimal aggregation interval for urban intermittent traffic flow prediction, which is used to select the optimal aggregation interval when predicting urban intermittent traffic flow and belongs to the field of intelligent transportation. Background Technology
[0002] Traffic flow prediction is a crucial component of intelligent transportation systems. Real-time and accurate traffic flow forecasting is fundamental for implementing traffic management and guidance, and alleviating road congestion. Compared to the continuous traffic flow on highways, urban traffic flow is influenced by factors such as signal control, exhibiting intermittent, periodic, and random characteristics, making the accurate prediction of short-term urban traffic flow a greater challenge.
[0003] Most current urban short-term traffic flow prediction models often aggregate traffic flow data into fixed aggregation intervals such as 5 minutes or 10 minutes. However, they do not consider the impact of the periodicity of intermittent flow data on the aggregation time interval during the raw traffic flow data aggregation process; instead, they directly select fixed aggregation time intervals. This may lead to statistical fluctuations in the intermittent traffic flow time series. Most studies on the optimal aggregation time interval for traffic flow are based on continuous flow studies on highways, with relatively few studies specifically addressing the optimal aggregation time interval for urban short-term traffic flow.
[0004] Based on this, the present invention proposes an optimal aggregation interval determination method for urban intermittent traffic flow prediction, which reduces the statistical error caused by the convergence time interval and helps to improve the accuracy of urban intermittent traffic flow prediction. Summary of the Invention
[0005] The purpose of this invention is to provide a method for determining the optimal aggregation interval for predicting intermittent traffic flow in cities. This method addresses the intermittent and periodic characteristics of urban traffic flow caused by signal control, and can calculate the optimal aggregation interval time, reducing the volatility of traffic flow data and improving the accuracy of model predictions.
[0006] A first aspect of the present invention provides a method for determining the optimal aggregation interval for predicting intermittent traffic flow in cities, the method comprising the following steps:
[0007] S1: Preprocessing of raw traffic flow data and initial aggregation of raw data;
[0008] For traffic data, the traffic flow per t seconds is used as the minimum aggregation time window to perform preliminary aggregation on the original data sequence with a time length of T seconds, thus obtaining the time series.
[0009] S2: Calculation of the optimal aggregation interval candidate value based on Fourier transform;
[0010] S21: Obtain the Fourier transform results of the traffic flow data based on the time series;
[0011] S22: Calculate the amplitude of the Fourier transform result and plot the frequency-amplitude graph;
[0012] S23: Obtain the first m peak values of the Fourier amplitude;
[0013] S24: Select the duration corresponding to the first m peaks as the candidate value for the optimal aggregation interval.
[0014] S3: Precise calculation of the optimal aggregation interval based on autocorrelation analysis;
[0015] S31: Based on the candidate aggregation interval, perform autocorrelation analysis on five time series fluctuating within the maximum and minimum candidate period range with lag numbers [p1-5, pm+5].
[0016] S32: Solve for the autocorrelation coefficients for different lag values;
[0017] S33: If the largest lag order k is selected from the autocorrelation coefficients, then the optimal aggregation interval is m*k*t seconds.
[0018] Preferably, the traffic data includes license plate recognition data, microwave detection data, or coil detection data.
[0019] A second aspect of the present invention provides an optimal aggregation interval determination system for predicting intermittent traffic flow in cities, comprising:
[0020] The traffic flow raw data preprocessing and preliminary aggregation module performs preliminary aggregation on the traffic flow data, using the traffic flow passing through every t seconds as the minimum aggregation time window, to obtain the time series.
[0021] The optimal aggregation interval candidate value calculation module obtains the Fourier transform result of traffic flow data based on the time series; calculates the amplitude of the Fourier transform result and draws a frequency-amplitude diagram; obtains the first m peak values of the Fourier amplitude; and selects the duration corresponding to the first m peak values as the optimal aggregation interval candidate value.
[0022] The optimal aggregation interval calculation module performs autocorrelation analysis on five time series fluctuating within the maximum and minimum candidate period range, based on the candidate aggregation interval values, with lag numbers [p1-5, pm+5]. It solves for the autocorrelation coefficients of different lag values and selects the largest lag order k among the autocorrelation coefficients, thus determining the optimal aggregation interval as m*k*t seconds.
[0023] A third aspect of the present invention provides an optimal aggregation interval determination device for predicting intermittent traffic flow in cities, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the above-described optimal aggregation interval determination method.
[0024] In a fourth aspect, the present invention provides a computer-readable storage medium storing a computer program for performing the above-described optimal aggregation interval determination method.
[0025] Due to the adoption of the above technical solutions, the present invention has the following beneficial effects:
[0026] (1) To realize the automated optimization calculation of traffic flow aggregation interval, and avoid the unscientific nature of manually determining the aggregation interval.
[0027] (2) Aggregating traffic flow data based on the optimal aggregation time interval can effectively improve the prediction accuracy of urban intermittent traffic flow prediction models and provide decision support for the optimization of traffic management and control schemes. Attached Figure Description
[0028] Figure 1 The overall flowchart of the present invention.
[0029] Figure 2 Fourier transform spectrum of traffic flow time series.
[0030] Figure 3 Autocorrelation coefficients of traffic flow time series under different lag values.
[0031] Figure 4 Predicted MAPE using different models at different aggregation time intervals.
[0032] Figure 5 This invention provides a system structure diagram for determining the optimal aggregation interval for predicting intermittent traffic flow in urban areas.
[0033] Figure 6 This invention provides a structural diagram of an equipment for determining the optimal aggregation interval for predicting intermittent traffic flow in cities. Detailed Implementation
[0034] The present invention will be further described below with reference to the embodiments and accompanying drawings.
[0035] like Figure 1 As shown, the method embodiment of the present invention includes the following steps:
[0036] S1: Preprocessing of raw traffic flow data and initial aggregation of raw data.
[0037] S2: Calculation of the optimal aggregation interval candidate value based on Fourier transform;
[0038] S3: Precise calculation of the optimal aggregation interval based on autocorrelation analysis.
[0039] In a preferred embodiment, step S1 includes:
[0040] S11: Taking license plate recognition data as an example, the cross-sectional license plate recognition data is aggregated using the traffic flow every 5 seconds as the minimum aggregation time window. Preliminary aggregation is performed on the original data sequence with a time length of 3600 seconds (8:00-9:00) to obtain the time series. Where N is the number of time series.
[0041] In a preferred embodiment, step S2 includes:
[0042] S21: Use the following formula to solve for the Fourier transform results of traffic flow data.
[0043]
[0044] In the formula, X(u) is the Fourier transform value, N represents the length of the time series, j represents the imaginary number, u represents the u-th spectrum of the Fourier transform, and x... n This is a time series of traffic flow.
[0045] S22: Calculate the amplitude of the Fourier transform result in step S21, and plot the frequency-amplitude graph, as shown. Figure 2 As shown.
[0046] Ayy=abs(A*2) / N (2)
[0047] Where abs represents the modulo operation, A is the Fourier transform result, and N is the amount of data.
[0048] S23: Obtain the first m peak values of the Fourier amplitude in step S22, where m = 3.
[0049]
[0050] f m This represents the frequency corresponding to the m-th peak, and Topm represents the first m peaks sorted from largest to smallest. This indicates the frequency corresponding to the peak value.
[0051] S24: Select the duration p corresponding to the first m peaks of the discrete Fourier transform result. i The optimal aggregation interval options are [35, 35, 36].
[0052]
[0053] p i f represents the i-th peak frequency. i The corresponding period length.
[0054] In a preferred embodiment, step S3 includes:
[0055] S31: Based on the candidate aggregation interval (where p1 <= ... <= pm), perform autocorrelation analysis on five time series fluctuating within the maximum and minimum candidate period range with lag numbers [p1-5, pm+5].
[0056] S32: Use the following formula to solve for the autocorrelation coefficients of different lag values, such as Figure 3 As shown.
[0057]
[0058] Where k is the lag order.
[0059] S33: Select the autocorrelation coefficient r k If the lag order k is the largest, then the optimal aggregation interval is m*k*t seconds (m=1,2,…). In this case, the maximum correlation coefficient is 0.69, corresponding to a lag order k=36. Choosing m=1,2, the aggregation intervals are (1 / 2)*36*5=180 / 360 seconds respectively.
[0060] This embodiment uses different aggregation intervals to aggregate traffic flow to obtain different sequences, and applies different prediction models to predict the corresponding sequences. The results show that, among different prediction models, the sequences obtained by applying the aggregation intervals of this embodiment all achieve the best prediction results. Figure 4 As shown, 180 seconds or 360 seconds, or 3 minutes or 6 minutes, correspond to the lowest MAPE in the prediction results.
[0061] Figure 5 This invention provides an embodiment of an optimal aggregation interval determination system for predicting intermittent traffic flow in cities. The system includes:
[0062] The traffic flow raw data preprocessing and preliminary aggregation module is used to execute the following program: for traffic flow data, using the traffic flow passing through every t seconds as the minimum aggregation time window, the raw data sequence with a time length of T seconds is initially aggregated to obtain a time series.
[0063] The optimal aggregation interval candidate value calculation module is used to execute the following procedures: obtain the Fourier transform result of traffic flow data based on the time series; calculate the amplitude of the Fourier transform result and draw a frequency-amplitude diagram; obtain the first m peak values of the Fourier amplitude; and select the duration corresponding to the first m peak values as the optimal aggregation interval candidate values.
[0064] The optimal aggregation interval calculation module is used to execute the following program: based on the aggregation interval candidate values, perform autocorrelation analysis on five time series fluctuating within the maximum and minimum candidate period range with lag numbers [p1-5, pm+5]; solve for the autocorrelation coefficients of different lag values; select the largest lag order k among the autocorrelation coefficients, then the optimal aggregation interval is m*k*t seconds.
[0065] The embodiment of the optimal aggregation interval determination system of the present invention can be applied to network devices. The system embodiment can be implemented in software, hardware, or a combination of both. Taking software implementation as an example, as a logical device, it is formed by the processor of the device loading corresponding computer program instructions from non-volatile memory into memory and running them. The computer program is used for the optimal aggregation interval determination method for urban intermittent traffic flow prediction. From a hardware perspective, such as... Figure 6 The diagram shown is a hardware structure diagram of the optimal aggregation interval determination device for predicting intermittent traffic flow in cities according to the present invention. Except for... Figure 6 In addition to the processor, network interface, memory, and non-volatile memory shown, the device may also include other hardware for hardware-level expansion. On the other hand, this application also provides a computer-readable storage medium storing a computer program for executing a method for determining the optimal aggregation interval for urban intermittent traffic flow prediction.
[0066] For the computing device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative, and those skilled in the art can understand and implement them without creative effort.
[0067] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only.
[0068] It should also be noted that the terms “comprising,” “including,” or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.
[0069] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A method for determining the optimal aggregation interval for urban intermittent traffic flow prediction, characterized in that... The method includes the following steps: S1: Preprocessing of raw traffic flow data and initial aggregation of raw data; For traffic data, the traffic flow per t seconds is used as the minimum aggregation time window to perform preliminary aggregation on the original data sequence with a time length of T seconds, thus obtaining the time series; S2: Calculation of the optimal aggregation interval candidate value based on Fourier transform; S21: Obtain the Fourier transform results of the traffic flow data based on the time series; S22: Calculate the amplitude of the Fourier transform result and plot the frequency-amplitude graph; S23: Obtain the first m peak values of the Fourier amplitude; S24: Select the duration corresponding to the first m peaks as the candidate values for the optimal aggregation interval; S3: Precise calculation of the optimal aggregation interval based on autocorrelation analysis; S31: Based on the candidate aggregation interval, perform autocorrelation analysis on five time series fluctuating within the range of the maximum candidate period pm and the minimum candidate period p1, with a lag number of [p1-5, pm+5]. S32: Solve for the autocorrelation coefficients for different lag values; S33: Select the largest lag order k among the autocorrelation coefficients, then the optimal aggregation interval is m×k×t seconds.
2. The method for determining the optimal aggregation interval for urban intermittent traffic flow prediction according to claim 1, characterized in that: The traffic data includes license plate recognition data, microwave detection data, or coil detection data.
3. An optimal aggregation interval determination system for predicting intermittent traffic flow in cities, characterized in that, include: The traffic flow raw data preprocessing and preliminary aggregation module, for traffic flow data, uses the traffic flow passing through every t seconds as the minimum aggregation time window to perform preliminary aggregation on the raw data sequence with a time length of T seconds to obtain the time series; The optimal aggregation interval candidate value calculation module obtains the Fourier transform result of traffic flow data based on the time series; calculates the amplitude of the Fourier transform result and draws a frequency-amplitude diagram; obtains the first m peak values of the Fourier amplitude; and selects the duration corresponding to the first m peak values as the optimal aggregation interval candidate value. The optimal aggregation interval calculation module performs autocorrelation analysis on five time series fluctuating within the maximum and minimum candidate period range, based on the candidate aggregation interval values, with lag numbers [p1-5, pm+5]. It solves for the autocorrelation coefficients of different lag values and selects the largest lag order k among the autocorrelation coefficients, thus determining the optimal aggregation interval as m×k×t seconds.
4. An optimal aggregation interval determination device for predicting intermittent traffic flow in cities, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the optimal aggregation interval determination method according to any one of claims 1-2.
5. A computer-readable storage medium, characterized in that, The storage medium stores a computer program for executing the optimal aggregation interval determination method according to any one of claims 1-2.
Citation Information
Patent Citations
Power supply system cost prediction method considering multi-scale time series
CN113256020A
Short-term traffic flow prediction method based on spatio-temporal correlation
WO2020010717A1