Traffic risk early warning methods, devices, equipment and storage media

By generating structured time series data and utilizing pre-trained time series prediction models, the two-way warning threshold and alarm confidence level are determined, thus solving the accuracy problem of traffic risk warning methods for blind spots on highways and achieving more precise risk warnings.

CN123072196APending Publication Date: 2026-11-10ZHEJIANG EXPRESSWAY INFO ENG TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611221498.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-12
Publication Date
2026-11-10

AI Technical Summary

Technical Problem

Existing technologies for traffic risk warning in blind spots on highways have low accuracy and cannot be adapted to blind spot sections with scarce data, resulting in inaccurate predictions.

Method used

By acquiring traffic data from upstream and downstream of the road segment to be detected, a structured time series is generated. A pre-trained time series prediction model is used to obtain the probability prediction interval, determine the traffic warning threshold and alarm information, and combine the alarm confidence level to generate risk warning output results.

Benefits of technology

The accuracy of traffic risk warning methods for blind spots on highways has been improved. Two-way warning thresholds are generated by predicting intervals based on probability, covering traffic anomalies in different directions of change. The credibility of warnings is distinguished by warning confidence, thereby improving the accuracy of warning output.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123072196A_ABST
    Figure CN123072196A_ABST
Patent Text Reader

Abstract

This application discloses a traffic risk early warning method, device, equipment, and storage medium, relating to the field of intelligent transportation technology. The traffic risk early warning method of this application generates a structured time series based on traffic data from the upstream and downstream of the road segment to be detected. A probability prediction interval is obtained through a pre-trained time series prediction model, and a traffic warning threshold, including a lower and upper threshold for traffic warning, is determined based on the probability prediction interval. Then, alarm information is determined based on the traffic warning threshold and the current traffic data from the upstream and downstream of the road segment to be detected. Simultaneously, the alarm confidence level is determined by combining the probability prediction interval and the current traffic data from the upstream and downstream of the road segment to be detected. Finally, based on the probability prediction interval, the traffic warning threshold, the alarm information, and the alarm confidence level, the risk warning output result for the road segment to be detected is determined. This improves scenario adaptability and, by combining the alarm confidence level to distinguish the credibility of alarms, improves the accuracy of the early warning output.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of intelligent transportation technology, and in particular to traffic risk early warning methods, devices, equipment and storage media. Background Technology

[0002] With the development of intelligent transportation technology, rapid early warning of highway traffic accidents has become a core requirement for ensuring road traffic safety. In particular, blind spots, where real-time traffic conditions cannot be obtained, result in delayed accident detection and missed rescue opportunities.

[0003] To achieve real-time traffic condition monitoring, some technologies employ traditional machine learning or deep learning models for risk prediction. While these methods can improve prediction accuracy for road sections with ample data, they heavily rely on labeled target road sections and primarily output deterministic results. This makes them unsuitable for data-scarce blind spot road sections and also results in inaccurate predictions. Therefore, improving the accuracy of traffic risk warning methods for highway blind spot road sections has become an urgent problem to be solved. Summary of the Invention

[0004] This application provides a traffic risk warning method, apparatus, device, and storage medium to at least address the problem of low accuracy in traffic risk warning methods for blind spots on highways in related technologies.

[0005] This application provides a traffic risk early warning method, including: Acquire traffic data upstream and downstream of the road segment to be detected; the traffic data includes average speed and flow rate. Generate structured time series data based on traffic data; Based on the pre-trained time series prediction model, the probability prediction interval is obtained according to the structured time series. Based on the probability prediction interval, determine the traffic warning threshold; whereby the traffic warning threshold includes the lower threshold for traffic warning and the upper threshold for traffic warning. Based on the traffic flow warning threshold and the current traffic data upstream and downstream of the road segment to be monitored, the alarm information is determined; The alarm confidence level is determined based on the probability prediction interval and the current traffic data upstream and downstream of the road segment to be detected; Based on the probability prediction interval, traffic warning threshold, alarm information, and alarm confidence level, the risk warning output results for the road segment to be detected are determined.

[0006] In one alternative implementation, a structured time series is generated based on traffic data, including: Missing values ​​in the traffic data are processed to obtain the completed traffic data; The completed traffic data is then processed to obtain the processed traffic data. Based on the processed traffic data, structured time series are generated according to road, direction, and lane dimensions.

[0007] In one optional implementation, determining the traffic warning threshold based on a probability prediction interval includes: The predicted value corresponding to the preset low quantile in the probability prediction interval is used as the threshold for traffic warning; The predicted value corresponding to the preset high quantile in the probability prediction interval is used as the upper threshold for traffic warning.

