A method, device and server for obtaining a road traffic state

By acquiring and comparing the observation windows and historical windows of road historical traffic flow data, road traffic abnormalities are detected in real time, and the problems of low efficiency and insufficient accuracy in the existing technology are solved, real-time and accurate detection of road traffic status and identification of abnormal time periods are achieved.

CN113409566BActive Publication Date: 2025-07-25ALIBABA GROUP HOLDING LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010182652.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-03-16
Publication Date
2025-07-25
Estimated Expiration
2040-03-16

AI Technical Summary

Technical Problem

The prior art has problems of low efficiency and insufficient accuracy in road abnormality detection, especially when detecting traffic flow abnormalities caused by dynamic events, it is difficult to accurately judge the road state.

Method used

By obtaining the road historical traffic flow data within the preset time of the current moment, determine the observation window and the history window, compare the rate of change of flow sum, detect road traffic abnormalities in real time, and slide the observation window to determine the abnormal time interval.

Benefits of technology

Real-time and accurate detection of road traffic status is achieved, and abnormal time periods and degrees can be identified, labor costs can be reduced, detection accuracy can be improved, and human factors can be reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113409566B_ABST
    Figure CN113409566B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a method for obtaining a road traffic state. The method includes: obtaining road historical traffic flow data within a preset duration forward from the current moment; determining, in the road historical traffic flow data, an observation window where a specified first detection moment is located and at least one corresponding historical window; the first detection moment being the current moment or a neighboring moment of the current moment; the historical window having the same duration as the observation window and the historical window being earlier than the observation window; determining whether the traffic flow on the road at the first detection moment is abnormal according to a comparison result between the traffic flow sum within the observation window and the traffic flow sums within the at least one historical window; and when it is determined that the traffic flow on the road at the first detection moment is abnormal, determining that the current traffic state of the road is abnormal. The present disclosure can greatly improve the accuracy of road anomaly detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of intelligent transportation, and particularly to a method, an apparatus, and a server for obtaining a road traffic state. Background Art

[0002] There are various reasons for abnormal road conditions. Among them, dynamic events on the road (such as road closures, road construction, traffic accidents, etc.) are the main aspects leading to abnormal road traffic, and real-time traffic flow is the basic dynamic attribute for measuring whether the state of a road is abnormal. Therefore, when a dynamic event occurs on the road, the real-time traffic flow will change abnormally. The abnormal road traffic mainly causes a decrease in the traffic flow of the road, that is, the traffic state of the road has become abnormal. Based on this, it is possible to effectively determine whether the road is abnormal by detecting the degree of abnormality of the real-time traffic flow.

[0003] Currently, there are mainly the following two methods for road anomaly detection:

[0004] First, road anomaly detection based on intelligence information. Intelligence personnel (such as traffic bureaus, governments, new media, users, etc.) will report the collected traffic information after the real-time traffic flow becomes abnormal. After manual review, it is possible to effectively determine whether the road is abnormal.

[0005] The road anomaly detection based on intelligence information has low efficiency in obtaining traffic information, and the obtained traffic information usually requires manual review to finally determine whether the road is abnormal, resulting in high operating costs.

[0006] Second, an automatic anomaly detection method, which is a road anomaly detection based on statistical methods. If the real-time traffic flow is statistically counted on a daily basis, the mean and variance of the real-time traffic flow of the road within a number of days will be pre-statistically calculated. The mean represents the overall real-time traffic flow level of the road, and the variance represents the fluctuation of the real-time traffic flow each day relative to the mean. If the fluctuation of the real-time traffic flow of a road on a certain day is greater than n times the variance (in practical applications, the value of n is usually set to 2 or 3), it indicates that the real-time traffic flow of the road on that day is abnormal, and it can be determined that the road is abnormal on that day.

[0007] Although the road anomaly detection based on statistical methods has, to a certain extent, solved the problem of low efficiency in obtaining traffic information, since it judges whether an anomaly has occurred within a fixed time granularity (such as a day), often, within a day, because the real-time traffic flow on the road every day is not an ideal mean distribution, the fluctuations in the real-time traffic flow on the road within a day may be very large. It is difficult to detect which fluctuations are caused by anomalies on the road itself and which are not. In the way of judging by a fixed time granularity, it is impossible to discover road anomalies with a smaller time granularity or road anomalies across time granularities, thus unable to accurately judge the roads where real dynamic events occur, resulting in a low accuracy rate of road anomaly detection.

[0008] Therefore, how to efficiently, accurately and economically detect whether a dynamic event has occurred on the road has become an urgent problem to be solved. Summary of the Invention

[0009] In view of the above problems, the present disclosure is proposed to provide a method, apparatus and server for obtaining the road traffic state that can overcome or at least partially solve the above problems.

[0010] In a first aspect, an embodiment of the present disclosure provides a method for obtaining the road traffic state, including:

[0011] Obtain the road historical traffic flow data within a preset duration forward from the current moment;

[0012] In the road historical traffic flow data, determine the observation window where the specified first detection moment is located and the corresponding at least one historical window; the first detection moment is the current moment or a neighboring moment of the current moment; the duration of the historical window is the same as that of the observation window and the historical window is earlier than the observation window;

[0013] According to the comparison result between the traffic flow sum within the observation window and the traffic flow sums within the at least one historical window, determine whether the traffic flow on the road at the first detection moment is abnormal;

[0014] When it is determined that the traffic flow on the road at the first detection moment is abnormal, determine that the current traffic state of the road is abnormal.

[0015] In one embodiment, the method further includes:

[0016] When it is determined that the road is abnormal at the first detection time, slide the observation window so that the slid observation window includes the second detection time. Determine whether the road is abnormal at the second detection time according to the comparison result of the sum of the traffic flows in the slid observation window and the sum of the traffic flows in the at least one historical window, and repeat this process until it is determined that the road is normal; the second detection time is the detection time earlier than the first detection time in the historical traffic flow data of the road.

[0017] Determine the time interval during which the road status is abnormal from the last second detection time in the case of road abnormality to the first detection time in the case of road abnormality.

[0018] In one embodiment, the sliding of the observation window includes:

[0019] Move the observation window forward by one or more unit times corresponding to the first detection time.

[0020] In one embodiment, after it is determined that the traffic flow of the road is normal, the method further includes:

[0021] According to the change rate of the sum of the traffic flows in the observation window relative to the sum of the traffic flows in each historical window, determine the traffic anomaly degree values at the first detection time and each second detection time.

[0022] Accumulate the traffic anomaly degree values at the first detection time and all second detection times to obtain the traffic anomaly degree value of the time interval during which the road has traffic anomalies.

[0023] In one embodiment, determining the observation window where the first detection time is located includes:

[0024] Determine the time window with a preset duration at the end where the first detection time is located as the observation window;

[0025] The determination of the at least one historical window corresponding to the detection time includes:

[0026] Randomly select an odd number of historical windows before the observation window.

[0027] In one embodiment, if there are multiple historical windows, determining whether the traffic flow of the road at the first detection time or the second detection time is abnormal according to the comparison result of the sum of the traffic flows in the observation window and the sum of the traffic flows in the at least one historical window includes:

[0028] For each historical window, determine the change rate of the sum of the traffic flows in the observation window relative to the sum of the traffic flows in each historical window according to the sum of the traffic flows in the observation window and the sum of the traffic flows in the historical window;

[0029] When it is determined that both the traffic flow within the observation window and the change rate relative to the traffic flow sums within more than half of all historical windows are less than a preset change rate threshold, it is determined that the traffic flow on the road at the first detection moment or the second detection moment is abnormal.

[0030] In one embodiment, the durations of the historical window and the observation window are determined in advance in the following manner:

[0031] Traverse multiple assumed values of the preset duration, and sequentially determine, for each assumed value, the ratio of the absolute value of the difference between the traffic flow sums of the historical window and the observation window to the assumed value;

[0032] Select the assumed value when the ratio is the smallest as the durations of the historical window and the observation window.

[0033] In a second aspect, an embodiment of the present disclosure provides a device for obtaining a road traffic state, including:

[0034] An acquisition module, configured to acquire road historical traffic flow data within a preset duration starting from the current moment;

[0035] A historical window determination module, configured to determine, in the road historical traffic flow data, an observation window where a specified first detection moment is located and at least one corresponding historical window; the first detection moment is the current moment or a neighboring moment of the current moment; the historical window and the observation window have the same duration and the historical window is earlier than the observation window;

[0036] A traffic flow anomaly determination module, configured to determine whether the traffic flow on the road at the first detection moment is abnormal according to the comparison result between the traffic flow sum within the observation window and the traffic flow sums within at least one historical window;

[0037] A road state determination module, configured to determine that the current traffic state of the road is abnormal when the traffic flow anomaly determination module determines that the traffic flow on the road at the first detection moment is abnormal.

[0038] In a third aspect, an embodiment of the present disclosure provides a road traffic state monitoring server, including: a memory and a processor; wherein, the memory stores a computer program, and when the program is executed by the processor, it can implement the foregoing method for obtaining a road traffic state.

[0039] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, on which a computer instruction is stored, and when the instruction is executed by the processor, it implements the foregoing method for obtaining a road traffic state.

[0040] The beneficial effects of the above technical solutions provided by the embodiments of the present disclosure at least include:

[0041] The method, apparatus, and server for obtaining the road traffic state provided by the present disclosure acquire the historical road traffic flow data within a preset duration starting from the current moment. Among the acquired historical road traffic flow data, an observation window and at least one corresponding historical window where the current moment or the adjacent moment of the current moment is located are determined. Then, based on the comparison result of the sum of the flows in the observation window and the historical window, it is determined whether the traffic flow on the current road is abnormal, and further whether the road traffic state is abnormal. The embodiments of the present disclosure can realize real-time tracking of the historical road traffic flow data within a preset duration starting from the current moment, and thus can determine the current road traffic state in real time, without, as in the prior art, collecting road anomaly information manually or being able to determine whether the road is abnormal only within a long and fixed time granularity. The detection has high real-time performance and more accurate results. In addition, for the above method for obtaining the road traffic state provided by the present disclosure, observation windows and historical windows with different time granularities are set according to roads with different traffic flows, and the traffic flow abnormality of each moment of the road can be detected in sequence with a relatively small time granularity, so as to finally obtain the time period composed of all the moments with traffic flow abnormalities. This time period can truly reflect the actual road anomaly situation, and can avoid various problems brought about by detection according to a fixed time granularity in the prior art, greatly improving the accuracy of road anomaly detection.

[0042] On the other hand, when it is determined that the road is abnormal at the first detection moment, the observation window continues to slide, and it is continuously determined whether the road is abnormal at the previous detection moment of the detection moment, and so on until the road is determined to be normal; the time interval from the last second detection moment to the first detection moment in the case of determining the road is abnormal is the time interval when the road state is abnormal. The above method for obtaining the road traffic state provided by the present disclosure can not only realize real-time determination of whether the current road traffic flow is abnormal, but also determine the accurate time period when the traffic flow abnormality occurs. This time period can truly reflect the actual road anomaly situation, and can avoid various problems brought about by detection according to a fixed time granularity in the prior art, greatly improving the accuracy of road anomaly detection.

