Highway traffic flow risk identification method and system based on SDE and GPR

The traffic flow risk identification method based on SDE and GPR combined with the whale optimization algorithm solves the problems of randomness and uncertainty in traffic data, realizes flexible and accurate risk detection of traffic flow data, and improves detection efficiency and robustness.

CN119207094BActive Publication Date: 2025-09-05JIANGXI GANYUE EXPRESSWAY +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411482453.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-23
Publication Date
2025-09-05
Estimated Expiration
2044-10-23

AI Technical Summary

Technical Problem

Existing methods are unable to effectively deal with the randomness and uncertainty of traffic data, especially when detecting outliers in non-Gaussian data and large data sets, which is very challenging and affects the accuracy and efficiency of traffic flow anomaly detection.

Method used

A traffic flow risk identification model is established by combining a method based on stochastic differential equations (SDE) and Gaussian process regression (GPR) with the whale optimization algorithm. Robust risk detection of traffic flow data is achieved through data preprocessing, stochastic differential equation model construction, hyperparameter optimization and anomaly detection.

Benefits of technology

It realizes flexible and accurate risk detection of time-series traffic flow data, has strong robustness and practicality, can quantify short-term dynamic traffic flow status, reduce false alarm rate and improve detection efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119207094B_ABST
    Figure CN119207094B_ABST
Patent Text Reader

Abstract

The present invention proposes a highway traffic flow risk identification method and system based on SDE (Stochastic Differential Equation) and GPR (Gaussian Process Regression), which effectively considers the randomness and uncertainty in the observed data. The method is based on stochastic differential equations (SDE) and Gaussian process regression (GPR). SDE is used to capture the drift and diffusion estimation of traffic flow data, and GPR is combined to realize outlier detection based on Bayesian posterior inference. In order to improve practicality, a flexible threshold setting based on statistical tests is introduced to balance model fitting and detection complexity. Compared with the traditional SDE method, the SDE-GPR method of the present invention exhibits stronger robustness and is more suitable for the complexity of the traffic system. Experiments show that the present invention has better regression performance than GPR and a lower false alarm rate. The present invention provides a more advanced and accurate method for outlier detection in traffic flow data, opening up a new way for real-time traffic condition monitoring and management.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of road traffic safety analysis and management, and relates to a highway traffic flow risk identification method and system based on stochastic differential equations (SDE) and Gaussian process regression (GPR) for studying the randomness of traffic flow. Background Art

[0002] Accurate and reliable data analysis plays a critical role in modern urban traffic management, enabling real-time traffic monitoring, prediction, and optimization. However, outliers in traffic data, arising from system complexity, can negatively impact analysis and model building. Outlier detection is used not only to identify traffic flow anomalies but also to identify road congestion, traffic accidents, and emergencies. However, existing methods struggle to effectively address the randomness and uncertainty of traffic data, and outlier detection in non-Gaussian data and large datasets presents significant challenges. Summary of the Invention

[0003] Purpose of the invention: The purpose of the present invention is to provide a highway traffic flow risk identification method and system based on SDE and GPR, which uses traffic flow data for risk detection to address the shortcomings of traditional traffic flow prediction methods in the field of traffic engineering in terms of fitting performance and algorithm efficiency. This method can fully consider the uncertainty and time-varying laws of traffic flow and has strong robustness and practicality.

[0004] Technical solution: To achieve the above objectives, the present invention provides a highway traffic flow risk identification method based on SDE and GPR, comprising the following steps:

[0005] (1) Data collection, including checkpoint data for highway section monitoring and highway accident data;

[0006] (2) Analyzing and preprocessing the cross-section monitoring data collected in step (1) to obtain traffic flow data, establishing a Gaussian prior analysis, and obtaining the Gaussian mean and variance; extracting accident features from the accident data, and using the accident features to calculate a correction coefficient for adjusting the detection threshold;

[0007] (3) Establishing a stochastic differential equation model for the traffic flow data processed in step (2), calculating the diffusion function and drift function, and realizing the prediction and analysis of traffic flow data taking into account randomness;

[0008] (4) applying the whale optimization algorithm to optimize the hyperparameters of the stochastic differential equation model established in step (3), wherein the hyperparameters include the mean and variance of the Gaussian kernel function;