[0008] In one optional implementation, alarm information is determined based on a traffic flow warning threshold and traffic data, including: If the current traffic flow, as represented by the current traffic data upstream and downstream of the road segment to be detected, is lower than the lower threshold of the traffic flow warning, a speed reduction type alarm message is generated; the alarm message includes speed reduction type alarm messages. If the current traffic flow, as represented by the current traffic data upstream and downstream of the road segment to be detected, is higher than the upper threshold of the traffic flow warning, a speed recovery type alarm message is generated; the alarm message includes speed recovery type alarm information.

[0009] In one alternative implementation, the method further includes: The alarm information is tagged with attributes to obtain the corresponding alarm attribute information; the alarm attribute information includes the road segment to be detected, the direction of travel, the alarm type and the alarm time; Based on alarm attribute information, alarm information is grouped to obtain at least one set of alarms of the same type; Based on a preset time window, multiple alarm messages for the same traffic event within the same alarm set of the same type are merged into a single target alarm message.

[0010] In one optional implementation, the traffic data includes historical alarm data and corresponding verification results. Based on the probability prediction interval and the traffic data, the alarm confidence level is determined, including: The historical alarm hit rate is obtained based on historical alarm data and the corresponding verification results. The alarm confidence level is determined based on the interval width of the probability prediction interval and the historical alarm hit rate.

[0011] In one alternative implementation, the method further includes: Collect feedback data corresponding to the risk warning output results; Based on the feedback data, calculate the early warning success rate, early warning timeliness, early warning false alarm rate, and early warning hit rate; The evaluation results of the early warning effect are determined based on the early warning success rate, early warning timeliness, early warning false alarm rate, and early warning hit rate. Based on the evaluation results of the early warning effect, the pre-trained time series prediction model is optimized to obtain the optimized pre-trained time series prediction model.

[0012] This application also provides a traffic risk warning device, including: The data acquisition module is used to acquire traffic data upstream and downstream of the road segment to be detected; the traffic data includes average speed and flow rate. The sequence generation module is used to generate structured time series data based on traffic data. The interval prediction module is used to obtain the probability prediction interval based on the structured time series, using a pre-trained time series prediction model. The threshold determination module is used to determine the traffic warning threshold based on the probability prediction interval; wherein, the traffic warning threshold includes a lower threshold for traffic warning and an upper threshold for traffic warning. The information determination module is used to determine alarm information based on the traffic warning threshold and the current traffic data of the upstream and downstream of the road segment to be detected; The confidence level determination module is used to determine the alarm confidence level based on the probability prediction interval and the current traffic data upstream and downstream of the road segment to be detected; The early warning output module is used to determine the risk early warning output result of the road segment to be detected based on the probability prediction interval, traffic warning threshold, alarm information and alarm confidence level.

[0013] This application also provides an electronic device, including: a memory for storing a computer program; and a processor for executing the computer program to implement the steps of any of the above-described traffic risk warning methods.

[0014] This application also provides a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, it implements the steps of any of the above-described traffic risk warning methods.

[0015] This application also provides a computer program product, including computer instructions for causing a computer to implement the steps of any of the above-described traffic risk warning methods.

[0016] In some embodiments of this application, a structured time series is generated based on traffic data upstream and downstream of the road segment to be detected. A probability prediction interval is obtained through a pre-trained time series prediction model, and a traffic warning threshold, including a lower threshold and an upper threshold, is determined based on the probability prediction interval. Then, alarm information is determined based on the traffic warning threshold and the current traffic data upstream and downstream of the road segment to be detected, and alarm confidence is determined by combining the probability prediction interval and the current traffic data upstream and downstream of the road segment to be detected. Finally, the risk warning output result for the road segment to be detected is determined based on the probability prediction interval, the traffic warning threshold, the alarm information, and the alarm confidence. In this way, a two-way warning threshold can be generated through the probability prediction interval, improving the scenario adaptability of anomaly detection; at the same time, the two-way threshold covers traffic anomalies in different directions of change, and the alarm confidence distinguishes the credibility of alarms, improving the accuracy of warning output. Thus, the accuracy of the traffic risk warning method for highway blind spot sections can be improved. Attached Figure Description

[0017] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 A flowchart illustrating a traffic risk warning method provided for some embodiments of this application; Figure 2 Schematic diagram of a traffic risk warning device provided for some embodiments of this application; Figure 3 A schematic diagram of the modules of an electronic device provided for some embodiments of this application. Detailed Implementation

[0019] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.

[0020] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.

[0021] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0022] In related technologies, to meet the need for rapid early warning of highway traffic accidents, traditional machine learning or deep learning models are often used to predict traffic risks and achieve real-time monitoring and risk identification of traffic conditions. However, these methods have limitations. While they can achieve good prediction results on road sections with sufficient data, they are highly dependent on labeled data of the target road section for model training and mostly output deterministic prediction results. This makes them unsuitable for blind spot road sections with scarce data, resulting in insufficient accuracy in early warning for blind spot road sections. Therefore, how to improve the accuracy of traffic risk early warning methods for highway blind spot road sections has become an urgent problem to be solved.

