A traffic flow prediction and early warning method, device, equipment and storage medium

By explicitly decoupling real-time traffic data from basic flow and event congestion components, and utilizing multi-task prediction models and historical data to calculate traffic capacity, the problem of distinguishing between normal and emergency events in highway traffic flow prediction is solved, thereby improving prediction accuracy and early warning effectiveness.

CN121011086BActive Publication Date: 2026-02-03GUANGDONG ZHISHI CLOUD CONTROL TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511547225.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-28
Publication Date
2026-02-03
Estimated Expiration
2045-10-28

AI Technical Summary

Technical Problem

Existing technologies fail to effectively distinguish between normal traffic demand and congestion caused by sudden events in highway traffic flow prediction. This leads to distorted prediction results due to hybrid modeling and an inability to provide effective early warning information.

Method used

By explicitly decoupling real-time traffic data from basic flow components and event-related congestion components, a multi-task prediction model is used to predict basic flow and event-related flow across multiple cycles. Combined with historical traffic data, effective capacity is calculated to generate traffic flow early warning information.

Benefits of technology

It significantly improves the accuracy of traffic flow forecasting, provides a clear basis for decision-making, and optimizes the effectiveness of traffic flow forecasting and early warning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121011086B_ABST
    Figure CN121011086B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of traffic flow prediction, and discloses a traffic flow prediction and early warning method, device, equipment and storage medium, comprising: acquiring real-time traffic data and historical traffic data of a target road section; performing explicit decoupling on the real-time traffic data to obtain a basic flow component and an event congestion component; inputting the basic flow component into a preset multi-task prediction model to obtain a multi-period basic flow prediction value; performing future flow prediction based on the event congestion component to obtain an event influence flow value; performing flow fusion calculation based on the multi-period basic flow prediction value and the event influence flow value to obtain a final flow prediction value; performing effective traffic capacity calculation based on the event congestion component and the historical traffic data to obtain a real-time effective traffic capacity value; and comparing the final flow prediction value with the real-time effective traffic capacity to generate traffic flow early warning information; the present application optimizes the traffic flow prediction and early warning effect through multi-period prediction and decoupling analysis.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of traffic volume prediction, and in particular to a traffic flow prediction and early warning method, device, equipment and storage medium. BACKGROUND

[0002] In the field of highway traffic flow prediction and early warning, the prior art generally takes the whole traffic flow as the modeling object, does not effectively distinguish and separate the basic flow representing normal traffic demand and the event congestion flow caused by sudden events such as accidents and bad weather, but adopts a mixed modeling method for prediction; such a mixed modeling mode will interfere with the prediction logic of the basic flow by the abnormal flow fluctuation caused by sudden events, resulting in a large deviation between the traffic flow prediction results of different periods and the actual normal traffic demand, and further causing model distortion, which cannot provide effective early warning information for managers. SUMMARY

[0003] In order to overcome the shortcomings of the prior art, the purpose of the present application is to provide a traffic flow prediction and early warning method, system, device and storage medium, which significantly improves the prediction accuracy by combining multi-period prediction and decoupling analysis, solves the mixed modeling drawbacks of the prior art, provides clear root cause decision basis for traffic managers, and effectively optimizes the traffic flow prediction and early warning effect.

[0004] The first aspect of the present application provides a traffic flow prediction and early warning method, comprising: acquiring real-time traffic data and historical traffic data of a target road section;

[0005] Explicitly decoupling the real-time traffic data to obtain a basic flow component and an event congestion component;

[0006] Inputting the basic flow component into a preset multi-task prediction model to obtain a multi-period basic flow prediction value;

[0007] Performing future flow prediction based on the event congestion component to obtain an event impact flow value;

[0008] Performing flow fusion calculation based on the multi-period basic flow prediction value and the event impact flow value to obtain a final flow prediction value;

[0009] Performing effective traffic capacity calculation based on the event congestion component and the historical traffic data to obtain a real-time effective traffic capacity value;

[0010] Comparing the final flow prediction value with the real-time effective traffic capacity to generate traffic flow early warning information.

[0011] Optionally, in a first implementation of the first aspect of the present invention, the explicit decoupling of real-time traffic data to obtain basic flow components and event congestion components includes: performing state identification on real-time traffic data to determine the current traffic flow state of the target road segment; and performing explicit decoupling of real-time traffic data by matching a pre-built flow decoupling model from a preset flow decoupling model library according to the traffic flow state to obtain basic flow components representing normal traffic demand and event congestion components representing abnormal events.

[0012] Optionally, in a second implementation of the first aspect of the present invention, the step of inputting the basic traffic components into a preset multi-task prediction model to obtain multi-period basic traffic prediction values ​​includes: inputting the basic traffic components into the preset multi-task prediction model, and using the underlying shared feature extraction network of the multi-task prediction model to extract time-series features and trend features from the basic traffic components; sending the time-series features and trend features to the multi-period output head of the multi-task prediction model respectively; the multi-period output head includes an hourly output head, a daily output head, a weekly output head, and a monthly output head; and performing calculations on the time-series features and trend features through the multi-period output head to obtain multi-period basic traffic prediction values.

[0013] Optionally, in a third implementation of the first aspect of the present invention, the step of calculating the effective traffic capacity based on event congestion components and historical traffic data to obtain a real-time effective traffic capacity value includes: performing event analysis on the event congestion components to determine the current traffic event; retrieving the historical traffic event with the highest similarity to the current traffic event from historical traffic data; obtaining historical flow data corresponding to the historical traffic event; and performing analogical reasoning on the historical flow data based on the differences in characteristics between the current traffic event and the historical traffic event to obtain the event-affected flow value.

[0014] Optionally, in a fourth implementation of the first aspect of the present invention, the step of performing traffic fusion calculation based on the multi-period basic traffic prediction value and the event-affected traffic value to obtain the final traffic prediction value includes: dividing the multi-period basic traffic prediction value into hourly traffic prediction value, daily traffic prediction value, weekly traffic prediction value, and monthly traffic prediction value; correcting the event-affected traffic value using a preset event attenuation coefficient to obtain a corrected event-affected traffic value; accumulating the corrected event-affected traffic value by hourly, daily, weekly, and monthly levels, and then weighting and aggregating it with the hourly, daily, weekly, and monthly traffic prediction values ​​respectively to obtain the final traffic prediction value.

[0015] Optionally, in a fifth implementation of the first aspect of the present invention, the step of calculating the effective traffic capacity based on the event congestion components to obtain a real-time effective traffic capacity value includes: obtaining the design traffic capacity value of the target road; extracting event impact factors related to traffic on the target road based on the event congestion components; the event impact factors include lane occupancy ratio factors, event occurrence time factors, real-time weather factors, and road segment geometric risk factors; generating reduction coefficients based on the event impact factors, and correcting the design traffic capacity value according to the reduction coefficients to obtain a real-time effective traffic capacity value.