[0043] In addition, the solution of the embodiments of the present disclosure can not only detect whether the road is abnormal, but also determine the time interval when the road is abnormal and the degree value when the road is abnormal, and determine the severity of the road anomaly based on this. Therefore, after monitoring the real-time traffic flow of the road using this solution, the ability to actively discover road anomalies can be greatly improved, and the problem of insufficient accuracy caused by real-time traffic flow fluctuations can be greatly improved, thereby realizing faster and more accurate positioning of the abnormal road. In addition, the implementation of this solution does not require a large amount of manual work, can save a large amount of labor costs, and can reduce the influence of human factors in the process of road anomaly detection.

[0044] Other features and advantages of the present disclosure will be set forth in the following description, and in part will be obvious from the description, or may be learned by practice of the present disclosure. The objectives and other advantages of the present disclosure may be realized and attained by the structure particularly pointed out in the written description, claims, as well as the drawings.

[0045] The technical solution of the present disclosure will be further described in detail below with reference to the drawings and embodiments. Description of the Drawings

[0046] The drawings are used to provide a further understanding of the present disclosure, and constitute a part of the description. Together with the embodiments of the present disclosure, they are used to explain the present disclosure, but do not constitute a limitation to the present disclosure. In the drawings:

[0047] Figure 1 is a flowchart of the method for obtaining the road traffic state in the first embodiment of the present disclosure;

[0048] Figure 2 is a schematic diagram of an example of the road historical traffic flow data in the first embodiment of the present disclosure;

[0049] Figure 3 is a schematic diagram of the observation window and the historical window where the first detection moment is located in the first embodiment of the present disclosure;

[0050] Figure 4 is a schematic diagram of the fluctuation of the historical traffic flow data in the first embodiment of the present disclosure;

[0051] Figure 5 is a flowchart of determining the durations of the observation window and the historical window in the first embodiment of the present disclosure;

[0052] Figure 6 is a flowchart of determining the time interval when the road traffic state is abnormal in the first embodiment of the present disclosure;

[0053] Figure 7A is a schematic diagram of an example of the road traffic state method in the second embodiment of the present disclosure;

[0054] Figure 7B is another schematic diagram of an example of the road traffic state method in the second embodiment of the present disclosure;

[0055] Figure 8 is a block diagram of the structure of the road traffic state device in the embodiments of the present disclosure. Detailed Embodiments

[0056] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided so that the present disclosure can be more thoroughly understood and the scope of the present disclosure can be fully conveyed to those skilled in the art.

[0057] Embodiment 1:

[0058] Embodiment 1 of the present disclosure provides a method for obtaining the road traffic state. The process is as shown in Figure 1 and includes the following steps:

[0059] S11. Obtain the road historical traffic flow data within a preset duration starting from the current moment.

[0060] S12. In the road historical traffic flow data, determine the observation window where the specified first detection moment is located and the corresponding at least one historical window; wherein, the first detection moment is the current moment or a neighboring moment of the current moment; the duration of the historical window is the same as that of the observation window and the historical window is earlier than the observation window.

[0061] S13. According to the comparison result between the traffic flow sum within the observation window and the traffic flow sums within at least one historical window, determine whether the traffic flow of the road at the first detection moment is abnormal. When it is determined that the road at the first detection moment is abnormal, execute step S14; otherwise, go to step S15.

[0062] S14. Determine that the current road traffic state is abnormal.

[0063] S15. End the current process.

[0064] The method for obtaining the above road traffic status provided by the embodiments of the present disclosure obtains the historical road traffic flow data within a preset duration starting from the current moment. Among the obtained historical road traffic flow data, an observation window and at least one corresponding historical window where the current moment or a neighboring moment of the current moment is located are determined. Then, based on the comparison result of the sum of the flows in the observation window and the historical window, it is determined whether the traffic flow of the current road is abnormal, and further whether the traffic status of the road is abnormal. The embodiments of the present disclosure can achieve real-time tracking of the historical road traffic flow data within a preset duration starting from the current moment, and thus determine the traffic status of the current road in real time, without the need to collect road anomaly information manually as in the prior art, or being able to determine whether the road is abnormal only within a long and fixed time granularity. The detection has high real-time performance and more accurate results. In addition, for the method for obtaining the above road traffic status provided by the present disclosure, observation windows and historical windows with different time granularities are set according to roads with different traffic flows, and each moment of the road can be sequentially detected for traffic flow anomalies with a relatively small time granularity, so as to finally obtain the time period composed of all the moments with traffic flow anomalies. This time period can truly reflect the actual road anomaly situation, and can avoid various problems brought about by detection according to a fixed time granularity in the prior art, greatly improving the accuracy of road anomaly detection.

[0065] The above processes will be described in detail below.

[0066] In the above step S11, for the road where traffic flow anomaly monitoring is required, the historical traffic flow data within a preset duration before the current moment is obtained. The historical road traffic flow data includes the historical traffic flow data of multiple roads in the road network, and one or more pieces of the historical traffic flow data included therein can be selected according to requirements for subsequent processing.

[0067] An example of the historical traffic flow data of a road within a preset duration is referred to Figure 2 as shown. The horizontal axis represents the time axis composed of several moments, corresponding to the sequence of time from left to right, that is, the earlier the time, the more to the left, and vice versa. The vertical axis represents the historical flow magnitude corresponding to each moment.

[0068] For a road, if it is desired to determine whether the road is abnormal, for example, it can be determined whether the traffic flow passing through the road at the current moment has changed significantly by comparing the flow data at the current moment or a neighboring moment of the current moment with the historical traffic flow data, that is, to determine that the road has a traffic flow anomaly.

