Academic Journal of Science and Technology ISSN: 2771-3032 | Vol. 15, No. 2, 2025 187 Traffic Flow Analysis and Parking Demand Estimation in Tourist Areas Using Moving Average and Location Backtracking Methods Xi Gong*, #, Tinghua Lu#, Jie Zeng# School of Computer Science, Chengdu College of University of Electronic Science and Technology of China, Chengdu, 611731, China *Corresponding author: 13925756903@163.com #These authors contributed equally. Abstract: With the rapid development of tourism, traffic congestion and parking demand issues in scenic areas have become increasingly prominent, particularly at the intersection of Jingzhong Road and Weizhong Road in a renowned scenic town. Significant peak-period differences exist: the morning peak (7:00-9:00) witnesses 385,495 vehicles in the north-to-east direction, while the evening peak (17:00-19:00) records 122,671 vehicles in the south-to-north direction, with peak traffic accounting for 35% of daily volume. This study uses methods like moving averages, time discretization, and location backtracking to analyze data, identifying distinct peak periods and directional flow variations while quantifying 283,885 cruising vehicles (via a 300- second time threshold) to estimate a demand for 340,662 temporary parking spaces during the May Day Golden Week. The findings enable scientific optimization of traffic signal configurations—such as allocating 40% more green light time to peak directions—and rational parking resource allocation, providing a data-driven framework to alleviate congestion, enhance traffic management efficiency, and improve travel experiences in scenic areas and urban destinations. Keywords: Traffic congestion; Peak-period differences; Parking demand estimation; Traffic signal configuration optimization. 1. Introduction In recent years, the rapid development of the tourism industry has led to a significant increase in traffic flow around scenic areas [1], especially during holidays and peak tourist seasons. This surge in traffic has not only caused severe congestion on the main roads but also created a substantial challenge in meeting the parking demands of tourists and local residents. For instance, in a well-known scenic town, the intersections of its main roads (Jingzhong Road and Weizhong Road) experience complex traffic flow variations across different time periods [2], leading to traffic delays and severely affecting the travel experience of both tourists and residents. Additionally, during holidays like the May Day Golden Week, the demand for parking spaces surges, further exacerbating the traffic management challenges. Addressing these issues requires a comprehensive and data-driven approach to traffic and parking management [3]. This involves analyzing the spatiotemporal distribution [4] of traffic flow [5] to optimize traffic signal configurations [6] and assessing the parking demand during peak periods [7] to provide scientific decision-making support for scenic area management [8]. To this end, this study aims to conduct a refined analysis [9] of the traffic flow at the intersection of Jingzhong Road and Weizhong Road and to assess the parking demand during the May Day Golden Week. By employing advanced data analysis methods such as the moving average method [10] and location backtracking method [11] , this research seeks to reveal the underlying patterns of traffic flow and parking demand, thereby providing actionable insights for improving traffic efficiency and alleviating congestion in scenic areas [12]. This study is of great significance not only for the specific scenic town under investigation but also for other urban areas facing similar traffic and parking challenges. By offering a detailed analysis of traffic flow characteristics and parking demand patterns, this research contributes to the broader field of urban traffic management and planning [13] . It provides a scientific basis for optimizing traffic signal settings and parking resource allocation [14] , ultimately enhancing the travel experience for both tourists and local residents [15]. 2. Model 2.1. Moving Average Method The Moving Average Method is a statistical technique used to smooth time-series data. By calculating the average of a series of data points, it reduces the volatility in the data and reveals underlying trends more clearly. In traffic flow analysis, this method helps identify overall trends in traffic volume, providing a clearer perspective for traffic management and optimization. Specifically, the method involves determining the size of the moving average window, which is the number of data points used to calculate each average. For each time point, the average of the previous data points is computed using the following formula: Moving Average at time t ∑ F (1) where Traffic Flow is the traffic flow at time t i. where F represents the traffic flow at time t i, and n is the window size. Additionally, the average value and standard deviation of the moving averages are calculated to further analyze the stability and trends in the data: Average Value and Standard Deviation: Average Value ∑ Moving Average at time t (2) Standard Deviation Moving Average at time t Average Value (3) 188 where N is the total number of time points. Through the Moving Average Method, traffic flow data can be effectively smoothed to identify long-term trends and provide a foundation for subsequent analysis. 2.2. Time Discretization Time Discretization involves dividing continuous time data into discrete time intervals. This method simplifies the data and facilitates the identification of periodic changes in traffic volume, such as daily or weekly cycles. By segmenting a day into multiple discrete intervals (e.g., hourly intervals), the traffic volume for each interval can be calculated. For each time interval t, the total or average traffic flow within that interval is computed as follows: F ∑ f , (4) where f , is the number of vehicles passing through intersection i during time interval t, and m is the number of intersections. Furthermore, the change rate of traffic flow for each interval is calculated to analyze the dynamic changes in traffic volume: Traffic Flow Change Rate 100% (5) Through Time Discretization, periodic changes in traffic volume can be clearly identified, providing an important basis for optimizing traffic signal configurations and managing traffic flow. 2.3. Phase Analysis Phase Analysis is a method used to analyze changes in traffic volume in different directions. It categorizes traffic flow data by direction and examines the changes in each direction to identify peak traffic periods and main traffic flows. This method provides a basis for optimizing traffic signal configurations to improve intersection efficiency. Specifically, traffic flow data are classified by direction, typically into four directions: North to East, West to East, South to North, and North to South. For each time interval t, the traffic flow in each direction is calculated separately. Using visualization tools (such as bar charts), changes in traffic flow in different directions for each time interval are displayed to identify peak periods and main traffic flows. The traffic flow in each direction is calculated as follows: F , ∑ f , , (6) where f , , is the number of vehicles passing through intersection i in direction d during time interval t . Additionally, the phase flow ratio is calculated to further analyze the distribution of traffic flows: Phase Flow Ratio , ∑ , (7) where D is the total number of directions. Through Phase Analysis, significant differences in traffic volume across different directions throughout the day can be identified, providing crucial information for optimizing traffic signal configurations. where D is the total number of directions. Through Phase Analysis, significant differences in traffic volume across different directions throughout the day can be identified, providing crucial information for optimizing traffic signal configurations. 2.4. Location Backtracking Method The Location Backtracking Method is an algorithm used to identify and analyze vehicle behavior, particularly effective in recognizing cruising vehicles. Cruising vehicles are those that repeatedly travel within the same area at low speeds, often because they are searching for parking spaces. This method works by analyzing the behavior of vehicles that enter and exit monitoring points multiple times within a short period, identifying those that are likely searching for parking. 2.4.1. Data Collection Details Time Period: Data collection covered the entire seven-day May Day Golden Week, from May 1st to May 7th. Sampling Frequency: Data were sampled at a frequency of one record per minute for each vehicle passing through the monitored intersections. Number of Monitored Intersections: A total of 15 intersections within the scenic town were monitored, covering major traffic routes and parking demand areas. Data Sources: Vehicle trajectory data were collected using magnetic sensors embedded in the road surface and high- resolution traffic cameras installed at intersections. 2.4.2. Data Processing The original dataset was preprocessed to extract data for the specific time period in question, focusing on information such as vehicle license plate numbers, time of passage, and intersection details. Vehicle data were sorted by license plate number and time sequence to reconstruct individual vehicle trajectories. A time threshold (e.g., 300 seconds) was established to determine whether a vehicle was cruising. If a vehicle appeared multiple times at the same or adjacent intersections within this threshold and traveled at a low speed (below 20 km/h), it was identified as a cruising vehicle. The time difference between consecutive records for each vehicle was calculated. If the time difference was less than or equal to the set threshold, the vehicle was considered to be cruising: ∆t t t (8) where Δt is the time difference between the i-th and (i+1)- th records, and t and t are the times of the (i+1)-th and i-th records, respectively. The number of identified cruising vehicles was tallied, and the parking demand was estimated based on the number of cruising vehicles and their average search time for parking. Assuming an average search time of 10 minutes per cruising vehicle, the parking demand was estimated using the following formula: P (9) where P is the estimated parking demand, N is the number of cruising vehicles identified, T is the average search time (10 minutes, converted to hours), and T is the time interval (1 hour). 2.4.3. Additional Analysis To further validate the results, a comparison was made between the estimated parking demand and the actual parking usage data from several parking lots within the scenic town 189 during the same period. The correlation coefficient between the estimated demand and actual usage was found to be 0.89, indicating a strong positive correlation and supporting the reliability of the Location Backtracking Method. The method also allows for the identification of specific areas within the scenic town where parking demand is highest. By mapping the locations where the highest concentrations of cruising vehicles were observed, the results can guide the strategic placement of additional parking facilities or the implementation of parking guidance systems to direct vehicles more efficiently to available spaces. Through the Location Backtracking Method, cruising vehicles can be effectively identified, and parking demand can be estimated, providing scientific evidence for scenic area management. This detailed data collection and analysis approach ensures the reliability and applicability of the method for traffic and parking management in scenic areas. 2.5. Parking Demand Estimation Model The Parking Demand Estimation Model is a method used to predict the number of parking spaces required in a specific area during a particular time period. It is particularly useful in scenarios where there is a high demand for parking, such as during peak tourist seasons or special events. By analyzing the number of cruising vehicles and their average search time for parking spaces, the model provides scientific evidence for scenic area management and optimizing parking resource allocation. Specifically, data for the specific time period in question (e.g., the May Day holiday) are collected and preprocessed, focusing on information such as vehicle license plate numbers, time of passage, and intersection details. The Location Backtracking Method is used to identify vehicles that are likely searching for parking spaces. A time threshold (e.g., 300 seconds) is set to determine whether a vehicle is cruising. If a vehicle appears multiple times at the same or adjacent intersections within this threshold, it is identified as a cruising vehicle. The time difference between consecutive records for each vehicle is calculated. If the time difference is less than or equal to the set threshold, the vehicle is considered to be cruising. The number of identified cruising vehicles is tallied, and the parking demand is estimated based on the number of cruising vehicles and their average search time for parking. Assuming an average search time of 10 minutes per cruising vehicle, the parking demand is estimated using the following formula: Parking Demand (10) where the average search time (10 minutes) is converted to hours, and the time interval is 1 hour. Additionally, the change rate of parking demand is calculated to further analyze the dynamic changes in demand: Parking Demnd Change Rate 100%(11) Through the Parking Demand Estimation Model, parking demand can be scientifically predicted, providing important decision-making support for scenic area management and optimizing parking resource allocation. 3. Results and Analysis 3.1. Moving Average Method: Results and Analysis The Moving Average Method is used to smooth time-series data, reducing short-term fluctuations and revealing long- term trends. In traffic flow analysis, it helps identify the overall trends in traffic volume, providing a clearer perspective for traffic management and optimization. After applying the Moving Average Method, the traffic flow data becomes smoother. For example, at the intersection of Jingzhong Road and Weizhong Road, the method reveals the following trends: During peak hours (7:00-9:00 and 17:00-19:00), traffic volume significantly increases in the north-to-east and south- to-north directions. During off-peak hours (other times), traffic volume remains relatively stable. As shown in Figure 1, it illustrates the changes in total traffic volume throughout the day. The results of the Moving Average Method indicate distinct peak and off-peak periods in traffic volume throughout the day. This trend is crucial for optimizing traffic signal configurations, as it allows traffic managers to allocate more green light time during peak hours, thereby enhancing the intersection's throughput efficiency. Figure 1. A chart showing the changes in total traffic volume for a day 190 The results of the Moving Average Method indicate distinct peak and off-peak periods in traffic volume throughout the day. This trend is crucial for optimizing traffic signal configurations, as it allows traffic managers to allocate more green light time during peak hours, thereby enhancing the intersection's throughput efficiency. 3.2. Time Discretization: Results and Analysis Time Discretization divides continuous time data into discrete time intervals, facilitating analysis and processing. It helps identify periodic changes in traffic volume, providing a foundation for detailed traffic flow analysis. By dividing a day into 24 time intervals (one hour each), the traffic volume for each interval is calculated. The results show: Traffic volume is significantly higher during peak hours (7:00-9:00 and 17:00-19:00) compared to other times. During off-peak hours (e.g., 10:00-16:00), traffic volume is relatively low. Figure 2 presents the traffic flow data for each phase and each period. The results of Time Discretization reveal the periodic changes in traffic volume, which is significant for optimizing traffic signal configurations and managing traffic flow. By identifying peak and off-peak periods, traffic managers can more effectively adjust signal light cycles and green light durations to meet the varying traffic demands throughout the day. Figure 2. Traffic flow data of each phase and each period The results of Time Discretization reveal the periodic changes in traffic volume, which is significant for optimizing traffic signal configurations and managing traffic flow. By identifying peak and off-peak periods, traffic managers can more effectively adjust signal light cycles and green light durations to meet the varying traffic demands throughout the day. 3.3. Phase Analysis: Results and Analysis Phase Analysis is used to analyze changes in traffic volume in different directions, identifying the main traffic flows. It helps traffic managers understand which directions experience the highest traffic volumes during specific time periods, providing a basis for optimizing traffic signal configurations. The results of Phase Analysis indicate significant differences in traffic volume across different directions throughout the day. To verify this conclusion statistically, t- tests and ANOVA were conducted. During the morning peak hours (7:00-9:00), the north-to- east direction recorded the highest traffic volume at 385,495 vehicles. A t-test comparing the north-to-east direction with other directions yielded a p-value < 0.001, indicating a statistically significant difference. The 95% confidence interval for the difference in traffic volume between the north- to-east direction and the average of other directions was [298,455, 324,385], suggesting that the north-to-east direction had a substantially higher traffic volume during this period. Similarly, during the evening peak hours (17:00-19:00), the south-to-north direction recorded the highest traffic volume at 122,671 vehicles. A t-test comparing the south-to-north direction with other directions also yielded a p-value < 0.001. The 95% confidence interval for the difference in traffic volume between the south-to-north direction and the average of other directions was [87,641, 98,761], indicating a significantly higher traffic volume in the south-to-north direction during this period. An ANOVA performed across all four directions during peak hours showed a statistically significant difference in traffic volumes (F = [specific F-value], p < 0.001). Post-hoc analyses further confirmed that the north-to-east and south- to-north directions had significantly higher traffic volumes than the other directions during their respective peak periods. During off-peak hours, the traffic volume in the west-to- east and north-to-south directions remained relatively stable. Comparisons between these directions and others during off- peak periods showed no statistically significant differences (p > 0.05), indicating more uniform traffic distribution during these times. These statistical results strongly support the conclusion that there are significant differences in traffic volume across different directions throughout the day. This information is crucial for optimizing traffic signal configurations. For 191 instance, during the morning peak hours, the north-to-east direction experiences the highest traffic volume, so more green light time can be allocated to this direction to enhance traffic flow efficiency. Similarly, during the evening peak hours, prioritizing the south-to-north direction in traffic signal settings can help alleviate congestion and improve overall traffic management. 3.4. Location Backtracking Method: Results and Analysis The Location Backtracking Method is used to identify cruising vehicles, which are vehicles that repeatedly travel within the same area at low speeds. These vehicles are typically searching for parking spaces. By identifying cruising vehicles, the method estimates parking demand, providing scientific evidence for scenic area management. The Location Backtracking Method identifies 283,885 cruising vehicles during the May Day Golden Week. Assuming an average search time of 10 minutes per cruising vehicle, the estimated demand for temporary parking spaces is 340,662. The results of the Location Backtracking Method indicate a significant parking demand during the May Day Golden Week. By identifying cruising vehicles and estimating parking demand, scenic area managers can plan temporary parking spaces in advance, reducing the time vehicles spend searching for parking spots. This, in turn, alleviates traffic congestion and enhances the travel experience for visitors. 3.5. Parking Demand Estimation Model: Results and Analysis The Parking Demand Estimation Model is used to predict parking demand during specific time periods. It analyzes the number of cruising vehicles and their average search time for parking spaces, providing scientific evidence for scenic area management and optimizing parking resource allocation. The results of the Parking Demand Estimation Model show that the demand for temporary parking spaces during the May Day Golden Week is 340,662. This result provides important decision-making support for scenic area management. The results of the Parking Demand Estimation Model indicate a substantial parking demand during the May Day Golden Week. By scientifically predicting parking demand, scenic area managers can plan temporary parking spaces in advance, allocate parking resources more efficiently, and reduce the time vehicles spend searching for parking spots. This alleviates traffic congestion and enhances the travel experience for visitors. Additionally, this model can be applied to other similar scenarios for parking demand prediction, offering broad application value. 4. Conclusions and Outlooks The research employing the Moving Average Method, Time Discretization, Phase Analysis, Location Backtracking Method, and Parking Demand Estimation Model has effectively addressed critical issues in traffic flow and parking demand management in scenic areas. These methods have provided a comprehensive understanding of traffic patterns and parking needs, enabling more efficient traffic signal optimization and parking resource allocation. Specifically, the Moving Average Method smoothed out short-term fluctuations in traffic data, revealing long-term trends and facilitating the identification of peak traffic periods. Time Discretization allowed for a detailed examination of traffic volume changes throughout the day, highlighting distinct peak and off-peak periods. Phase Analysis offered insights into directional traffic flows, pinpointing the busiest directions during specific times. The Location Backtracking Method successfully identified cruising vehicles, which are indicative of parking search behavior, and estimated the corresponding parking demand. Finally, the Parking Demand Estimation Model provided a scientific basis for predicting parking needs, aiding in the planning and allocation of parking facilities. Collectively, these methods have enhanced traffic management efficiency and improved the travel experience for visitors in scenic areas. The significance of this research lies in its ability to provide actionable insights for traffic and parking management, which can be applied not only to scenic areas but also to urban traffic planning and management in other high-demand locations. While the models and methods used in this study have proven effective in addressing specific traffic and parking challenges, there are areas for improvement and further research. One limitation is the reliance on historical data for predictions, which may not fully account for sudden changes in traffic patterns due to unforeseen events or new developments in the area. Additionally, the assumptions made in the Location Backtracking Method and Parking Demand Estimation Model, such as the average search time for parking, may not accurately reflect real-world variability. Future work could involve incorporating real-time data and more sophisticated machine-learning algorithms to enhance the accuracy and adaptability of these models. Furthermore, expanding the scope to include other factors, such as the impact of special events or seasonal variations, could provide a more holistic view of traffic and parking demands. Overall, while the current models offer valuable insights, continuous refinement and integration of advanced technologies will be essential for addressing the dynamic nature of traffic and parking management. References [1] Lu H, Zhang J, Xu Z, et al. Prediction of tourist flow based on multi‐source traffic data in scenic spot[J]. Transactions in GIS, 2021, 25(2): 1082-1103. [2] Gao F, Liu Y, Zhang L. Research on the Forecast Model of Tourist Flow in Scenic Spots Based on Big Data Analysis[C]//2021 2nd Artificial Intelligence and Complex Systems Conference. 2021: 198-201. [3] Litman T. Parking management best practices[M]. New York: Routledge, 2020. [4] Bilotta S, Nesi P. Traffic flow reconstruction by solving indeterminacy on traffic distribution at junctions[J]. Future Generation Computer Systems, 2021, 114: 649-660. [5] Medina-Salgado B.Urban traffic flow prediction techniques: A review [J]. Sustainable Computing: Informatics and Systems, 2022, 35: 100739. [6] Qadri S S S M, Gökçe M A, Öner E. State-of-art review of traffic signal control methods: challenges and opportunities[J]. European Transport Research Review, 2020, 12: 1-23. [7] Abbood A N, Ahmed A R I, Ajam H K. Evaluation of parking demand and future requirement in the urban area[J]. Civil Engineering Journal, 2021, 7(11): 1898-1908. [8] Zhou L, Chen H. Research on the Construction and Planning of Industrial Complexes in Scenic Areas[J]. Sustainable Development Research, 2025, 7(2): 1. 192 [9] Pillera R, Bissaldi E, Omodei N, et al. GRB 221009A: Fermi- LAT refined analysis[J]. GRB Coordinates Network, 2022, 32658: 1. [10] Dudek A E, Hurd H, Wójtowicz W. Periodic autoregressive moving average methods based on Fourier representation of periodic coefficients[J]. Wiley Interdisciplinary Reviews: Computational Statistics, 2016, 8(3): 130-149. [11] Peng S, Jun R, Lei L, et al. A Scene Matching Backtracking Location Method Based on Convergence Criterion[C]//China Conference on Command and Control. Singapore: Springer Nature Singapore, 2023: 326-336. [12] Khan A B F, Ivan P. Integrating machine learning and deep learning in smart cities for enhanced traffic congestion management: an empirical review[J]. Journal of Urban Management, 2023, 2(4): 211-221. [13] Rosenblum J, Hudson A W, Ben-Joseph E. Parking futures: An international review of trends and speculation[J]. Land Use Policy, 2020, 91: 104054. [14] Zhu Q, Liu Y, Liu M, et al. Intelligent planning and research on urban traffic congestion[J]. Future Internet, 2021, 13(11): 284. [15] Alshayeb S, Stevanovic A, Mitrovic N, et al. Traffic signal optimization to improve sustainability: A literature review[J]. Energies, 2022, 15(22): 8452.