[0016] Optionally, in a sixth implementation of the first aspect of the present invention, the step of comparing the final traffic flow prediction value with the real-time effective traffic capacity to generate traffic flow early warning information includes: comparing the final traffic flow prediction value with the real-time effective traffic capacity to obtain a comparison result; and generating traffic flow early warning information based on the comparison result and preset early warning level triggering conditions.

[0017] A second aspect of the present invention provides a traffic flow prediction and early warning device, comprising: a data acquisition module for acquiring real-time traffic data and historical traffic data of a target road segment; a data decoupling module for explicitly decoupling the real-time traffic data to obtain basic flow components and event congestion components; a periodic prediction module for inputting the basic flow components into a preset multi-task prediction model to obtain multi-period basic flow prediction values; an event prediction module for predicting future flow based on event congestion components to obtain event-affected flow values; a flow fusion module for performing flow fusion calculations based on multi-period basic flow prediction values ​​and event-affected flow values ​​to obtain a final flow prediction value; a traffic analysis module for calculating effective traffic capacity based on event congestion components and historical traffic data to obtain a real-time effective traffic capacity value; and a comparison and early warning module for comparing the final flow prediction value with the real-time effective traffic capacity to generate traffic flow early warning information.

[0018] A third aspect of the present invention provides a traffic flow prediction and early warning device, the traffic flow prediction and early warning device comprising: a memory and at least one processor, the memory storing instructions; at least one processor calling the instructions in the memory to cause the computer device to execute the various steps of the traffic flow prediction and early warning method described in any of the preceding claims.

[0019] A fourth aspect of the present invention provides a computer-readable storage medium storing instructions that, when executed by a processor, implement the steps of the traffic flow prediction and early warning method described in any of the preceding claims.

[0020] In the technical solution of this invention, firstly, normal basic traffic flow and abnormal event congestion traffic flow are separated from the data source; then, the separated basic traffic flow components are input into a preset multi-task prediction model, which can output multi-period basic traffic flow prediction values ​​in the dimensions of hours, days, weeks, and months, ensuring that the normal traffic flow prediction in each period is not affected by events; at the same time, the event-affected traffic flow value is predicted separately based on the event congestion component, quantifying the degree of impact of the event on traffic flow; then, the final traffic flow prediction value is obtained through traffic fusion calculation, ensuring that the prediction result can reflect the superposition effect of normal and abnormal traffic flow; subsequently, the real-time effective capacity value is calculated by combining the event congestion component and historical traffic data, providing a benchmark for early warning comparison; finally, the final traffic flow prediction value is compared with the real-time effective capacity to generate early warning information. The solution of this invention, by combining multi-period prediction and decoupled analysis, significantly improves the prediction accuracy, solves the drawbacks of the hybrid modeling of existing technologies, provides traffic managers with a clear decision-making basis, and effectively optimizes the effect of traffic flow prediction and early warning. Attached Figure Description

[0021] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which:

[0022] Figure 1 This is a first flowchart of a traffic flow prediction and early warning method provided in an embodiment of the present invention;

[0023] Figure 2 This is a second flowchart of the traffic flow prediction and early warning method provided in an embodiment of the present invention;

[0024] Figure 3 This is a third flowchart of the traffic flow prediction and early warning method provided in the embodiments of the present invention;

[0025] Figure 4 This is a fourth flowchart of the traffic flow prediction and early warning method provided in the embodiments of the present invention;

[0026] Figure 5 This is a fifth flowchart of the traffic flow prediction and early warning method provided in the embodiments of the present invention;

[0027] Figure 6 This is a sixth flowchart of the traffic flow prediction and early warning method provided in the embodiments of the present invention;

[0028] Figure 7 The seventh flowchart of the traffic flow prediction and early warning method provided in the embodiments of the present invention;

[0029] Figure 8 This is a schematic diagram of the traffic flow prediction and early warning device provided in an embodiment of the present invention;

[0030] Figure 9This is a schematic diagram of the traffic flow prediction and early warning device provided in an embodiment of the present invention. Detailed Implementation

[0031] This invention provides a traffic flow prediction and early warning method, system, device, and storage medium. By combining multi-period prediction and decoupling analysis, it significantly improves prediction accuracy, solves the drawbacks of hybrid modeling in existing technologies, provides traffic managers with a clear decision-making basis based on root causes, and effectively optimizes the effect of traffic flow prediction and early warning.

[0032] The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" or "having" and any variations thereof are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0033] For ease of understanding, the specific process of the embodiments of the present invention is described below. Please refer to [link / reference]. Figure 1 One embodiment of the traffic flow prediction and early warning method in this invention includes:

[0034] 101. Obtain real-time and historical traffic data for the target road segment;

[0035] In this embodiment, the core of traffic flow prediction and early warning is to deduce future trends based on data patterns. Real-time traffic data reflects the current road conditions, while historical traffic data contains normal traffic flow patterns and event impact patterns. Both are indispensable. The core purpose of this step is to obtain two types of data to provide complete data support for subsequent traffic flow decoupling, prediction, and capacity calculation.

[0036] Historical traffic data acquisition: Real-time traffic flow, average speed, lane occupancy, and vehicle type ratio are collected at a 5-minute granularity using coil sensors, radar detectors, and video surveillance equipment deployed along the target road section. Simultaneously, real-time event reporting data (such as accident and construction location and type) from the road patrol system and real-time weather data (such as precipitation level and visibility) from the meteorological station are integrated to ensure the data reflects the current traffic operation status and interfering factors. Historical traffic data is used to train multi-task prediction models, build an event case knowledge base, and determine capacity reduction coefficients.

[0037] The acquisition of historical traffic data is divided into two stages;

[0038] In the early stages of data accumulation, due to the short deployment time and limited data accumulation of the target road segment's traffic data front-end, it was impossible to directly obtain sufficient historical data from the past 3-5 years. Therefore, a holiday basic traffic flow prediction model constructed using the meta-learning framework MAML was adopted to output equivalent historical traffic data. The specific implementation method is as follows:

[0039] First, historical weekday data (including hourly and daily basic traffic flow data, excluding the impact of accidents, construction, and other events) of the target road segment and surrounding similar road segments are retrieved from the traffic management department's database. This data serves as training data for the meta-learning model, which is then input into the MAML framework to train the model and enable it to predict basic traffic flow. Next, meta-feature vectors for holidays of the target road segment are extracted (such as holiday type, holiday duration, distribution of surrounding business districts, historical weather trends for the same period, and traffic control information), and input into the trained MAML model. Finally, the model performs zero-shot prediction based on the meta-feature vectors, outputting hourly and daily basic traffic flow prediction data for different holidays of the target road segment, which serves as equivalent historical traffic data for the data missing phase.