[0069] In the embodiments of the present disclosure, the detection moment can be a moment point or a very short time period, that is, a unit time of a preset duration. Since the collection of historical traffic data may be continuously collected unit by unit (for example, every 5 minutes), the detection moment can also be a time period composed of several consecutive time points.

[0070] The duration of the first detection moment uses the unit time of the preset duration. The preset duration can be flexibly set according to specific circumstances, and different roads may choose differently. For example, it can be determined according to the size of the road traffic. Since different roads have different traffic volumes, for roads with high traffic volume, the traffic volume passing through in a very short time (such as 1 hour, 10 minutes, etc.) is already very large, and the possibility of abnormal fluctuations in traffic volume also becomes larger. Therefore, the duration of this unit time can be set shorter, such as 10 minutes or even 5 minutes; for roads with low traffic volume, the duration of this unit time can be set slightly longer. If the duration of the unit time is set too large, it will be impossible to accurately locate the time period when abnormal fluctuations actually occur. If the duration of the unit time is set too small, it may bring the problem of increased calculation amount. Therefore, it can be selected by considering conditions such as road traffic data, computing power, and computing time requirements.

[0071] When determining whether the road at the first detection moment is abnormal, it is first necessary to determine the observation window where the first detection moment is located and the historical window for comparison. The observation window where the first detection moment is located is a time window of the preset duration with the first detection moment at the end, as shown in Figure 3 shown. Figure 3 In the figure, the horizontal axis is the time axis, corresponding to the sequence of time from left to right, that is, the earlier the time, the more to the left, and vice versa; the vertical axis represents the historical traffic volume corresponding to the moment; the position indicated by the triangular arrow is the position of the detection moment on the time axis.

[0072] The observation window is a time window of the preset duration starting from the first detection moment and taking the direction of the previous moment of the first detection moment (that is, to the left) along the horizontal axis; the number of historical windows corresponding to the first detection moment can be one or more. Looking from the time axis, all historical windows are located before the observation window, as shown in Figure 3 shown, that is, all historical windows are always located on the left side of the observation window.

[0073] The window size of the historical window is equal to the size of the observation window.

[0074] The way to select the historical window can be, for example, random selection. The reason for adopting random selection is mainly because of the possible fluctuations in historical traffic flow data, which do not conform to the ideal mean distribution. The method of randomly selecting the historical window and comparing the flow of the historical window with the flow of the observation window can minimize the possibility that inaccurate detection results are caused by improper selection of the observation window due to abnormal fluctuations in historical traffic flow data.

[0075] Referring to Figure 4 the example shown, the duration of the historical window is 4 days. Taking the historical window with 1 day as the unit time as an example, it can be seen that there are large fluctuations in the flow of this window. If this historical window is used to compare with the observation window where the first detection time is located, there may be a large error in the comparison result.

[0076] The number of randomly selected historical windows can be one or more. When only one historical window is selected, it is possible to determine whether there is an abnormality on the road by comparing this one historical window with the observation window.

[0077] Preferably, multiple historical windows are randomly selected. This method can minimize the possibility that inaccurate detection results are caused by improper selection of the observation window due to abnormal fluctuations in historical traffic flow data. When calculating by selecting multiple historical windows, for the convenience of calculation, in the embodiments of the present disclosure, it is determined whether there is an abnormality in the road flow at the first detection time according to the comparison result of the change rate of the flow in the observation window and the sum of the flows of more than half of the historical windows. Based on this, when the number of historical windows is multiple, the number is odd.

[0078] Of course, other methods can also be used to judge the comparison result of the flow change rates of multiple historical windows and the observation window, and to obtain whether there is a flow abnormality at the detection time of the observation window. In the case of using other methods, if the number of historical windows is not limited to an odd number, any suitable number can be adopted, and the embodiments of the present disclosure do not make a limitation.

[0079] In practical applications, if the size of the observation window for each road is restricted, for example, to 3 hours. Although this brings certain convenience, for roads with different traffic flows, with a fixed size of the observation window, it is impossible to accurately and efficiently determine whether a road is abnormal based on the characteristics of the traffic flow data of each road. For example: for a high-traffic road, a very small observation window can detect whether a large amount of traffic is abnormal; for a low-traffic road, a long period of observation is required to detect whether the traffic flow of the road is abnormal. The calculation of the observation window and the historical window duration proposed in this disclosure is to solve the above problems, ultimately enabling roads with different traffic flows to adapt to observation windows and historical windows of different durations. Therefore, the specific duration selection of the observation window and the historical window needs to be optimized according to factors such as road traffic volume, for example, by using the following method:

[0080] Refer to Figure 5 As shown, it can be implemented through the following process:

[0081] S511. Traverse multiple assumed values of the preset duration, and sequentially determine the ratio of the absolute value of the difference between the sum of the traffic flows in the historical window and the observation window to the assumed value under each assumed value;

[0082] To facilitate the understanding of the above step S511, an example is used here for illustration:

[0083] For a road with relatively low traffic flow, assume that the obtained historical traffic flow data uses 5 minutes as a basic unit for each moment, that is, every 5 minutes represents each moment. The durations of the observation window and the historical window are set as x (representing x moments), where x = 1, 2, 3, 4, 5, 6, 7 (for example, x = 3 means that the durations of the observation window and the historical window are 15 minutes)……

[0084] Statistically calculate the difference between the sum of the traffic flows in the observation window and the historical window where each moment is located, denoted as Δt; for the convenience of explanation here, it is assumed that one historical window is selected; traverse all x until the minimum value is obtained.

[0085] This example is described in units of days. The determination method of the preset durations of the observation window and the historical window in other cases where the unit time is hours, minutes, etc. is the same as the above method and will not be elaborated here. When multiple historical windows are selected, for example, it can be 3, and calculate the differences Δt1, Δt2, and Δt3 between the sum of the traffic flows in the observation window and the historical window corresponding to each detection moment respectively. Traverse all x until the minimum value is obtained.

[0086] S512. Select the assumed value when the ratio is the smallest as the durations of the historical window and the observation window.

[0087] After obtaining the minimum value, the duration of the observation window and the historical window is determined by the value of x at this time (x moments).

[0088] There are two cases for the comparison result of the sum of the flows within the observation window and at least one historical window:

[0089] First, when there is one historical window, it is possible to determine whether the road is abnormal according to the comparison result of the sum of the flows within the observation window and the one historical window.

[0090] Second, when there are multiple historical windows, it is necessary to determine whether the road is abnormal based on multiple sets of comparison data of the sum of the flows within the observation window and the multiple historical windows. Only when more than half of the multiple sets of comparison data are determined to be abnormal can it be finally determined that the road is abnormal.

[0091] In the above step S13, the comparison result of the sum of the flows within the observation window and the historical window is mainly based on the change rate of the sum of the flows as the evaluation criterion. The specific calculation process of the change rate of the sum of the flows is as follows:

[0092] First, when there is one historical window, assume that the sum of the flows within the historical window corresponding to a certain first detection moment is f n , and the sum of the flows within the observation window is f o . If the flow change rate is flowratio, the calculation formula for the flow change rate flowratio is:

[0093]

[0094] For example, when flowratio < 0.9, it is determined that the road flow is abnormal, that is, the road is abnormal at this first detection moment.

[0095] Second, when there are multiple historical windows, assume that there are 5 historical windows at a certain detection moment, and their sums of the flows are respectively The sum of the flows within the observation window is f o . If the flow change rate is flowratio, the calculation formulas for the flow change rate flowratio of the observation window relative to the 5 historical windows are respectively:

[0096]

[0097]

[0098]

[0099]

[0100]

[0101] Only when the values of more than half of the above five groups of change rates are less than 0.9 can it be determined that the road traffic flow is abnormal at the first detection moment; otherwise, it is not considered that the road traffic flow is abnormal at the first detection moment.

[0102] Through the above method, according to the comparison result of the traffic flow sums within the observation window and at least one historical window, it can be determined whether an abnormality has occurred at the first detection moment, and the comparison result can be quantified by a specific value, making the road abnormality detection more accurate.

[0103] Since in the actual road conditions, the abnormal road traffic flow leading to the abnormal road traffic state is often not an instantaneous event but will last for a period of time. When it is detected that the road traffic flow is abnormal at a certain first detection moment, more information about the abnormal road traffic flow needs to be obtained, such as when the abnormal road traffic flow started and how long it has lasted since the first detection moment, etc. Based on this, after it is determined in the above step S13 that the traffic flow of the road is abnormal at the first detection moment, refer to Figure 6 As shown, the embodiments of the present disclosure may further perform the following steps:

[0104] S61. When it is determined that the road is abnormal at the first detection moment, slide the observation window so that the slid observation window includes the second detection moment;

[0105] The above second detection moment is the detection moment earlier than the first detection moment in the historical road traffic flow data of the road;

[0106] S62. According to the comparison result of the traffic flow sums of the slid observation window and the at least one historical window, determine whether the road traffic flow is abnormal at the second detection moment. If so, turn to S61 and repeat the operation of sliding the observation window; otherwise, perform the following step S63;

[0107] S63. Determine the time interval from the last second detection moment to the first detection moment in the case of road abnormality as the time interval when the road state is abnormal.

[0108] For the sake of distinction, in the embodiments of the present disclosure, the designated detection moment is called the first detection moment. After sliding the observation window, the first detection moment moves forward by one moment, and it is called the second detection moment. After repeating the sliding of the observation window again, each subsequent detection moment is called the second detection moment.

[0109] In the above step S61, each time the observation window is slid, the sliding length is equal to the unit time corresponding to a moment, and the sliding direction is the direction of the N moments before the first detection moment (N is greater than or equal to 1). After the sliding is completed, the observation window where the first detection moment is located moves forward by one moment and reaches the observation window where the second detection moment is located. At this time, the second detection window is still located at the rightmost end of the observation window, and in order to further compare the flow sum of the observation window and the historical window, it is necessary to continue to select at least one historical window corresponding to the second detection moment in accordance with the aforementioned method of selecting the historical window. The selection method is similar to that in step S12, for example, an odd number of historical windows can be randomly selected.

[0110] According to the comparison result of the flow rate sum in the sliding observation window and the corresponding at least one historical window, it can be determined whether the road traffic state at the second detection moment is abnormal.

[0111] In the embodiment of the present disclosure, at least one historical window corresponding to the observation window after sliding may be completely identical, completely different, or partially identical (that is, partially different) to at least one historical window corresponding to the observation window before sliding.

[0112] The above steps S61 to S63 can detect whether traffic anomalies occur at each moment in turn with a relatively small time granularity by sliding the observation window, so as to finally obtain the time period from the second detection moment of the last traffic anomaly to the first detection moment of the traffic anomaly. This time period can truly reflect the time interval when traffic anomalies occur on the actual road, and can avoid the various problems caused by detection according to fixed time granularity in the prior art, so that the determination of road traffic status is more accurate.