[0023] In view of this, this application provides a traffic risk early warning method that can solve the above problems. The traffic risk early warning method can be applied to electronic devices. Electronic devices may include, but are not limited to, tablet computers, laptops, desktop computers, servers, etc. (See also...) Figure 1 This is a flowchart illustrating a traffic risk warning method provided in some embodiments of this application. Figure 1 In China, traffic risk early warning methods include the following steps: Step S101: Obtain traffic data from the upstream and downstream of the road segment to be detected; the traffic data includes average speed and flow rate.

[0024] Specifically, traffic data is collected by roadside fixed detection equipment deployed upstream and downstream of the road segment to be detected. The collection equipment can be fixed detectors such as radar, coils and video structuring. Traffic data includes, but is not limited to, average speed, traffic flow and lane occupancy.

[0025] Step S102: Generate a structured time series based on traffic data.

[0026] Specifically, structured time series refers to an ordered collection of traffic data with a unified data format, fixed time intervals, and clear spatial affiliation.

[0027] In this embodiment, the traffic data is first validated and its continuity is restored. Then, the traffic data is aligned and aggregated according to a preset time granularity. The data is arranged in chronological order and finally, a structured time series that can be used for subsequent prediction calculations is generated.

[0028] Step S103: Based on the pre-trained time series prediction model, obtain the probability prediction interval according to the structured time series.

[0029] Specifically, a pre-trained time series prediction model refers to a time series prediction model that has been trained in advance on a large-scale time series dataset from multiple sources. It has learned the general laws of time series evolution under different scenarios and can directly output the prediction results for the corresponding future time period based on the input historical time series data. It can adopt the T5 (Text-to-Text Transfer Transformer, encoder-decoder) architecture. The model internally discretizes continuous time series values ​​into words and reuses the self-attention mechanism and autoregressive generation capability of the language model. It can directly infer without making any fine-tuning to the road segment to be detected.

[0030] Specifically, the probability prediction interval refers to the numerical range formed by the predicted values ​​corresponding to different probability quantiles, which can quantitatively characterize the possible fluctuation boundaries of future traffic parameters.

[0031] In this embodiment, a structured time series is input into a pre-trained time series prediction model. The model adopts a zero-shot inference approach and predicts the flow parameters within a preset step size based on the general time series evolution rules learned in advance on a massive time series dataset. It outputs the prediction results of multiple probability quantiles for the corresponding time period, and the prediction values ​​of different quantiles together constitute the probability prediction interval.

[0032] Step S104: Determine the traffic warning threshold based on the probability prediction interval; wherein, the traffic warning threshold includes a lower traffic warning threshold and an upper traffic warning threshold.

[0033] Specifically, the traffic flow warning threshold refers to the boundary value used to determine whether the traffic flow operation status deviates from the normal range. It includes upper and lower judgment boundaries, which can respectively cover two abnormal scenarios: abnormal decrease and abnormal increase of traffic parameters. The traffic flow warning threshold can be dynamically and adaptively adjusted according to the traffic status. Among them, the lower threshold of the traffic flow warning is the lower limit of the warning judgment corresponding to the lower quantile of the probability prediction interval, used to identify the operation status of abnormal decrease in traffic flow parameters, corresponding to the risk scenario of reduced road capacity; the upper threshold of the traffic flow warning is the upper limit of the warning judgment corresponding to the higher quantile of the probability prediction interval, used to identify the operation status of abnormal increase in traffic flow parameters, corresponding to the scenario of recovery of road capacity.

[0034] In this embodiment, the probability prediction interval output by the pre-trained time series prediction model is processed by quantile extraction. The predicted value corresponding to the preset low quantile is selected as the judgment boundary for abnormal decline, and the predicted value corresponding to the preset high quantile is selected as the judgment boundary for abnormal rise. Thus, a traffic warning threshold including the lower threshold and the upper threshold of traffic warning is obtained.

[0035] Step S105: Determine alarm information based on the traffic flow warning threshold and the current traffic data of the upstream and downstream of the road segment to be detected.

[0036] Specifically, alarm information refers to traffic anomaly status identification information generated after threshold comparison and judgment, including speed reduction alarm information and speed recovery alarm information.

[0037] In this embodiment, the current traffic data collected upstream and downstream of the road segment to be detected is compared and judged bidirectionally with the traffic flow warning threshold for the corresponding time period. If the current traffic data is lower than the lower threshold of the traffic flow warning, a speed decrease type alarm message is generated; if the current traffic data is higher than the upper threshold of the traffic flow warning, a speed recovery type alarm message is generated.

[0038] Step S106: Determine the alarm confidence level based on the probability prediction interval and the current traffic data upstream and downstream of the road segment to be detected.

[0039] Specifically, alarm confidence level refers to an indicator used to quantify the credibility of alarm information, which can reflect the probability of a real traffic event corresponding to the current alarm.

[0040] In this embodiment, the interval width parameter is extracted from the probability prediction interval, the deviation between the current traffic data of the upstream and downstream of the road segment to be detected and the corresponding warning threshold is calculated, and the alarm confidence level corresponding to the current alarm is determined by combining the interval width and the deviation level.

[0041] Step S107: Determine the risk warning output result for the road segment to be detected based on the probability prediction interval, traffic warning threshold, alarm information and alarm confidence level.

[0042] Specifically, the risk warning output result refers to the warning output data that integrates probability prediction intervals, traffic warning thresholds, alarm information and alarm confidence, and can fully present the traffic risk status of the road segment to be detected.

[0043] In summary, in the technical solutions of some embodiments of this application, a structured time series is generated based on traffic data upstream and downstream of the road segment to be detected. A probability prediction interval is obtained through a pre-trained time series prediction model, and a traffic warning threshold, including a lower threshold and an upper threshold, is determined based on the probability prediction interval. Then, alarm information is determined based on the traffic warning threshold and the current traffic data upstream and downstream of the road segment to be detected, and alarm confidence is determined by combining the probability prediction interval and the current traffic data upstream and downstream of the road segment to be detected. Finally, the risk warning output result for the road segment to be detected is determined based on the probability prediction interval, the traffic warning threshold, the alarm information, and the alarm confidence. In this way, a two-way warning threshold can be generated through the probability prediction interval, improving the scenario adaptability of anomaly detection; at the same time, the two-way threshold covers traffic anomalies in different directions of change, and the alarm confidence distinguishes the credibility of alarms, improving the accuracy of warning output. Thus, the accuracy of the traffic risk warning method for blind spots on highways can be improved.

[0044] In some embodiments, generating a structured time series based on traffic data in step S102 includes: Step S1021: Process the traffic data for missing values ​​to obtain the completed traffic data.

[0045] Step S1022: Perform outlier processing on the completed traffic data to obtain processed traffic data.

[0046] Step S1023: Based on the processed traffic data, generate a structured time series according to road, direction, and lane dimensions.

[0047] Specifically, missing value handling refers to the process of repairing missing data segments in the original traffic data using corresponding strategies based on the duration of the missing data. Short-term missing data is filled using linear interpolation, while long-term missing data is filled using the statistical median of adjacent detection points. Time periods with a missing proportion exceeding a preset missing threshold are directly removed.

[0048] Specifically, outlier handling refers to the process of identifying and removing abnormal jump data that deviate from the normal fluctuation range in the completed traffic data. The sliding median or statistical criteria can be used to screen and remove outlier data.

[0049] In this embodiment, firstly, missing value processing is performed on the original traffic data, and corresponding repair strategies are adopted for different degrees of missing data to complete the data, resulting in time-continuous completed traffic data; then, outlier processing is performed on the completed traffic data, filtering and removing outlier data that deviates from the normal range, resulting in cleaned and processed traffic data; finally, the processed traffic data is classified and organized according to the spatial dimensions of roads, directions and lanes, and arranged in chronological order to generate a structured time series.

[0050] In the above embodiments, the traffic data is cleaned and organized through a process of missing value repair, outlier filtering, and spatial dimension normalization, which effectively improves the integrity and reliability of the time-series input data and enhances the accuracy of traffic risk warning results.

[0051] In some embodiments, determining the traffic warning threshold based on the probability prediction interval in step S104 includes: Step S1041: The predicted value corresponding to the preset low quantile in the probability prediction interval is used as the threshold for traffic warning.

[0052] Step S1042: Use the predicted value corresponding to the preset high quantile in the probability prediction interval as the upper threshold for traffic warning.

[0053] Specifically, the lower threshold for traffic flow warning refers to the lower limit for anomaly judgment determined based on a preset low quantile prediction value. The preset low quantile prediction value can be 10%, which is used to identify the operating state of abnormal decline in traffic flow parameters, corresponding to the risk scenario of reduced road capacity.

[0054] Specifically, the upper threshold for traffic flow warning refers to the upper limit for anomaly judgment determined based on a preset high quantile prediction value. The preset high quantile prediction value can be 90%, which is used to identify the operating state of abnormally rising traffic flow parameters, corresponding to the scenario of road traffic status recovery.

[0055] In this embodiment, firstly, traffic parameter prediction values ​​corresponding to the preset low quantiles are extracted from the probability prediction interval and set as the lower threshold for traffic warning, serving as the boundary for determining abnormal decline in traffic conditions; then, traffic parameter prediction values ​​corresponding to the preset high quantiles are extracted from the probability prediction interval and set as the upper threshold for traffic warning, serving as the boundary for determining abnormal rise in traffic conditions, thus forming a two-way traffic warning threshold.

