An adaptive online prediction method for the spatial impact range of highway accidents
Through the Kalman filtering model and adaptive adjustment of correlation coefficient, the inaccuracy problem of prediction of the spatial impact range of highway accidents in the existing technology is solved, and the adaptive online efficient prediction of the spatial impact range of highway accidents is realized, which improves traffic accidents real-time prediction accuracy.
Patent Information
- Application Number
- CN202210473921.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-29
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2042-04-29
AI Technical Summary
The existing prediction methods for spatial impact ranges of highway accidents cannot adaptively change, and the factor correlation coefficient is fixed, resulting in inaccurate prediction results and it is difficult to meet the rapid changes in complex road traffic environments.
Using the Kalman filtering model, by establishing an accident data set and acquiring new data, adaptively adjusting the correlation coefficient of the influence range factors, combining the data to predict, and computing the covariance matrix to achieve adaptive online prediction of the spatial impact range of highway accidents.
It realizes adaptive online efficient prediction of the spatial impact range of highway accidents, improves the model's ability to capture recent changes, and enhances the real-time and accurate prediction ability of traffic accidents.
Smart Images

Figure CN114925887B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of traffic accident impact range prediction, in particular to an adaptive online prediction method for the spatial impact range of highway accidents. Background Art
[0002] Highway traffic accidents are one of the main factors that reduce the efficiency of road network operation, and seriously threaten the safety of people's lives and property. Predicting the spatial impact range of accidents helps highway management departments to timely analyze the impact of accidents, reasonably organize and control traffic, improve emergency rescue efficiency, thereby avoiding further deterioration of the impact caused by traffic accidents, reducing casualties and property losses caused by traffic accidents, and providing decision-making basis for the long-term planning of highway systems. Therefore, it is of great significance to predict the spatial impact range of traffic accidents online and efficiently, and it is urgent to propose an effective method for predicting the impact range of highway traffic accidents.
[0003] At present, the prediction methods for the impact range of highway traffic accidents have the following shortcomings: In the existing research methods for predicting the spatial impact range of highway accidents, the correlation coefficients of the influencing factors are mostly fixed values. The prediction results obtained based on them only conform to the spatial impact range of highway accidents in the initial data set, and cannot change adaptively with the changes in the highway accident data set; in addition, the road traffic environment is very complex. With the change of time, the operation status of traffic in the highway network is also changing rapidly, and the influence degree of each related factor will also fluctuate greatly. The general prediction method only uses the correlation coefficients of the initial influencing factors for prediction, which may produce inaccurate prediction results of the spatial impact range of highway accidents, thereby having a negative impact on subsequent traffic management and control decisions. Therefore, it is of great theoretical and practical significance to establish a prediction method that can consider the influence of multiple related factors and adapt to changes according to highway accident data. Summary of the invention
[0004] The technical problem to be solved by the present invention is to overcome the shortcomings of the prior art and provide an adaptive online prediction method for the spatial impact range of highway accidents. The method of the present invention establishes a model data set by acquiring data on the spatial impact range and influencing factors of highway accidents, adaptively adjusts the correlation coefficients of the factors of the spatial impact range of highway accidents according to the new data, predicts the spatial impact range of highway accidents in combination with the acquired data and the new correlation coefficients, and finally calculates the correlation coefficient covariance matrix and repeats this process, thereby realizing adaptive online and efficient prediction of the spatial impact range of highway accidents.
[0005] The present invention adopts the following technical solutions to solve the above technical problems:
[0006] The invention discloses an adaptive online prediction method for the spatial impact range of highway accidents. The method predicts the spatial impact range of accidents by constructing a prediction model for the spatial impact range of accidents, wherein the prediction model for the spatial impact range of accidents adopts a Kalman filter model.
[0007] The prediction method comprises the following steps:
[0008] Step 1: Establish an accident data set, where each accident data includes the observed value of the accident spatial impact range, the number of one-way lanes, the number of occupied lanes, the number of accident vehicles, the number of accident trucks, the time of the accident, and the traffic flow;
[0009] Step 2, initializing parameters in the Kalman filter model, wherein the parameters include a correlation coefficient, a state transfer matrix, an observation matrix, an observation process covariance matrix, and a state process covariance matrix;
[0010] Step 3, determine whether a new accident occurs at time t, if yes, obtain the number of one-way lanes, the number of occupied lanes, the number of accident vehicles, the number of accident trucks, the time of the accident and the traffic flow when the new accident occurs, and proceed to step 4, otherwise proceed to step 7;
[0011] Step 4: Obtain the parameters in the Kalman filter model at time t;
[0012] Step 5: Calculate the prior state and prior state covariance matrix of the Kalman filter model at time t, and predict the spatial impact range of the accident at time t;
[0013] Step 6: After the new accident is processed, the observation value of the accident space impact range of the new accident is obtained, and the observation error, observation process covariance matrix, Kalman gain, posterior state, posterior state covariance matrix and state process covariance matrix at time t are calculated to complete the update of the Kalman filter model as the basis for the next prediction;
[0014] Step 7: Let t=t+1 and go to step 3.
[0015] Furthermore, the i-th accident data in the accident data set established in step 1 is: i ,b i ,c i ,d i ,e i ,f i ,g i}, where: a i , b i , c i , d i , e i , f i , g iThey are the spatial impact range of the accident at time i, the number of one-way lanes, the number of occupied lanes, the number of accident vehicles, the number of accident trucks, the time of the accident and the traffic flow.
[0016] Furthermore, in step 2, the initial value w0 of the correlation coefficient, the constant state transfer matrix Φ, the initial value X1 of the observation matrix, the initial value R1 of the observation process covariance matrix, and the initial value Q1 of the state process covariance matrix are respectively:
[0017]
[0018]
[0019] X1=(b1c1d1e1f1g1)
[0020] R1=I
[0021] Q1=I
[0022] Where: λ is the forgetting factor; are the number of one-way lanes, the number of occupied lanes, the number of accident vehicles, the number of accident trucks, the time of the accident, the initial value of the correlation coefficient between the flow rate and the spatial impact range of the accident; I is the unit matrix.
[0023] Furthermore, in step 5, the spatial impact range of the accident at time t is predicted, and the specific steps are as follows:
[0024] Calculate the prior state of the Kalman filter model at time t That is, the prior correlation coefficient at time t:
[0025]
[0026] Where: Φ is the state transfer matrix, is the posterior state value of the correlation coefficient at time t-1;
[0027] In the calculated Based on the predicted value of the accident spatial impact range at time t The calculation formula is as follows:
[0028]
[0029] Where: X t is the observation matrix at time t;
[0030] Compute the prior state covariance matrix That is, the prior correlation coefficient covariance matrix:
[0031]
[0032] Where: Φ is the state transfer matrix, is the posterior state covariance matrix at time t-1, Q t is the state process covariance matrix at time t.
[0033] Furthermore, the observation error e at time t in step 6 is t , the observation process covariance matrix R t , Kalman gain K t , the posterior state Posterior state covariance matrix State process covariance matrix Q t The calculation method is as follows:
[0034] The observation error at time t is e t The calculation formula is as follows:
[0035]
[0036] Where: a t is the observed value of the accident spatial impact range at time t, X t is the observation matrix at time t, is the prior state at time t;
[0037] The observation process covariance matrix R at time t t The calculation formula is as follows:
[0038]
[0039] Where: N is the size of the accident data set at time t, e t is the observation error at time t, e t-j+1 is the observation error at time t-j+1, is the average value of the observation error at time t, X t is the observation matrix at time t, X t-j+1 is the observation matrix at time t-j+1, is the prior state covariance matrix at time t, is the prior state covariance matrix at time t-j+1;
[0040] Kalman filter gain K at time t t The calculation formula is as follows:
[0041]
[0042] The posterior state at time t The calculation formula is as follows:
[0043]
[0044] Where: is the prior state of the Kalman filter model at time t;
[0045] The posterior state covariance matrix at time t The calculation formula is as follows:
[0046]
[0047] Where: I is the unit matrix, is the prior state covariance matrix at time t;
[0048] The state process covariance matrix Q at time t t The calculation formula is as follows:
[0049]
[0050] Where: Φ is the state transfer matrix, is the posterior state covariance matrix at time t-j+1, is the prior state covariance matrix at time t-j+1, l t-j+1 is the process error at time t-j+1, is the average process error at time t.
[0051] Furthermore, the average observation error at time t is
[0052] Furthermore, t and The calculation formulas are as follows:
[0053]
[0054]
[0055] Where: is the posterior state at time t-1.
[0056] Compared with the prior art, the present invention adopts the above technical solution and has the following technical effects:
[0057] The present invention adopts a variety of factors affecting the spatial impact range of highway accidents, and through an adaptive method, updates the correlation coefficients of the factors online and efficiently, and combines the new influencing factor data to obtain the predicted value of the spatial impact range of highway accidents. At the same time, by continuously acquiring new data, the model's ability to capture recent changes in the spatial impact range of highway accidents is improved, thereby achieving adaptive real-time and accurate prediction of traffic accidents. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 The figure is an overall flow chart of an adaptive online prediction method for the spatial impact range of highway accidents. DETAILED DESCRIPTION
[0059] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0060] The present invention provides an adaptive online prediction method for the spatial impact range of highway accidents, which overcomes the shortcomings of traditional prediction based on traffic wave theory, as described in detail as follows:
[0061] (1) The problem of main influencing factors. Traditional prediction methods are mainly based on traffic wave theory, which ignores the dynamic correlation between various factors at the accident site and the spatial impact range. Based on this, the present invention predicts the spatial impact range of highway accidents by combining the acquired data of various influencing factors and the new correlation coefficient. In the calculation process, the influence weights of various influencing factors can be obtained, and the relationship between various factors and the spatial impact range of accidents is taken into account.
[0062] (2) Problems of adaptive online prediction. Traditional prediction methods are difficult to achieve real-time online prediction of the impact range of traffic accidents. Based on this, the present invention further achieves adaptive online efficient prediction of the spatial impact range of highway accidents by adaptively adjusting the correlation coefficients of factors affecting the spatial impact range of highway accidents and continuously adding new data to update the prediction results.
[0063] Therefore, the present invention adopts a variety of factors affecting the spatial impact range of highway accidents, and updates the correlation coefficients of the factors online and efficiently through an adaptive method, and combines the new influencing factor data to obtain the predicted value of the spatial impact range of highway accidents. At the same time, by continuously acquiring new data, the method improves the ability of the model to capture the changes in the spatial impact range of highway accidents in the near future, thereby realizing adaptive real-time and accurate prediction of traffic accidents.
[0064] In one embodiment, a method for adaptive online prediction of the spatial impact range of a highway accident is provided. The method predicts the spatial impact range of an accident by constructing a prediction model for the spatial impact range of an accident, wherein the prediction model for the spatial impact range of an accident adopts a Kalman filter model.
[0065] like Figure 1 As shown, the above prediction method includes the following steps:
[0066] Step 1, establish an accident data set, where each accident data includes the observation value of the accident spatial impact range, the number of one-way lanes, the number of occupied lanes, the number of accident vehicles, the number of accident trucks, the time of the accident, and the traffic flow;
[0067] Step 2, initializing the parameters in the Kalman filter model, the parameters include correlation coefficient, state transfer matrix, observation matrix, observation process covariance matrix and state process covariance matrix;
[0068] Step 3, determine whether there is a new accident at time t. If yes, obtain the number of one-way lanes, the number of occupied lanes, the number of accident vehicles, the number of accident trucks, the time of the accident and the traffic flow when the new accident occurred, and proceed to step 4; otherwise, proceed to step 7;
[0069] Step 4. Obtain the parameters in the Kalman filter model at time t, including the correlation coefficient w at time t t-1 , the state transfer matrix Φ t , the observation matrix X t , the observation process covariance matrix R t , the state process covariance matrix Q t ;
[0070] Step 5: Calculate the prior state of the Kalman filter model at time t Prior state covariance matrix Predict the spatial impact range of the accident at time t;
[0071] Step 6. After completing the new accident processing, obtain the accident spatial impact range observation value a of the new accident t , calculate the observation error e at time t t , observation process covariance matrix R t , Kalman gain K t , posterior state Posterior state covariance matrix and the state process covariance matrix Q t , complete the update of the Kalman filter model as the basis for the next prediction;
[0072] Step 7. Let t = t + 1, go to Step 3, and repeat the calculation.
[0073] In one embodiment, the model data set established in step 1 is as follows:
[0074]
[0075] Among them, the i-th accident data is: i ,b i ,c i ,d i ,e i ,f i ,g i}, a i , b i , c i , di , e i , f i , g i They are respectively the accident spatial impact range, the number of one-way lanes, the number of occupied lanes, the number of accident vehicles, the number of accident trucks and traffic data at time i, i∈[1,N], N is the size of the data set.
[0076] In one embodiment, in step 2, the initial value w0 of the correlation coefficient, the constant state transfer matrix Φ, the initial value X1 of the observation matrix, the initial value R1 of the observation process covariance matrix, and the initial value Q1 of the state process covariance matrix are respectively:
[0077]
[0078]
[0079] X1=(b1c1d1e1f1g1)
[0080] R1=I
[0081] Q1=I
[0082] Where: λ is the forgetting factor; are the number of one-way lanes, the number of occupied lanes, the number of accident vehicles, the number of accident trucks, the time of the accident, the initial value of the correlation coefficient between the flow rate and the spatial impact range of the accident; I is the unit matrix.
[0083] In one embodiment, the specific steps of predicting the spatial impact range of the accident at time t in step 5 are as follows:
[0084] Calculate the prior state of the Kalman filter model at time t That is, the prior correlation coefficient at time t:
[0085]
[0086] Where: Φ is the state transfer matrix, is the posterior state value of the correlation coefficient at time t-1;
[0087] In the calculated Based on the predicted value of the accident spatial impact range at time t The calculation formula is as follows:
[0088]
[0089] Where: X t is the observation matrix at time t;
[0090] Compute the prior state covariance matrix That is, the prior correlation coefficient covariance matrix:
[0091]
[0092] Where: Φ is the state transfer matrix, is the posterior state covariance matrix at time t-1, Q t is the state process covariance matrix at time t.
[0093] In one embodiment, the observation error e at time t in step 6 is t , the observation process covariance matrix R t , Kalman gain K t , the posterior state Posterior state covariance matrix State process covariance matrix Q t The calculation method is as follows:
[0094] The observation error at time t is e t The calculation formula is as follows:
[0095]
[0096] Where: a t is the observed value of the accident spatial impact range at time t, X t is the observation matrix at time t, is the prior state at time t;
[0097] The observation process covariance matrix R at time t t The calculation formula is as follows:
[0098]
[0099] Where: N is the size of the accident data set at time t, e t is the observation error at time t, e t-j+1 is the observation error at time t-j+1, is the average value of the observation error at time t, X t is the observation matrix at time t, X t-j+1 is the observation matrix at time t-j+1, is the prior state covariance matrix at time t, is the prior state covariance matrix at time t-j+1;
[0100] Kalman filter gain K at time t t The calculation formula is as follows:
[0101]
[0102] The posterior state at time t The calculation formula is as follows:
[0103]
[0104] Where: is the prior state of the Kalman filter model at time t;
[0105] The posterior state covariance matrix at time t The calculation formula is as follows:
[0106]
[0107] Where: I is the unit matrix, is the prior state covariance matrix at time t;
[0108] The state process covariance matrix Q at time t t The calculation formula is as follows:
[0109]
[0110] Where: Φ is the state transfer matrix, is the posterior state covariance matrix at time t-j+1, is the prior state covariance matrix at time t-j+1, l t-j+1 is the process error at time t-j+1, is the average process error at time t.
[0111] In one embodiment, the average value of the observed error at time t is
[0112] In one embodiment, t and The calculation formulas are as follows:
[0113]
[0114]
[0115] Where: is the posterior state at time t-1.
[0116] The present invention establishes a model data set by acquiring data on the spatial impact range and influencing factors of highway accidents, applies a Kalman filter framework, adaptively adjusts the correlation coefficients of factors of the spatial impact range of highway accidents according to new accident data, and combines the acquired data and the new correlation coefficient to achieve adaptive online and efficient prediction of the spatial impact range of highway accidents.
[0117] The above description is only a specific implementation of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by a technician familiar with the technical field within the technical scope disclosed by the present invention should be covered by the protection scope of the present invention.
Claims
1. An adaptive online prediction method for the spatial impact range of highway accidents, characterized in that: The method predicts the spatial impact range of an accident by constructing a prediction model for the spatial impact range of an accident, wherein the prediction model for the spatial impact range of an accident adopts a Kalman filter model; The prediction method comprises the following steps: Step 1: Establish an accident data set, where each accident data includes the observed value of the accident spatial impact range, the number of one-way lanes, the number of occupied lanes, the number of accident vehicles, the number of accident trucks, the time of the accident, and the traffic flow; Step 2, initializing parameters in the Kalman filter model, wherein the parameters include a correlation coefficient, a state transfer matrix, an observation matrix, an observation process covariance matrix, and a state process covariance matrix; Step 3, determine whether a new accident occurs at time t, if yes, obtain the number of one-way lanes, the number of occupied lanes, the number of accident vehicles, the number of accident trucks, the time of the accident and the traffic flow when the new accident occurs, and proceed to step 4, otherwise proceed to step 7; Step 4: Obtain the parameters in the Kalman filter model at time t; Step 5: Calculate the prior state and prior state covariance matrix of the Kalman filter model at time t, and predict the spatial impact range of the accident at time t; Step 6: After the new accident is processed, the observation value of the accident space impact range of the new accident is obtained, and the observation error, observation process covariance matrix, Kalman gain, posterior state, posterior state covariance matrix and state process covariance matrix at time t are calculated to complete the update of the Kalman filter model as the basis for the next prediction; Step 7, let t=t+1, and go to step 3; In step 5, the spatial impact range of the accident at time t is predicted. The specific steps are as follows: Calculate the prior state of the Kalman filter model at time t That is, the prior correlation coefficient at time t: Where: Φ is the state transfer matrix, is the posterior state value of the correlation coefficient at time t-1; In the calculated Based on the predicted value of the accident spatial impact range at time t The calculation formula is as follows: Where: X t is the observation matrix at time t; Compute the prior state covariance matrix That is, the prior correlation coefficient covariance matrix: Where: Φ is the state transfer matrix, is the posterior state covariance matrix at time t-1, Q t is the state process covariance matrix at time t; The observation error e at time t in step 6 t , the observation process covariance matrix R t , Kalman gain K t , the posterior state Posterior state covariance matrix State process covariance matrix Q t The calculation method is as follows: The observation error at time t is e t The calculation formula is as follows: Where: a t is the observed value of the accident spatial impact range at time t, X t is the observation matrix at time t, is the prior state at time t; The observation process covariance matrix R at time t t The calculation formula is as follows: Where: N is the size of the accident data set at time t, e t is the observation error at time t, e t-j+1 is the observation error at time t-j+1, is the average value of the observation error at time t, X t is the observation matrix at time t, X t-j+1 is the observation matrix at time t-j+1, is the prior state covariance matrix at time t, is the prior state covariance matrix at time t-j+1; Kalman filter gain K at time t t The calculation formula is as follows: The posterior state at time t The calculation formula is as follows: Where: is the prior state of the Kalman filter model at time t; The posterior state covariance matrix at time t The calculation formula is as follows: Where: I is the unit matrix, is the prior state covariance matrix at time t; The state process covariance matrix Q at time t t The calculation formula is as follows: Where: Φ is the state transfer matrix, is the posterior state covariance matrix at time t-j+1, is the prior state covariance matrix at time t-j+1, l t - j+1 is the process error at time t-j+1, is the average process error at time t.
2. The method for adaptive online prediction of the spatial impact range of highway accidents according to claim 1 is characterized in that: The i-th accident data in the accident data set created in step 1 is: i ,b i ,c i ,d i ,e i ,f i ,g i }, where: a i , b i , c i , d i , e i , f i , g i They are the spatial impact range of the accident at time i, the number of one-way lanes, the number of occupied lanes, the number of accident vehicles, the number of accident trucks, the time of the accident and the traffic flow.
3. The method for adaptive online prediction of spatial impact range of highway accidents according to claim 2, characterized in that: In step 2, the initial value w0 of the correlation coefficient, the constant state transfer matrix Φ, the initial value X1 of the observation matrix, the initial value R1 of the observation process covariance matrix, and the initial value Q1 of the state process covariance matrix are respectively: X1=(b1 c1 d1 e1 f1 g1) R1=I Q1=I Where: λ is the forgetting factor; are the number of one-way lanes, the number of occupied lanes, the number of accident vehicles, the number of accident trucks, the time of the accident, the initial value of the correlation coefficient between the flow rate and the spatial impact range of the accident; I is the unit matrix.
4. The method for adaptive online prediction of spatial impact range of highway accidents according to claim 1, characterized in that: The average value of the observation error at time t 5. The method for adaptive online prediction of spatial impact range of highway accidents according to claim 1, characterized in that: l t and The calculation formulas are as follows: Where: is the posterior state at time t-1.