[0113] In the above step S62, the method of determining whether the road traffic state at the second detection moment is abnormal is the same as that of the above step S13, which will not be repeated here.

[0114] In the above step S63, i.e., when determining the time interval during which the road traffic status is abnormal, the embodiment of the present disclosure can further determine the degree of abnormality of the road at each moment according to the rate of change of the flow rate and.

[0115] For example, the traffic abnormality degree value of the entire road abnormality time interval may be further determined based on the degree value of the road abnormality at each detection moment (the first detection moment or the second detection moment).

[0116] The abnormality value N at each detection moment a The calculation formula is as follows:

[0117]

[0118] Among them, the sigmoid function:

[0119]

[0120] When the historical window is one, the anomaly degree value at the detection moment is:

[0121] When there are multiple historical windows, calculate the anomaly degree values at the detection moments (including the first detection moment and at least one second detection moment) corresponding to each historical window, and sum them; for the sake of illustration, here take 5 historical windows as an example, then the anomaly degree value N a is calculated as follows:

[0122]

[0123]

[0124]

[0125]

[0126]

[0127]

[0128] In addition, there are multiple different detection moments (i.e., the first detection moment and at least one second detection moment) within the time interval when the road has an anomaly. Therefore, it is also necessary to calculate the overall anomaly value N b of the time interval when the road has an anomaly. Assuming that there are 3 detection moments within the time interval when the road has an anomaly, and the anomaly degree values corresponding to each detection moment are: N 1 a , N 2 a and N 3 a , and the anomaly degree value of the detection moment is as described above. Then the overall anomaly degree value N b of this road in the anomaly time interval is calculated as follows:

[0129] N b = N 1 a + N 2 a + N 3 a

[0130] The above-mentioned road anomaly detection method provided by the present disclosure sets observation windows and historical windows with different time granularities according to roads with different traffic volumes, and can detect whether traffic anomalies occur at each moment of the road in turn with a relatively small time granularity, so as to finally obtain the time period composed of all moments when traffic anomalies occur. This time period can truly reflect the actual road anomalies, and can avoid various problems brought about by detecting according to a fixed time granularity in the prior art, greatly improving the accuracy of road anomaly detection.

[0131] In addition, this solution can not only detect whether the road traffic state is abnormal, but also determine the time interval when the road traffic state is abnormal and the degree value of the road anomaly, and determine the severity of the road anomaly based on this. Therefore, after monitoring the real-time traffic flow of the road using this solution, the ability to actively detect abnormal road traffic states can be greatly improved, and the problem of insufficient accuracy caused by fluctuations in real-time traffic flow can be greatly improved, so as to achieve more rapid and accurate positioning of abnormal roads. In addition, the implementation of this solution does not require a large amount of manpower, can save a large amount of labor costs, and can reduce the influence of human factors in the process of road anomaly detection.

[0132] Embodiment 2

[0133] Embodiment 2 of the present disclosure is a specific example of the method for obtaining the road traffic state.

[0134] Referring to Figure 7A As shown, the horizontal axis represents the time axis composed of 57 moments, the vertical axis represents the historical traffic volume corresponding to each moment, and the position of the triangular arrow indicates the position of the detection moment a. Assuming that the duration of each moment is 10 minutes, according to the obtained historical traffic flow data, the historical traffic volume corresponding to each moment can be known. The determination method of the duration of the observation window where the detection moment a is located refers to the above-mentioned Embodiment 1, and the duration of the observation window where the detection moment a is located and the corresponding historical window is 3 * 10 = 30 minutes. The historical window is randomly selected 3 windows, and all are located before the observation window where the detection moment a is located. The observation window where the detection moment a is located is A, and the historical windows are A1, A2, and A3.

[0135] According to the comparison result of the traffic volume sums in the observation window A where the detection moment a is located and the historical windows A1, A2, and A3, it can be determined whether the road is abnormal at the detection moment a. The specific calculation process of the change rate of the traffic volume sums in the observation window A and the historical windows A1, A2, and A3 refers to the above-mentioned Embodiment 1, which will not be elaborated here. Assume that the road traffic state is abnormal at the detection moment a.

[0136] If the detection time a is the current time or a time adjacent to the current time, it is possible to monitor that traffic anomalies have occurred on this road at the current time or at a time slightly earlier or later than the current time.

[0137] Further, slide the sliding time window one time period (10 minutes) to the left along the time axis. The position after sliding is shown in Figure 7B the time window B in Figure 7B which is a schematic diagram of the observation window where the previous time b of the detection time a is located (the position indicated by the triangular arrow is the position of the detection time b) and the corresponding historical windows B1, B2, and B3. In Figure 7B the historical windows B1, B2, and B3 can be the same as the historical windows A1, A2, and A3 in Figure 7A or can be different from the historical windows A1, A2, and A3, or partially the same. After determining the observation window where the detection time b is located and the corresponding historical windows, it is also necessary to calculate the change rate of the sum of the traffic flows within the observation window where the detection time b is located and the corresponding historical windows. Assume that the traffic state of the road is also abnormal at the detection time b.

[0138] Continue to slide the time window forward until it is detected that the traffic flow on the road is normal at a certain detection time. The sum of the time periods of all abnormal detection times before the detection time when the road traffic flow is detected to be normal is used as the time period of road anomaly. For example, at the detection time c (not shown in the figure) before the detection time b mentioned above, if it is detected that the traffic flow on the road is normal at the detection time c, then the time period composed of the sum of the time a and the time b is the time interval during which the traffic flow on this road is abnormal.