[0056] In the above embodiments, a two-way dynamic traffic warning threshold is generated by extracting the corresponding values ​​of high and low quantiles from the probability prediction interval. This enables the warning judgment boundary to be adaptively adjusted according to the traffic operation status, while covering two scenarios: abnormal decrease and abnormal increase of traffic parameters. This provides a quantitative standard for subsequent two-way abnormal alarm judgment.

[0057] In some embodiments, determining the alarm information based on the traffic warning threshold and traffic data in step S105 includes: Step S1051: If the current traffic flow represented by the current traffic data of the upstream and downstream of the road segment to be detected is lower than the lower threshold of the traffic flow warning, a speed reduction type alarm message is generated; wherein, the alarm message includes speed reduction type alarm message.

[0058] Step S1052: If the current traffic flow represented by the current traffic data of the upstream and downstream of the road segment to be detected is higher than the upper threshold of the traffic warning, a speed recovery alarm message is generated; wherein, the alarm message includes speed recovery alarm information.

[0059] Specifically, speed reduction warning information refers to abnormal warning information generated when traffic parameters are lower than the threshold of the traffic flow warning. It corresponds to the risk scenario of reduced road capacity, which may be related to events such as breakdowns, debris spills, rear-end collisions, or construction that reduce traffic capacity.

[0060] Specifically, speed recovery alarm information refers to the status identification information generated when traffic parameters are higher than the upper threshold of the traffic flow warning. It corresponds to the scenario of road traffic status recovery, and may correspond to the event of abnormal speed increase when traffic flow returns to normal after accident clearance and control is lifted.

[0061] In this embodiment, firstly, the current traffic flow data collected upstream and downstream of the road segment to be detected is compared with the lower threshold of the traffic flow warning. If the current traffic flow value is lower than the lower threshold of the traffic flow warning, it is determined that the current traffic status has abnormally decreased, and a corresponding speed decrease type alarm message is generated. Then, the current traffic flow data is compared with the upper threshold of the traffic flow warning. If the current traffic flow value is higher than the upper threshold of the traffic flow warning, it is determined that the current traffic status has abnormally increased and the traffic status has recovered, and a corresponding speed recovery type alarm message is generated.

[0062] In the above embodiments, by comparing and determining with bidirectional thresholds and real-time traffic data, two types of change scenarios, namely abnormal decline and abnormal rebound of traffic flow, are covered respectively. It can simultaneously identify two types of traffic events, namely reduced traffic capacity and restored traffic status, making the generation logic of alarm information clearer and the coverage scenarios more comprehensive.

[0063] In some embodiments, the method of this application further includes: Step a1: Mark the alarm information with attributes to obtain the corresponding alarm attribute information; wherein, the alarm attribute information includes the road segment to be detected, the direction of travel, the alarm type and the alarm time.

[0064] Step a2: Group the alarm information according to the alarm attribute information to obtain at least one set of alarms of the same type.

[0065] Step a3: According to the preset time window, merge multiple alarm messages of the same traffic event in the same alarm set into a single target alarm message.

[0066] Specifically, alarm attribute information refers to a set of feature information used to identify the monitored road segment, traffic direction, alarm type, and alarm time of an alarm, enabling multi-dimensional classification and labeling of alarm information. Among these, the monitored road segment refers to the blind spot section of a highway, used to identify the spatial location range of the alarm occurrence; the traffic direction refers to the direction of vehicle flow, used to distinguish traffic anomalies in different traffic directions; the alarm type refers to the anomaly category, including speed decrease and speed recovery types; and the alarm time refers to the moment the alarm information was triggered, identifying the time node when the traffic anomaly was identified.

[0067] Specifically, a set of alarms of the same type refers to a set of alarm information that has the same road segment to be detected, direction of travel and alarm type, and the alarms in the set belong to the same spatial location and the same anomaly category.

[0068] Specifically, the target alarm information refers to the event-level alarm information generated after merging, corresponding to a single traffic event, and retaining the trigger time of the first alarm.

[0069] In this embodiment, firstly, each generated alarm message is marked with multi-dimensional attributes, indicating its corresponding road segment to be detected, traffic direction, alarm type, and alarm time, thus obtaining alarm attribute information; then, based on the road segment, direction, and type in the alarm attribute information, alarm messages with the same attributes are grouped into the same group to form a set of alarms of the same type; finally, based on a preset time window, the time continuity of alarms in the same set is judged, and multiple alarms belonging to the same traffic event within the time interval within the window are merged to output a single target alarm message.

