Method for predicting traffic flow in region based on Internet
By dividing traffic flow data into short-term, medium-term and long-term time periods, normalized analysis and outlier processing, combined with trend characteristics evaluation values, the problems of data singularity and outlier impact in the existing technology are solved, and traffic is improved Accuracy and reliability of traffic forecasts.
Patent Information
- Application Number
- CN202411472084.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-22
- Publication Date
- 2024-12-27
AI Technical Summary
Existing traffic flow prediction methods are usually based on data from a single historical time period, which is difficult to fully reflect the traffic flow change pattern, and fail to effectively handle abnormal data, resulting in inaccuracy and reliability of the prediction results.
Using the Internet-based intra-regional traffic flow prediction method, by dividing the data into short-term, medium-term and long-term collection time periods, normalized analysis and outlier elimination, combined with trend characteristic evaluation values, multi-dimensional data is used for prediction, and dynamic adjustment is made. Weight factor to improve prediction accuracy.
Multi-dimensional and comprehensive data analysis is realized, data processing efficiency and quality are improved, outliers have reduced the impact of outliers on predictions, and improved the accuracy and reliability of traffic flow prediction.
Smart Images

Figure CN119207093A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of traffic flow prediction, and in particular to a method for predicting regional traffic flow based on the Internet. Background Art
[0002] In recent years, with the acceleration of urbanization, the status of transportation in urban development has become increasingly prominent. Accurate prediction of regional traffic flow is of vital importance to urban planning, traffic management and residents' travel arrangements. In the operation of the transportation system, traffic flow is affected by many factors and presents complex dynamic changes. On the one hand, there are significant differences in traffic flow in different time periods, such as weekdays and weekends, holidays and weekdays; on the other hand, sudden events, such as large-scale events, bad weather, etc., will also have a significant impact on traffic flow, resulting in large fluctuations in traffic flow in the short term.
[0003] At present, there are the following problems in the prediction method of regional traffic flow:
[0004] (1) Existing traffic flow forecasting usually only uses the original traffic flow data within a single historical time period as the prediction basis. This method can only collect and analyze data from a single dimension, which is difficult to fully reflect the changing pattern of traffic flow, making the prediction basis too limited and one-sided. At the same time, it is impossible to guarantee the representativeness and value of the data, which in turn affects the accuracy of the traffic flow prediction results.
[0005] (2) Existing predictions of regional traffic flow often directly use the collected historical traffic flow data, ignoring the elimination of outliers in the data. These outliers will interfere with subsequent traffic flow predictions, thereby reducing the reliability of the prediction results and even leading to invalid predictions.
[0006] In order to solve the above defects, a technical solution is now provided. Summary of the invention
[0007] The purpose of the present invention is to provide an Internet-based method for predicting regional traffic flow to solve the problems raised in the above background.
[0008] The purpose of the present invention can be achieved by the following technical solution: A method for predicting regional traffic flow based on the Internet, comprising the following steps:
[0009] Step 1: The area to be predicted for traffic flow is recorded as a marked area, and the time period to be predicted for traffic flow is recorded as a target time period, and a short-term collection time period set, a medium-term collection time period set, and a long-term collection time period set are determined according to the target time period;
[0010] Step 2: Obtain the historical traffic flow data of the marked area for the short-term collection time period set, the medium-term collection time period set, and the long-term collection time period set from the traffic flow detection platform;
[0011] Step 3: normalize and analyze the historical traffic flow data of the marked areas of the short-term collection time period set, the medium-term collection time period set, and the long-term collection time period set to obtain the normalized values of the historical traffic flow data of each marked area corresponding to the short-term collection time period set, the medium-term collection time period set, and the long-term collection time period set;
[0012] Step 4: Analyze and process the normalized values of the historical traffic flow data of each marked area corresponding to the short-term collection time period set, the medium-term collection time period set, and the long-term collection time period set to obtain valid data in the historical traffic flow data of the marked area corresponding to the short-term collection time period set, the medium-term collection time period set, and the long-term collection time period set;
[0013] Step 5: Use the historical traffic flow valid data of the marked area corresponding to the short-term collection time period set and the medium-term collection time period set to predict the traffic flow of the marked area corresponding to the target time period, and obtain the short-term marked area predicted traffic flow and the medium-term marked area predicted traffic flow;
[0014] Step 6: Analyze the trend characteristic evaluation value of the valid historical traffic flow data of the marked area corresponding to the long-term collection time period set to obtain the trend characteristic evaluation value of the long-term marked area traffic flow;
[0015] Step 7: Substitute the short-term marked area predicted traffic flow, the medium-term marked area predicted traffic flow and the long-term marked area traffic flow trend characteristic evaluation value into the set prediction model to predict the traffic flow of the marked area corresponding to the target time period, thereby obtaining the traffic flow of the marked area corresponding to the target time period.
[0016] Furthermore, the steps of determining the short-term collection time period set, the medium-term collection time period set and the long-term collection time period set according to the target time period are as follows:
[0017] 101: taking the same time period of the date before the date corresponding to the target time period as the last collection time period in the short-term collection time period set, and then calculating backwards from the last collection time period by the set number of short-term collection samples to obtain a starting collection time period in the short-term collection time period set, and all the same time periods between the starting collection time period and the last collection time period constitute the short-term collection time period set;
[0018] 102: starting a collection time period in the mid-term collection time period set by counting backwards from the last collection time period by the set number of mid-term collection samples, and all the same time periods between the starting collection time period and the last collection time period constitute the mid-term collection time period set;
[0019] 103: Obtain the year corresponding to the target time period from the target time period, and use the same time period in the previous year of the year corresponding to the target time period as the last collection time period in the long-term collection time period set, thereby reversing the last collection time period with the set number of long-term collection samples to obtain a starting collection time period in the long-term collection time period set, and all the same time periods between the starting collection time period and the last collection time period constitute the short-term collection time period set.
[0020] Furthermore, the historical traffic flow data of the marked area of the short-term collection time period set, the medium-term collection time period set and the long-term collection time period set are normalized and analyzed. The specific analysis method is as follows:
[0021] 301: Obtain the historical traffic flow data of each marked area corresponding to the short-term collection time period set and mark it as JL i 短 ,i represents the number of the historical traffic flow data of the marked area corresponding to the short-term collection time period set, i=1,2,....,m,m represents the total number of the historical traffic flow data numbers of the marked area corresponding to the short-term collection time period set, and the average value is calculated at the same time to obtain the average marked area traffic flow corresponding to the short-term collection time period set, and it is marked as According to the formula Calculate the discrete degree value σ of the historical traffic flow data of the marked area corresponding to the short-term collection time period set, and e is expressed as a natural constant;
[0022] 302: Compare the discrete degree value of the historical traffic flow data of the marked area corresponding to the short-term collection time period set with the set discrete degree threshold. When the discrete degree value of the historical traffic flow data of the marked area corresponding to the short-term collection time period set is less than or equal to the set discrete degree threshold, the historical traffic flow data of each marked area corresponding to the short-term collection time period set is analyzed according to the set formula model 1: Get the normalized value of historical traffic flow data of each marked area corresponding to the short-term collection time period set JL max It is represented by the maximum traffic flow data in the historical traffic flow data of the marked area corresponding to the short-term collection time period set, JL min It is represented as the minimum traffic flow data in the historical traffic flow data of the marked area corresponding to the short-term collection time period set;
[0023] When the discrete degree value of the historical traffic flow data of the marked area corresponding to the short-term collection time period set is greater than the set discrete degree threshold, the historical traffic flow data of each marked area corresponding to the short-term collection time period set is calculated according to the set formula model 2: Get the normalized value of historical traffic flow data of each marked area corresponding to the short-term collection time period set
[0024] Thus, the normalized value of the historical traffic flow data of each marked area corresponding to the short-term collection time period set is obtained;
[0025] 303: Perform the same operation as steps 301 and 302 on the historical traffic flow data of the marked areas corresponding to the mid-term collection time period set and the long-term collection time period set, thereby obtaining the normalized value of the historical traffic flow data of each marked area corresponding to the mid-term collection time period set. The normalized value of the historical traffic flow data of each marked area corresponding to the long-term collection time period set j represents the number of historical traffic flow data in the marked area corresponding to the medium-term collection time period set, j = 1, 2, ...., n, n represents the total number of historical traffic flow data numbers in the marked area corresponding to the medium-term collection time period set, f represents the number of historical traffic flow data in the marked area corresponding to the long-term collection time period set, f = 1, 2, ...., g, g represents the total number of historical traffic flow data numbers in the marked area corresponding to the long-term collection time period set.
[0026] Furthermore, the normalized values of the historical traffic flow data of each marked area corresponding to the short-term collection time period set, the medium-term collection time period set and the long-term collection time period set are analyzed and processed, and the specific execution steps are as follows:
[0027] 401: obtaining the normalization method of the historical traffic flow data of the marked area in the short-term collection time period set. If the normalization method is linear normalization, execute steps 402, 403, and 404. If the normalization method is nonlinear normalization, execute steps 405, 406, and 404.
[0028] 402: Calculate the average value of the normalized values of the historical traffic flow data of each marked area corresponding to the short-term collection time period set to obtain the average normalized value of the historical traffic flow data of the marked area corresponding to the short-term collection time period set, and mark it as
[0029] 403: According to the formula Calculate the normalized value deviation index of historical traffic flow data in each marked area corresponding to the short-term collection time period set
[0030] 404: Compare the normalized value deviation index of the historical traffic flow data of each marked area corresponding to the short-term collection time period set with the set normalized value deviation index threshold. When the normalized value deviation index of the historical traffic flow data of a marked area is greater than the set normalized value deviation index threshold, the historical traffic flow data of the marked area is determined to be abnormal data and the abnormal data is removed. Otherwise, the historical traffic flow data of the marked area is determined to be valid data and the valid data is retained.
[0031] Thus, the valid data of historical traffic flow in the marked area corresponding to the short-term collection time period set is obtained;
[0032] 405: Arrange the normalized values of the historical traffic flow data of each marked area corresponding to the short-term collection time period set in descending order, and extract the maximum value, minimum value, median value and mode value corresponding to the normalized value, thereby obtaining the maximum normalized value, minimum normalized value, median normalized value and mode normalized value of the historical traffic flow data of the marked area corresponding to the short-term collection time period set, and mark it as κ max , κ min , κ med , κ mod ;
[0033] According to the formula Calculate the normalized stability index φ of the historical traffic flow data of each marked area corresponding to the short-term collection time period set i , w1, w2, w3, w4 represent the set weight factors respectively;
[0034] The maximum normalized stability index is selected from the normalized stability index of the historical traffic flow data of each marked area corresponding to the short-term collection time period set, and the historical traffic flow data of the marked area corresponding to the maximum normalized stability index is extracted, and then the normalized value corresponding to the historical traffic flow data of the marked area is taken as the expected normalized value, which is marked as κ 期望 ;
[0035] 406: According to the formula Calculate the normalized value deviation index of historical traffic flow data in each marked area corresponding to the short-term collection time period set
[0036] 407: Perform the same operation as steps 401-406 on the normalized values of the historical traffic flow data of each marked area corresponding to the mid-term collection time period set and the long-term collection time period set, thereby obtaining the valid historical traffic flow data of the marked area corresponding to the mid-term collection time period set and the valid historical traffic flow data of the marked area corresponding to the long-term collection time period set.
[0037] Furthermore, the effective data of historical traffic flow in the marked area corresponding to the short-term collection time period set is used to predict the traffic flow in the marked area corresponding to the target time period, and the specific execution steps are:
[0038] 501: obtaining a normalization method for the historical traffic flow data of the marked area in the short-term collection time period set, if the normalization method is linear normalization, executing step 502, if the normalization method is nonlinear normalization, executing step 503;
[0039] 502: Calculate the average value of the historical traffic flow valid data of the marked area in the short-term collection time period set, and obtain the average value of the historical traffic flow valid data of the marked area in the short-term collection time period set as the short-term marked area predicted traffic flow, denoted as YJ 短 ;
[0040] 503: Calculate the normalized stability index of the valid historical traffic flow data of the marked area in the short-term collection time period set, obtain the normalized stability index corresponding to the valid historical traffic flow data of each marked area in the short-term collection time period set, and select the marked area historical traffic flow data corresponding to the maximum normalized stability index as the short-term marked area predicted traffic flow, denoted as YJ 短 ;
[0041] 504: According to the same operation steps as steps 501 and 502, the traffic flow of the marked area corresponding to the target time period is predicted for the marked area according to the valid historical traffic flow data of the mid-term collection time period set, and the predicted traffic flow of the mid-term marked area is obtained, which is recorded as YJ 中 .
[0042] Furthermore, the effective data of historical traffic flow in the marked area corresponding to the long-term collection time period set is analyzed for trend characteristic evaluation value, and the specific analysis method is as follows:
[0043] 601: Draw a two-dimensional dynamic coordinate system with time as the horizontal coordinate and traffic flow as the vertical coordinate, and annotate and connect the valid data of historical traffic flow of each marked area corresponding to the long-term collection time period set in the two-dimensional dynamic coordinate system to obtain a change curve of the valid data of historical traffic flow of the marked area corresponding to the long-term collection time period set;
[0044] 602: Obtain the slope of the valid data of historical traffic flow in each marked area corresponding to the long-term collection time period set, denoted as k s , s represents the number of valid data of historical traffic flow in each marked area corresponding to the long-term collection time period set, s=1,2,....,t, t represents the total number of valid data numbers of historical traffic flow in each marked area corresponding to the long-term collection time period set, and t∈{1,2,....,f,....,g};
[0045] 603: Obtaining the slope sign corresponding to the valid data of historical traffic flow in each marked area according to the slope of the valid data of historical traffic flow in each marked area corresponding to the long-term collection time period set, wherein the slope sign includes a positive slope sign and a negative slope sign, thereby counting the number of positive slope signs and the number of negative slope signs in the valid data of historical traffic flow in the marked area corresponding to the long-term collection time period set. When the number of positive slope signs is greater than the number of negative slope signs, it is determined that the slope sign feedback value is +1, otherwise, it is determined that the slope sign feedback value is -1;
[0046] 604: According to the formula Calculate the long-term marked area traffic flow trend characteristic evaluation value ω 长 .
[0047] Furthermore, the set prediction model is:
[0048] η represents the difference between the short-term predicted traffic flow and the long-term predicted traffic flow, α and β represent the weight factors corresponding to the short-term marked area predicted traffic flow and the medium-term marked area predicted traffic flow, respectively.
[0049] Beneficial effects of the present invention:
[0050] The present invention determines a short-term collection time period set, a medium-term collection time period set and a long-term collection time period set according to a target time period, thereby collecting historical traffic flow data of the marked area of the short-term collection time period set, the medium-term collection time period set and the long-term collection time period set, and uses this as the basis for traffic flow prediction in the marked area, thereby realizing multi-dimensional and comprehensive data analysis to a certain extent, avoiding the inaccuracy and limitations of the prediction results caused by a single data analysis.
[0051] The present invention normalizes and analyzes the historical traffic flow data of the marked area corresponding to the short-term, medium-term and long-term collection time period sets, maps the data to a unified scale, improves the efficiency of data processing, and makes all data at the same order of magnitude, providing strong data support for the subsequent acquisition of effective data.
[0052] The present invention can effectively identify abnormal data and perform corresponding elimination operations by conducting targeted analysis and processing on the normalized values and normalization methods of the historical traffic flow data of each marked area corresponding to the short-term, medium-term and long-term collection time period sets. This abnormal data processing mechanism can improve the quality of data, reduce the impact of abnormal values on traffic flow prediction, thereby improving the accuracy of the prediction, and effectively avoiding the occurrence of invalid predictions to a certain extent.
[0053] The present invention performs prediction by substituting the short-term marked area predicted traffic flow, the medium-term marked area predicted traffic flow and the long-term marked area traffic flow trend characteristic evaluation values into a set prediction model, comprehensively considering the prediction results of different time scales, and dynamically setting the weight factors corresponding to the short-term marked area predicted traffic flow and the medium-term marked area predicted traffic flow according to the difference between the short-term marked area predicted traffic flow and the long-term marked area predicted traffic flow, so that the traffic flow of the marked area corresponding to the target time period obtained in the end is more accurate and reliable to a certain extent. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] The present invention will be further described below in conjunction with the accompanying drawings.
[0055] Figure 1 It is a flow chart of the method of the present invention. DETAILED DESCRIPTION
[0056] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions 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. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0057] See also Figure 1 As shown, the present invention is a method for predicting regional traffic flow based on the Internet, comprising the following steps:
[0058] Step 1: The area to be predicted for traffic flow is recorded as the marked area, and the time period to be predicted for traffic flow is recorded as the target time period. According to the target time period, the short-term collection time period set, the medium-term collection time period set and the long-term collection time period set are determined. The specific execution steps are as follows:
[0059] 101: taking the same time period of the date before the date corresponding to the target time period as the last collection time period in the short-term collection time period set, and then calculating backwards from the last collection time period by the set number of short-term collection samples to obtain a starting collection time period in the short-term collection time period set, and all the same time periods between the starting collection time period and the last collection time period constitute the short-term collection time period set;
[0060] For example, assuming that the target time period is 7:00-9:00 a.m. on May 12, 2024, the date before the target time period is May 11, 2024. Then, 7:00-9:00 a.m. on May 11, 2024 is taken as the last collection time period in the short-term collection time period set. The number of short-term collection samples is set to be 14 days of the same collection time period. Then, the first collection time period in the short-term collection time period set is 7:00-9:00 a.m. on April 29, 2024, and the short-term collection time period set is 7:00-9:00 a.m. every day from April 29, 2024 to May 11, 2024.
[0061] 102: starting a collection time period in the mid-term collection time period set by counting backwards from the last collection time period by the set number of mid-term collection samples, and all the same time periods between the starting collection time period and the last collection time period constitute the mid-term collection time period set;
[0062] For example: Assuming that the set number of mid-term collection samples is the same collection time period of 3 months, the first collection time period in the mid-term collection time period set is 7:00-9:00 am on February 11, 2024, and the mid-term collection time period set is 7:00-9:00 am every day from February 11, 2024 to May 11, 2024.
[0063] 103: Obtain the year corresponding to the target time period from the target time period, and use the same time period in the previous year of the year corresponding to the target time period as the last collection time period in the long-term collection time period set, thereby reversing the last collection time period by the set number of long-term collection samples to obtain a starting collection time period in the long-term collection time period set, and all the same time periods between the starting collection time period and the last collection time period constitute the short-term collection time period set;
[0064] For example: if the target time period corresponds to 2024, then 7:00-9:00 a.m. on May 12, 2023 will be the last collection time period in the long-term collection time period set. If the number of long-term collection samples is set to 5 years, the first collection time in the long-term collection time period set will be 7:00-9:00 a.m. on May 12, 2019, and the long-term collection time period set will be 7:00-9:00 a.m. every day from May 12, 2019 to May 12, 2023.
[0065] Step 2: Obtain the historical traffic flow data of the marked area for the short-term collection time period set, the medium-term collection time period set, and the long-term collection time period set from the traffic flow detection platform.
[0066] In a specific embodiment, the present invention determines a short-term collection time period set, a medium-term collection time period set and a long-term collection time period set according to a target time period, thereby collecting historical traffic flow data of a marked area of a short-term collection time period set, a medium-term collection time period set and a long-term collection time period set, and uses this as a basis for predicting traffic flow in the marked area, thereby achieving multi-dimensional and comprehensive data analysis to a certain extent, avoiding the inaccuracy and limitations of prediction results caused by a single data analysis.
[0067] Step 3: Perform normalization analysis on the historical traffic flow data of the marked areas of the short-term collection time period set, the medium-term collection time period set, and the long-term collection time period set to obtain the normalized values of the historical traffic flow data of each marked area corresponding to the short-term collection time period set, the medium-term collection time period set, and the long-term collection time period set. The specific analysis method is as follows:
[0068] 301: Obtain the historical traffic flow data of each marked area corresponding to the short-term collection time period set and mark it as JL i 短 ,i represents the number of the historical traffic flow data of the marked area corresponding to the short-term collection time period set, i=1,2,....,m,m represents the total number of the historical traffic flow data numbers of the marked area corresponding to the short-term collection time period set, and the average value is calculated at the same time to obtain the average marked area traffic flow corresponding to the short-term collection time period set, and it is marked as According to the formula Calculate the discrete degree value σ of the historical traffic flow data of the marked area corresponding to the short-term collection time period set, and e is expressed as a natural constant;
[0069] 302: Compare the discrete degree value of the historical traffic flow data of the marked area corresponding to the short-term collection time period set with the set discrete degree threshold. When the discrete degree value of the historical traffic flow data of the marked area corresponding to the short-term collection time period set is less than or equal to the set discrete degree threshold, the historical traffic flow data of each marked area corresponding to the short-term collection time period set is analyzed according to the set formula model 1: Get the normalized value of historical traffic flow data of each marked area corresponding to the short-term collection time period set JL max It is represented by the maximum traffic flow data in the historical traffic flow data of the marked area corresponding to the short-term collection time period set, JL min It is represented as the minimum traffic flow data in the historical traffic flow data of the marked area corresponding to the short-term collection time period set;
[0070] When the discrete degree value of the historical traffic flow data of the marked area corresponding to the short-term collection time period set is greater than the set discrete degree threshold, the historical traffic flow data of each marked area corresponding to the short-term collection time period set is calculated according to the set formula model 2: Get the normalized value of historical traffic flow data of each marked area corresponding to the short-term collection time period set
[0071] Thus, the normalized value of the historical traffic flow data of each marked area corresponding to the short-term collection time period set is obtained;
[0072] 303: Perform the same operation as steps 301 and 302 on the historical traffic flow data of the marked areas corresponding to the mid-term collection time period set and the long-term collection time period set, thereby obtaining the normalized value of the historical traffic flow data of each marked area corresponding to the mid-term collection time period set. The normalized value of the historical traffic flow data of each marked area corresponding to the long-term collection time period set j represents the number of historical traffic flow data in the marked area corresponding to the medium-term collection time period set, j = 1, 2, ...., n, n represents the total number of historical traffic flow data numbers in the marked area corresponding to the medium-term collection time period set, f represents the number of historical traffic flow data in the marked area corresponding to the long-term collection time period set, f = 1, 2, ...., g, g represents the total number of historical traffic flow data numbers in the marked area corresponding to the long-term collection time period set.
[0073] In a specific embodiment, the present invention normalizes and analyzes the historical traffic flow data of the marked area corresponding to the short-term, medium-term and long-term collection time period sets, maps the data to a unified scale, improves the efficiency of data processing, and makes all data at the same order of magnitude, providing strong data support for the subsequent acquisition of valid data.
[0074] Step 4: Analyze and process the normalized values of the historical traffic flow data of each marked area corresponding to the short-term collection time period set, the medium-term collection time period set, and the long-term collection time period set to obtain valid data in the historical traffic flow data of the marked area corresponding to the short-term collection time period set, the medium-term collection time period set, and the long-term collection time period set. The specific execution steps are as follows:
[0075] 401: obtaining the normalization method of the historical traffic flow data of the marked area in the short-term collection time period set. If the normalization method is linear normalization, execute steps 402, 403, and 404. If the normalization method is nonlinear normalization, execute steps 405, 406, and 404.
[0076] 402: Calculate the average value of the normalized values of the historical traffic flow data of each marked area corresponding to the short-term collection time period set to obtain the average normalized value of the historical traffic flow data of the marked area corresponding to the short-term collection time period set, and mark it as
[0077] 403: According to the formula Calculate the normalized value deviation index of historical traffic flow data in each marked area corresponding to the short-term collection time period set
[0078] 404: Compare the normalized value deviation index of the historical traffic flow data of each marked area corresponding to the short-term collection time period set with the set normalized value deviation index threshold. When the normalized value deviation index of the historical traffic flow data of a marked area is greater than the set normalized value deviation index threshold, the historical traffic flow data of the marked area is determined to be abnormal data and the abnormal data is removed. Otherwise, the historical traffic flow data of the marked area is determined to be valid data and the valid data is retained.
[0079] Thus, the valid data of historical traffic flow in the marked area corresponding to the short-term collection time period set is obtained;
[0080] 405: Arrange the normalized values of the historical traffic flow data of each marked area corresponding to the short-term collection time period set in descending order, and extract the maximum value, minimum value, median value and mode value corresponding to the normalized value, thereby obtaining the maximum normalized value, minimum normalized value, median normalized value and mode normalized value of the historical traffic flow data of the marked area corresponding to the short-term collection time period set, and mark it as κ max , κ min , κ med , κ mod ;
[0081] According to the formula Calculate the normalized stability index φ of the historical traffic flow data of each marked area corresponding to the short-term collection time period set i , w1, w2, w3, w4 represent the set weight factors respectively;
[0082] The maximum normalized stability index is selected from the normalized stability index of the historical traffic flow data of each marked area corresponding to the short-term collection time period set, and the historical traffic flow data of the marked area corresponding to the maximum normalized stability index is extracted, and then the normalized value corresponding to the historical traffic flow data of the marked area is taken as the expected normalized value, which is marked as κ 期望 ;
[0083] 406: According to the formula Calculate the normalized value deviation index of historical traffic flow data in each marked area corresponding to the short-term collection time period set
[0084] 407: Perform the same operation as steps 401-406 on the normalized values of the historical traffic flow data of each marked area corresponding to the mid-term collection time period set and the long-term collection time period set, thereby obtaining the valid historical traffic flow data of the marked area corresponding to the mid-term collection time period set and the valid historical traffic flow data of the marked area corresponding to the long-term collection time period set.
[0085] In a specific embodiment, the present invention can effectively identify abnormal data and perform corresponding elimination operations by conducting targeted analysis and processing on the normalized values and normalization methods of the historical traffic flow data of each marked area corresponding to the short-term, medium-term and long-term collection time period sets. This abnormal data processing mechanism can improve the quality of data, reduce the impact of abnormal values on traffic flow prediction, thereby improving the accuracy of the prediction, and effectively avoiding the occurrence of invalid predictions to a certain extent.
[0086] Step 5: Use the historical traffic flow valid data of the marked area corresponding to the short-term collection time period set and the medium-term collection time period set to predict the traffic flow of the marked area corresponding to the target time period, and obtain the short-term marked area predicted traffic flow and the medium-term marked area predicted traffic flow. The specific execution steps are as follows:
[0087] 501: obtaining a normalization method for the historical traffic flow data of the marked area in the short-term collection time period set, if the normalization method is linear normalization, executing step 502, if the normalization method is nonlinear normalization, executing step 503;
[0088] 502: Calculate the average value of the historical traffic flow valid data of the marked area in the short-term collection time period set, and obtain the average value of the historical traffic flow valid data of the marked area in the short-term collection time period set as the short-term marked area predicted traffic flow, denoted as YJ 短 ;
[0089] 503: Calculate the normalized stability index of the valid historical traffic flow data of the marked area in the short-term collection time period set, obtain the normalized stability index corresponding to the valid historical traffic flow data of each marked area in the short-term collection time period set, and select the marked area historical traffic flow data corresponding to the maximum normalized stability index as the short-term marked area predicted traffic flow, denoted as YJ 短 ;
[0090] It should be noted that the normalized stability index is calculated for the valid historical traffic flow data of the marked area in the short-term collection time period set, and the specific calculation process is the same as 405 in step 4;
[0091] 504: According to the same operation steps as steps 501 and 502, the traffic flow of the marked area corresponding to the target time period is predicted for the marked area according to the valid historical traffic flow data of the mid-term collection time period set, and the predicted traffic flow of the mid-term marked area is obtained, which is recorded as YJ 中 .
[0092] Step 6: Analyze the trend characteristic evaluation value of the valid historical traffic flow data of the marked area corresponding to the long-term collection time period set to obtain the trend characteristic evaluation value of the long-term marked area traffic flow. The specific analysis method is as follows:
[0093] 601: Draw a two-dimensional dynamic coordinate system with time as the horizontal coordinate and traffic flow as the vertical coordinate, and annotate and connect the valid data of historical traffic flow of each marked area corresponding to the long-term collection time period set in the two-dimensional dynamic coordinate system to obtain a change curve of the valid data of historical traffic flow of the marked area corresponding to the long-term collection time period set;
[0094] 602: Obtain the slope of the valid data of historical traffic flow in each marked area corresponding to the long-term collection time period set, denoted as k s , s represents the number of valid data of historical traffic flow in each marked area corresponding to the long-term collection time period set, s=1,2,....,t, t represents the total number of valid data numbers of historical traffic flow in each marked area corresponding to the long-term collection time period set, and t∈{1,2,....,f,....,g};
[0095] It should be noted that the slope of the effective data of historical traffic flow in each marked area refers to the slope of the tangent line of the effective data of historical traffic flow in each marked area in the change curve;
[0096] 603: Obtaining the slope sign corresponding to the valid data of historical traffic flow in each marked area according to the slope of the valid data of historical traffic flow in each marked area corresponding to the long-term collection time period set, wherein the slope sign includes a positive slope sign and a negative slope sign, thereby counting the number of positive slope signs and the number of negative slope signs in the valid data of historical traffic flow in the marked area corresponding to the long-term collection time period set. When the number of positive slope signs is greater than the number of negative slope signs, it is determined that the slope sign feedback value is +1, otherwise, it is determined that the slope sign feedback value is -1;
[0097] 604: According to the formula Calculate the long-term marked area traffic flow trend characteristic evaluation value ω 长 .
[0098] Step 7: Substitute the short-term marked area predicted traffic flow, the medium-term marked area predicted traffic flow and the long-term marked area traffic flow trend characteristic evaluation value into the set prediction model to predict the traffic flow of the marked area corresponding to the target period, thereby obtaining the traffic flow of the marked area corresponding to the target period
[0099] Furthermore, the prediction model is set as:
[0100] η represents the difference between the traffic flow predicted by the short-term marked area and the traffic flow predicted by the long-term marked area. α and β represent the weight factors corresponding to the traffic flow predicted by the short-term marked area and the traffic flow predicted by the medium-term marked area, respectively.
[0101] It should be noted that according to the formula η=|YJ 短 -YJ 中 |The difference η between the short-term marked area predicted traffic flow and the long-term marked area predicted traffic flow is calculated, and the sizes of α and β are dynamically adjusted according to the difference between the short-term marked area predicted traffic flow and the medium-term marked area predicted traffic flow. Specifically:
[0102] The difference between the predicted traffic flow in the short-term marked area and the predicted traffic flow in the long-term marked area is compared and analyzed with the set difference threshold. When the difference between the predicted traffic flow in the short-term marked area and the predicted traffic flow in the long-term marked area is less than or equal to the set difference threshold, α = β;
[0103] When the difference between the predicted traffic flow in the short-term marked area and the predicted traffic flow in the long-term marked area is greater than the set difference threshold, α≠β.
[0104] In a specific embodiment, the present invention performs prediction by substituting the short-term marked area predicted traffic flow, the medium-term marked area predicted traffic flow and the long-term marked area traffic flow trend characteristic evaluation value into a set prediction model, comprehensively considering the prediction results of different time scales, and at the same time, dynamically setting the weight factors corresponding to the short-term marked area predicted traffic flow and the medium-term marked area predicted traffic flow according to the difference between the short-term marked area predicted traffic flow and the long-term marked area predicted traffic flow, so that the traffic flow of the marked area corresponding to the target time period obtained in the end is more accurate and reliable to a certain extent.
[0105] The above contents are merely examples and explanations of the structure of the present invention. The technicians in this technical field may make various modifications or additions to the specific embodiments described or replace them in a similar manner. As long as they do not deviate from the structure of the invention or exceed the scope defined by the claims, they should all fall within the protection scope of the present invention.
Claims
1. A method for predicting regional traffic flow based on the Internet, characterized in that: The following steps are involved: Step 1: The area to be predicted for traffic flow is recorded as a marked area, and the time period to be predicted for traffic flow is recorded as a target time period, and a short-term collection time period set, a medium-term collection time period set, and a long-term collection time period set are determined according to the target time period; Step 2: Obtain the historical traffic flow data of the marked area for the short-term collection time period set, the medium-term collection time period set, and the long-term collection time period set from the traffic flow detection platform; Step 3: normalize and analyze the historical traffic flow data of the marked areas of the short-term collection time period set, the medium-term collection time period set, and the long-term collection time period set to obtain the normalized values of the historical traffic flow data of each marked area corresponding to the short-term collection time period set, the medium-term collection time period set, and the long-term collection time period set; Step 4: Analyze and process the normalized values of the historical traffic flow data of each marked area corresponding to the short-term collection time period set, the medium-term collection time period set, and the long-term collection time period set to obtain valid data in the historical traffic flow data of the marked area corresponding to the short-term collection time period set, the medium-term collection time period set, and the long-term collection time period set; Step 5: Use the historical traffic flow valid data of the marked area corresponding to the short-term collection time period set and the medium-term collection time period set to predict the traffic flow of the marked area corresponding to the target time period, and obtain the short-term marked area predicted traffic flow and the medium-term marked area predicted traffic flow; Step 6: Analyze the trend characteristic evaluation value of the valid historical traffic flow data of the marked area corresponding to the long-term collection time period set to obtain the trend characteristic evaluation value of the long-term marked area traffic flow; Step 7: Substitute the short-term marked area predicted traffic flow, the medium-term marked area predicted traffic flow and the long-term marked area traffic flow trend characteristic evaluation values into the set prediction model to predict the traffic flow of the marked area corresponding to the target time period, thereby obtaining the traffic flow of the marked area corresponding to the target time period.
2. The method for predicting regional traffic flow based on the Internet according to claim 1, characterized in that: The steps of determining the short-term collection time period set, the medium-term collection time period set and the long-term collection time period set according to the target time period are as follows: 101: taking the same time period of the date before the date corresponding to the target time period as the last collection time period in the short-term collection time period set, and then calculating backwards from the last collection time period by the set number of short-term collection samples to obtain a starting collection time period in the short-term collection time period set, and all the same time periods between the starting collection time period and the last collection time period constitute the short-term collection time period set; 102: starting a collection time period in the mid-term collection time period set by counting backwards from the last collection time period by the set number of mid-term collection samples, and all the same time periods between the starting collection time period and the last collection time period constitute the mid-term collection time period set; 103: Obtain the year corresponding to the target time period from the target time period, and use the same time period in the previous year of the year corresponding to the target time period as the last collection time period in the long-term collection time period set, thereby reversing the last collection time period with the set number of long-term collection samples to obtain a starting collection time period in the long-term collection time period set, and all the same time periods between the starting collection time period and the last collection time period constitute the short-term collection time period set.
3. The method for predicting regional traffic flow based on the Internet according to claim 1, characterized in that: The historical traffic flow data of the marked area of the short-term collection time period set, the medium-term collection time period set and the long-term collection time period set are normalized and analyzed. The specific analysis method is as follows: 301: Obtain the historical traffic flow data of each marked area corresponding to the short-term collection time period set, and mark it as i represents the number of the historical traffic flow data of the marked area corresponding to the short-term collection time period set, i = 1, 2, ..., m, m represents the total number of the historical traffic flow data numbers of the marked area corresponding to the short-term collection time period set, and the average value is calculated at the same time to obtain the average marked area traffic flow corresponding to the short-term collection time period set, and it is marked as According to the formula Calculate the discrete degree value σ of the historical traffic flow data of the marked area corresponding to the short-term collection time period set, and e is expressed as a natural constant; 302: Compare the discrete degree value of the historical traffic flow data of the marked area corresponding to the short-term collection time period set with the set discrete degree threshold. When the discrete degree value of the historical traffic flow data of the marked area corresponding to the short-term collection time period set is less than or equal to the set discrete degree threshold, the historical traffic flow data of each marked area corresponding to the short-term collection time period set is analyzed according to the set formula model 1: Get the normalized value of historical traffic flow data of each marked area corresponding to the short-term collection time period set JL max It is represented by the maximum traffic flow data in the historical traffic flow data of the marked area corresponding to the short-term collection time period set, JL min It is represented as the minimum traffic flow data in the historical traffic flow data of the marked area corresponding to the short-term collection time period set; When the discrete degree value of the historical traffic flow data of the marked area corresponding to the short-term collection time period set is greater than the set discrete degree threshold, the historical traffic flow data of each marked area corresponding to the short-term collection time period set is calculated according to the set formula model 2: Get the normalized value of historical traffic flow data of each marked area corresponding to the short-term collection time period set Thus, the normalized value of the historical traffic flow data of each marked area corresponding to the short-term collection time period set is obtained; 303: Perform the same operation as steps 301 and 302 on the historical traffic flow data of the marked areas corresponding to the mid-term collection time period set and the long-term collection time period set, thereby obtaining the normalized value of the historical traffic flow data of each marked area corresponding to the mid-term collection time period set. The normalized value of the historical traffic flow data of each marked area corresponding to the long-term collection time period set j represents the number of historical traffic flow data in the marked area corresponding to the medium-term collection time period set, j = 1, 2, ...., n, n represents the total number of historical traffic flow data numbers in the marked area corresponding to the medium-term collection time period set, f represents the number of historical traffic flow data in the marked area corresponding to the long-term collection time period set, f = 1, 2, ...., g, g represents the total number of historical traffic flow data numbers in the marked area corresponding to the long-term collection time period set.
4. The method for predicting regional traffic flow based on the Internet according to claim 1, characterized in that: The normalized values of the historical traffic flow data of each marked area corresponding to the short-term collection time period set, the medium-term collection time period set, and the long-term collection time period set are analyzed and processed, and the specific execution steps are as follows: 401: obtaining the normalization method of the historical traffic flow data of the marked area in the short-term collection time period set. If the normalization method is linear normalization, execute steps 402, 403, and 404. If the normalization method is nonlinear normalization, execute steps 405, 406, and 404. 402: Calculate the average value of the normalized values of the historical traffic flow data of each marked area corresponding to the short-term collection time period set to obtain the average normalized value of the historical traffic flow data of the marked area corresponding to the short-term collection time period set, and mark it as 403: According to the formula Calculate the normalized value deviation index of historical traffic flow data in each marked area corresponding to the short-term collection time period set 404: Compare the normalized value deviation index of the historical traffic flow data of each marked area corresponding to the short-term collection time period set with the set normalized value deviation index threshold. When the normalized value deviation index of the historical traffic flow data of a marked area is greater than the set normalized value deviation index threshold, the historical traffic flow data of the marked area is determined to be abnormal data and the abnormal data is removed. Otherwise, the historical traffic flow data of the marked area is determined to be valid data and the valid data is retained. Thus, the valid data of historical traffic flow in the marked area corresponding to the short-term collection time period set is obtained; 405: Arrange the normalized values of the historical traffic flow data of each marked area corresponding to the short-term collection time period set in descending order, and extract the maximum value, minimum value, median value and mode value corresponding to the normalized value, thereby obtaining the maximum normalized value, minimum normalized value, median normalized value and mode normalized value of the historical traffic flow data of the marked area corresponding to the short-term collection time period set, and mark it as κ max , κ min , κ med , κ mod ; According to the formula Calculate the normalized stability index φ of the historical traffic flow data of each marked area corresponding to the short-term collection time period set i , w1, w2, w3, w4 represent the set weight factors respectively; The maximum normalized stability index is selected from the normalized stability index of the historical traffic flow data of each marked area corresponding to the short-term collection time period set, and the historical traffic flow data of the marked area corresponding to the maximum normalized stability index is extracted, and then the normalized value corresponding to the historical traffic flow data of the marked area is taken as the expected normalized value, which is marked as κ 期望 ; 406: According to the formula Calculate the normalized value deviation index of historical traffic flow data in each marked area corresponding to the short-term collection time period set 407: Perform the same operation as steps 401-406 on the normalized values of the historical traffic flow data of each marked area corresponding to the mid-term collection time period set and the long-term collection time period set, thereby obtaining the valid historical traffic flow data of the marked area corresponding to the mid-term collection time period set and the valid historical traffic flow data of the marked area corresponding to the long-term collection time period set.
5. The method for predicting regional traffic flow based on the Internet according to claim 1, characterized in that: The specific execution steps of using the historical traffic flow valid data of the marked area corresponding to the short-term collection time period set to predict the traffic flow of the marked area corresponding to the target time period are as follows: 501: obtaining a normalization method for the historical traffic flow data of the marked area in the short-term collection time period set, if the normalization method is linear normalization, executing step 502, if the normalization method is nonlinear normalization, executing step 503; 502: Calculate the average value of the historical traffic flow valid data of the marked area in the short-term collection time period set, and obtain the average value of the historical traffic flow valid data of the marked area in the short-term collection time period set as the short-term marked area predicted traffic flow, denoted as YJ 短 ; 503: Calculate the normalized stability index of the valid historical traffic flow data of the marked area in the short-term collection time period set, obtain the normalized stability index corresponding to the valid historical traffic flow data of each marked area in the short-term collection time period set, and select the marked area historical traffic flow data corresponding to the maximum normalized stability index as the short-term marked area predicted traffic flow, denoted as YJ 短 ; 504: According to the same operation steps as steps 501 and 502, the traffic flow of the marked area corresponding to the target time period is predicted for the marked area according to the valid historical traffic flow data of the mid-term collection time period set, and the predicted traffic flow of the marked area in the mid-term is obtained, which is recorded as YJ 中 .
6. The method for predicting regional traffic flow based on the Internet according to claim 1, characterized in that: The trend characteristic evaluation value analysis is performed on the effective data of historical traffic flow in the marked area corresponding to the long-term collection time period set. The specific analysis method is as follows: 601: Draw a two-dimensional dynamic coordinate system with time as the horizontal coordinate and traffic flow as the vertical coordinate, and annotate and connect the valid data of historical traffic flow of each marked area corresponding to the long-term collection time period set in the two-dimensional dynamic coordinate system to obtain a change curve of the valid data of historical traffic flow of the marked area corresponding to the long-term collection time period set; 602: Obtain the slope of the valid data of historical traffic flow in each marked area corresponding to the long-term collection time period set, denoted as k s , s represents the number of valid data of historical traffic flow in each marked area corresponding to the long-term collection time period set, s=1,2,....,t, t represents the total number of valid data numbers of historical traffic flow in each marked area corresponding to the long-term collection time period set, and t∈{1,2,....,f,....,g}; 603: Obtaining the slope sign corresponding to the valid data of historical traffic flow in each marked area according to the slope of the valid data of historical traffic flow in each marked area corresponding to the long-term collection time period set, wherein the slope sign includes a positive slope sign and a negative slope sign, thereby counting the number of positive slope signs and the number of negative slope signs in the valid data of historical traffic flow in the marked area corresponding to the long-term collection time period set. When the number of positive slope signs is greater than the number of negative slope signs, it is determined that the slope sign feedback value is +1, otherwise, it is determined that the slope sign feedback value is -1; 604: According to the formula Calculate the long-term marked area traffic flow trend characteristic evaluation value ω 长 .
7. The method for predicting regional traffic flow based on the Internet according to claim 1, characterized in that: The prediction model set is: η represents the difference between the short-term predicted traffic flow and the long-term predicted traffic flow, α and β represent the weight factors corresponding to the short-term marked area predicted traffic flow and the medium-term marked area predicted traffic flow, respectively.