[0139] In this way, continuously sliding the observation window where the detection time is located in the direction of the previous time of the detection time can finally determine the time interval during which the traffic flow on the road is abnormal (the traffic state is abnormal). After determining the time interval during which the traffic flow on the road is abnormal, it is also possible to calculate the degree value of the traffic flow anomaly on the road within this time interval according to the calculation method of the road anomaly degree provided in the first embodiment above, so as to measure the severity of the traffic flow anomaly on this road.

[0140] Based on the same inventive concept, the embodiments of the present disclosure also provide a road anomaly detection device and a server. Since the principles of the problems solved by these devices and the server are similar to those of the foregoing road anomaly detection method, the implementation of these devices and the server can refer to the implementation of the foregoing method, and the repeated parts will not be described again.

[0141] Referring to Figure 8 as shown, the embodiments of the present disclosure also provide a device for obtaining the road traffic state, including: an acquisition module 81, a historical window determination module 82, a traffic anomaly determination module 83; and a road state determination module 84, where:

[0142] An acquisition module 81, configured to acquire road historical traffic flow data within a preset duration starting from the current moment and moving forward;

[0143] A window determination module 82, configured to determine, in the road historical traffic flow data, an observation window where a specified first detection moment is located and at least one corresponding historical window; the first detection moment is the current moment or a neighboring moment of the current moment; the historical window has the same duration as the observation window and the historical window is earlier than the observation window;

[0144] A flow anomaly determination module 83, configured to determine whether the traffic flow of the road at the first detection moment is abnormal according to a comparison result between the traffic flow within the observation window and the sum of the traffic flows within at least one historical window;

[0145] A road state determination module 84, configured to determine that the current traffic state of the road is abnormal when the flow anomaly determination module determines that the traffic flow of the road at the first detection moment is abnormal.

[0146] In one embodiment, the device for acquiring the road traffic state, with reference to Figure 8 as shown, may further include: a time window sliding module 85 and a time interval determination module 86; where:

[0147] The time window sliding module 85 is configured to, when the flow anomaly determination module 83 determines that the road at the first detection moment is abnormal, slide the observation window so that the slid observation window includes a second detection moment; and when the traffic flow of the road at the second detection moment is abnormal, slide the observation window again; until the traffic flow of the road is normal; the second detection moment is a detection moment earlier than the first detection moment in the road historical traffic flow data;

[0148] The above-mentioned flow anomaly determination module 83 is further configured to determine whether the road at the second detection moment is abnormal according to a comparison result between the traffic flow of the slid observation window and the sum of the traffic flows of the at least one historical window;

[0149] The time interval determination module 86 is configured to determine the time interval from the last second detection moment in the case of road anomaly to the first detection moment in the case of road anomaly as the time interval during which the road state is abnormal.

[0150] In one embodiment, the above-mentioned window determination module 82 is specifically configured to determine a time window with a preset duration at the end where the first detection moment is located as the observation window; randomly select an odd number of historical windows before the observation window.

[0151] In one embodiment, when there is only one historical window, the traffic anomaly determination module 83 is specifically configured to determine the change rate of the traffic sum within the observation window relative to the traffic sum within the historical window based on the traffic sum within the observation window and the traffic sum within the historical window; when it is determined that the change rate is less than a preset change rate threshold, it is determined that the road traffic at the first detection moment or the second detection moment is abnormal.

[0152] In one embodiment, when there are multiple historical windows, the traffic anomaly determination module 83 is specifically configured to, for each historical window, determine the change rate of the traffic sum within the observation window relative to the traffic sum within each historical window based on the traffic sum within the observation window and the traffic sum within the historical window; when it is determined that the change rate of the traffic sum within the observation window relative to the traffic sum within more than half of the historical windows is less than a preset change rate threshold, it is determined that the road traffic at the first detection moment or the second detection moment is abnormal.

[0153] In one embodiment, the time window sliding module 85 is specifically configured to move the observation window forward by one or more unit times corresponding to the first detection moment.

[0154] In one embodiment, the above-mentioned device for obtaining the road traffic state, as shown in Figure 8 may further include: a traffic anomaly degree calculation module 87, configured to determine the traffic anomaly degree values at the first detection moment and each second detection moment according to the change rate of the traffic sum within the observation window relative to the traffic sum within each historical window; accumulate the traffic anomaly degree values at the first detection moment and all second detection moments to obtain the traffic anomaly degree value of the time interval when the road has traffic anomalies.

[0155] In one embodiment, the time window sliding module 85 is further configured to traverse multiple assumed values of the preset duration, and sequentially determine, for each assumed value, the ratio of the absolute value of the difference between the traffic sums of the historical window and the observation window to the assumed value; select the assumed value when the ratio is the smallest as the duration of the historical window and the observation window.

[0156] The embodiments of the present disclosure further provide a traffic state monitoring server, including: a memory and a processor; wherein, the memory stores a computer program, and when the program is executed by the processor, it can implement the above-mentioned method for obtaining the road traffic state.

[0157] The embodiments of the present disclosure further provide a computer-readable storage medium, on which a computer instruction is stored, and when the instruction is executed by the processor, it implements the above-mentioned method for obtaining the road traffic state.

[0158] Regarding the road anomaly detection device in the above embodiments, the specific manners in which each module performs operations have been described in detail in the embodiments related to the method, and will not be elaborated herein.

[0159] Those skilled in the art should understand that the embodiments of the present disclosure can be provided as a method, a system, or a computer program product. Therefore, the present disclosure can take the form of an all-hardware embodiment, an all-software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present disclosure can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer-usable program code.

[0160] The present disclosure is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to the embodiments of the present disclosure. It should be understood that each flow and / or block in the flowchart and / or block diagram, and the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.

[0161] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device that implements the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.