[0070] In this embodiment, by using attribute tagging, grouping and time window merging, multiple single-point alarms triggered continuously during the same event are integrated into a single event-level alarm. This can eliminate duplicate alarm outputs under the same traffic event and improve the simplicity and event identification of alarm outputs.

[0071] In some embodiments, traffic data includes historical alarm data and verification results corresponding to the historical alarm data. Step S106, determining the alarm confidence level based on the probability prediction interval and traffic data, includes: Step S1061: Based on the historical alarm data and the corresponding verification results, obtain the historical alarm hit rate.

[0072] Step S1062: Determine the alarm confidence level based on the interval width of the probability prediction interval and the historical alarm hit rate.

[0073] Specifically, the verification result corresponding to the historical alarm data refers to the authenticity judgment result obtained after verifying the traffic events corresponding to the historical alarm data, which is used to identify whether the corresponding historical alarm matches a real traffic event.

[0074] Specifically, the historical alarm hit rate refers to the ratio obtained by statistically analyzing historical alarm data and corresponding verification results, that is, the proportion of the number of real and valid alarms to the total number of alarms, which can reflect the historical accuracy level of alarm results in the corresponding scenario.

[0075] In this embodiment, firstly, based on the retained historical alarm data and the verification results corresponding to each alarm, the historical alarm hit rate in the corresponding scenario is calculated by statistically analyzing the proportion of real and valid alarms to the total alarms; then, the interval width parameter of the current probability prediction interval is extracted and combined with the historical alarm hit rate to calculate the alarm confidence level corresponding to the current alarm.

[0076] In the above embodiments, the historical alarm hit rate is obtained by statistically analyzing the actual verification results of historical alarms, and the alarm confidence level is calculated together with the prediction stability reflected by the probability prediction interval. This allows the determination of confidence level to more accurately quantify the credibility of alarms and improve the accuracy of the judgment of early warning results.

[0077] In some embodiments, the method of this application further includes: Step b1: Collect feedback data corresponding to the risk warning output results.

[0078] Step b2: Based on the feedback data, calculate the early warning success rate, early warning timeliness, early warning false alarm rate, and early warning hit rate.

[0079] Step b3: Determine the evaluation results of the early warning effect based on the early warning success rate, early warning timeliness, early warning false alarm rate, and early warning hit rate.

[0080] Step b4: Based on the evaluation results of the early warning effect, optimize the pre-trained time series prediction model to obtain the optimized pre-trained time series prediction model.

[0081] Specifically, the early warning success rate refers to the proportion of real and valid early warning events to the total number of output early warning events. It is used to characterize the effectiveness of the early warning results in relation to real traffic events and can be statistically analyzed on an event-by-event basis.

[0082] Specifically, early warning timeliness refers to the time interval from the occurrence of an actual traffic incident to the first triggering of an early warning by the system, which is used to characterize the timeliness of the early warning response.

[0083] Specifically, the false alarm rate refers to the proportion of false alarms that do not correspond to real traffic events to the total number of warnings, and is used to characterize the proportion of false alarms in the warning results.

[0084] Specifically, the early warning hit rate refers to the proportion of successfully identified real traffic events out of all real traffic events, and is used to characterize the system's ability to cover and identify real events.

[0085] In this embodiment, firstly, feedback data corresponding to the risk warning output results is collected to obtain the true judgment information of the warning event; secondly, based on the real event information in the feedback data and the warning records, four evaluation indicators are calculated: warning success rate, warning timeliness, warning false alarm rate, and warning hit rate; nextly, the overall operating effect of the warning system is comprehensively judged by combining the quantitative results of the four indicators to obtain a complete warning effect evaluation result; finally, based on the model prediction deviation reflected in the warning effect evaluation result, the pre-trained time series prediction model is iteratively updated to obtain the optimized pre-trained time series prediction model.

[0086] In the above embodiments, through a closed-loop process of feedback data collection, multi-dimensional indicator calculation, comprehensive effect evaluation and model iterative optimization, the actual operation effect of the early warning is fed back to the prediction model, thereby improving the accuracy of the probability prediction interval and the rationality of the early warning threshold.

[0087] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.

[0088] Corresponding to the traffic risk warning method, this application also provides a traffic risk warning device. (See also...) Figure 2 This is a schematic diagram of a traffic risk warning device provided in some embodiments of this application. Figure 2 In China, traffic risk early warning devices include: The data acquisition module 201 is used to acquire traffic data upstream and downstream of the road segment to be detected; the traffic data includes average speed and flow rate.

[0089] The sequence generation module 202 is used to generate structured time series based on traffic data.

[0090] The interval prediction module 203 is used to obtain the probability prediction interval based on the pre-trained time series prediction model and the structured time series.

[0091] The threshold determination module 204 is used to determine the traffic warning threshold based on the probability prediction interval; wherein, the traffic warning threshold includes a lower traffic warning threshold and an upper traffic warning threshold.