[0009] (5) Using the model trained in step (4) to perform risk detection, by generating bootstrap samples and calculating statistical test thresholds for the detection data, thereby effectively controlling the false alarm rate;

[0010] (6) Calculate the drift estimate of the model trained in step (4) and compare it with the test threshold in step (5) to determine whether the data is abnormal or not.

[0011] As a preference, in step (2), the collected traffic flow is distributed according to the Gaussian distribution 3σ principle, with the mean μ and variance σ for Gaussian regression. 2 The sample data outside (μ-3σ,μ+3σ) are eliminated, and the processed samples are used for subsequent analysis.

[0012] Preferably, in step (3), the traffic flow data is from a checkpoint detector on a highway, with a time interval of Δt, and the cumulative number of vehicles passing through the detector position is recorded every Δt; establishing the stochastic differential equation model includes the following steps:

[0013] (31) The data set of traffic flow data within the total time T is divided into a set of discrete points {t0, t1, ..., t i ,...,t N-1 ,t N},t i ∈[0,T], time interval Δt=T / N, where N is the number of data point intervals; let X t is the random process representation of the data point flow, and its stochastic differential equation can be expressed as:

[0014]

[0015] Where f(X t ) is the drift function of the stochastic differential equation, is the diffusion term of the stochastic differential equation, dW t is the variation of Brownian motion;

[0016] (32) Diffusion estimation The observed quantity Y D =(X t+Δt -X t ) 2 / Δt is obtained, and its diffusion function D(x) and error ζ are modeled as:

[0017]

[0018] In function fitting calculation, x is a continuous variable, and its physical meaning is the same as X t Similarly, the diffusion function D(x) is composed of the flow data point vector Gram matrix K Dand the covariance vector k D (x), where λ is the data point X t Gaussian regression deviation ζ t The mean of the square, I is the unit matrix, k D (·,·) is the covariance function;

[0019]

[0020] [K D ] ij =k D (x i ,x j )

[0021] k D (x)=[k D (x,x0)k D (x,x1)...k D (x,x i )] T

[0022] is the observed flow vector, Represents the observed quantity of the flow variable at time t i Data points at the moment, x0 x1...x i represents the data point flow in the i-th random process;

[0023] (33) Drift estimation The corresponding observation quantity Y=(X t+Δt -X t ) / Δt, the drift function f(x) obeys the mean variance Gaussian distribution Where ∑ is the noise matrix, Gram matrix K and vector k(x) form K D and k D (x) is the same, and the Gaussian kernel function has two sets of parameters μ1,σ1 and μ2,σ2.

[0024] Preferably, in step (4), the whale optimization algorithm is applied to find the optimal solution of the model kernel function parameters, including the following steps:

[0025] (41) The agent simulates the behavior of the whale and continuously shrinks the search range through the bubble network. The whale searches for the optimal parameters through three strategies: circling, attacking, and searching. Among them, the whale coordinate X m As time goes by, the coordinate calculation of the mth generation is as follows:

[0026] X m+1 =X m -A·D

[0027]

[0028] A=2×a×ra

[0029] C=2×r

[0030] Where A and C are parameters defined by the whale optimization algorithm, A contains a random number ranging from 2 to 0, D is the distance between the prey and the whale, and a and r are random vectors generated by the whale algorithm.

[0031] (42) Whales approach their prey by spiraling along the e bl The updated coordinates of the helix are shown below on the left:

[0032]

[0033] Where D' represents the current search distance, b and l are the spiral shape parameters, and p is the random number generated when the whale makes a decision.

[0034] Preferably, in step (5), a dynamic abnormal risk threshold is calculated based on the test data set, comprising the following steps:

[0035] (51) Create a new trained stochastic differential equation based on the test data Let f(X t )=μ(Y t ), Then the drift function after transformation based on the Gilsanov theorem is:

[0036]

[0037] where X t is the random process representation of the data point flow, Y t represents the observation quantity of the data point, σ(X t ) represents the diffusion function, f(X t ) represents the drift function, μ(Y t ) represents the drift function after transformation;

[0038] (52) The computable likelihood ratio ζ is obtained i , f1 and f2 are the drift functions of the training set and the test set respectively:

[0039]