[0040] Once sufficient data has been accumulated, historical data for the target road segment over the past 3-5 years can be retrieved from the traffic management department's database. This includes hourly and daily traffic flow data for weekdays and holidays during the same period (pure basic traffic flow data excluding the impact of events), historical event case data (such as accident type, duration of impact, and traffic flow change curves), and traffic flow fluctuation data under different weather conditions.

[0041] 102. Explicitly decouple real-time traffic data to obtain basic flow components and event congestion components;

[0042] In this embodiment, a preset state classifier is first used to determine whether the target road segment is currently in a normal state, a holiday state, or an event state by combining features such as traffic fluctuations, event reporting, and weather in real-time data. Then, based on the determination result, the corresponding dedicated model is called from the traffic decoupling model library to explicitly decouple the real-time traffic data, thereby separating the basic traffic components and the event congestion components.

[0043] 103. Input the basic flow components into the preset multi-task prediction model to obtain multi-period basic flow prediction values;

[0044] In this embodiment, the basic traffic components obtained by explicit decoupling are input into the multi-task prediction model. The model extracts time-series and trend features from the basic traffic through the underlying shared feature extraction network. The features are then sent to four independent output heads at the hourly, daily, weekly, and monthly levels. Through the computational logic adapted to each output head, multi-period basic traffic prediction values ​​are output synchronously.

[0045] 104. Predict future traffic flow based on event congestion components to obtain the event's impact on traffic flow;

[0046] In this embodiment, the characteristics of the traffic congestion components of the event, such as the fluctuation range and scope of impact, are first analyzed, and key information such as the type of the current traffic event, the number of lanes occupied, and the time of occurrence are determined by combining the event reporting data. Then, historical cases similar to the current event are retrieved from the event case knowledge base, and the traffic impact patterns of similar cases are referenced. The coefficients are then corrected by combining the characteristic differences between the current event and historical cases. Finally, the future event impact traffic value is predicted through analogy reasoning.

[0047] 105. Perform traffic fusion calculation based on multi-period basic traffic forecast values ​​and event-affected traffic values ​​to obtain the final traffic forecast value;

[0048] In this embodiment, the multi-period basic traffic forecast value is first split into hourly, daily, weekly, and monthly dimensions; then, the event-affected traffic value is dynamically corrected using the decay function preset in the referenced file; finally, the corrected multi-period basic traffic forecast value and the event-affected traffic value are fused together to obtain the final traffic forecast value.

[0049] 106. Calculate the effective capacity based on event congestion components and historical traffic data to obtain the real-time effective capacity value;

[0050] In this embodiment, the design capacity value of the target road segment is first obtained; then, based on the event information associated with the event congestion components, event impact factors such as lane occupancy ratio, real-time weather, and road segment geometric features are extracted; a reduction coefficient is obtained based on the impact factors; finally, the design capacity value is multiplied by the reduction coefficient to obtain the real-time effective capacity value under the influence of the current event.

[0051] 107. Compare the final traffic flow forecast with the real-time effective capacity to generate traffic flow early warning information;

[0052] In this embodiment, the final traffic flow prediction value is first quantitatively compared with the real-time effective traffic capacity on a periodic basis to calculate the over-limit range; then, combined with the preset warning level triggering conditions, the warning level for each period is determined, and finally traffic flow warning information is generated.

[0053] In this embodiment of the invention, firstly, normal basic traffic flow and abnormal event congestion traffic flow are separated from the data source. Then, the separated basic traffic flow components are input into a preset multi-task prediction model, which can output multi-period basic traffic flow prediction values ​​in hourly, daily, weekly, and monthly dimensions, ensuring that normal traffic flow prediction for each period is not affected by events. Simultaneously, the event-affected traffic flow value is predicted separately based on the event congestion component, quantifying the degree of impact of the event on traffic flow. Then, the final traffic flow prediction value is obtained through traffic fusion calculation, ensuring that the prediction result reflects the superimposed effect of normal and abnormal traffic flow. Subsequently, the real-time effective capacity value is calculated by combining the event congestion component with historical traffic data, providing a benchmark for early warning comparison. Finally, the final traffic flow prediction value is compared with the real-time effective capacity to generate early warning information. The solution of this invention, by combining multi-period prediction and decoupled analysis, significantly improves prediction accuracy, solves the drawbacks of hybrid modeling in existing technologies, provides traffic managers with a clear decision-making basis, and effectively optimizes traffic flow prediction and early warning effects.

[0054] Please see Figure 2 Two embodiments of the traffic flow prediction and early warning method in this invention include step 102, which includes:

[0055] 201. Perform status identification on real-time traffic data to determine the current traffic flow status of the target road segment;

[0056] In this embodiment, the current traffic flow status is identified to provide a basis for selecting the appropriate decoupling model. The traffic flow characteristics of different traffic flow statuses (such as normal commuting, holiday travel, and accident congestion) are significantly different. For example, holiday traffic shows a double-peak trend of "travel peak / return peak", while accident traffic shows a sudden drop and rise trend. If the status is not identified first and decoupling is performed directly, it will lead to a deviation in the separation between basic traffic flow and event congestion traffic.

[0057] The specific methods for state recognition are as follows:

[0058] First, a preliminary analysis of real-time traffic data is conducted to extract three key data aspects: traffic operation data (real-time traffic flow, average vehicle speed, lane occupancy), event data (accidents, construction, weather), and time period data (weekdays, weekends, statutory holidays, morning and evening rush hours). This data is then simply processed to remove obviously invalid data (such as blank values ​​caused by temporary sensor malfunctions) to ensure that the data accurately reflects the current road conditions.

[0059] Feature Input and State Determination: Input the processed real-time traffic data, event information, meteorological data, time period attributes and other core features into the preset traffic flow state classifier; the traffic flow state classifier is a model trained on historical traffic data of the target road segment, learns the traffic feature patterns under different states based on historical samples, and can automatically determine the current state based on the input data;

[0060] The classifier compares the similarity between the current three key data points and the three key data points from the past, and outputs the state with the highest probability as the judgment result:

[0061] If there are no abnormal events, the weather is normal, and the traffic flow and vehicle speed are in line with the normal fluctuation patterns of weekdays or weekends, it is judged as "normal state";

[0062] If there are no abnormal events at present, but it is a statutory holiday and the traffic is significantly higher than on weekdays, it is judged as "holiday status";

[0063] If an event is reported (such as an accident or construction), and traffic flow drops sharply and vehicle speed decreases significantly, it is classified as an "event state".

[0064] The above judgment of traffic flow status will be directly used for the selection of the decoupling model in step 202, thereby ensuring that the model matches the current traffic scenario.

[0065] 202. Based on the traffic flow status, match the pre-built traffic decoupling model from the preset traffic decoupling model library to explicitly decouple the real-time traffic data, so as to obtain the basic traffic flow component that represents normal traffic demand and the event congestion component that represents abnormal events.