[0092] The information determination module 205 is used to determine alarm information based on the traffic warning threshold and the current traffic data of the upstream and downstream of the road segment to be detected.

[0093] The confidence determination module 206 is used to determine the alarm confidence level based on the probability prediction interval and the current traffic data upstream and downstream of the road segment to be detected.

[0094] The early warning output module 207 is used to determine the risk early warning output result of the road segment to be detected based on the probability prediction interval, traffic warning threshold, alarm information and alarm confidence level.

[0095] In some embodiments, the sequence generation module 202 is specifically used for: Missing values ​​in the traffic data are processed to obtain the completed traffic data.

[0096] The completed traffic data is then processed to obtain the processed traffic data.

[0097] Based on the processed traffic data, structured time series are generated according to road, direction, and lane dimensions.

[0098] In some embodiments, the threshold determination module 204 is specifically used for: The predicted value corresponding to the preset low quantile in the probability prediction interval is used as the threshold for traffic warning.

[0099] The predicted value corresponding to the preset high quantile in the probability prediction interval is used as the upper threshold for traffic warning.

[0100] In some embodiments, the information determination module 205 is specifically used for: If the current traffic flow, as represented by the current traffic data upstream and downstream of the road segment to be detected, is lower than the lower threshold of the traffic flow warning, a speed reduction type alarm message is generated; the alarm message includes speed reduction type alarm messages.

[0101] If the current traffic flow, as represented by the current traffic data upstream and downstream of the road segment to be detected, is higher than the upper threshold of the traffic flow warning, a speed recovery type alarm message is generated; the alarm message includes speed recovery type alarm information.

[0102] In some embodiments, the information determination module 205 is further configured to: The alarm information is tagged with attributes to obtain the corresponding alarm attribute information; the alarm attribute information includes the road segment to be detected, the direction of travel, the alarm type, and the alarm time.

[0103] Alarm information is grouped according to alarm attribute information to obtain at least one set of alarms of the same type.

[0104] Based on a preset time window, multiple alarm messages for the same traffic event within the same alarm set of the same type are merged into a single target alarm message.

[0105] In some embodiments, the confidence determination module 206 is specifically used for: The historical alarm hit rate is obtained based on historical alarm data and the corresponding verification results.

[0106] The alarm confidence level is determined based on the interval width of the probability prediction interval and the historical alarm hit rate.

[0107] In some embodiments, the device further includes an optimization module, which is specifically used for: Collect feedback data corresponding to the risk warning output results.

[0108] Based on the feedback data, calculate the early warning success rate, early warning timeliness, early warning false alarm rate, and early warning hit rate.

[0109] The evaluation results of the early warning effect are determined based on the early warning success rate, early warning timeliness, early warning false alarm rate, and early warning hit rate.

[0110] Based on the evaluation results of the early warning effect, the pre-trained time series prediction model is optimized to obtain the optimized pre-trained time series prediction model.

[0111] For a description of the features in the embodiment corresponding to the traffic risk warning device, please refer to the relevant description of the embodiment corresponding to the sample data processing method, which will not be repeated here.

[0112] See also Figure 3 The embodiments of this application also provide an electronic device, including a memory 10 and a processor 20, wherein the memory 10 stores a computer program and the processor 20 is configured to run the computer program to perform the steps in any of the above-described traffic risk warning method embodiments.

[0113] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above-described traffic risk warning method embodiments when it is run.

[0114] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.

[0115] The embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above-described traffic risk warning method embodiments.

[0116] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in any of the above-described traffic risk warning method embodiments.

[0117] Any of the components, modules, units, parts, methods, and operations described herein can be implemented using software, firmware, hardware (e.g., fixed logic circuitry), manual processing, or any combination thereof. Alternatively or additionally, any functionality described herein can be executed at least in part by one or more hardware logic components, such as, but not limited to, a central processing unit (CPU), a field-programmable gate array (FPGA), an application-specific integrated circuit (ASIC), an application-specific standard product (ASSP), a system-on-a-chip (SoC), a complex programmable logic device (CPLD), a microprocessor (MCU), etc. The terms "system," "computing device," or "apparatus" as used herein encompass various means, devices, and machines for processing data, including, for example, one or more programmable processors, computers, SoCs, or combinations thereof. The apparatus may also include code that creates an execution environment for the computer program in question, such as code constituting processor firmware, a protocol stack, a database management system, an operating system, a cross-platform runtime environment, a virtual machine, or one or more combinations thereof. The aforementioned computer program (also known as a program, software, software application, app, script, or code) can be written in any form of programming language, including compiled or interpreted languages, declarative or procedural languages, and can be deployed in any form, including as a standalone program or as a module, component, subroutine, object, or other unit suitable for a computing environment.