[0040] in and The corresponding functions of the training set and the test set are respectively. According to the statistical test, the threshold η can be calculated based on the quantile, and the threshold is post-processed. The coefficient C calculated by combining the accident data is used to calculate the corrected threshold η'. If the likelihood ratio is greater than the calculated threshold, it is classified as an abnormal risk. If it is less than the threshold, it is classified as a normal point. The expression of the quantile α is as follows:

[0041] η′=C*η

[0042]

[0043] in represents the distribution function, Ⅱ(ζ i >η′) represents the 0-1 variable obtained by the indicator function. If the condition is met, the function takes 1, otherwise it takes 0, and B is the number of bootstrap samples.

[0044] Preferably, in step (6), the time location of the abnormal point is also estimated, and the correlation between the abnormal point and the risk point is analyzed in combination with the accident data characteristics, including spatial correlation and risk correlation coefficient.

[0045] A highway traffic flow risk identification system based on SDE and GPR includes:

[0046] Data acquisition module, used for data collection, including checkpoint road section monitoring data and highway accident data;

[0047] The preprocessing module is used to analyze and preprocess the collected cross-section monitoring data, obtain traffic flow data, establish Gaussian prior analysis, obtain Gaussian mean and variance, and extract accident features from the accident data. The accident features are used to calculate the correction coefficient to adjust the detection threshold;

[0048] The model building module is used to build a stochastic differential equation model for the processed traffic data, calculate the diffusion function and drift function, and realize the prediction and analysis of traffic flow data taking into account randomness;

[0049] A parameter optimization module is used to optimize the hyperparameters of the established stochastic differential equation model using the whale optimization method, wherein the hyperparameters include the mean and variance of the Gaussian kernel function;

[0050] The anomaly detection and risk identification module is used to perform risk detection on the trained model. By generating bootstrap samples and calculating the statistical test threshold for the test data, the false alarm rate can be effectively controlled. The drift estimate of the trained model is calculated and compared with the test threshold to determine whether the data is abnormal.

[0051] A computer system includes a memory, a processor, and a computer program / instruction stored in the memory and executable on the processor. When the computer program / instruction is executed by the processor, the steps of a highway traffic flow risk identification method based on SDE and GPR are implemented.

[0052] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of a highway traffic flow risk identification method based on SDE and GPR.

[0053] A computer program product includes a computer program / instruction, which, when executed by a processor, implements the steps of a highway traffic flow risk identification method based on SDE and GPR.

[0054] Beneficial effects: The present invention has the following beneficial effects:

[0055] (1) The present invention can perform risk detection on time-series traffic flow data and proposes a stochastic differential equation model SDE-GPR that integrates Gaussian process regression. It can predict quantifiable confidence intervals for short-term dynamic traffic flow states and has robustness and flexibility.

[0056] (2) The present invention adopts the whale optimization method to derive the log-likelihood function of the SDE-GPR model and optimize the high-dimensional parameters, which has a faster convergence speed than the traditional parameter optimization method.

[0057] (3) The abnormal risk threshold of the traffic flow data set to be tested is calculated based on statistical tests to obtain a dynamic risk threshold, which can be used for dynamic detection adapted to the data characteristics. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] Figure 1 Schematic diagram of a method flow in an embodiment of the present invention.

[0059] Figure 2 Schematic diagram of traffic flow according to an embodiment of the present invention.

[0060] Figure 3 Schematic diagram of the abnormal traffic flow risk detection results for one month in an embodiment of the present invention.

[0061] Figure 4 Schematic diagram of detailed results of traffic anomaly risk detection in an embodiment of the present invention. DETAILED DESCRIPTION

[0062] The technical solution of the present invention is described in detail below with reference to the accompanying drawings and specific embodiments.

[0063] An embodiment of the present invention discloses a highway traffic flow risk identification method based on SDE and GPR, which takes into account the randomness and uncertainty of real-time dynamic changes to effectively identify outliers in traffic flow data. SDE describes the evolution of random processes and captures the inherent randomness and uncertainty in the data. GPR provides SDE with accurate Bayesian inference and probabilistic statistical methods for outlier detection. The present invention combines SDE and GPR to enhance the understanding of the randomness and uncertainty of traffic systems, realize a more effective and robust outlier detection method, and provide a new approach for real-time traffic condition monitoring and management.

