CN117475633A - Event-oriented traffic flow prediction method and device - Google Patents
Event-oriented traffic flow prediction method and device Download PDFInfo
- Publication number
- CN117475633A CN117475633A CN202311483678.5A CN202311483678A CN117475633A CN 117475633 A CN117475633 A CN 117475633A CN 202311483678 A CN202311483678 A CN 202311483678A CN 117475633 A CN117475633 A CN 117475633A
- Authority
- CN
- China
- Prior art keywords
- traffic flow
- time
- event
- historical
- flow
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 35
- 238000004364 calculation method Methods 0.000 claims description 17
- 206010039203 Road traffic accident Diseases 0.000 claims description 11
- 238000004422 calculation algorithm Methods 0.000 claims description 11
- 230000003247 decreasing effect Effects 0.000 claims description 11
- 230000009471 action Effects 0.000 claims description 8
- 238000004590 computer program Methods 0.000 claims description 6
- 230000004044 response Effects 0.000 claims description 2
- 238000007781 pre-processing Methods 0.000 claims 1
- 230000000875 corresponding effect Effects 0.000 description 51
- 238000013527 convolutional neural network Methods 0.000 description 7
- 238000012544 monitoring process Methods 0.000 description 7
- 238000012549 training Methods 0.000 description 7
- 238000004891 communication Methods 0.000 description 4
- 230000001960 triggered effect Effects 0.000 description 3
- 238000012795 verification Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 238000005070 sampling Methods 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- 230000002596 correlated effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 230000000284 resting effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G08—SIGNALLING
- G08G—TRAFFIC CONTROL SYSTEMS
- G08G1/00—Traffic control systems for road vehicles
- G08G1/01—Detecting movement of traffic to be counted or controlled
- G08G1/0104—Measuring and analyzing of parameters relative to traffic conditions
- G08G1/0125—Traffic data processing
- G08G1/0129—Traffic data processing for creating historical data or processing based on historical data
-
- G—PHYSICS
- G08—SIGNALLING
- G08G—TRAFFIC CONTROL SYSTEMS
- G08G1/00—Traffic control systems for road vehicles
- G08G1/01—Detecting movement of traffic to be counted or controlled
- G08G1/0104—Measuring and analyzing of parameters relative to traffic conditions
- G08G1/0137—Measuring and analyzing of parameters relative to traffic conditions for specific applications
- G08G1/0145—Measuring and analyzing of parameters relative to traffic conditions for specific applications for active traffic flow control
-
- G—PHYSICS
- G08—SIGNALLING
- G08G—TRAFFIC CONTROL SYSTEMS
- G08G1/00—Traffic control systems for road vehicles
- G08G1/065—Traffic control systems for road vehicles by counting the vehicles in a section of the road or in a parking area, i.e. comparing incoming count with outgoing count
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Chemical & Material Sciences (AREA)
- Analytical Chemistry (AREA)
- Traffic Control Systems (AREA)
Abstract
The invention belongs to the technical field of traffic flow prediction, and particularly relates to an event-oriented traffic flow prediction method and device. The method comprises the steps of firstly obtaining reference traffic flow data and target historical traffic flow in traffic flow data related to a trigger event, taking the data of the historical traffic flow in a preset time as the reference data, then obtaining the target historical traffic flow according to the type of the target event, calculating the standard deviation of the traffic flow in the time of collection, and finally obtaining the increment and decrement values of the historical traffic flow and the target historical traffic flow to obtain a prediction result. The invention expands the prediction coverage range and the prediction accuracy, avoids lower accuracy possibly brought by a single prediction method, and simultaneously calculates the traffic flow increment and decrement value by calculating the total traffic flow and standard deviation in the confidence interval and selecting the similar traffic flow increment and decrement interval, thereby improving the accuracy of the traffic flow increment and decrement value.
Description
Technical Field
The invention belongs to the technical field of traffic flow prediction, and particularly relates to an event-oriented traffic flow prediction method and device.
Background
The prediction of traffic flow is intended to use historical traffic observations to predict traffic flow for a road over a period of time in the future. However, in certain specific events, traffic data exhibits non-linearities, instabilities, and unpredictable characteristics, which make traffic flow prediction a challenging topic of research. These events include vehicle traffic accidents, holiday vehicle increases, etc., which can have a significant impact on road traffic. It is counted that about 60% of traffic congestion is caused by aperiodic congestion caused by these events. Therefore, predicting these traffic flow changes caused by the events is of great significance to improving road traffic efficiency.
Through searching and finding of the existing patent and related technology, the existing methods related to traffic flow prediction are as follows:
(1) Wang Jian, he Yanzhao, liu Haitao, etc. A method and apparatus for optimizing power of a terminal device is disclosed, in which CN110730480a [ P ].2020 provides a method and apparatus for a terminal device to actively report a lower capability or a DRX parameter matching a current service to a network device according to one or more conditions such as current service information, power information, or signal quality of a serving cell, etc., and the network device can configure the capability or parameter of the terminal according to information reported by the terminal, so as to implement power optimization and reduce power consumption of the terminal.
(2) Jiaxi, ma Tingting, niu Wenan, etc. A holiday traffic scheduling method and device based on traffic flow prediction is disclosed, wherein CN111445694B [ P ].2020 provides a traffic scheduling scheme corresponding to historical traffic flow as a holiday traffic scheduling scheme if the similarity value of the holiday traffic flow and the historical traffic flow in a preset time period is greater than or equal to a preset threshold; otherwise, dividing the holiday into a plurality of time periods according to the trend of the change of the holiday traffic flow; searching at least one historical date with the time period number closest to the holiday time period number; determining a reference historical date with highest similarity to the traffic flow variation trend of the holidays in a plurality of time periods by using a binary differential searching method; the historical traffic flow corresponding to the reference historical date is output, and the corresponding traffic scheduling scheme is used as a holiday traffic scheduling scheme, the existing traffic flow prediction is mainly performed based on historical traffic observation data, a large amount of data is needed, similarity between different roads is difficult to find, and the accuracy of traffic flow prediction is low.
(3) Chen, li Qi, and CN113055888B [ P ].2022. A mobile communication method, apparatus and device are provided to solve the problem that the attach request message may be attacked by a man-in-the-middle during the sending process, resulting in inconsistent UE capability information acquired by the MME and actual UE sending. The main idea is as follows: the MME sends first or second verification matching information to the UE through the NAS security mode command message, and the UE verifies the UE capability information received by the MME according to the verification matching information so as to ensure that the MME acquires the correct UE capability information. The authentication matching information may be an attach request message or a hash value of UE capability information, etc. And after the UE passes the verification, sending a NAS security mode completion message to the MME.
(4) Cai Biao A method for predicting the passenger flow of rail transit based on convolutional neural network is disclosed, which comprises CN110298486A [ P ]. 2019; filling the missing historical passenger flow data to obtain filled historical passenger flow data; dividing historical passenger flow data into different data sets according to working days, resting days, sunny days and rainy and snowy days; acquiring passenger flow data forwards in each data set by taking any moment as a starting point and time t as a single sampling length, and taking the passenger flow data as a group of training data so as to obtain training data corresponding to each data set; training the established convolutional neural network by adopting training data corresponding to each data set respectively to obtain a trained convolutional neural network; taking the starting time of a time period to be predicted as a starting point and the time t as a single sampling length, acquiring passenger flow data forwards in a track traffic network where a station to be predicted is located, and obtaining prediction basic data of the time period to be predicted; and selecting a convolutional neural network trained by a data set matched with the time period to be predicted, taking prediction base data of the time to be predicted as input of the convolutional neural network after training, and taking corresponding output as a passenger flow prediction result of the track traffic network in the time period to be predicted. The convolutional neural network is trained by training data corresponding to the data sets, a large amount of historical passenger flow data is needed, and the correlation often exists in workdays, rest days, sunny days and rainy and snowy days, the convolutional neural network is obtained through training of the respective data sets, and the defect that the accuracy of traffic flow prediction is low is also caused.
Disclosure of Invention
In order to solve the problem of low accuracy in the traffic flow prediction technology, the invention provides an event-oriented traffic flow prediction method and device.
An event-oriented traffic flow prediction method comprises the following steps:
1. when the action of triggering event flow prediction occurs, reversely inquiring the historical traffic flow of the road by taking the triggering time of triggering event flow prediction as a starting point, and determining the average value of the historical traffic flow within the preset duration as the reference traffic flow.
2. And determining a target event type triggering event flow prediction from preset event types, and selecting the historical traffic flow which is the same as the reference traffic flow and the event type which is the same as the target event type from the historical traffic flow of the road as the target historical traffic flow.
3. And calculating the total traffic flow in a confidence interval corresponding to the k value in a time interval from the first moment to the second moment according to the target historical traffic flow and a preset k value of a k-sigma algorithm corresponding to the target event type, and calculating the standard deviation between the total traffic flows.
4. If the standard deviation is smaller than the preset standard deviation threshold, calculating the time difference between each time and the acquisition time in the time interval from the acquisition time corresponding to the target historical traffic flow to the second time.
5. According to the historical vehicle flow in the time interval from the acquisition time corresponding to the target historical vehicle flow to the second time, calculating the historical vehicle flow average value under each time difference, and calculating the vehicle flow increment and decrement value of the historical vehicle flow average value relative to the target historical vehicle flow. And finally, generating a traffic flow prediction result according to the traffic flow increment and decrement value.
In one embodiment, the step of calculating the time difference between each time instant and the first time instant comprises: firstly, calculating the time difference between each moment and the first moment; then, according to the historical traffic flow of each moment in the time interval from the first moment to the second moment corresponding to the target historical traffic flow, calculating the average value and the variance of the historical traffic flow under the same time difference; and finally, calculating the total traffic flow in a confidence interval corresponding to the k value in a time interval from the first moment to the second moment corresponding to the target historical traffic flow according to a preset k value corresponding to the target event type in the k-sigma algorithm and the average value and the variance of the historical traffic flow under the same time difference.
In another embodiment, if the standard deviation is greater than or equal to the preset standard deviation threshold, the value at the second moment is redetermined, and the foregoing calculating step is re-performed until the newly calculated standard deviation is less than the preset standard deviation threshold.
There is provided an event-oriented traffic flow prediction device comprising the following modules:
1. the historical traffic flow inquiring and reference traffic flow determining module is used for reversely inquiring the historical traffic flow of the road and determining the average value of the historical traffic flow within the preset duration as the reference traffic flow.
2. The event type determining and historical vehicle flow selecting module is used for determining a target event type for triggering event flow prediction and selecting the historical vehicle flow which is the same as the reference vehicle flow and the event type which is the same as the target event type from the historical vehicle flows of the road as the target historical vehicle flow.
3. The total traffic flow and standard deviation calculation module is used for calculating the total traffic flow in the confidence interval corresponding to the k value in the time interval from the first moment to the second moment, and calculating the standard deviation between the total traffic flows.
4. The time difference calculation module is used for calculating the time difference between each time and the acquisition time in the time interval from the acquisition time corresponding to the target historical traffic flow to the second time under the condition that the standard deviation is smaller than the preset standard deviation threshold value.
5. The historical vehicle flow average value calculation and prediction result generation module is used for calculating the historical vehicle flow average value under each time difference according to the historical vehicle flow in the time interval from the acquisition time corresponding to the target historical vehicle flow to the second time, and the vehicle flow increment and decrement value of the historical vehicle flow average value relative to the target historical vehicle flow, and generating the traffic flow prediction result according to the vehicle flow increment and decrement value.
There is provided a computer readable storage medium storing a computer program executable by a processor, implementing the steps of the aforementioned method. An electronic device is also provided that includes a memory and a processor. The memory has stored thereon a computer program and the processor is adapted to execute the computer program in the memory, thereby implementing the steps of the aforementioned method.
The scheme provided by the invention has the following advantages:
1. the coverage range of prediction and the accuracy of prediction are enlarged, and lower accuracy possibly brought by a single prediction method is avoided.
2. By selecting the historical traffic flow which is the same as the reference traffic flow and the event type is the same as the target event type for prediction, the problem that different traffic type events have different influences on the prediction result is avoided, and the accuracy is improved.
3. The total traffic flow and standard deviation in the confidence interval are calculated, and the similar traffic flow increasing and decreasing interval is selected to calculate the traffic flow increasing and decreasing value, so that the accuracy of the traffic flow increasing and decreasing value is improved.
4. The vehicle evacuation system can timely and effectively help road law enforcement and dispatcher evacuate vehicles.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a flow chart illustrating a method of event-oriented traffic flow prediction according to an exemplary embodiment.
FIG. 2 is a schematic diagram illustrating an implementation of event-oriented traffic flow prediction, according to an example embodiment.
Fig. 3 is a flow chart illustrating one implementation of step S13 in fig. 1 according to an exemplary embodiment.
Fig. 4 is a flow chart illustrating a method of determining a value of a preset k for a target event type according to an exemplary embodiment.
Fig. 5 is a block diagram illustrating an event-oriented traffic flow prediction device according to an example embodiment.
Detailed Description
The invention is described in further detail below with reference to the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations of the present disclosure. Rather, they are merely examples of aspects of the disclosure, apparatus and methods consistent with what is described in the appended claims.
FIG. 1 is a flow chart illustrating a method of event-oriented traffic flow prediction according to an exemplary embodiment. As shown in fig. 1, the method comprises the steps of:
in step S11, in response to the action of triggering event flow prediction, the historical traffic flow of the road is queried in reverse in time with the triggering time of triggering event flow prediction as a time starting point, and the average value of the historical traffic flow within the preset duration is determined as the reference traffic flow.
As shown in fig. 2, the embodiment of the invention can be applied to a traffic monitoring cloud server. The traffic monitoring cloud server can be in communication connection with traffic information acquisition cameras, sound sensors, laser radars and speed sensors beside roads. The sound sensor is in communication connection with the traffic monitoring cloud server through the gateway, and can collect sounds such as vehicle whistling. Depending on the frequency or number of vehicle whistling sounds, it may be helpful to determine whether a traffic jam or other event has occurred. And the laser radar is in communication connection with the traffic monitoring cloud server through the gateway, so that vehicles coming and going can be collected. For example, vehicles within a range of distances from the lidar may be tracked and captured to determine traffic flow. The speed sensor may collect the speed of travel of the vehicle on the road to assist in determining whether to trigger the event flow prediction action. In the embodiment of the present disclosure, if the vehicle running speeds of all passing vehicles are lower than a preset threshold, the action of event flow prediction may be triggered. The traffic monitoring cloud server can be in communication connection with the monitoring terminal equipment of the traffic management department so as to display the traffic flow prediction result on the user interface of the monitoring terminal equipment of the traffic management department. Traffic managers can view the traffic flow prediction results on the user interface to make accurate guided traffic decisions.
In the present invention, the action of triggering event traffic prediction may be triggered by one or more events. For example, a rain trigger event flow prediction, a rain and occurrence of a vehicle traffic accident trigger event flow prediction, or a rain and occurrence of a holiday and a vehicle traffic accident trigger event flow prediction.
Among them, for a historical traffic flow of a reverse query road in time, it can be explained by the following example. If event flow prediction is triggered at 13:00, historical traffic flow within a preset time range before 13:00 is queried and the average of the historical traffic flow between, for example, 12:30 and 13:00 is determined to be the reference traffic flow.
In step S12, a target event type of an event triggering the event flow prediction is determined according to a preset event type, and a historical traffic flow which is the same as the reference traffic flow and the event type is the same as the target event type is selected from the historical traffic flows of the road as a target historical traffic flow.
The historical traffic flow identical to the reference traffic flow may be arbitrarily selected as the reference traffic flow. If the number of target historical traffic does not meet the preset threshold, the average of the historical traffic in any time period can be selected to be the same as the reference traffic, so that the negative influence of too few samples on the prediction accuracy is avoided.
In step S13, according to the historical traffic flow and the preset k value, calculating the total traffic flow of each target historical traffic flow in the k value range from the first time to the second time, and calculating the standard deviation between the total traffic flows.
It will be appreciated that the first time and the second time are calculated based on the value of the preset k, the mean and the variance of the historical traffic flow. The first moment is obtained by subtracting k times of variance from the average value of the historical vehicle flow, and the second moment is obtained by adding k times of variance to the average value of the historical vehicle flow.
The k-sigma algorithm is adopted to select the total traffic flow of the interval with similar characteristics from the historical traffic flow, so that the time difference calculation of the target historical traffic flow is facilitated to be processed later, and the accuracy of the historical traffic flow and the average value of the historical traffic flow is improved.
In step S14, when the standard deviation is smaller than the preset standard deviation threshold, a time difference between each time and the corresponding acquisition time in the time interval from the acquisition time to the second time of the target historical traffic is calculated.
In step S15, according to the historical traffic flow of the target historical traffic flow in the time interval from the acquisition time to the second time, the historical traffic flow average value under each time difference is calculated, the traffic flow increment and decrement value of the historical traffic flow average value under each time difference relative to the target historical traffic flow is calculated, and the traffic flow prediction result is generated according to the traffic flow increment and decrement value.
The historical traffic flow average value under each time difference is calculated under the acquisition time with the same time difference. For example, the collection time corresponding to the target historical traffic is 13:02, 10:20, 14:35 and 14:26, wherein the historical traffic average with a time difference of 1 minute is 13:03, 10:21, 14:36 and 14:27.
According to the technical scheme, the action of triggering event flow prediction can be responded, the triggering time is used as a time starting point, reverse inquiry is conducted from the historical vehicle flow, and the average value of the historical vehicle flow in the preset duration is determined to be used as the reference vehicle flow. Therefore, the range of the predicted vehicle flow can be enlarged, and the accuracy is improved. By determining the type of the target event, the historical traffic flow with the same type as the reference traffic flow is selected as the target historical traffic flow, so that the influence of different traffic type events is avoided, and the prediction accuracy is improved. And calculating the total traffic flow of the target historical traffic flow in the k range in the time interval by utilizing the historical traffic flow and the preset k value, and calculating the standard deviation between the total traffic flows. And calculating the time difference between each time and the acquisition time in the time interval from the acquisition time to the second time according to the condition that the standard deviation is smaller than the preset standard deviation threshold. And calculating a historical vehicle flow average value according to the historical vehicle flow and the time difference, and calculating a vehicle flow increment and decrement value of the historical vehicle flow average value relative to the target historical vehicle flow. And finally, generating a traffic flow prediction result according to the traffic flow increasing and decreasing value. By the algorithm, the sample most similar to the target historical traffic flow increasing and decreasing interval can be queried, and the calculation accuracy of the traffic flow increasing and decreasing value is improved, so that the traffic flow prediction accuracy under the event occurrence condition is improved. And further, road law enforcement and dispatcher can be helped to timely and effectively evacuate vehicles.
In one possible implementation manner, as shown in fig. 3, in step S13, calculating, according to the historical traffic flow and the preset k value, a total traffic flow of the target historical traffic flow in a k value range in a time interval from the first moment to the second moment, where the total traffic flow includes:
in step S131, a time difference between each time point and the corresponding first time point in the time interval from the first time point to the second time point in the target historical traffic flow is calculated.
△t im =t ij -t ik (1)
Wherein Deltat im For the time difference corresponding to the ith target historical traffic flow, tij is the jth moment corresponding to the ith target historical traffic flow, the value of j does not exceed the second moment, and tik is the first moment corresponding to the ith target historical traffic flow.
Similarly, the time difference with the corresponding first time is the time difference of any time relative to the first time.
In step S132, according to the historical traffic flow at each time in the time interval from the first time to the second time corresponding to the target historical traffic flow, calculating the average value and the variance of the historical traffic flow under the same time difference;
the mean value corresponding to the historical vehicle flow is calculated by referring to the following formula:
wherein wi1, wi2, wi3, & gt wiN are historical traffic at each time in a time interval from a first time corresponding to an i-th target historical traffic to a second time, wherein wi1 is the historical traffic at the first time corresponding to the i-th target historical traffic, and wiN is the historical traffic at the second time corresponding to the i-th target historical traffic. Ni is the number of times from the first time to the second time corresponding to the ith target historical traffic flow.
The variance corresponding to the historical vehicle flow is calculated with reference to the following formula:
wherein sigma i And the variance corresponding to the i-th target historical vehicle flow is obtained.
In step S133, according to the preset k value corresponding to the target event type in the k-sigma algorithm, and the average value and variance of the historical traffic under the same time difference, the total traffic in the laida confidence interval corresponding to the k value in the time interval from the first time to the second time corresponding to the target historical traffic is calculated.
Wherein, the Laida confidence interval corresponding to the ith target historical traffic flow is [ mu ] i -kσ i ,μ i +kσ i ]。
In the application, the total traffic flow in the Laida confidence interval corresponding to the value of the corresponding k calculated by the k-sigma algorithm is the prior art, and is not described in detail.
In one possible implementation, the method further includes:
and under the condition that the standard deviation is greater than or equal to the preset standard deviation threshold, re-determining the value of the second moment, and re-executing the value of the preset k corresponding to the target event type in the k-sigma algorithm according to the historical traffic flow, and calculating the total traffic flow in the Laida confidence interval corresponding to the value of the k in the time interval from the first moment corresponding to the target historical traffic flow to the second moment and the standard deviation between the calculated total traffic flow until the newly calculated standard deviation is smaller than the preset standard deviation threshold.
In one possible implementation, the method further includes:
the following steps are circularly executed: in the time interval from the first time to the second time, if the time length corresponding to the time interval does not meet the preset time length threshold value, taking the total traffic flow with the largest difference value as the removed total traffic flow;
after the removed total traffic flow is removed, recalculating the standard deviation between the residual total traffic flows;
the following steps are re-executed: if the standard deviation is smaller than a preset standard deviation threshold value, generating a traffic flow prediction result according to the traffic flow increasing and decreasing value; and if the standard deviation is greater than or equal to the preset standard deviation threshold value, until the newly calculated standard deviation is smaller than the preset standard deviation threshold value.
In one possible implementation, the value of the preset k of the target event type is determined by:
in step S31, a first sample traffic flow within a preset range of occurrence times of events of the same event type is acquired.
In step S32, a second sample traffic flow which does not relate to the target type within a predetermined range is searched for in the history traffic flow, with an event which relates to an event other than the predetermined event type as the target type.
For example, if the types of preset events involved include a vehicle traffic accident, a holiday event, and a rain and snow event, inquiring a second sample traffic flow, which does not involve the vehicle traffic accident but involves the holiday event and the rain and snow event, within a preset range from the historical traffic flow for the vehicle traffic accident; for holiday events, inquiring second sample traffic flow which does not relate to the holiday events but relates to vehicle traffic accidents and rain and snow events in a preset range from the historical traffic flow; for a rain and snow event, a second sample traffic flow within a preset range that is not related to the rain and snow event but is related to a vehicle traffic accident and holiday event is queried from the historical traffic flow.
In step S33, the ratio of the second sample traffic flow to the first sample traffic flow is determined as the impact weight of each preset event type on the event.
Wherein the impact weight is calculated by the following formula:
Di=Wx2-Wx1 (4)
where Di is the impact weight, wx2 is the second sample traffic flow, and Wx1 is the first sample traffic flow.
In step S34, a third sample traffic is determined from the weighted summation of the impact weights and the corresponding second sample traffic.
Wherein the third sample traffic flow is determined by the following formula:
wherein Wx3 is the third sample traffic, M is the number of second sample traffic, D1, D2, D3.
In step S35, a sample traffic flow mean and a sample traffic flow variance of the traffic flow at each moment in the preset range are determined.
Referring to equations (2) and (3), the mean and variance of the sample traffic flow are calculated.
In step S36, the value of k of the corresponding rada confidence interval in the preset range is determined according to the third sample traffic flow, the mean value and the variance of the sample traffic flow.
According to the k-sigma algorithm, the third sample traffic flow, the mean value and the variance of the sample traffic flow are known, and the corresponding k value is calculated reversely, which is not described again.
In one possible implementation, the preset range is determined according to a preset event type related to the event, and the preset range is positively related to the number of event types related to the event.
That is, if the event type to which the event relates is 1, the preset range is minimum, and if the event type to which the event relates is 5, the preset range is maximum. The corresponding relation between the event type related to the event and the preset range can be set, so that the preset range can be conveniently and rapidly searched in the calculation process.
In one possible implementation, the incident traffic flow predictions include at least one of holiday periods, special weather periods, public event periods, traffic accident periods, and the like.
The embodiment of the disclosure also provides an event-oriented traffic flow prediction device, see fig. 5. The event-oriented traffic flow prediction device includes: the system comprises a historical traffic flow inquiry and reference traffic flow determining module, an event type determining and historical traffic flow selecting module, a total traffic flow and standard deviation calculating module, a time difference calculating module and a historical traffic flow average calculating and predicting result generating module.
The historical traffic query and reference traffic determination module is configured to respond to the action of triggering event traffic prediction. And reversely inquiring the historical traffic flow of the road in time according to the predicted triggering time of the triggering event flow as a starting point, and determining the average value of the historical traffic flow within the preset duration as the reference traffic flow.
The event type determining and historical vehicle flow selecting module is used for determining a target event type of an event triggering event flow prediction, and selecting the historical vehicle flow which is the same as the reference vehicle flow and the event type which is the same as the target event type from the historical vehicle flow of the road as a target historical vehicle flow.
The total traffic flow and standard deviation calculation module is used for calculating the total traffic flow in the Laida confidence interval according to the historical traffic flow and the preset k value, and calculating the standard deviation between the total traffic flows.
The time difference calculation module is used for calculating the time difference corresponding to the target historical vehicle flow under the condition that the standard deviation is smaller than a preset standard deviation threshold value.
The historical vehicle flow average value calculation and prediction result generation module is used for calculating the average value of the historical vehicle flow according to the target historical vehicle flow and the time difference, calculating the increase and decrease value of the historical vehicle flow relative to the target historical vehicle flow and generating a traffic flow prediction result.
In one possible implementation, the total traffic flow and standard deviation calculation module is configured to:
calculating the time difference between each time and the first time in the time interval from the first time to the second time;
calculating the mean value and variance of the historical vehicle flow under the same time difference;
and calculating the total traffic flow in the confidence interval corresponding to the k value according to the preset k value and the mean value and the variance of the historical traffic flow under the same time difference.
In one possible implementation, the time difference calculation module is further configured to:
and under the condition that the standard deviation is larger than or equal to a preset standard deviation threshold value, re-determining the value at the second moment, and re-executing the steps of calculating the total vehicle flow and calculating the standard deviation according to the historical vehicle flow and the preset k value until the re-calculated standard deviation is smaller than the preset standard deviation threshold value.
In one possible implementation, the time difference calculation module is further configured to:
under the condition that the time length from the first time to the second time does not meet the preset time length threshold value, taking the total traffic flow with the largest difference value from the total traffic flow mean value in the standard deviation as the removed total traffic flow;
after the removed total traffic flow is removed, recalculating the standard deviation between the residual total traffic flows;
the step of generating a traffic flow prediction result according to the traffic flow increase and decrease value is re-performed, or the step of re-performing until the re-calculated standard deviation is smaller than a preset standard deviation threshold value is re-performed.
In one possible implementation, the time difference calculation module is further configured to determine the preset k value of the target event type by:
acquiring a first sample traffic flow in a preset range of each event occurrence time with the same type as a target event;
querying a second sample traffic flow of events not related to the target type only within a preset range;
determining the ratio of the traffic flows of all the samples as the influence weight of the target event type on the event;
determining a third sample traffic flow by weighted summation according to the influence weight and the corresponding second sample traffic flow;
determining a sample mean value and a variance of the vehicle flow at each moment in a preset range;
and determining a k value in the Laida confidence interval corresponding to the preset range according to the third sample traffic flow, the sample mean value and the variance.
In one possible implementation, the preset range is determined according to a preset event type to which the event relates, and the preset range is positively correlated with the number of event types to which the event relates.
In one possible implementation, the incident traffic flow predictions include at least one of holiday periods, special weather periods, public event periods, traffic accident periods, and the like.
Claims (7)
1. An event-oriented traffic flow prediction method and system are characterized by comprising the following steps:
s1, preprocessing traffic flow data, including:
s11, data acquisition: acquiring reference traffic flow data and target historical traffic flow in traffic flow data related to a trigger event;
s12, calculating the time difference between each time and the corresponding first time in the time interval from the first time corresponding to each target historical traffic flow to the second time, wherein the calculation formula is as follows:
△t im =t ij -t ik
wherein Deltat im For the time difference corresponding to the ith target historical traffic flow, t ij The value of j does not exceed the second moment and t is the j moment corresponding to the i-th target historical vehicle flow ik The first moment corresponding to the ith target historical traffic flow; the time difference between the first time and the corresponding first time refers to the time difference between any time and the first time;
s13, calculating the average value and the variance of the historical traffic flow under the same time difference according to the historical traffic flow of each moment in the time interval from the first moment to the second moment corresponding to the target historical traffic flow:
wherein w is i1 、w i2 、w i3 、...、w iN The historical traffic flow of each moment in the time interval from the first moment to the second moment corresponding to the ith target historical traffic flow, wherein w is as follows i1 The historical traffic flow at the first moment corresponding to the ith target historical traffic flow, w iN The historical traffic flow at the second moment corresponding to the i-th target historical traffic flow; n (N) i For the number of times, sigma, from the first time to the second time corresponding to the ith target historical traffic flow i The variance corresponding to the i-th target historical vehicle flow is obtained;
s14, calculating total traffic flow in a Laida confidence interval corresponding to the value of k in a time interval from a first moment to a second moment corresponding to each target historical traffic flow according to the value of a preset k corresponding to the target event type in a k-sigma algorithm and the average value and variance of the historical traffic flow under the same time difference, and calculating the standard deviation among the total traffic flows; setting Laida confidence interval corresponding to the ith target historical traffic flow as [ mu ] i -kσ i ,μ i +kσ i ];
S2, calculating the time difference between each time and the corresponding acquisition time when the standard deviation is smaller than a preset standard deviation threshold value in the time interval from the acquisition time corresponding to each target historical traffic flow to the second time;
s3, calculating the average value of the historical traffic flow under each time difference according to the target historical traffic flow and the time difference from the acquisition time to the second time, calculating the traffic flow increasing and decreasing value of the historical traffic flow average value under each time difference relative to the target historical traffic flow, and generating a traffic flow prediction result according to the traffic flow increasing and decreasing value, wherein the traffic flow prediction result specifically comprises the following steps:
s31, under the condition that the standard deviation is larger than or equal to a preset standard deviation threshold value, re-determining the value at the second moment, re-executing the preset k value corresponding to the target event type in the historical traffic flow and the k-sigma algorithm to calculate the total traffic flow of each target historical traffic flow in the Laida confidence interval corresponding to the k value in the time interval from the first moment to the second moment, calculating the standard deviation between the total traffic flows, and repeating the steps until the newly calculated standard deviation is smaller than the preset standard deviation threshold value;
s32, in a time interval from the first moment to the second moment, if the difference between the calculated standard deviation and the average value of the total traffic flow is maximum and does not meet a preset duration threshold, taking the total traffic flow as the removed total traffic flow;
after the removed total traffic flow is removed, calculating the standard deviation between the residual total traffic flows again, judging whether the newly obtained standard deviation is smaller than a preset standard deviation threshold value, and if so, generating a traffic flow prediction result according to the increase and decrease value of the traffic flow; otherwise, repeating the operation until the newly calculated standard deviation is smaller than a preset standard deviation threshold value, and finally generating a traffic flow prediction result according to the increase and decrease value of the traffic flow.
2. The method for predicting traffic flow facing an event according to claim 1, wherein the method for obtaining the preset k value of the target event type in S14 is as follows:
a. acquiring the occurrence time of each event with the same event type, and selecting a first sample traffic flow in a preset range;
b. taking any related preset event type as a target type, inquiring an event only related to the target type in the historical traffic flow, and selecting a second sample traffic flow in a preset range;
c. calculating the influence weight of each preset event type on the event, and determining the ratio of the second sample traffic flow to the first sample traffic flow;
d. according to the influence weight and the corresponding second sample traffic flow, obtaining a third sample traffic flow by weighted summation;
e. calculating a sample mean value and a sample variance of the vehicle flow at each moment in a preset range;
f. and determining the value of the parameter k of the corresponding Laida confidence interval in a preset range according to the third sample traffic flow, the sample mean value and the sample variance.
3. The method according to claim 2, wherein the preset range in the step a is determined according to a preset event type related to the event, and the preset range is positively related to the number of event types related to the event.
4. A method of event-oriented traffic flow prediction according to any of claims 1-3 wherein the triggering event comprises holidays, special weather, public events, traffic accidents.
5. An event-oriented traffic flow prediction device, comprising:
the method comprises the steps of inquiring historical traffic flow and determining reference traffic flow, wherein the historical traffic flow is used for inquiring the historical traffic flow of a road in a reverse direction in time by taking trigger time for triggering event traffic prediction as a time starting point in response to the action for triggering event traffic prediction, and the average value of the historical traffic flow within a preset duration is determined to be the reference traffic flow;
the event type determining and historical vehicle flow selecting module is used for determining a target event type of an event triggering the event flow prediction from preset event types, and taking the historical vehicle flow which is the same as the reference vehicle flow and the event type is the same as the target event type from the historical vehicle flow of the road as a target historical vehicle flow;
the total traffic flow and standard deviation calculation module is used for calculating the total traffic flow in the Laida confidence interval corresponding to the value of k in the time interval from the first moment to the second moment corresponding to each target historical traffic flow according to the historical traffic flow and the value of the preset k corresponding to the target event type in a k-sigma algorithm, and calculating the standard deviation between the total traffic flows;
the time difference calculation module is used for calculating the time difference between each time and the corresponding acquisition time in the time interval from the acquisition time corresponding to each target historical vehicle flow to the second time when the standard deviation is smaller than a preset standard deviation threshold value;
the historical traffic flow average value calculation and prediction result generation module is used for calculating the historical traffic flow average value under each time difference according to the historical traffic flow in the time interval from the acquisition time corresponding to the target historical traffic flow to the second time, calculating the traffic flow increasing and decreasing value of the historical traffic flow average value relative to the target historical traffic flow under each time difference, and generating a traffic flow prediction result according to the traffic flow increasing and decreasing value.
6. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the steps of the method according to any of claims 1-2.
7. An electronic device, comprising:
a memory having a computer program stored thereon;
a processor for executing the computer program in the memory to implement the steps of the method of any of claims 1-2.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311483678.5A CN117475633B (en) | 2023-11-07 | 2023-11-07 | Event-oriented traffic flow prediction method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311483678.5A CN117475633B (en) | 2023-11-07 | 2023-11-07 | Event-oriented traffic flow prediction method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN117475633A true CN117475633A (en) | 2024-01-30 |
CN117475633B CN117475633B (en) | 2024-05-28 |
Family
ID=89636073
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311483678.5A Active CN117475633B (en) | 2023-11-07 | 2023-11-07 | Event-oriented traffic flow prediction method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117475633B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118366319A (en) * | 2024-06-19 | 2024-07-19 | 贵州桥梁建设集团有限责任公司 | Intelligent acquisition method and system for traffic flow of expressway |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2016095708A1 (en) * | 2014-12-16 | 2016-06-23 | 高德软件有限公司 | Traffic flow prediction method, and prediction model generation method and device |
CN109300310A (en) * | 2018-11-26 | 2019-02-01 | 平安科技(深圳)有限公司 | A kind of vehicle flowrate prediction technique and device |
CN111445694A (en) * | 2020-03-04 | 2020-07-24 | 青岛海信网络科技股份有限公司 | Festival and holiday traffic scheduling method and device based on traffic flow prediction |
WO2021174811A1 (en) * | 2020-03-04 | 2021-09-10 | 平安科技(深圳)有限公司 | Prediction method and prediction apparatus for traffic flow time series |
CN113570396A (en) * | 2021-01-26 | 2021-10-29 | 腾讯科技(深圳)有限公司 | Time series data abnormity detection method, device, equipment and storage medium |
CN116386317A (en) * | 2022-12-12 | 2023-07-04 | 中国工商银行股份有限公司 | Traffic intersection traffic flow prediction method and device |
CN116432810A (en) * | 2022-12-30 | 2023-07-14 | 北京大唐高鸿数据网络技术有限公司 | Traffic flow prediction model determination method, device, apparatus and readable storage medium |
CN116915710A (en) * | 2023-05-30 | 2023-10-20 | 中国移动通信有限公司研究院 | Traffic early warning method, device, equipment and readable storage medium |
-
2023
- 2023-11-07 CN CN202311483678.5A patent/CN117475633B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2016095708A1 (en) * | 2014-12-16 | 2016-06-23 | 高德软件有限公司 | Traffic flow prediction method, and prediction model generation method and device |
CN109300310A (en) * | 2018-11-26 | 2019-02-01 | 平安科技(深圳)有限公司 | A kind of vehicle flowrate prediction technique and device |
CN111445694A (en) * | 2020-03-04 | 2020-07-24 | 青岛海信网络科技股份有限公司 | Festival and holiday traffic scheduling method and device based on traffic flow prediction |
WO2021174811A1 (en) * | 2020-03-04 | 2021-09-10 | 平安科技(深圳)有限公司 | Prediction method and prediction apparatus for traffic flow time series |
CN113570396A (en) * | 2021-01-26 | 2021-10-29 | 腾讯科技(深圳)有限公司 | Time series data abnormity detection method, device, equipment and storage medium |
CN116386317A (en) * | 2022-12-12 | 2023-07-04 | 中国工商银行股份有限公司 | Traffic intersection traffic flow prediction method and device |
CN116432810A (en) * | 2022-12-30 | 2023-07-14 | 北京大唐高鸿数据网络技术有限公司 | Traffic flow prediction model determination method, device, apparatus and readable storage medium |
CN116915710A (en) * | 2023-05-30 | 2023-10-20 | 中国移动通信有限公司研究院 | Traffic early warning method, device, equipment and readable storage medium |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118366319A (en) * | 2024-06-19 | 2024-07-19 | 贵州桥梁建设集团有限责任公司 | Intelligent acquisition method and system for traffic flow of expressway |
Also Published As
Publication number | Publication date |
---|---|
CN117475633B (en) | 2024-05-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11948405B2 (en) | Providing autonomous vehicle maintenance | |
US10409279B2 (en) | Efficient situational awareness by event generation and episodic memory recall for autonomous driving systems | |
CN107249169B (en) | Based on the event driven method of data capture of mist node under In-vehicle networking environment | |
CN117475633B (en) | Event-oriented traffic flow prediction method and device | |
US20180217603A1 (en) | Efficient situational awareness from perception streams in autonomous driving systems | |
Soni et al. | A review of IoT devices for traffic management system | |
CN109784254B (en) | Vehicle violation event detection method and device and electronic equipment | |
EP3023961A1 (en) | Methods and devices for controlling vehicular wireless communications | |
CN104408915B (en) | A kind of method of estimation of traffic state data and system | |
CN110706485A (en) | Driving early warning method and device, electronic equipment and computer storage medium | |
EP3462427A1 (en) | Method of predicting the probability of occurrence of vacant parking slots and its realization system | |
EP3361412B1 (en) | Black ice detection system, program, and method | |
US20210325901A1 (en) | Methods and systems for automated driving system monitoring and management | |
CN110807930A (en) | Dangerous vehicle early warning method and device | |
US20210295441A1 (en) | Using vehicle data and crash force data in determining an indication of whether a vehicle in a vehicle collision is a total loss | |
CN111465955A (en) | Method and apparatus for managing shared vehicles | |
CN111462507A (en) | Signal data processing method, system, computer device and storage medium | |
CN109360417B (en) | Dangerous driving behavior identification and pushing method and system based on block chain | |
CN112633120A (en) | Intelligent roadside sensing system based on semi-supervised learning and model training method | |
CN110189537B (en) | Parking guidance method, device and equipment based on space-time characteristics and storage medium | |
CN106682590B (en) | Processing method of monitoring service and server | |
CN116289444A (en) | Intelligent pavement disease real-time monitoring and predicting device and method | |
CN113313969B (en) | Parking space sharing method and device | |
CN117078020B (en) | Logistics transportation data management system based on unmanned aerial vehicle | |
JP5058176B2 (en) | Road traffic monitoring system and related method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |