A method for predicting expressway entrance and exit flow based on sparse data of a card hole
By classifying and denoising sparse checkpoint data and combining it with a combined prediction model, the problem of accuracy in traffic flow prediction for highway service areas was solved, and accurate prediction of traffic flow in and out of service areas was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING YUNXINGYU TRAFFIC SCI & TECH
- Filing Date
- 2026-02-06
- Publication Date
- 2026-05-26
AI Technical Summary
Existing technologies struggle to accurately predict traffic flow in and out of highway service areas, especially due to the difficulty and misjudgment in traffic estimation caused by the sparsity of checkpoint data.
By classifying and defining traffic estimation scenarios, sparse checkpoint data is used to track vehicle identification information. Combined with spatiotemporal constraints and SG filter denoising, multiple combined prediction models are constructed for traffic prediction, eliminating the influence of service areas and performing correction and denoising processing.
It enables accurate prediction of traffic flow at highway entrances and exits, reduces misjudgments in traffic statistics by service areas, and improves the accuracy and stability of prediction.
Smart Images

Figure CN122090635A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of traffic flow estimation and prediction technology in the transportation sector, and more specifically, to a method for predicting highway entrance and exit traffic flow based on sparse checkpoint data. Background Technology
[0002] Toll stations and interchanges are key nodes in highway traffic management. Their inbound and outbound traffic not only has a significant impact on the traffic flow on the main line, but also has a very important impact on management decisions.
[0003] Service areas, as special entrances and exits on highways, significantly impact mainline traffic flow. However, most existing service areas lack vehicle detection equipment, making it difficult to conveniently and accurately perceive service area traffic parameters. Therefore, it is necessary to estimate service area entry and exit traffic flow using other data. Given the sparse distribution of checkpoint data and the fact that the locational relationship between service areas and mainline checkpoints directly affects the determination of vehicle entry and exit behavior, different scenarios need to be discussed separately.
[0004] The changes in traffic flow on highways are highly complex, random, and uncertain, making them difficult to predict accurately. Furthermore, the sparsity of checkpoint data poses significant challenges to estimating inbound and outbound traffic flow. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention provides a method for predicting highway entrance and exit traffic flow based on sparse checkpoint data.
[0006] According to one aspect of the present invention, a method for predicting highway entrance and exit traffic flow based on sparse checkpoint data is provided, comprising: Based on the sparsity characteristics of the data at the checkpoints between computing nodes, traffic estimation scenarios are classified and defined to obtain multiple preset traffic estimation scenarios. Based on the spatiotemporal constraint method, by tracking vehicle identification information in checkpoint data, the basic flow data of each computing node within a preset time period is determined and statistically analyzed. The basic flow data includes basic inbound flow and basic outbound flow. Based on the spatial relationship between the service area and the computing node, the basic traffic data is corrected to eliminate traffic statistics errors caused by vehicles entering and leaving the service area, and the corrected traffic data is obtained. The corrected flow data is denoised using a moving average smoothing method to obtain the first denoised flow data, and the corrected flow data is denoised using an SG filter to obtain the second denoised flow data. The first and second denoised traffic data were used as training samples to train multiple pre-built combined prediction models for each traffic estimation scenario, and the prediction results were evaluated to obtain the optimal prediction model for each traffic estimation scenario. Traffic is predicted for each traffic estimation scenario based on the optimal prediction model for each scenario.
[0007] According to another aspect of the present invention, a highway entrance / exit traffic flow prediction device based on sparse checkpoint data is provided, comprising: The classification module is used to classify and define traffic estimation scenarios based on the sparsity characteristics of the data at the checkpoints between computing nodes, and obtain multiple preset traffic estimation scenarios. The statistics module is used to determine and statistically analyze the basic traffic flow data of each computing node within a preset time period by tracking vehicle identification information in the checkpoint data based on the spatiotemporal constraint method. The basic traffic flow data includes basic inbound traffic flow and basic outbound traffic flow. The correction module is used to correct the basic traffic data by eliminating traffic statistics errors caused by vehicles entering and leaving the service area based on the spatial relationship between the service area and the computing node, so as to obtain corrected traffic data. The denoising module is used to denoise the corrected flow data using the moving average smoothing method to obtain the first denoised flow data, and to denoise the corrected flow data using the SG filter to obtain the second denoised flow data. The training and evaluation module is used to train multiple pre-built combined prediction models for each traffic estimation scenario using the first denoised traffic data and the second denoised traffic data as training samples, and to evaluate the prediction results to obtain the optimal prediction model for each traffic estimation scenario. The prediction module is used to predict the traffic for each traffic estimation scenario based on the optimal prediction model for each traffic estimation scenario.
[0008] According to another aspect of the present invention, a computer-readable storage medium is provided, the storage medium storing a computer program for performing the methods described in any of the above aspects of the present invention.
[0009] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising: a processor; a memory for storing executable instructions of the processor; the processor being configured to read the executable instructions from the memory and execute the instructions to implement the method described in any of the preceding aspects of the present invention.
[0010] Therefore, this invention classifies and analyzes entrance and exit traffic flow estimation scenarios based on the sparsity characteristics of checkpoint data; it uses a time- and space-constrained method, employing license plate number tracking from checkpoint data to determine whether vehicles have entered or exited the highway; it eliminates the influence of service area distribution on vehicle entry and exit behavior determination through classification and discussion; and it combines the estimation scenarios with service area location classification to obtain different prediction scenarios, applying different combined models to different prediction scenarios. This allows for accurate estimation of highway entry and exit traffic flow. Attached Figure Description
[0011] Exemplary embodiments of the present invention can be more fully understood by referring to the following figures: Figure 1 This is a flowchart illustrating a highway entrance / exit traffic flow prediction method based on sparse checkpoint data, provided by an exemplary embodiment of the present invention. Figure 2 This is another flowchart illustrating a highway entrance / exit traffic prediction method based on sparse checkpoint data, provided in an exemplary embodiment of the present invention. Figures 3-9 This is a schematic diagram of a traffic flow calculation scenario for eight entrances and exits based on checkpoint data features, provided by an exemplary embodiment of the present invention. Figure 10 , Figure 11 This is a schematic diagram of entry and exit determination provided by an exemplary embodiment of the present invention; Figures 12-15 This is a schematic diagram illustrating the service area impact provided by an exemplary embodiment of the present invention; Figure 16 This is a schematic diagram comparing the inbound traffic flow from the Shenyang direction at the Yahongqiao toll station with and without considering service area calculation results, provided by an exemplary embodiment of the present invention. Figure 17 This is a schematic diagram comparing the calculation results of traffic flow from Tangshan North to Beijing with and without considering service areas, provided by an exemplary embodiment of the present invention. Figure 18 This is a schematic diagram of the structure of a highway entrance / exit traffic flow prediction device based on sparse checkpoint data provided in an exemplary embodiment of the present invention. Figure 19 This is the structure of an electronic device provided in an exemplary embodiment of the present invention. Detailed Implementation
[0012] Hereinafter, exemplary embodiments according to the present invention will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of the present invention, and not all embodiments of the present invention. It should be understood that the present invention is not limited to the exemplary embodiments described herein.
[0013] It should be noted that, unless otherwise specifically stated, the relative arrangement, numerical expressions, and values of the components and steps described in these embodiments do not limit the scope of the invention.
[0014] Those skilled in the art will understand that the terms "first," "second," etc., in the embodiments of the present invention are only used to distinguish different steps, devices, or modules, and do not represent any specific technical meaning, nor do they indicate a necessary logical order between them.
[0015] It should also be understood that in the embodiments of the present invention, "multiple" can refer to two or more, and "at least one" can refer to one, two or more.
[0016] It should also be understood that any component, data or structure mentioned in the embodiments of the present invention can generally be understood as one or more unless explicitly defined or given contrary instructions in the context.
[0017] Furthermore, the term "and / or" in this invention is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this invention generally indicates that the preceding and following related objects have an "or" relationship.
[0018] It should also be understood that the description of the various embodiments in this invention emphasizes the differences between the various embodiments, and the similarities or similarities can be referred to each other. For the sake of brevity, they will not be described in detail.
[0019] At the same time, it should be understood that, for ease of description, the dimensions of the various parts shown in the accompanying drawings are not drawn according to actual scale.
[0020] The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit the invention or its application or use.
[0021] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, they should be considered part of the specification.
[0022] It should be noted that similar labels and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be discussed further in subsequent figures.
[0023] The embodiments of this invention can be applied to electronic devices such as terminal devices, computer systems, and servers, and can operate together with a wide range of other general-purpose or special-purpose computing system environments or configurations. Well-known examples of terminal devices, computing systems, environments, and / or configurations suitable for use with electronic devices such as terminal devices, computer systems, and servers include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputer systems, mainframe computer systems, and distributed cloud computing environments including any of the above systems, etc.
[0024] Electronic devices such as terminal devices, computer systems, and servers can be described in the general context of computer system executable instructions (such as program modules) executed by a computer system. Typically, program modules can include routines, programs, object programs, components, logic, data structures, etc., which perform specific tasks or implement specific abstract data types. Computer systems / servers can be implemented in distributed cloud computing environments, where tasks are executed by remote processing devices linked through communication networks. In distributed cloud computing environments, program modules can reside on local or remote computing system storage media, including storage devices.
[0025] Exemplary methods Figure 1 This is a flowchart illustrating a highway entrance / exit traffic flow prediction method based on sparse checkpoint data, provided in an exemplary embodiment of the present invention. This embodiment can be applied to electronic devices, such as... Figure 1 As shown, the highway entrance and exit traffic flow prediction method 100 based on sparse checkpoint data includes the following steps: Step 101: Based on the sparsity characteristics of the data at the checkpoints between computing nodes, the traffic estimation scenarios are classified and defined to obtain multiple preset traffic estimation scenarios. Step 102: Based on the spatiotemporal constraint method, by tracking the vehicle identification information in the checkpoint data, determine and statistically analyze the basic flow data of each computing node within a preset time period, wherein the basic flow data includes basic inbound flow and basic outbound flow. Step 103: Based on the spatial relationship between the service area and the computing node, eliminate the misjudgment of traffic statistics caused by vehicles entering and leaving the service area, correct the basic traffic data, and obtain the corrected traffic data. Step 104: Denoise the corrected flow data using the moving average smoothing method to obtain the first denoised flow data, and denoise the corrected flow data using the SG filter to obtain the second denoised flow data. Step 105: Use the first denoised traffic data and the second denoised traffic data as training samples to train multiple pre-built combined prediction models for each traffic estimation scenario and evaluate their prediction results to obtain the optimal prediction model for each traffic estimation scenario. Step 106: Predict the traffic for each traffic estimation scenario based on the optimal prediction model for each traffic estimation scenario.
[0026] Specifically, this invention analyzes the estimation scenarios of entrance and exit traffic flow and designs a method to determine whether vehicles enter or exit the highway based on time and spatial constraints, thereby statistically analyzing the inbound and outbound traffic flow. Then, the traffic flow data after denoising using moving average smoothing and SG filter is used as the input for prediction. Next, different prediction scenarios are defined for different estimation scenarios and service area locations. Finally, under different prediction scenarios, multiple combined models are used to predict the inbound and outbound traffic flow, the prediction effects are compared, and the optimal combined prediction model for each prediction scenario is selected. (Reference) Figure 2 As shown, the specific implementation steps are as follows: S1: Classify and analyze entrance and exit traffic estimation scenarios based on the sparsity characteristics of checkpoint data; Given the sparsity of checkpoint data, inbound and outbound traffic flow is difficult to estimate. Therefore, we first categorize highway toll stations and interchanges into eight scenarios. Given the sparsity of checkpoint data, inbound and outbound traffic flow is difficult to estimate. Therefore, we first categorize highway toll stations and interchanges into eight scenarios. Scenario 1: such as Figure 3 As shown, in a four-way interchange, if the inbound traffic flow of any three branches and the outbound traffic flow of any three branches are known, the traffic flow within the interchange can be calculated; otherwise, it cannot. Scenario 2: such as Figure 4 As shown, four-way interchanges are adjacent to each other (there is no mainline checkpoint between them). The traffic flow within the two interchanges must be calculated. One interchange must have a mainline checkpoint at each of the remaining three intersections. The other interchange must have the inbound and outbound directions of any two of the remaining three intersections known. Otherwise, the flow cannot be calculated. Scenario 3: such as Figure 5 As shown, the four-way interchange is adjacent to the toll station (there is no mainline checkpoint between the two). Calculate the vehicle traffic flow of the four-way interchange and the inbound and outbound flow of the toll station. The remaining three intersections of the four-way interchange must all have mainline checkpoints, and the two directions on the other side of the toll station must also have mainline checkpoints, otherwise it is impossible to calculate. Scenario 4: such as Figure 6 As shown, in a three-way interchange, if the inbound direction of any two forks and the outbound direction of any two forks are known, then the remaining inbound and outbound directions can be deduced. Scenario 5: For example Figure 7As shown, two three-way interchanges are adjacent to each other (there is no mainline checkpoint between them). The traffic flow scenarios of the two three-way interchanges are deduced. For one interchange, the remaining two forks must have mainline checkpoints. For the other three-way interchange, the inlet of any one fork and the outlet of any one fork must be known. Otherwise, it is impossible to deduce the traffic flow. Scenario 6: For example Figure 8 As shown, the Sancha Interchange is adjacent to the toll station (there is no mainline checkpoint between the two). Calculate the vehicle traffic flow of the Sancha Interchange and the inbound and outbound traffic of the toll station. The remaining two forks of the Sancha Interchange must have mainline checkpoints, and the two directions on the other side of the toll station must also have mainline checkpoints, otherwise it is impossible to calculate. Scenario 7: For example Figure 9 As shown, the four-way interchange and the three-way interchange are adjacent (there is no mainline bottleneck between them). Calculate the traffic flow of the two interchanges; ① The four-way interchange must have three remaining intersections ( Figure 9 (as indicated by the green arrow) must all have a mainline checkpoint; for a three-way interchange, it is necessary to know the entry point from any one of the other two branch points and the exit point from any one of the other two branch points. Figure 9 The light green arrow indicates the main line checkpoint; or ② the remaining two branches of the three-way interchange ( Figure 9 (as indicated by the green arrow) must all have a mainline checkpoint; for a four-way interchange, it is necessary to know any two of the remaining three branch points for entry and any two for exit. Figure 9 (The main line checkpoint is located at the light green arrow). Scenario 8: Toll stations are adjacent, making it impossible to calculate the traffic exchange between the two toll stations, and therefore impossible to calculate the inbound and outbound traffic of the toll stations.
[0027] S2: Based on time and space constraints, the vehicle license plate number tracking method in the checkpoint data is used to determine whether a vehicle has entered or exited the highway; Specifically, for cases where the checkpoint data contains abnormal license plate numbers (displaying "-" or "no license plate"), these abnormal data are directly removed.
[0028] For cases where the time interval between records of the same license plate number is no more than 5 seconds, retain the first record in that consecutive time period and delete the other records.
[0029] For incoming computing nodes, the multiple mainline checkpoints between the current computing node and the second adjacent upstream computing node are defined as the upstream region, and the mainline checkpoint between the current computing node and the adjacent downstream computing node (i.e., the mainline checkpoint closest to the current computing node) is defined as the downstream region.
[0030] For outgoing operations, the upstream region is defined as one mainline checkpoint between the current computing node and its upstream neighboring computing node (i.e., the mainline checkpoint closest to the current computing node), and the downstream region is defined as multiple mainline checkpoints between the current computing node and its second downstream neighboring computing node.
[0031] When determining when a vehicle enters, the upstream time window is set to 30 minutes prior to the current time (the first preset time, or any other time, not specifically limited here) to the current time, and the downstream time window is set to 5 minutes prior to the current time (the second preset time, or any other time, not specifically limited here) to the current time.
[0032] When determining when to exit, set the upstream time window to 30 minutes before the current time (the third preset time, or any other time, not specifically limited here) to 25 minutes before the current time (the fourth preset time, or any other time, not specifically limited here), and the downstream time window to 30 minutes before the current time (the fifth preset time, or any other time, not specifically limited here) to the current time.
[0033] Vehicles appearing in the upstream area but not in the downstream area are considered as departing vehicles. The number of license plates is counted, which is the outgoing traffic flow from 30 minutes to 25 minutes before the current time.
[0034] Vehicles appearing in the downstream area but not in the upstream area are considered as entering vehicles. The number of license plates is counted, which is the inbound traffic from 5 minutes before the current time to the current time.
[0035] In cases where there is a missing mainline checkpoint between adjacent computing nodes, a weighted method is used to estimate the inbound and outbound traffic flow, which involves distributing the calculated inbound and outbound traffic flow to the two computing nodes according to empirical weights.
[0036] If the downstream checkpoint is abnormal during the entry judgment, a new checkpoint will be selected for calculation; if the upstream checkpoint is abnormal during the exit judgment, a new checkpoint will be selected for calculation.
[0037] S3: Further limits the time and space, and classify and exclude the influence of service areas according to their distribution location, so as to count the traffic flow entering and leaving the highway. Specifically, when a vehicle enters a service area, if there is a mainline checkpoint between the service area and the adjacent upstream computing node, the vehicle in the service area will be mistakenly identified as having exited from the current computing node. When a vehicle enters a service area, if there is no mainline checkpoint between the service area and the adjacent upstream computing node, the vehicle in the service area will be mistakenly identified as having exited from the adjacent upstream computing node. When a vehicle leaves the service area, if there is a mainline checkpoint between the service area and the adjacent downstream computing node, the vehicle in the service area will be mistakenly identified as having entered from the upstream computing node. When a vehicle leaves the service area, if there is no mainline checkpoint between the service area and the adjacent downstream computing node, the vehicle in the service area will be mistakenly identified as having entered from the current computing node.
[0038] When calculating inbound and outbound traffic flow, the misjudged traffic flow of the corresponding node must be subtracted.
[0039] S4: Noise reduction is achieved for inbound and outbound traffic using the moving average smoothing method; Specifically, the moving window size is set to 6 time steps, and the moving average smoothing method is used to denoise the original inbound and outbound traffic. Calculate the ratio of the original sum to the smoothed sum, and then multiply all smoothed values by this ratio to correct the data. Compare the original sum with the smoothed sum. If the original sum is larger, the difference is evenly distributed among the data points with smaller smoothed sums; if the original sum is smaller, the difference is evenly distributed among the data points with larger smoothed sums.
[0040] S5: Use an SG filter to denoise the inbound and outbound traffic flow; Setting the time window width to 11 time steps effectively captures short-term trends in inbound and outbound traffic. Setting the order of the multinomials to 2 effectively fits the nonlinear trend of traffic flow and ensures computational efficiency.
[0041] S6: Using the denoised result as input, multiple combined prediction models are used to predict traffic flow for different estimation scenarios and service area locations.
[0042] Specifically, different traffic prediction scenarios are obtained by combining and classifying the estimation scenarios and service area locations; Under different prediction scenarios, the results after moving average smoothing and denoising were used as input, with a training set to test set ratio of 8:2. Twelve combined models, including LSTM, GRU, ARIMA, STL-BiLSTM, STL-BiGRU, STL-LSTM, STL-GRU, STL-GRU-Transformer, STL-ARIMA-LSTM, STL-ARIMA-GRU, VMD-BiLSTM-BiGRU, and VMD-BiLSTM-GRU, were used to predict inbound and outbound traffic flows.
[0043] Under different prediction scenarios, the results after denoising using the SG filter are used as input, with a training set to test set ratio of 8:2. VMD-BiLSTM-GRU and BiLSTM-GRU combined models are employed to predict inbound and outbound traffic flows.
[0044] The initial parameter settings for the BiLSTM-GRU model are as follows: the BiLSTM model has an input dimension of 1, 2 layers, and 128 hidden layers; the GRU model has an input dimension of 256, 2 layers, 128 hidden layers, a dropout rate of 0.3, a batch size of 64, a learning rate of 0.001, an optimizer of Adam, 150 training epochs, and an early stopping strategy parameter of 15.
[0045] S7: Evaluate the prediction performance of each model in different scenarios in terms of accuracy, stability, and robustness, and select the optimal combination prediction model suitable for each estimation scenario and service area location.
[0046] Different prediction scenarios are obtained by combining and classifying the estimated scenarios and service area locations. Under the same forecasting scenario, the forecasting performance of the above 14 combined forecasting models is evaluated in terms of accuracy: RMSE, MAE, MAPE, sMAPE, and 1 / R2 indices are calculated between the actual value and the forecast value. Under the same prediction scenario, the prediction performance of the above 14 combined prediction models is evaluated in terms of stability: first, the RMSE and MAE within each window are calculated by applying a sliding window, and then their variance, standard deviation and coefficient of variation are evaluated. Under the same prediction scenario, the prediction performance of the above 14 combined prediction models was evaluated in terms of robustness: First, the time periods in which the flow values are in the highest 10% and the lowest 10% of the distribution were selected, and the MAPE of these time periods was calculated. Second, the sliding variance detection was used to identify the flow change points, and the MAPE of these change points was calculated. Then, Gaussian noise with SNR=10dB was added to the test set data, and the percentage increase in MAPE after adding noise was calculated. The above indicators are standardized using the maximum value, and the accuracy, stability, and robustness indicators are assigned weights of 40%, 30%, 20%, and 10% respectively. The comprehensive score of each model is calculated by weighted summation. Based on the comprehensive scores mentioned above, the optimal combination prediction model suitable for this scenario is selected.
[0047] In a specific embodiment of the present invention, based on the analysis of eight different scenarios, the following traffic flow lines at toll stations and interchanges on the currently given Beijing-Harbin Expressway cannot be calculated.
[0048] ① Changchun-Shenzhen-Beijing-Harbin Interchange: This is a four-way interchange with mainline checkpoints on both the east and west sides. It is adjacent to the Tangshan-Caofeidian Interchange (a four-way interchange) on the south side and to the Fengrun Toll Station on the north side. The Fengrun Toll Station is adjacent to the Fengrun West Toll Station. Based on the analysis of situations 2, 3, and 8, the traffic flow of these two interchanges and the inbound and outbound traffic of the two toll stations cannot be calculated.
[0049] ② Tangjin-Jingha Interchange: This is a three-way interchange with mainline checkpoints on both the east and west sides. It is adjacent to the Tangshan East Toll Station on the south side (with mainline checkpoint 062 in between, but data for this checkpoint is unavailable). There is no mainline checkpoint data for the Tianjin direction between the Tangshan East Toll Station and the Tanggang Toll Station of the Tangjin Expressway (checkpoint 244 is a mainline checkpoint, but data for this checkpoint is unavailable). Based on analyses of situations 6 and 8, the traffic flow of this interchange and the inbound and outbound traffic volumes of the two toll stations cannot be estimated.
[0050] ③ Jingha, Qian'an, and Qiancao Interchanges: These are four-way interchanges with mainline checkpoints on both the east and west sides. The Qian'an branch line runs to the north, and the Qiancao Expressway runs to the south. Data for the north and south sides is not provided, making it impossible to estimate the traffic flow of vehicles at the interchange. However, the interchange can be considered a toll station, allowing for the estimation of its inbound and outbound traffic in the Beijing and Shenyang directions on the Jingha Expressway.
[0051] ④ Beidaihe Connector Jingha Interchange: This is a three-way interchange. On the east side, there is no mainline checkpoint between the Beijing direction and the Jingha Coastal Interchange, but there is one mainline checkpoint (579) in the Shenyang direction. On the west side, there are mainline checkpoints in both the Beijing and Shenyang directions. On the south side, it is adjacent to the Coastal Beidaihe Connector Interchange (also a three-way interchange). There is no checkpoint data between the two interchanges, and there is also no checkpoint data around the Coastal Beidaihe Connector Interchange. Based on the analysis in section 5, it is impossible to calculate the traffic flow of the two interchanges. However, the Beidaihe Connector Jingha Interchange can be considered a toll station, and its inbound and outbound traffic in the Shenyang direction of the Jingha Interchange can be calculated. Traffic flow in the Beijing direction cannot be calculated due to the lack of a mainline checkpoint on the east side.
[0052] ⑤ Beijing-Harbin Coastal Interchange and Beijing-Harbin-Chengde-Qinhuangdao Interchange: The Beijing-Harbin Coastal Interchange is a three-way interchange. On the west side, there is no mainline checkpoint between the Beijing-bound side and the Beijing-Harbin Interchange on the Beidaihe connecting line, but there is one mainline checkpoint (579) in the Shenyang direction. On the east side, it is adjacent to the Beijing-Harbin-Chengde-Qinhuangdao Interchange (a three-way interchange). On the south side of the Beijing-Harbin Coastal Interchange, between it and the Qinhuangdao West Toll Station, there is one mainline checkpoint (HBGS03008) in the Tianjin direction, but none in the Shenyang direction. Between the Qinhuangdao West Toll Station and the Nandaihe Toll Station, there is one mainline checkpoint in the Tianjin direction, but no data is available; there is one mainline checkpoint (HBGS03028) in the Qinhuangdao direction. The Beijing-Harbin-Chengde-Qinhuangdao Interchange is a three-way interchange, adjacent to the Beijing-Harbin Coastal Interchange on the west side, with a mainline checkpoint on the east and north sides. Based on the analysis in situation 5, the flow exchange between the two interchanges can be estimated through the Beijing-Harbin-Chengde-Qinhuangdao interchange. Furthermore, among the remaining two branches of the Beijing-Harbin coastal interchange, the western branch is known to be the entrance and the southern branch to be the exit, so the vehicle traffic flow of the two interchanges can be estimated. Thus, the problem of the missing main line checkpoint on the east side of the Beijing-Harbin interchange on the Beidaihe connecting line mentioned in (4) can be solved. However, the vehicle traffic flow of the Beijing-Harbin interchange on the Beidaihe connecting line still cannot be estimated.
[0053] It can be observed that the traffic flow of most interchanges cannot be accurately inferred. Therefore, this study treats interchanges as equivalent to toll stations, only distinguishing between vehicles exiting the Beijing-Harbin Expressway from the Shenyang / Beijing direction at the calculation node (including interchanges and toll stations) and vehicles entering the Beijing-Harbin Expressway from the Shenyang / Beijing direction at the calculation node, without distinguishing the direction of non-Beijing-Harbin Expressway sections within the interchange (such as the south / north direction of the Changchun-Shenzhen Expressway in the Changchun-Shenzhen Beijing-Harbin Interchange).
[0054] Calculation method: The main types of nodes on the Beijing-Harbin Expressway include four types of checkpoints: toll stations, interchanges, service areas, and main lines. The calculation of inbound and outbound traffic flow mainly targets toll stations and interchanges. To this end, the following three calculation schemes based on license plate number tracking were designed.
[0055] Option 1: Using a day as the time unit, the multiple mainline checkpoints between the current computing node and its upstream neighboring computing nodes are designated as the upstream region, and the multiple mainline checkpoints between the current computing node and its downstream neighboring computing nodes are designated as the downstream region. License plates appearing in the downstream region but not in the upstream region are considered entering vehicles, with the earliest recorded time considered the entry time. The number of license plates is counted at 5-minute intervals, which represents the inbound traffic flow. Similarly, license plates appearing in the upstream region but not in the downstream region are considered exiting vehicles, with the last recorded time considered the exit time. The number of license plates is counted at 5-minute intervals, which represents the outbound traffic flow.
[0056] Option 2: Move the entry and exit time windows at 5-minute intervals. Define the upstream region as the multiple mainline checkpoints between the current computing node and its upstream neighbors, and the downstream region as the multiple mainline checkpoints between the current computing node and its downstream neighbors. When determining an entry, set the upstream time window to 30 minutes prior to the current time and the downstream time window to 5 minutes prior to the current time. When determining an exit, set the upstream time window to 30 minutes prior to the current time and the downstream time window to 30 minutes prior to the current time and the current time. License plates appearing in the upstream region but not in the downstream region are considered exiting vehicles; the number of these license plates represents the exit flow from 30 minutes to 25 minutes prior to the current time. Similarly, license plates appearing in the downstream region but not in the upstream region are considered entering vehicles; the number of these license plates represents the entering flow from 5 minutes prior to the current time. Example: Figure 10 , 11 As shown.
[0057] Option 3: Similar to Option 2, but with a more rigorous division of the upstream and downstream areas for both inbound and outbound traffic, while also considering the impact of service areas. For inbound traffic, the multiple mainline checkpoints between the current computing node and the second adjacent upstream computing node (i.e., the checkpoint interval changes from one segment in Option 2 to two segments) are considered the upstream area, and the single mainline checkpoint between the current computing node and the adjacent downstream computing node (i.e., the mainline checkpoint closest to the current computing node) is considered the downstream area. For outbound traffic, the single mainline checkpoint between the current computing node and the adjacent upstream computing node (i.e., the mainline checkpoint closest to the current computing node) is considered the upstream area, and the multiple mainline checkpoints between the current computing node and the second adjacent downstream computing node (i.e., the checkpoint interval changes from one segment in Option 2 to two segments) are considered the downstream area. The impact of service areas on inbound and outbound traffic statistics can be categorized into four situations: ① When a vehicle enters the service area, if there is a mainline checkpoint between the service area and the adjacent upstream computing node, the vehicle will be misidentified as having exited from the current computing node; ② When a vehicle enters the service area, if there is no mainline checkpoint between the service area and the adjacent upstream computing node, the vehicle will be misidentified as having exited from the adjacent upstream computing node; ③ When a vehicle exits the service area, if there is a mainline checkpoint between the service area and the adjacent downstream computing node, the vehicle will be misidentified as having entered from the upstream computing node; ④ When a vehicle exits the service area, if there is no mainline checkpoint between the service area and the adjacent downstream computing node, the vehicle will be misidentified as having entered from the current computing node. Finally, when calculating inbound and outbound traffic, the traffic volume misidentified at the corresponding node must be subtracted. Example: Figure 12-15 As shown.
[0058] Compared to Scheme 2, Scheme 1 has a larger time span and significant computational redundancy, resulting in a huge computational load and making real-time calculation difficult. Furthermore, Scheme 1 has some bias in judging outbound traffic flow; when the time windows of upstream and downstream areas are consistent, upstream vehicles are unlikely to reach downstream areas in the last 5 minutes of the time window, leading to an overestimation of the calculated outbound traffic flow. Scheme 3, compared to Scheme 2, incorporates service areas, increasing the accuracy of inbound and outbound traffic flow calculations. It also standardizes the checkpoint range; if adjacent checkpoint records are incorrect, the calculation can be performed using the second adjacent checkpoint, enhancing the robustness of the results. Based on these considerations, Scheme 3 is ultimately adopted for calculating inbound and outbound traffic flow. Additionally, the following points provide supplementary explanations regarding the inbound and outbound traffic flow calculation logic.
[0059] (1) The selected time window size is 30 minutes. The main reason is that the normal driving time of vehicles between upstream and downstream areas is less than 30 minutes. A smaller time window requires less computation and is more conducive to real-time calculation. The inbound traffic flow at checkpoint 592 (i.e., Yahongqiao toll station in the Shenyang direction) and checkpoint 595 (i.e., Tangshan North toll station in the Beijing direction) will be compared as examples for illustration. Figure 16 , Figure 17 The curves for “Service Area - 30min (2 segments)”, “Service Area - 45min (2 segments)”, and “Service Area - 1h (2 segments)” almost overlap, indicating that increasing the time window has almost no impact on the calculation results, and the current time window size is appropriate.
[0060] (2) In the case of missing main line checkpoints between adjacent computing nodes, the weighted method is used to estimate the inbound and outbound traffic flow, that is, the calculated inbound and outbound traffic flow is distributed to the two computing nodes according to empirical weights.
[0061] (3) If the downstream checkpoint is abnormal when entering the vehicle, the checkpoint will be re-selected for calculation; if the upstream checkpoint is abnormal when exiting the vehicle, the checkpoint will be re-selected for calculation.
[0062] Therefore, this invention classifies and analyzes entrance and exit traffic flow estimation scenarios based on the sparsity characteristics of checkpoint data; it uses a time- and space-constrained method, employing license plate number tracking from checkpoint data to determine whether vehicles have entered or exited the highway; it eliminates the influence of service area distribution on vehicle entry and exit behavior determination through classification and discussion; and it combines the estimation scenarios with service area location classification to obtain different prediction scenarios, applying different combined models to different prediction scenarios. This allows for accurate estimation of highway entry and exit traffic flow.
[0063] Exemplary device Figure 18 This is a schematic diagram of a highway entrance / exit traffic flow prediction device based on sparse checkpoint data, provided in an exemplary embodiment of the present invention. Figure 18 As shown, the device 1800 includes: The classification module 1810 is used to classify and define traffic estimation scenarios based on the sparsity characteristics of the data at the checkpoints between computing nodes, and obtain multiple preset traffic estimation scenarios. The statistics module 1820 is used to determine and statistically analyze the basic traffic flow data of each computing node within a preset time period by tracking vehicle identification information in the checkpoint data based on the spatiotemporal constraint method. The basic traffic flow data includes basic inbound traffic flow and basic outbound traffic flow. The correction module 1830 is used to correct the basic traffic data based on the spatial relationship between the service area and the computing node, eliminate the misjudgment of traffic statistics caused by vehicles entering and leaving the service area, and obtain corrected traffic data. The denoising module 1840 is used to perform moving average smoothing on the corrected flow data to obtain the first denoised flow data, and to perform SG filter denoising on the corrected flow data to obtain the second denoised flow data. The training and evaluation module 1850 is used to train multiple pre-built combined prediction models for each traffic estimation scenario using the first denoised traffic data and the second denoised traffic data as training samples, and to evaluate the prediction results to obtain the optimal prediction model for each traffic estimation scenario. The prediction module 1860 is used to predict the traffic for each traffic estimation scenario based on the optimal prediction model for each traffic estimation scenario.
[0064] Exemplary electronic devices Figure 19 This is the structure of an electronic device provided in an exemplary embodiment of the present invention. For example... Figure 19 As shown, the electronic device 190 includes one or more processors 191 and memory 192.
[0065] The processor 191 may be a central processing unit (CPU) or other form of processing unit with data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device to perform desired functions.
[0066] The memory 192 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 191 may execute the program instructions to implement the methods of the software programs of the various embodiments of the present invention described above, and / or other desired functions. In one example, the electronic device may also include an input device 193 and an output device 194, these components being interconnected via a bus system and / or other forms of connection mechanisms (not shown).
[0067] In addition, the input device 193 may also include, for example, a keyboard, a mouse, etc.
[0068] The output device 194 can output various information to the outside. The output device 194 may include, for example, a display, a speaker, a printer, and a communication network and its connected remote output devices, etc.
[0069] Of course, for the sake of simplicity, Figure 19 Only some of the components of this electronic device relevant to the present invention are shown, omitting components such as buses, input / output interfaces, etc. In addition, the electronic device may include any other suitable components depending on the specific application.
[0070] Exemplary computer program products and computer-readable storage media In addition to the methods and apparatus described above, embodiments of the present invention may also be computer program products, which include computer program instructions that, when executed by a processor, cause the processor to perform the steps in the methods according to various embodiments of the present invention described in the "Exemplary Methods" section above.
[0071] The computer program product can be written in any combination of one or more programming languages to perform the operations of the embodiments of the present invention. The programming languages include object-oriented programming languages such as Java and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0072] Furthermore, embodiments of the present invention may also be computer-readable storage media storing computer program instructions thereon, which, when executed by a processor, cause the processor to perform the steps of the methods according to various embodiments of the present invention described in the "Exemplary Methods" section above.
[0073] The computer-readable storage medium may be any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, system, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0074] The basic principles of the present invention have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in the present invention are merely examples and not limitations, and should not be considered as essential features of each embodiment of the present invention. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the present invention to the necessity of employing the aforementioned specific details.
[0075] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For system embodiments, since they largely correspond to method embodiments, the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.
[0076] The block diagrams of devices, systems, devices, and systems involved in this invention are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, systems, devices, and systems can be connected, arranged, and configured in any manner. Words such as “comprising,” “including,” “having,” etc., are open-ended terms meaning “including but not limited to,” and are used interchangeably with them. The terms “or” and “and” as used herein refer to the terms “and / or,” and are used interchangeably with them unless the context clearly indicates otherwise. The term “such as” as used herein refers to the phrase “such as but not limited to,” and is used interchangeably with it.
[0077] The methods and systems of the present invention may be implemented in many ways. For example, they may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above-described order of steps for the methods is for illustrative purposes only, and the steps of the methods of the present invention are not limited to the order specifically described above unless otherwise specifically stated. Furthermore, in some embodiments, the present invention may also be implemented as a program recorded on a recording medium, the program comprising machine-readable instructions for implementing the methods according to the present invention. Thus, the present invention also covers recording media storing programs for performing the methods according to the present invention.
[0078] It should also be noted that in the systems, apparatus, and methods of the present invention, the components or steps can be disassembled and / or recombined. These disassemblies and / or recombinations should be considered equivalents of the present invention. The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the invention. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein can be applied to other aspects without departing from the scope of the invention. Therefore, the invention is not intended to be limited to the aspects shown herein, but rather to be carried out within the widest scope consistent with the principles and novel features disclosed herein.
[0079] The above description has been given for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of the invention to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations thereof.
Claims
1. A method for predicting highway entrance and exit traffic flow based on sparse checkpoint data, characterized in that, include: Based on the sparsity characteristics of the data at the checkpoints between computing nodes, traffic estimation scenarios are classified and defined to obtain multiple preset traffic estimation scenarios. Based on the spatiotemporal constraint method, by tracking vehicle identification information in checkpoint data, the basic flow data of each computing node within a preset time period is determined and statistically analyzed. The basic flow data includes basic inbound flow and basic outbound flow. Based on the spatial relationship between the service area and the computing node, the basic traffic data is corrected to eliminate misjudgments in traffic statistics caused by vehicles entering and leaving the service area, thereby obtaining corrected traffic data. The corrected flow data is denoised using a moving average smoothing method to obtain first denoised flow data, and the corrected flow data is denoised using an SG filter to obtain second denoised flow data. The first denoised traffic data and the second denoised traffic data are used as training samples to train multiple pre-built combined prediction models for each traffic estimation scenario, and their prediction results are evaluated to obtain the optimal prediction model for each traffic estimation scenario. The optimal prediction model for each traffic estimation scenario is used to predict the traffic for each traffic estimation scenario.
2. The method according to claim 1, characterized in that, The computing nodes include interchange nodes and toll station nodes; the traffic estimation scenario categories are defined based on node type, the completeness of checkpoint deployment between adjacent nodes, and known traffic information. The traffic estimation scenarios specifically include: in a four-way interchange, four-way interchanges are adjacent to each other, and four-way interchanges are adjacent to toll stations; in a three-way interchange, three-way interchanges are adjacent to each other, three-way interchanges are adjacent to toll stations, four-way interchanges are adjacent to each other, and four-way interchanges are adjacent to each other, and four-way interchanges are adjacent to toll stations.
3. The method according to claim 1, characterized in that, Based on a spatiotemporal constraint method, by tracking vehicle identification information in checkpoint data, the basic traffic flow data of each computing node within a preset time period is determined and statistically analyzed, including: Abnormal vehicle identification information in the checkpoint data is removed, and duplicates of the same vehicle identification information that appears consecutively within a preset very short time are deduplicated to obtain valid checkpoint data. Multiple mainline checkpoints between the current computing node and the second adjacent upstream computing node are used as entry points into the upstream region, and one mainline checkpoint between the current computing node and the adjacent downstream computing node is used as entry points into the downstream region. Take one mainline checkpoint between the current computing node and its upstream neighboring computing node as the exit from the upstream region, and take multiple mainline checkpoints between the current computing node and its downstream second neighboring computing node as the exit from the downstream region. When determining when a vehicle enters, the upstream time window is set to the first preset time preceding the current time to the current time, and the downstream time window is set to the second preset time preceding the current time to the current time. When determining when to exit, set the upstream time window to the third preset time before the current time to the fourth preset time before the current time, and the downstream time window to the fifth preset time before the current time to the current time; Vehicles whose identification information only appears when leaving the upstream area and not when leaving the downstream area in the valid checkpoint data are counted as outgoing vehicles, and the basic outgoing flow is obtained. Vehicles whose identification information appears only in the downstream area but not in the upstream area from the valid checkpoint data are counted as entering vehicles, thus obtaining the basic inbound traffic flow. The first preset time, the second preset time, the third preset time, the fourth preset time, and the fifth preset time are determined by the speed and the distance between the checkpoints.
4. The method according to claim 1, characterized in that, Based on the spatial relationship between the service area and the computing node, and eliminating misjudgments in traffic statistics caused by vehicles entering and leaving the service area, the basic traffic data is corrected to obtain corrected traffic data, including: Based on whether there is a mainline bottleneck between the service area and adjacent computing nodes, identify the types of traffic statistics misjudgments and obtain the misjudged traffic for each type; The corrected traffic data is obtained by subtracting the misjudged traffic of the corresponding type from the basic traffic data.
5. The method according to claim 1, characterized in that, The corrected traffic data is denoised using a moving average smoothing method to obtain first denoised traffic data, including: The traffic data is smoothed using a moving window of a preset width; Calculate the ratio of the sum of the corrected flow data before and after smoothing, and multiply the smoothed corrected flow data by the ratio to obtain the smoothed flow data; Compare the first sum of the corrected traffic data with the second sum of the smoothed traffic data. If the first sum is larger, the difference between the first sum and the second sum is evenly distributed and added to the smaller data points of the smoothed traffic data. If the first sum is smaller, the difference is evenly distributed and added to the larger data points of the smoothed traffic data to obtain the first denoised traffic data.
6. The method according to claim 1, characterized in that, The SG filter has a time window width of 11 time steps and a polynomial order of 2.
7. The method according to claim 1, characterized in that, The first denoised traffic data and the second denoised traffic data are used as training samples to train multiple pre-built combined prediction models for each traffic estimation scenario, and the prediction results are evaluated to obtain the optimal prediction model for each traffic estimation scenario, including: In different traffic estimation scenarios, the first set of prediction models is used to train and predict the first denoised traffic sequence. In different traffic estimation scenarios, for the second denoised traffic sequence, a second set of prediction models is used for training and prediction; the first set of prediction models and the second set of prediction models contain at least one different prediction model; The prediction results output by each prediction model are evaluated from multiple preset evaluation dimensions, a comprehensive score is calculated, and the optimal prediction model suitable for the current traffic estimation scenario is selected based on the comprehensive score.
8. The method according to claim 7, characterized in that, The first set of prediction models and / or the second set of prediction models include at least one of the following: long short-term memory networks, gated recurrent units, autoregressive integral moving average models, and combinations thereof or combined models with STL.
9. The method according to claim 7, characterized in that, The multiple evaluation dimensions include accuracy, stability, and robustness; the comprehensive score is obtained by weighted summation of multiple sub-indicators under each evaluation dimension.
10. A highway entrance / exit traffic flow prediction device based on sparse checkpoint data, characterized in that, include: The classification module is used to classify and define traffic estimation scenarios based on the sparsity characteristics of the data at the checkpoints between computing nodes, and obtain multiple preset traffic estimation scenarios. The statistics module is used to determine and statistically analyze the basic traffic flow data of each computing node within a preset time period by tracking vehicle identification information in the checkpoint data based on the spatiotemporal constraint method. The basic traffic flow data includes basic inbound traffic flow and basic outbound traffic flow. The correction module is used to correct the basic traffic data by eliminating traffic statistics errors caused by vehicles entering and leaving the service area based on the spatial relationship between the service area and the computing node, so as to obtain corrected traffic data. The denoising module is used to perform moving average smoothing on the corrected flow data to obtain first denoised flow data, and to perform SG filter denoising on the corrected flow data to obtain second denoised flow data. The training and evaluation module is used to train multiple pre-built combined prediction models for each traffic estimation scenario using the first denoised traffic data and the second denoised traffic data as training samples, and to evaluate their prediction results to obtain the optimal prediction model for each traffic estimation scenario. The prediction module is used to predict the traffic for each traffic estimation scenario based on the optimal prediction model for each traffic estimation scenario.
11. A computer-readable storage medium, characterized in that, The storage medium stores a computer program for performing the method described in any one of claims 1-9.
12. An electronic device, characterized in that, The electronic device includes: processor; Memory used to store the processor's executable instructions; The processor is configured to read the executable instructions from the memory and execute the instructions to implement the method described in any one of claims 1-9.