[0064] The method flow of the embodiment of the present invention is as follows Figure 1 As shown in the figure, using time series traffic flow data as input, the temporal fluctuation and random diffusion behavior of traffic flow data are simulated through random processes, and a threshold-based detection method is provided for assessing the anomaly risk of traffic flow data. The method includes the following steps:

[0065] (1) Data collection, including road section monitoring data and highway accident data;

[0066] (2) Analyze and preprocess the cross-section monitoring data collected in step (1) to obtain traffic flow data and establish Gaussian prior analysis, such as Figure 2 The traffic flow data set shown in the figure is used to obtain the Gaussian mean and variance. Accident characteristics such as accident frequency, accident type distribution, and accident severity are then extracted from the accident data. The correction coefficient is calculated based on the spatiotemporal characteristics of the accident to adjust the detection threshold.

[0067] (3) Establishing a stochastic differential equation model for the traffic flow data processed in step (2), calculating the diffusion function and drift function, and realizing the prediction and analysis of traffic flow data taking into account randomness;

[0068] (4) Optimizing the hyperparameters of the stochastic differential equation model established in step (3) using the whale optimization method. The hyperparameters of the training model are derived from the data features and dimensions, including the mean and variance of the Gaussian kernel function.

[0069] (5) Using the model trained in step (4) to establish risk detection, by generating bootstrap samples, calculating statistical test thresholds for the detection data, and effectively controlling the false alarm rate;

[0070] (6) Calculate the drift estimation of the model trained in step (4) and compare it with the test threshold in step (5) to determine whether the data is abnormal or not, estimate the time location of the abnormal point, and analyze the correlation between the abnormal point and the risk point in combination with the characteristics of the accident data. Figure 3 , Figure 4The details of anomaly detection are shown in Table 1. Compared with the GPR experimental results including MSE, AUC and FPR as shown in Table 2, this experimental method can obtain risk detection with smaller error, more sensitive test effect and lower false alarm rate.

[0071] Table 1 MSE values ​​of SDE-GPR method, Gaussian process regression and polynomial regression experiments

[0072]

[0073] Table 2. Area under the threshold curve (AUC) and false alarm rate of SDE-GPR method and baseline method

[0074]

[0075] Specifically, in step (2), the three traffic flow parameters collected are calculated according to the 3σ principle, with the mean μ and variance σ for Gaussian regression. 2 The sample data outside (μ-3σ,μ+3σ) are eliminated, and the processed samples are used for subsequent analysis.

[0076] In step (3), the traffic data comes from the checkpoint detectors on the highway. The time interval is recorded every 5 minutes (i.e., Δt = 5 minutes) to record the cumulative number of vehicles passing at the detector location. Establishing the stochastic differential equation model includes the following steps:

[0077] (31) The data set of traffic flow data within the total time T is divided into a set of discrete points {t0, t1, ..., t i ,...,t N-1 ,t N},t i ∈[0,T], time interval Δt=T / N, where N is the number of data point intervals; let X t is the random process representation of the data point flow, and its stochastic differential equation can be expressed as:

[0078]

[0079] Where f(X t ) is the drift function of the stochastic differential equation, is the diffusion term of the stochastic differential equation, dW t is the variation of Brownian motion;

[0080] (32) Diffusion estimation The observed quantity Y D =(X t+Δt -X t ) 2 / Δt is obtained, and its diffusion function D(x) and error ζ are modeled as:

[0081]

[0082] In function fitting calculation, x is a continuous variable, and its physical meaning is the same as X t Similarly, the diffusion function D(x) is composed of the flow data point vector Gram matrix K D and the covariance vector k D (x), where λ is the data point X t Gaussian regression deviation ζ t The mean of the square, I is the unit matrix, k D (·,·) is the covariance function;

[0083]

[0084] [K D ] ij =k D (x i ,x j )

[0085] k D (x)=[k D (x,x0)k D (x,x1)...k D (x,x i )] T

[0086] is the observed flow vector, Represents the observed quantity of the flow variable at time t i Data points at the moment, x0 x1...x i represents the data point flow in the i-th random process;

[0087] (33) Drift estimation The observation quantity Y=(X t+Δt -X t ) / Δt, the drift function f(x) obeys the mean variance Gaussian distribution Where ∑ is the noise matrix, Gram matrix K and vector k(x) form K D and k D (x) is the same, and the Gaussian kernel function has two sets of parameters μ1,σ1 and μ2,σ2.

[0088] In step (4), the whale optimization algorithm is applied to find the optimal solution of the model kernel function parameters, including the following steps:

[0089] (41) The agent simulates the behavior of the whale and continuously shrinks the search range through the bubble network. The whale searches for the optimal parameters through three strategies: circling, attacking, and searching. Among them, the whale coordinate X m As time goes by, the coordinate calculation of the mth generation is as follows:

[0090] X m+1 =X m -A·D

[0091]

[0092] A=2×a×ra

[0093] C=2×r

[0094] Where A and C are parameters defined by the whale optimization algorithm, A contains a random number ranging from 2 to 0, D is the distance between the prey and the whale, and a and r are random vectors generated by the whale algorithm.

[0095] (42) Whales approach their prey by spiraling along the e bl The updated coordinates of the helix are shown below on the left:

[0096]

[0097] Where D' represents the current search distance, b and l are the spiral shape parameters, and p is the random number generated when the whale makes a decision.

[0098] In step (5), a dynamic abnormal risk threshold is calculated based on the test data set, including the following steps:

[0099] (51) Create a new trained stochastic differential equation based on the test data Let f(X t )=μ(Y t ), Then the drift function after transformation based on the Gilsanov theorem is:

[0100]

[0101] where X t is the random process representation of the data point flow, Y t represents the observation quantity of the data point, σ(X t ) represents the diffusion function, f(X t ) represents the drift function, μ(Y t ) represents the drift function after transformation;

[0102] (52) The computable likelihood ratio ζ is obtained i , f1 and f2 are the drift functions of the training set and the test set respectively:

[0103]

[0104] in and The corresponding functions of the training set and the test set are respectively. According to the statistical test, the threshold η can be calculated based on the quantile, and the threshold is post-processed. The coefficient C calculated by combining the accident data is used to calculate the corrected threshold η'. If the likelihood ratio is greater than the calculated threshold, it is classified as an abnormal risk. If it is less than the threshold, it is classified as a normal point. The expression of the quantile α is as follows:

[0105] η'=C*η

[0106]

[0107] in represents the distribution function, Ⅱ(ζ i >η′) represents a 0-1 variable obtained by the indicator function, and takes 1 if the condition is met, and takes 0 otherwise, and B is the number of bootstrap samples. In this embodiment, referring to the reference standard for classification of high-incidence points and sections of highway traffic accidents, high-incidence points and sections of traffic accidents are divided into Class I high-incidence points and sections, Class II high-incidence points and sections, according to the frequency and severity of accidents, and the corresponding coefficients C are taken as 1.3, 1.2, and 1.1, respectively.

[0108] Based on the same inventive concept, an embodiment of the present invention discloses a highway traffic flow risk identification system based on SDE and GPR, including: a data acquisition module for data acquisition, including checkpoint road section monitoring data and highway accident data; a preprocessing module for analyzing and preprocessing the collected section monitoring data, obtaining traffic flow data, establishing Gaussian prior analysis, obtaining Gaussian mean and variance, and extracting accident features from the accident data, wherein the accident features are used to calculate correction coefficients for adjusting detection thresholds; a model construction module for establishing a stochastic differential equation model for the processed traffic data, calculating diffusion functions and drift functions, and realizing traffic flow data prediction and analysis considering randomness; a parameter optimization module for using the whale optimization method to optimize the hyperparameters of the established stochastic differential equation model, wherein the hyperparameters include the mean and variance of the Gaussian kernel function; an anomaly detection and risk identification module for performing risk detection on the trained model, calculating a statistical test threshold for the test data by generating bootstrap samples, and effectively controlling the false alarm rate; and calculating a drift estimate for the trained model and comparing it with the test threshold to determine whether the data is abnormal.

[0109] Based on the same inventive concept, an embodiment of the present invention discloses a computer system, including a memory, a processor, and a computer program / instruction stored in the memory and executable on the processor. When the computer program / instruction is executed by the processor, the steps of the highway traffic flow risk identification method based on SDE and GPR are implemented.

[0110] Based on the same inventive concept, an embodiment of the present invention discloses a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps of the highway traffic flow risk identification method based on SDE and GPR.

[0111] Based on the same inventive concept, an embodiment of the present invention discloses a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the highway traffic flow risk identification method based on SDE and GPR.

Claims

1. A highway traffic flow risk identification method based on SDE and GPR, characterized by: The following steps are involved: (1) Data collection, including checkpoint data for highway section monitoring and highway accident data; (2) Analyze and preprocess the cross-section monitoring data collected in step (1) to obtain traffic flow data, establish Gaussian prior analysis, and obtain Gaussian mean and variance; Extracting accident features from accident data, wherein the accident features are used to calculate a correction coefficient for adjusting a detection threshold; (3) Establishing a stochastic differential equation model for the traffic flow data processed in step (2), calculating the diffusion function and drift function, and realizing the prediction and analysis of traffic flow data taking into account randomness; (4) applying the whale optimization algorithm to optimize the hyperparameters of the stochastic differential equation model established in step (3), wherein the hyperparameters include the mean and variance of the Gaussian kernel function; (5) Using the model trained in step (4) to perform risk detection, by generating bootstrap samples and calculating the statistical test threshold of the detection data, the false alarm rate can be effectively controlled; wherein, the dynamic abnormal risk threshold is calculated based on the test data set, including the following steps: (51) Create a new trained stochastic differential equation based on the test data Let f(X t )=μ(Y t ), Then the drift function after transformation based on the Gilsanov theorem is: where X t is the random process representation of the data point flow, Y t represents the observation quantity of the data point, σ(X t ) represents the diffusion function, f(X t ) represents the drift function, μ(Y t ) represents the drift function after transformation; (52) The computable likelihood ratio ζ is obtained i , f1 and f2 are the drift functions of the training set and the test set respectively: in and are the corresponding functions of the training set and the test set respectively. According to the statistical test, the threshold η can be calculated according to the quantile, and the threshold is post-processed. The coefficient C calculated by combining the accident data is used to calculate the corrected threshold η'. If the likelihood ratio is greater than the calculated threshold, it is classified as an abnormal risk. If it is less than the threshold, it is classified as a normal point. The expression of the quantile α is as follows: η'=C*η in represents the distribution function, Ⅱ(ζ i >η) represents a 0-1 variable obtained by the indicator function, which takes 1 if the condition is met and 0 otherwise, and B is the number of bootstrap samples; (6) Calculate the drift estimate of the model trained in step (4) and compare it with the test threshold in step (5) to determine whether the data is abnormal or not.

2. The highway traffic flow risk identification method based on SDE and GPR according to claim 1 is characterized in that: In step (2), the collected traffic flow is distributed according to the Gaussian distribution 3σ principle, and the mean of Gaussian regression is μ and the variance is σ 2 The sample data outside (μ-3σ,μ+3σ) are eliminated, and the processed samples are used for subsequent analysis.

3. The highway traffic flow risk identification method based on SDE and GPR according to claim 1 is characterized in that: In step (3), the traffic flow data comes from the checkpoint detector on the highway, with a time interval of Δt, and the cumulative number of vehicles passing at the detector position is recorded every Δt; establishing the stochastic differential equation model includes the following steps: (31) The data set of traffic flow data within the total time T is divided into a set of discrete points {t0, t1, ..., t i ,...,t N-1 ,t N },t i ∈[0,T], time interval Δt=T / N, where N is the number of data point intervals; let X t is the random process representation of the data point flow, and its stochastic differential equation can be expressed as: Where f(X t ) is the drift function of the stochastic differential equation, is the diffusion term of the stochastic differential equation, dW t is the variation of Brownian motion; (32) Diffusion estimation The observed quantity Y D =(X t+Δt -X t ) 2 / Δt is obtained, and its diffusion function D(x) and error ζ are modeled as: In function fitting calculation, x is a continuous variable, and its physical meaning is the same as X t Similarly, the diffusion function D(x) is composed of the flow data point vector Gram matrix K D and covariance vector k D (x), where λ is the data point X t Gaussian regression deviation ζ t The mean of the square, I is the unit matrix, k D (·,·) is the covariance function; [K D ] ij =k D (x i ,x j ) k D (x)=[k D (x,x0)k D (x,x1)…k D (x,x i )] T is the observed flow vector, Represents the observed quantity of the flow variable at time t i Data point at the moment, x0x1...x i represents the data point flow in the i-th random process; (33) Drift estimation The corresponding observation quantity is Y=(X t+Δt -X t ) / Δt, the drift function f(x) obeys the mean variance Gaussian distribution Where Σ is the noise matrix, Gram matrix K and vector k(x) form K D and k D (x) is the same, and the Gaussian kernel function has two sets of parameters μ1,σ1 and μ2,σ2.