[0066] In this embodiment, based on the state determination result of step 201, the appropriate dedicated decoupling model is called to realize the correspondence between the state and the model;

[0067] The logic of traffic flow formation differs under different traffic flow states. Normal flow is dominated by regular demand such as daily commuting and freight, while holiday flow is dominated by concentrated travel demand. Event flow is affected by abnormal factors such as accidents and weather. If the same model is used to decouple them, the basic flow will be mixed with abnormal influences, and the congestion component of the event cannot be accurately quantified.

[0068] The specific methods for explicit decoupling are as follows:

[0069] The traffic decoupling model library contains three types of decoupling models, corresponding to normal state, holiday state, and event state, respectively.

[0070] The decoupling model consists of the following components:

[0071] The base network employs an improved TCN (Temporal Convolutional Network) to capture traffic features at different time scales through dilated convolutions.

[0072] Feature extraction layer: includes a traffic flow feature subnetwork (extracting traffic volume, speed, and occupancy features) and an event feature subnetwork (extracting event type, location, and duration features);

[0073] Decoupled output layer: Adopts a dual-channel separation structure to output basic traffic components and event congestion components respectively;

[0074] The training method for the decoupling model is as follows:

[0075] The training dataset consists of historical traffic data from the past three years, divided into training and validation sets in a 7:3 ratio. The training features include 5-minute granularity traffic flow data sequences, time features, meteorological features, and road segment attribute features. The label data consists of manually labeled basic traffic flow components (traffic flow without event impact) and event congestion components (traffic flow deviation caused by events).

[0076] The loss function uses MSE (mean squared error) loss, with a weight of 1.5 for the event congestion component; the optimizer uses the Adam optimizer with an initial learning rate of 0.001.

[0077] First, based on the status type output in step 201, match the corresponding traffic decoupling model from the model library;

[0078] If the model matches the "normal state," it first supplements the input with historical normal traffic data for the same period of the target road segment over a recent period (such as traffic flow data for the same time every Tuesday for the past 3 months) to provide a normal traffic reference standard for the model. The model uses this historical normal traffic data as a benchmark, compares it with real-time traffic data, and extracts the portion of real-time traffic that conforms to normal fluctuation patterns as the "basic traffic component." For the normal state, if the difference between the real-time traffic and the basic traffic component is extremely small (within a reasonable fluctuation range), it can be determined that there is no event-related congestion component, and the output "event-related congestion component" is zero.

[0079] If the model matches the "holiday status decoupling model", then first supplement the model with the characteristic data of holidays (specific holiday type, number of holiday days, and traffic situation in the early stage); the model uses the basic traffic prediction ability trained by historical working day data, combined with the holiday characteristics, to predict the normal traffic during the holiday as the "basic traffic component", and then subtract the basic traffic component from the real-time traffic to obtain the "event congestion component".

[0080] If the "event state decoupling model" is matched, the model is first supplemented with detailed information about the current event (such as accident type, number of affected lanes, and event occurrence time) to provide an analogy for the model. The model then predicts the normal basic traffic flow (i.e., "basic traffic component") in the current scenario based on the event information, and then calculates the difference between the real-time traffic flow and the basic traffic component. This difference is the "event congestion component".

[0081] Please see Figure 3 In the three embodiments of the traffic flow prediction and early warning method of the present invention, step 103 includes:

[0082] 301. Input the basic traffic components into the preset multi-task prediction model, and use the underlying shared feature extraction network of the multi-task prediction model to extract time-series features and trend features from the basic traffic components.

[0083] In this embodiment, multi-period basic traffic prediction needs to cover four dimensions: hour, day, week, and month. If a feature extraction network is built separately for each period, it will lead to data redundancy and low computational efficiency. Therefore, the core purpose of this step is to extract the core features (time series features and trend features) required for prediction in each period from the basic traffic components at once through the underlying shared feature extraction network of the multi-task prediction model. This ensures the consistency of feature extraction, reduces redundant calculations, and lays the foundation for subsequent multi-period parallel prediction.

[0084] The specific components of the multi-task prediction model are as follows:

[0085] The shared feature extraction layer uses LSTM (Long Short-Term Memory) as its basic structure, containing three layers of bidirectional LSTM units (64 neurons per layer), which are responsible for extracting general temporal features of traffic flow.

[0086] The multi-period independent output head is designed with independent output branches for prediction tasks of different periods; the hourly output head is set with a 1-layer fully connected network and a time distribution dense layer; the daily output head is set with a 2-layer fully connected network; the weekly and monthly output heads are each set with a 1-layer fully connected network.

[0087] The training strategy for the multi-task prediction model is as follows:

[0088] Based on basic traffic data that has no historical impact from events, the dataset is divided into a training set (80%), a validation set (10%), and a test set (10%) according to time series.

[0089] The input features are basic traffic data that has no historical impact from events; the label data are the actual basic traffic values ​​for the future prediction period corresponding to the above basic traffic data.

[0090] The loss function adopts multi-task joint loss, and the loss of each task is weighted and summed according to the weights of hourly (0.4), daily (0.3), weekly (0.2), and monthly (0.1); the optimizer uses AdamW optimizer with an initial learning rate of 0.0005 and a weight decay of 0.0001.

[0091] The multi-task prediction model adopts a two-layer architecture of "bottom-layer sharing + upper-layer separation". The shared feature extraction network serves as the core feature processing module of the model, which is responsible for uniformly extracting the time-series features and trend features required for prediction in each period from the input basic traffic components. The multi-period independent output heads correspond to hourly, daily, weekly, and monthly predictions, respectively. Each output head has built-in operation logic adapted to the corresponding period. After receiving the features from the bottom-layer shared network, it independently completes the calculation of the basic traffic prediction value for the corresponding period.

[0092] The basic traffic components are input into the underlying shared feature extraction network, which separates time-series features and trend features from the basic traffic:

[0093] The time series characteristics mainly reflect the fluctuation pattern of the basic flow in a short period of time, such as the flow fluctuation at different times within an hour, and the fixed time period when the daily flow peak occurs. These characteristics are the key basis for hourly and daily forecasts.

[0094] Trend characteristics mainly reflect the changing patterns of basic traffic over a longer period of time, such as the difference in traffic between weekdays and weekends, and the cyclical growth / decline trend of traffic within a month. These characteristics are the core support for weekly and monthly forecasts.

[0095] 302. The time-series features and trend features are respectively fed into the multi-period output head of the multi-task prediction model; the multi-period output head includes an hourly output head, a daily output head, a weekly output head, and a monthly output head;

[0096] In this embodiment, the basic traffic flow for different periods—hourly, daily, weekly, and monthly—has different emphases on features (e.g., hourly flow relies more on time-series features, while monthly flow relies more on trend features). Using a single output head for computation cannot meet the differentiated prediction needs of each period. Therefore, the core objective of this step is to specifically deliver the two types of extracted features to output heads adapted to different periods. Specifically:

[0097] Hourly output head: mainly used to predict hourly granular flow for the next 24-72 hours. It needs to accurately reflect short-term fluctuations, so it prioritizes receiving time-series features, while supplementing with a small amount of trend features (such as the flow trend of the current day and the week).

[0098] Daily output head: mainly used to predict daily granular flow for the next 7-14 days. It needs to take into account both short-term fluctuations and intraday patterns, so it simultaneously receives time-series characteristics (intraday flow fluctuation patterns) and trend characteristics (weekly date difference patterns).

[0099] Weekly output head: mainly used to predict the weekly average flow rate for the next 4-8 weeks. It needs to focus on the medium-term trend, so it prioritizes trend features (inter-week flow rate difference, weekly trend within the month), supplemented by a small number of time-series features, such as the weekly average flow rate parameter.

[0100] Monthly output head: mainly used to predict the total monthly flow for the next 3-6 months. It needs to focus on long-term trends, so it only receives trend characteristics (monthly flow growth, seasonal fluctuation patterns).

[0101] According to the above rules, time series features and trend features are directed to the corresponding multi-period output heads to ensure that each output head only receives the feature data required for its prediction and avoids irrelevant features from interfering with the calculation.

[0102] 303. Perform calculations on time-series and trend features using a multi-cycle output head to obtain multi-cycle basic flow prediction values;

[0103] In this embodiment, the four periodic output heads infer future traffic change patterns based on the input feature data, and obtain hourly, daily, weekly, and monthly basic traffic forecast values ​​respectively. The multi-period basic traffic forecast value can be obtained by summarizing the above.

[0104] Please see Figure 4 In the four embodiments of the traffic flow prediction and early warning method of the present invention, step 104 includes:

[0105] 401. Conduct event analysis on the congestion components of the event to determine the current traffic event;

[0106] In this embodiment, the event congestion component is a "flow component characterizing abnormal events," which corresponds to specific traffic events (such as accidents, construction, and severe weather). The impact patterns of different events on flow differ significantly (e.g., the duration and scope of the impact of rear-end collisions and rainstorms are different). Therefore, the core purpose of this step is to analyze the event congestion component to reverse locate and clarify the specific traffic event type and key characteristics that are currently causing congestion, laying the foundation for subsequent retrieval of similar historical events and accurate prediction of the impact on flow.

[0107] The specific steps of event analysis are as follows:

[0108] First, feature extraction is performed to extract key features that reflect the attributes of the event from the congestion components: the magnitude of traffic fluctuations caused by the event, the start time of the impact, the scope of the impact, and the trend of traffic recovery. These features are directly related to the severity and type of the event.

[0109] Then, the data that occurred at the same time as the event is correlated with the above features, and auxiliary data that occurred at the same time as the congestion component of the event is retrieved, such as event records reported by the road patrol system and meteorological monitoring data. These data are cross-validated with the congestion component features of the event to avoid misjudgment of the event due to relying solely on traffic data.

[0110] Subsequently, by combining the above features and auxiliary data, the current traffic incident can be identified, and the identified current traffic incident information can be organized into a complete event feature table, which includes fields such as event type, occurrence time, number of lanes occupied, weather conditions, and current impact, providing a basis for subsequent retrieval and analogy steps.

[0111] 402. Retrieve the historical traffic event with the highest similarity to the current traffic event from historical traffic data;

[0112] In this embodiment, since events of the same type and similar characteristics have a consistent impact on traffic (such as similar rear-end collisions with similar traffic recovery times), the core purpose of this step is to find the historical event that best matches the characteristics of the current event from historical data, thereby providing samples for subsequent analogical reasoning.

[0113] Based on the current traffic event (event feature table) output in step 401, set search keywords. Different fields correspond to different search weights, as detailed below:

[0114] High-weighted conditions (60% weight): Event type, number of lanes occupied;

[0115] Medium-weighted conditions (30% weight): meteorological conditions and time of occurrence;

[0116] Low-weight condition (weight 10%): Current impact magnitude;

[0117] By comparing the characteristics of the current event with those of various historical cases, the historical traffic event cases with the highest similarity were selected.

[0118] 403. Obtain historical traffic flow data corresponding to historical traffic events;

[0119] In this embodiment, historical traffic data records the traffic changes throughout the entire process of a historical event from its occurrence to its end, and can be directly used as a reference template for the current event; therefore, this step retrieves complete traffic impact data corresponding to historical traffic events to provide data support for subsequent analogical reasoning.

[0120] 404. Based on the differences in characteristics between current traffic events and historical traffic events, perform analogical reasoning on historical traffic flow data to obtain the traffic flow value affected by the event;

[0121] In this embodiment, the differences between the current traffic incident and historical traffic incidents are first compared, which can be based on the following aspects:

[0122] Time-of-day differences: The amplification or reduction effect of traffic flow at different times (peak and off-peak hours) on the impact of the event needs to be considered;

[0123] Road condition differences: The impact of different road conditions (construction conditions) on traffic flow needs to be considered;

[0124] Differences in handling: For example, if the current road administration clearing capacity is more sufficient, the traffic flow recovery speed needs to be adjusted;

[0125] To address the aforementioned discrepancies, a "coefficient correction method" is used to adjust the historical traffic data, resulting in corrected historical traffic data. The calculation basis for the correction coefficient is as follows: if the difference results in a traffic impact of ±n%, the corresponding correction coefficient is (1±n)×100%. For example, if the current period is a peak time, and historical data statistics from the referenced file show that the impact of events during peak hours is 20% higher than during off-peak hours, then the correction coefficient is 120%, which is calculated by multiplying the impact traffic values ​​of each period of the historical event by 120%.

[0126] Subsequently, the historical traffic data is corrected and time-series mapped according to the time dimension of the current event to obtain the traffic value affected by the event; the time-series mapping steps are as follows:

[0127] Timeline alignment: Using the current event's occurrence time as the origin, construct a timeline for the next 1-48 hours (divided into hourly granularities), and simultaneously using the occurrence time of historical events as the origin, extract the corrected historical traffic data from the corresponding timeline.

[0128] Phase mapping: Mapping the "early stage (0-2 hours), middle stage (2-4 hours), and late stage (4-6 hours)" of historical events to the "future 0-2 hours, 2-4 hours, and 4-6 hours" of the current event;

[0129] Boundary handling: If the expected duration of the current event is shorter than that of historical events, the corrected traffic data from the previous 3 hours of the historical event is extracted for mapping; if the expected duration of the current event is longer, the portion exceeding the duration of historical events is extrapolated based on a preset event impact decay function.

[0130] Output: The mapped traffic impact values ​​for each time node are organized into a sequence, which is the traffic impact value of the current event.

[0131] Please see Figure 5 Five embodiments of the traffic flow prediction and early warning method in this invention include step 105, which includes:

[0132] 501. Divide the multi-period basic flow forecast values ​​into hourly flow forecast values, daily flow forecast values, weekly flow forecast values ​​and monthly flow forecast values.

[0133] 502. Use a preset event attenuation coefficient to correct the event impact flow value to obtain the corrected event impact flow value;

[0134] In this embodiment, since traffic events have an objective law of decay over time, when considering the impact of events on traffic flow, we must preset a decay coefficient to dynamically correct the impact of events on traffic flow, so as to ensure that the corrected data can reflect the actual impact at different time points.

[0135] Before performing the correction, the event decay coefficient must first be defined. The expression for the event decay coefficient is: ; D is the difference between the predicted time and the actual time of occurrence; D is the predicted duration of the event. The attenuation factor is used to describe... The decay rate over time (during the duration of the event). The larger the value, the faster the decay. For propagation factors, used to describe The decay rate during the event recovery period. The larger the organ, the faster it recovers; As a recovery factor, used to describe Recovery rate The larger the organ, the more complete the recovery;

[0136] The output coefficient between 0 and 1 is used to simulate the decay process of the event's impact. The smaller the coefficient, the weaker the event's impact. Therefore, the corrected event impact flow value = initial event impact flow value × event decay coefficient.

[0137] 503. Accumulate the traffic impact value of the corrected event at the hourly, daily, weekly, and monthly levels, and then weight and aggregate it with the hourly, daily, weekly, and monthly traffic forecast values ​​respectively to obtain the final traffic forecast value.

[0138] In this embodiment, the corrected event impact traffic value is integrated with the multi-period basic traffic forecast value: the hourly level needs to reflect the event impact hourly, and the daily / weekly / monthly level needs to summarize the total event impact within the period. The specific method is as follows:

[0139] Hourly traffic fusion: Obtaining the time of event occurrence The predicted duration D and the preset decay factor Transmission factors Recovery Factor The event attenuation coefficient is calculated by multiplying the hourly event impact flow value by the corresponding event attenuation coefficient to obtain the corrected hourly event impact flow value; then the corrected hourly event impact flow value is added to the corresponding hourly basic flow prediction value to obtain the hourly final flow prediction value.

[0140] Daily-level traffic fusion: Determine the impact period of a single-day event, starting from the event occurrence time τ and covering up to τ+D (the predicted duration of the event). If the event spans multiple days, only the current day's period is considered. For each hour within the single-day period, calculate the corrected event impact traffic value according to hourly attenuation correction logic. By accumulating the hourly corrected impact values, obtain the total corrected value of the single-day event impact. Add the total corrected value of the single-day event impact to the daily basic traffic prediction value (the sum of the daily basic traffic) to obtain the final daily traffic prediction value.

[0141] Weekly traffic fusion: For the 7 days within a week, calculate the total correction value for the daily event impact according to the daily fusion logic. The correction value for days with no event impact is recorded as 0. The total correction value for the week is obtained by accumulating these values. Since the weekly basic traffic forecast value is "weekly average daily basic traffic", divide the total correction value for the week by 7 to obtain the weekly average daily event impact correction value. Add the weekly average daily event impact correction value to the weekly basic traffic forecast value to obtain the final weekly traffic forecast value (average daily traffic).

[0142] Monthly traffic fusion: For all dates in the current month, calculate the total correction value of the daily event impact according to the daily fusion logic, and sum them up to obtain the total correction value for the month; add the total correction value of the monthly event impact to the monthly basic traffic forecast value (sum of monthly basic traffic) to obtain the final monthly traffic forecast value;

[0143] The final traffic forecast is obtained by integrating the hourly, daily, weekly, and monthly final traffic forecasts into a structured message frame.

[0144] Please see Figure 6 The six embodiments of the traffic flow prediction and early warning method in this invention include step 106, which includes:

[0145] 601. Obtain the design capacity value of the target road;

[0146] In this embodiment, the core of the early warning is to "determine whether the predicted traffic flow exceeds the actual carrying capacity of the road", while the design capacity is the maximum traffic flow carrying capacity of the road under ideal conditions. Therefore, the core purpose of this step is to obtain the design capacity value of the target road as a benchmark for subsequent calculation of the real-time effective capacity, and to provide a basis for setting the final early warning threshold.

[0147] Obtain the design capacity value of the road segment from the road design documents or the infrastructure database of the traffic management department. The design capacity value includes the number of lanes, design speed, lane width, roadside interference level, etc. of the target road segment. Then, convert the obtained design capacity value into "standard vehicles per hour" to ensure that the unit is consistent with the subsequent traffic flow forecast value.

[0148] 602. Extract event impact factors related to target road traffic based on event congestion components; the event impact factors include lane occupancy ratio factor, event occurrence time factor, real-time weather factor, and road segment geometric risk factor;

[0149] In this embodiment, events (such as accidents and severe weather) can significantly reduce the actual traffic capacity of roads, and different event characteristics have different degrees of impact on traffic capacity; therefore, the core purpose of this step is to extract key influencing factors from the event congestion components and quantitatively assess the degree of interference of events on road traffic.

[0150] First, extract information closely related to traffic capacity from the current traffic events determined in step 401: lane occupancy status (number and location of lanes occupied by the event), event occurrence time (whether it is during peak traffic hours), real-time weather conditions (whether there is adverse weather such as rain or fog), and road segment geometric features (whether the road segment where the event occurred is a curve, slope, or other special geometric structure).

[0151] Based on the above information, the factors are then quantified as follows: lane occupancy ratio factor (calculates the proportion of occupied lanes to the total number of lanes), event occurrence time factor (value of 1.0 during peak hours and 0.7 during off-peak hours), real-time weather factor (assigned according to weather level, value of 0.8 for heavy rain / fog, 0.9 for light rain, and 1.0 for sunny days), and road segment geometric risk factor (value of 0.9 for special road segments and 1.0 for ordinary road segments).

[0152] 603. Generate a reduction factor based on the event impact factor, and correct the design capacity value according to the reduction factor to obtain the real-time effective capacity value;

[0153] In this embodiment, the core purpose of this step is to convert the event impact factor into a reduction factor, correct the design capacity, and obtain a real-time effective capacity value that truly reflects the current road carrying capacity.

[0154] Reduction factor = Lane occupancy ratio factor × Event occurrence time factor × Real-time weather factor × Road segment geometric risk factor;

[0155] Real-time effective traffic capacity = Designed traffic capacity value × Reduction factor.

[0156] Please see Figure 7 The seven embodiments of the traffic flow prediction and early warning method in this invention include step 107, which includes:

[0157] 701. Compare the final traffic prediction value with the real-time effective traffic capacity to obtain the comparison result;

[0158] In this embodiment, by quantitatively comparing the final traffic prediction value with the real-time effective passage capacity, the numerical relationship between the two is clarified (such as whether the prediction value exceeds the limit and the extent of the exceedance), providing objective data support for subsequent determination of the warning level;