[0118] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0119] The foregoing has provided a detailed description of a traffic risk early warning method, apparatus, device, and storage medium provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only intended to aid in understanding the method and core ideas of this application. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this application.

Claims

1. A traffic risk early warning method, characterized in that, The method includes: Acquire traffic data from the upstream and downstream of the road segment to be detected; wherein, the traffic data includes average speed and flow rate; Based on the traffic data, a structured time series is generated; Based on the pre-trained time series prediction model, the probability prediction interval is obtained according to the structured time series. Based on the probability prediction interval, a traffic warning threshold is determined; wherein, the traffic warning threshold includes a lower traffic warning threshold and an upper traffic warning threshold; Based on the traffic flow warning threshold and the current traffic data upstream and downstream of the road segment to be detected, the alarm information is determined; The alarm confidence level is determined based on the probability prediction interval and the current traffic data upstream and downstream of the road segment to be detected; Based on the probability prediction interval, traffic warning threshold, alarm information, and alarm confidence level, the risk warning output result of the road segment to be detected is determined.

2. The traffic risk early warning method according to claim 1, characterized in that, The step of generating a structured time series based on the traffic data includes: The missing values ​​in the traffic data are processed to obtain the completed traffic data; The completed traffic data is then processed to obtain the processed traffic data. Based on the processed traffic data, a structured time series is generated according to the road, direction, and lane dimensions.

3. The traffic risk early warning method according to claim 1, characterized in that, Determining the traffic warning threshold based on the probability prediction interval includes: The predicted value corresponding to the preset low quantile in the probability prediction interval is used as the threshold for traffic warning; The predicted value corresponding to the preset high quantile in the probability prediction interval is used as the upper threshold for traffic warning.

4. The traffic risk early warning method according to claim 1, characterized in that, The step of determining alarm information based on the traffic flow warning threshold and traffic data includes: If the current traffic flow, as represented by the current traffic data upstream and downstream of the road segment to be detected, is lower than the lower threshold of the traffic flow warning, a speed reduction type alarm message is generated; wherein, the alarm message includes the speed reduction type alarm message; If the current traffic flow, as represented by the current traffic data upstream and downstream of the road segment to be detected, is higher than the upper threshold of the traffic flow warning, a speed recovery alarm is generated; wherein, the alarm information includes the speed recovery alarm information.

5. The traffic risk early warning method according to claim 4, characterized in that, The method further includes: The alarm information is tagged with attributes to obtain the corresponding alarm attribute information; wherein, the alarm attribute information includes the road segment to be detected, the direction of travel, the alarm type and the alarm time; The alarm information is grouped according to the alarm attribute information to obtain at least one set of alarms of the same type; According to a preset time window, multiple alarm messages for the same traffic event within the same type of alarm set are merged into a single target alarm message.

6. The traffic risk early warning method according to claim 1, characterized in that, The traffic data includes historical alarm data and corresponding verification results. Determining the alarm confidence level based on the probability prediction interval and the traffic data includes: Based on the historical alarm data and the corresponding verification results, the historical alarm hit rate is obtained; The alarm confidence level is determined based on the interval width of the probability prediction interval and the historical alarm hit rate.

7. The traffic risk early warning method according to claim 1, characterized in that, The method further includes: Collect feedback data corresponding to the risk warning output results; Based on the feedback data, calculate the early warning success rate, early warning timeliness, early warning false alarm rate, and early warning hit rate; The evaluation results of the early warning effect are determined based on the early warning success rate, early warning timeliness, early warning false alarm rate, and early warning hit rate. Based on the evaluation results of the early warning effect, the pre-trained time series prediction model is optimized to obtain the optimized pre-trained time series prediction model.

8. A traffic risk early warning device, characterized in that, The device includes: The data acquisition module is used to acquire traffic data upstream and downstream of the road segment to be detected; wherein, the traffic data includes average speed and flow rate; A sequence generation module is used to generate a structured time series based on the traffic data; The interval prediction module is used to obtain the probability prediction interval based on the structured time series according to the pre-trained time series prediction model. A threshold determination module is used to determine a traffic warning threshold based on the probability prediction interval; wherein the traffic warning threshold includes a lower traffic warning threshold and an upper traffic warning threshold. The information determination module is used to determine alarm information based on the traffic warning threshold and the current traffic data of the upstream and downstream of the road segment to be detected; The confidence level determination module is used to determine the alarm confidence level based on the probability prediction interval and the current traffic data upstream and downstream of the road segment to be detected; The early warning output module is used to determine the risk early warning output result of the road segment to be detected based on the probability prediction interval, traffic warning threshold, alarm information and alarm confidence level.

9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the traffic risk warning method as described in any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, it implements the steps of the traffic risk warning method as described in any one of claims 1 to 7.