4. The highway traffic flow risk identification method based on SDE and GPR according to claim 1 is characterized in that: In step (4), the whale optimization algorithm is applied to find the optimal solution of the model kernel function parameters, including the following steps: (41) The agent simulates the behavior of the whale and continuously shrinks the search range through the bubble network. The whale searches for the optimal parameters through three strategies: circling, attacking, and searching. Among them, the whale coordinate X m As time goes by, the coordinate calculation of the mth generation is as follows: X m+1 =X m -A·D A=2×a×ra C=2×r Where A and C are parameters defined by the whale optimization algorithm, A contains a random number ranging from 2 to 0, D is the distance between the prey and the whale, and a and r are random vectors generated by the whale algorithm; (42) Whales approach their prey by spiraling along the e bl The updated coordinates of the helix are shown below on the left: Where D' represents the current search distance, b and l are the spiral shape parameters, and p is the random number generated when the whale makes a decision.

5. The highway traffic flow risk identification method based on SDE and GPR according to claim 1 is characterized in that: In step (6), the time location of the abnormal point is also estimated, and the correlation between the abnormal point and the risk point is analyzed in combination with the accident data characteristics, including spatial correlation and risk correlation coefficient.

6. A highway traffic flow risk identification system based on SDE and GPR, characterized by: include: Data acquisition module, used for data collection, including checkpoint road section monitoring data and highway accident data; The preprocessing module is used to analyze and preprocess the collected cross-section monitoring data, obtain traffic flow data, establish Gaussian prior analysis, obtain Gaussian mean and variance, and extract accident features from the accident data. The accident features are used to calculate the correction coefficient to adjust the detection threshold; The model building module is used to build a stochastic differential equation model for the processed traffic data, calculate the diffusion function and drift function, and realize the prediction and analysis of traffic flow data taking into account randomness; A parameter optimization module is used to optimize the hyperparameters of the established stochastic differential equation model using the whale optimization method, wherein the hyperparameters include the mean and variance of the Gaussian kernel function; The anomaly detection and risk identification module is used to perform risk detection on the trained model. By generating bootstrap samples and calculating the statistical test threshold of the detection data, the false alarm rate can be effectively controlled. The drift estimate of the trained model is calculated and compared with the test threshold to determine whether the data is abnormal. The dynamic abnormal risk threshold is calculated based on the test data set, including the following steps: Create a new trained stochastic differential equation based on the test data Let f(X t )=μ(Y t ), Then the drift function after transformation based on the Gilsanov theorem is: where X t is the random process representation of the data point flow, Y t represents the observation quantity of the data point, σ(X t ) represents the diffusion function, f(X t ) represents the drift function, μ(Y t ) represents the drift function after transformation; Obtain a computable likelihood ratio ζ i , f1 and f2 are the drift functions of the training set and the test set respectively: in and are the corresponding functions of the training set and the test set respectively. According to the statistical test, the threshold η can be calculated according to the quantile, and the threshold is post-processed. The coefficient C calculated by combining the accident data is used to calculate the corrected threshold η'. If the likelihood ratio is greater than the calculated threshold, it is classified as an abnormal risk. If it is less than the threshold, it is classified as a normal point. The expression of the quantile α is as follows: η'=C*η in represents the distribution function, Ⅱ(ζ i >η) represents the 0-1 variable obtained by the indicator function. If the condition is met, the function takes 1, otherwise it takes 0, and B is the number of bootstrap samples.

7. A computer system comprising a memory, a processor, and a computer program / instruction stored in the memory and executable on the processor, wherein: When the computer program / instructions are executed by a processor, the steps of the highway traffic flow risk identification method based on SDE and GPR are implemented according to any one of claims 1 to 5.

8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the highway traffic flow risk identification method based on SDE and GPR are implemented according to any one of claims 1 to 5.

9. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the highway traffic flow risk identification method based on SDE and GPR are implemented according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Variational filtering maneuvering target tracking method based on Gaussian process regression

    CN116662733A

  • Device and method for training the neural drift network and the neural diffusion network of a neural stochastic differential equation

    US20220215254A1