[0159] The hourly final traffic forecast is compared with the real-time effective capacity every hour to calculate the over-limit range (over-limit range = (final traffic forecast - real-time effective capacity) / real-time effective capacity × 100%). If the result is positive, it means that the predicted traffic exceeds the limit, and the larger the value, the more serious the over-limit. If it is negative or zero, it means that the limit is not exceeded.

[0160] For daily traffic volume, the over-limit range is calculated between the final daily traffic forecast and the real-time effective capacity (if the event continues, the effective capacity under the event's influence is used; if the event has ended, the design capacity is used). For weekly and monthly traffic volume, the over-limit range is calculated based on the weekly average daily forecast, the monthly total forecast, and the corresponding period's average effective capacity and monthly total effective capacity, respectively.

[0161] The comparison results are organized according to the periodic dimension. The results of each period should include five core pieces of information: "predicted time node, final traffic prediction value, real-time effective traffic capacity value, over-limit range, and whether the limit is exceeded". Among them, the "over-limit time node" in the hourly comparison needs to be marked in particular, because the hourly prediction is directly related to short-term emergency response.

[0162] 702. Generate traffic flow early warning information based on the comparison results and preset early warning level triggering conditions;

[0163] In this embodiment, by combining the comparison results with preset warning level conditions, warning information with clear root causes and distinct levels is generated:

[0164] The warning level rule base classifies warning levels according to the extent of exceeding the limit, specifically as follows:

[0165] Red alert: Hourly exceedance ≥ 15%, or daily exceedance ≥ 20%;

[0166] Yellow alert: Hourly over-limit range of 5%-14%, or daily over-limit range of 10%-19%;

[0167] Blue alert: Hourly over-limit range of 1%-4%, or daily over-limit range of 5%-9%;

[0168] No warning: Exceeding the limit by ≤0% (meaning no limit is exceeded);

[0169] Weekly and monthly forecasts are medium- to long-term predictions and are mainly used for macroeconomic assessments; therefore, the threshold for triggering early warning levels can be appropriately relaxed.

[0170] Based on the comparison results and the triggering conditions of the warning level, the warning level is determined cycle by cycle. If the warning levels of multiple cycles are inconsistent, the principle of "short-term cycle priority" is adopted, and the hourly and daily warning results are marked first.

[0171] After clarifying the specific warning level, targeted warning information is given based on the root cause. The warning information includes traffic component decomposition information, explanation of the root cause of congestion, warning level, predicted over-limit time, and suggested control direction.

[0172] The traffic component decomposition information should indicate the proportion of basic traffic component and the proportion of event-affected traffic component in the final traffic forecast; the congestion root cause explanation should clarify whether the congestion is caused by excessively high normal basic traffic or the superposition of event-affected congestion components; the warning level and time should clearly indicate the warning level for each period and the corresponding predicted over-limit time; the recommended control direction should provide targeted recommendations based on the root cause;

[0173] Step 701 provides an objective data basis for determining the warning level through periodic quantitative comparison, solving the problem of ambiguous warning basis; Step 702 generates warning information with clear root causes based on the comparison results and preset rules, combined with traffic component decomposition information, solving the problem of unclear warning root causes.

[0174] The traffic flow prediction and early warning method in the embodiments of the present invention has been described above. The traffic flow prediction and early warning device in the embodiments of the present invention is described below. Please refer to [link / reference]. Figure 8 One embodiment of the traffic flow prediction and early warning device in this invention includes:

[0175] The data acquisition module 801 is used to acquire real-time traffic data and historical traffic data of the target road segment;

[0176] The data decoupling module 802 is used to explicitly decouple real-time traffic data to obtain basic traffic components and event congestion components;

[0177] The periodic prediction module 803 is used to input the basic flow components into a preset multi-task prediction model to obtain multi-period basic flow prediction values.

[0178] The event prediction module 804 is used to predict future traffic based on the event congestion components in order to obtain the event-affected traffic value.

[0179] The traffic fusion module 805 is used to perform traffic fusion calculations based on multi-period basic traffic prediction values ​​and event-affected traffic values ​​to obtain the final traffic prediction value.

[0180] The traffic analysis module 806 is used to calculate the effective traffic capacity based on the event congestion components and historical traffic data to obtain the real-time effective traffic capacity value.

[0181] The comparison and early warning module 807 is used to compare the final traffic flow prediction value with the real-time effective traffic capacity to generate traffic flow early warning information;

[0182] In this embodiment, the data acquisition module 801 first acquires real-time and historical traffic data of the target road segment; then, the data decoupling module 802 separates the normal basic traffic flow from the abnormal event congestion flow in the real-time traffic data; next, the periodic prediction module 803 inputs the separated basic traffic flow components into a preset multi-task prediction model, which can output multi-period basic traffic flow prediction values ​​in hourly, daily, weekly, and monthly dimensions; simultaneously, the event prediction module 804 predicts the event-affected traffic flow value based on the event congestion component; the traffic fusion module 805 performs traffic fusion calculation on the multi-period basic traffic flow prediction value and the event-affected traffic flow value to obtain the final traffic flow prediction value; subsequently, the traffic analysis module 806 calculates the real-time effective traffic capacity value by combining the event congestion component and historical traffic data; finally, the comparison and early warning module 807 compares the final traffic flow prediction value with the real-time effective traffic capacity to generate early warning information. The solution of this invention, by combining multi-period prediction and decoupling analysis, significantly improves the prediction accuracy, solves the drawbacks of the hybrid modeling of the prior art, provides traffic managers with a clear decision-making basis, and effectively optimizes the traffic flow prediction and early warning effect.

[0183] Figure 9 This is a schematic diagram of the structure of a traffic flow prediction and early warning device 900 provided in an embodiment of the present invention. The traffic flow prediction and early warning device 900 can vary significantly due to different configurations or performance. It may include one or more central processing units (CPUs) 910 (e.g., one or more processors) and a memory 920, and one or more storage media 930 (e.g., one or more mass storage devices) storing application programs 933 or data 932. The memory 920 and storage media 930 can be temporary or persistent storage. The program stored in the storage media 930 may include one or more modules (not shown in the diagram), each module may include a series of instruction operations on the traffic flow prediction and early warning device 900. Furthermore, the processor 910 may be configured to communicate with the storage media 930 and execute the series of instruction operations in the storage media 930 on the traffic flow prediction and early warning device 900 to implement the steps of the traffic flow prediction and early warning methods provided in the above-described method embodiments.

[0184] The traffic flow prediction and early warning device 900 may also include one or more power supplies 940, one or more wired or wireless network interfaces 950, one or more input / output interfaces 960, and / or one or more operating systems 931, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will understand that... Figure 9 The illustrated traffic flow prediction and early warning device structure does not constitute a limitation on the traffic flow prediction and early warning device, and may include more or fewer components than illustrated, or combine certain components, or have different component arrangements.

[0185] The present invention also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium, wherein the computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the steps of a traffic flow prediction and early warning method.

[0186] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system, device, or unit described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0187] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0188] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A traffic flow prediction and early warning method, characterized in that, include: Obtain real-time and historical traffic data for the target road segment; Explicitly decouple real-time traffic data to obtain basic flow components and event congestion components; Input the basic flow components into the preset multi-task prediction model to obtain multi-period basic flow prediction values; Predict future traffic based on event congestion components to obtain the event's impact on traffic value; Traffic fusion calculation is performed based on multi-period basic traffic forecast values ​​and event-impacted traffic values ​​to obtain the final traffic forecast value; Effective capacity is calculated based on event congestion components to obtain real-time effective capacity values; The final traffic flow forecast is compared with the real-time effective capacity value to generate traffic flow early warning information; The explicit decoupling of real-time traffic data to obtain basic flow components and event congestion components includes: performing state identification on real-time traffic data to determine the current traffic flow state of the target road segment; and performing explicit decoupling of real-time traffic data by matching a pre-built flow decoupling model from a preset flow decoupling model library according to the traffic flow state to obtain basic flow components representing normal traffic demand and event congestion components representing abnormal events. The step of inputting the basic traffic components into a preset multi-task prediction model to obtain multi-period basic traffic prediction values ​​includes: inputting the basic traffic components into the preset multi-task prediction model, and using the underlying shared feature extraction network of the multi-task prediction model to extract time-series features and trend features from the basic traffic components; sending the time-series features and trend features to the multi-period output heads of the multi-task prediction model respectively; the multi-period output heads include hourly output heads, daily output heads, weekly output heads, and monthly output heads; and performing calculations on the time-series features and trend features through the multi-period output heads to obtain multi-period basic traffic prediction values. The method of predicting future traffic flow based on event congestion components to obtain the event-affected traffic flow value includes: performing event analysis on the event congestion components to determine the current traffic event; retrieving the historical traffic event with the highest similarity to the current traffic event from historical traffic data; obtaining historical traffic flow data corresponding to the historical traffic event; and performing analogical reasoning on the historical traffic flow data based on the differences in characteristics between the current traffic event and the historical traffic event to obtain the event-affected traffic flow value.

2. The traffic flow prediction and early warning method according to claim 1, characterized in that, The process of performing traffic fusion calculation based on the multi-period basic traffic prediction value and the event-affected traffic value to obtain the final traffic prediction value includes: The multi-period basic flow forecast values ​​are divided into hourly flow forecast values, daily flow forecast values, weekly flow forecast values ​​and monthly flow forecast values. The event impact traffic value is corrected using a preset event attenuation coefficient to obtain the corrected event impact traffic value; The traffic impact values ​​of the corrected events are accumulated at the hourly, daily, weekly, and monthly levels, and then weighted and aggregated with the hourly, daily, weekly, and monthly traffic forecast values ​​respectively to obtain the final traffic forecast value.

3. The traffic flow prediction and early warning method according to claim 1, characterized in that, The calculation of effective capacity based on the event congestion components to obtain a real-time effective capacity value includes: Obtain the design capacity value of the target road segment; Based on the event congestion components, event impact factors related to traffic flow on the target road segment are extracted; these event impact factors include lane occupancy ratio factor, event occurrence time factor, real-time weather factor, and road segment geometric risk factor. A reduction factor is generated based on the event impact factor, and the design capacity value is corrected according to the reduction factor to obtain the real-time effective capacity value.

4. The traffic flow prediction and early warning method according to claim 1, characterized in that, The step of comparing the final traffic flow prediction value with the real-time effective capacity value to generate traffic flow early warning information includes: The final traffic prediction value is compared with the real-time effective traffic capacity value to obtain the comparison result; Traffic flow warning information is generated based on the comparison results and the preset warning level trigger conditions.

5. A traffic flow prediction and early warning device, characterized in that, include: The data acquisition module is used to acquire real-time and historical traffic data for the target road segment; The data decoupling module is used to explicitly decouple real-time traffic data to obtain basic flow components and event congestion components; The explicit decoupling of real-time traffic data to obtain basic flow components and event congestion components includes: performing state identification on real-time traffic data to determine the current traffic flow state of the target road segment; and performing explicit decoupling of real-time traffic data by matching a pre-built flow decoupling model from a preset flow decoupling model library according to the traffic flow state to obtain basic flow components representing normal traffic demand and event congestion components representing abnormal events. The periodic prediction module is used to input basic traffic components into a preset multi-task prediction model to obtain multi-period basic traffic prediction values. The process of inputting basic traffic components into the preset multi-task prediction model to obtain multi-period basic traffic prediction values ​​includes: inputting the basic traffic components into the preset multi-task prediction model, and using the underlying shared feature extraction network of the multi-task prediction model to extract time-series features and trend features from the basic traffic components; sending the time-series features and trend features to the multi-period output heads of the multi-task prediction model respectively; the multi-period output heads include hourly, daily, weekly, and monthly output heads; and performing calculations on the time-series features and trend features through the multi-period output heads to obtain multi-period basic traffic prediction values. The event prediction module is used to predict future traffic flow based on event congestion components to obtain the event-impacted traffic flow value. This prediction includes: performing event analysis on the event congestion components to determine the current traffic event; retrieving the historical traffic event with the highest similarity to the current traffic event from historical traffic data; obtaining historical traffic flow data corresponding to the historical traffic event; and performing analogical reasoning on the historical traffic flow data based on the differences in characteristics between the current traffic event and the historical traffic event to obtain the event-impacted traffic flow value. The traffic fusion module is used to perform traffic fusion calculations based on multi-period basic traffic prediction values ​​and event-affected traffic values ​​to obtain the final traffic prediction value. The traffic analysis module is used to calculate the effective traffic capacity based on the event congestion components to obtain the real-time effective traffic capacity value; The comparison and early warning module is used to compare the final traffic flow prediction value with the real-time effective capacity value to generate traffic flow early warning information.

6. A traffic flow prediction and early warning device, characterized in that, The traffic flow prediction and early warning device includes: a memory and at least one processor, wherein the memory stores instructions; At least one of the processors invokes the instructions in the memory to cause the traffic flow prediction and warning device to perform the steps of the traffic flow prediction and warning method as described in any one of claims 1-4.

7. A computer-readable storage medium storing instructions thereon, characterized in that, When the instructions are executed by the processor, they implement the various steps of the traffic flow prediction and early warning method as described in any one of claims 1-4.

Citation Information

Patent Citations

  • Space-time heterogeneous decoupling method based on multi-mode traffic flow prediction

    CN117558125A

  • Road traffic flow prediction method based on space-time mixed attention network

    CN120526608A