[0162] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are performed on the computer or other programmable device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.

[0163] Obviously, those skilled in the art can make various changes and modifications to the present disclosure without departing from the spirit and scope of the present disclosure. Thus, if these modifications and variations of the present disclosure fall within the scope of the claims of the present disclosure and their equivalent technologies, the present disclosure is also intended to include these modifications and variations.

Claims

1. A method for obtaining the road traffic state, comprising: Obtaining the historical road traffic flow data within a preset duration forward from the current moment; In the historical road traffic flow data, determining the observation window where the specified first detection moment is located and the corresponding at least one historical window; the first detection moment is the current moment or a neighboring moment of the current moment; the historical window has the same duration as the observation window and the historical window is earlier than the observation window; Determining whether the traffic flow of the road at the first detection moment is abnormal according to the comparison result of the traffic flow sum within the observation window and the traffic flow sums within the at least one historical window; When it is determined that the traffic flow of the road at the first detection moment is abnormal, determining that the current traffic state of the road is abnormal; Wherein, the durations of the historical window and the observation window are pre-determined in the following manner: Traversing multiple assumed values of the preset duration, and sequentially determining, for each assumed value, the ratio of the absolute value of the difference between the traffic flow sums of the historical window and the observation window to the assumed value; Selecting the assumed value when the ratio is the smallest as the durations of the historical window and the observation window.

2. The method according to claim 1, the method further comprising: When it is determined that the road at the first detection moment is abnormal, sliding the observation window so that the slid observation window includes a second detection moment, and determining whether the traffic flow of the road at the second detection moment is abnormal according to the comparison result of the traffic flow sums of the slid observation window and the at least one historical window, and repeating this process until it is determined that the traffic flow of the road is normal; The second detection moment is a detection moment earlier than the first detection moment in the historical road traffic flow data; Determining the time interval from the last second detection moment in the case of road abnormality to the first detection moment in the case of road abnormality as the time interval during which the road state is abnormal.

3. The method according to claim 2, sliding the observation window, comprising: Moving the observation window forward by one or more unit times corresponding to the first detection moment.

4. The method according to claim 2, after it is determined that the traffic flow of the road is normal, the method further comprising: Determining the traffic flow abnormality degree values at the first detection moment and each second detection moment according to the change rate of the traffic flow sum within the observation window relative to the traffic flow sums of each historical window; Accumulating the traffic flow abnormality degree values at the first detection moment and all second detection moments to obtain the traffic flow abnormality degree value of the time interval during which the road has traffic flow abnormality.

5. The method according to claim 1, determining the observation window where the first detection moment is located, comprising: Determining the time window of the preset duration with the first detection moment at the end as the observation window; The determining the at least one historical window corresponding to the detection moment, comprising: Randomly selecting an odd number of historical windows before the observation window.

6. The method according to claim 1 or 2, if the historical window is one, determining whether the traffic flow of the road at the first detection moment or the second detection moment is abnormal according to the comparison result of the traffic flow sums within the observation window and the historical window, comprising: Determine the change rate of the traffic flow sum within the observation window relative to the traffic flow sum within the historical window according to the traffic flow sum within the observation window and the traffic flow sum within the historical window; When it is determined that the change rate is less than a preset change rate threshold, determine that the road at the detection moment is abnormal.

7. The method according to claim 1 or 2, if there are multiple historical windows, determine whether the traffic flow of the road at the first detection moment or the second detection moment is abnormal according to the comparison result of the traffic flow sums within the observation window and the at least one historical window, including: For each historical window, determine the change rate of the traffic flow sum within the observation window relative to the traffic flow sum within each historical window according to the traffic flow sum within the observation window and the traffic flow sum within the historical window; When it is determined that the change rates of the traffic flow sum within the observation window relative to the traffic flow sums within more than half of all the historical windows are less than the preset change rate threshold, determine that the traffic flow of the road at the first detection moment or the second detection moment is abnormal.

8. An apparatus for obtaining the road traffic state, comprising: An acquisition module, configured to acquire the road historical traffic flow data within a preset duration starting from the current moment; A historical window determination module, configured to determine, in the road historical traffic flow data, the observation window where the specified first detection moment is located and the corresponding at least one historical window; the first detection moment is the current moment or a neighboring moment of the current moment; the duration of the historical window is the same as that of the observation window and the historical window is earlier than the observation window; A traffic flow anomaly determination module, configured to determine whether the traffic flow of the road at the first detection moment is abnormal according to the comparison result of the traffic flow sum within the observation window and the traffic flow sum within at least one historical window; A road state determination module, configured to determine that the current traffic state of the road is abnormal when the traffic flow anomaly determination module determines that the traffic flow of the road at the first detection moment is abnormal; Wherein, the durations of the historical window and the observation window are determined in advance by the following method: Traverse multiple assumed values of the preset duration, and sequentially determine the ratio of the absolute value of the difference between the traffic flow sums of the historical window and the observation window to the assumed value under each assumed value; Select the assumed value when the ratio is the smallest as the durations of the historical window and the observation window.

9. A road traffic status monitoring server, comprising: A memory and a processor; wherein, the memory stores a computer program, and when the program is executed by the processor, it can implement the method for obtaining the road traffic state according to any one of claims 1-7.

10. A computer-readable storage medium, on which computer instructions are stored, and when the instructions are executed by a processor, the method for obtaining the road traffic state according to any one of claims 1-7 is implemented.

Citation Information

Patent Citations

  • Method for acquiring regional congestion information and regional congestion analyzing device

    CN102968901A

  • Method, system, medium and device for determining abnormal behavior of network flow

    CN108881326A