KR102341475B1 - Road speed prediction method based on machine learning by analyzing road environment data, and recording medium thereof - Google Patents

Road speed prediction method based on machine learning by analyzing road environment data, and recording medium thereof Download PDF

Info

Publication number
KR102341475B1
KR102341475B1 KR1020200033654A KR20200033654A KR102341475B1 KR 102341475 B1 KR102341475 B1 KR 102341475B1 KR 1020200033654 A KR1020200033654 A KR 1020200033654A KR 20200033654 A KR20200033654 A KR 20200033654A KR 102341475 B1 KR102341475 B1 KR 102341475B1
Authority
KR
South Korea
Prior art keywords
speed
road
prediction
data
predicted
Prior art date
Application number
KR1020200033654A
Other languages
Korean (ko)
Other versions
KR20210117445A (en
Inventor
박송희
최도진
임종태
복경수
유재수
Original Assignee
충북대학교 산학협력단
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 충북대학교 산학협력단 filed Critical 충북대학교 산학협력단
Priority to KR1020200033654A priority Critical patent/KR102341475B1/en
Publication of KR20210117445A publication Critical patent/KR20210117445A/en
Application granted granted Critical
Publication of KR102341475B1 publication Critical patent/KR102341475B1/en

Links

Images

Classifications

    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/01Detecting movement of traffic to be counted or controlled
    • G08G1/0104Measuring and analyzing of parameters relative to traffic conditions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Biomedical Technology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Traffic Control Systems (AREA)

Abstract

본 발명의 어느 시점에서 특정 도로를 통행하는 차량 흐름의 속도인 도로 속도를 예측하는 방법에서, 도로 속도를 예측하고자 하는 도로(이하 '타겟 도로'라 함)의 도로 환경 데이터를 실시간으로 수집하는 단계, 수집된 도로 환경 데이터를 정규화하여 도로 속도 예측에 필요한 예측 데이터 집합을 생성하는 단계, 생성된 예측 데이터 집합을 입력 데이터로 하는 신경망 학습 모델을 통해 1차 예측 속도를 예측하는 단계, 상기 타겟 도로의 일반적인 차량 흐름을 반영하기 위해, 상기 1차 예측 속도에 상기 타겟 도로의 과거 평균 속도를 적용하는 단계, 상기 타겟 도로에서 발생하는 이벤트에 의해 급변하는 차량 흐름을 반영하기 위해, 상기 1차 예측 속도에 이벤트 가중치를 적용하는 단계 및 상기 이벤트 가중치와 상기 과거 평균 속도를 적용하는 오류 보정을 통해 최종 예측 속도를 예측하는 단계를 포함한다. In the method of predicting the road speed, which is the speed of vehicle flow passing through a specific road at any point in the present invention, the step of collecting road environment data of a road for which the road speed is to be predicted (hereinafter referred to as a 'target road') in real time , generating a prediction data set required for road speed prediction by normalizing the collected road environment data, predicting the primary prediction speed through a neural network learning model using the generated prediction data set as input data, the target road To reflect the general vehicle flow, applying the past average speed of the target road to the first predicted speed, to reflect the vehicle flow that changes rapidly due to an event occurring on the target road, to the first predicted speed and estimating the final prediction speed through error correction by applying the event weight and applying the event weight and the past average speed.

Description

도로 환경 데이터 분석을 통한 기계 학습 기반의 도로 속도 예측 방법 및 이를 기록한 기록매체 {Road speed prediction method based on machine learning by analyzing road environment data, and recording medium thereof}{Road speed prediction method based on machine learning by analyzing road environment data, and recording medium thereof}

본 발명은 도로에서 차량의 흐름인 도로 속도를 예측하는 기술에 관한 것으로서, 더욱 상세하게는 도로 환경 데이터 분석을 통한 도로 속도 예측 기술에 관한 것이다. The present invention relates to a technology for predicting a road speed, which is a flow of a vehicle on a road, and more particularly, to a road speed prediction technology through road environment data analysis.

교통 혼잡으로 발생하는 비용이 2015년부터 33조원을 넘어서면서, 전국의 지자체들은 교통난을 해소하기 위해 교통 체계를 개선하기 위한 다양한 정책을 시행하고 있다. 또한, 교통 정체에 따른 문제를 해결하기 위한 다양한 연구들이 진행되고 있다. 교통 혼잡을 예측하여 교통 혼잡 발생 비율을 줄일 수 있으며, 정체에 대한 대안을 미리 제시하여 교통 혼잡으로 발생하는 다양한 문제들을 피할 수 있다. As the cost of traffic congestion has exceeded 33 trillion won since 2015, local governments across the country are implementing various policies to improve the traffic system to solve the traffic problem. In addition, various studies are being conducted to solve problems caused by traffic congestion. By predicting traffic congestion, the rate of occurrence of traffic congestion can be reduced, and various problems caused by traffic congestion can be avoided by suggesting alternatives to congestion in advance.

본 발명의 명세서에서 어느 시점에서 특정 도로를 통행하는 차량 흐름의 속도를 도로 속도라 명명하기로 한다. In the specification of the present invention, a speed of a vehicle flow passing a specific road at a certain point in time will be referred to as a road speed.

국가 ITS 센터에서는 도로의 속도를 교통상황을 판단하는 지표로 활용하고 있다. 도로 속도 예측을 통해 도로 혼잡 상황을 예측하여 혼잡 상황을 피할 수 있으며, 도로 정체에 대한 대안을 미리 제시하여 교통 혼잡으로 발생하는 다양한 문제들을 피할 수 있다.The national ITS center is using the speed of the road as an index to judge the traffic situation. Through predicting road speed, congestion can be avoided by predicting road congestion, and various problems caused by traffic congestion can be avoided by suggesting alternatives to road congestion in advance.

도로 속도는 교통 상황의 중요한 지표이며, 도로 속도에는 다양한 요소가 영향을 미친다. 도로 속도에 영향을 미치는 요소로는 도로의 속도, 도로가 수용할 수 있는 교통량, 시간에 따른 교통 흐름, 연결된 도로의 영향, 사고, 공사, 날씨 그리고 명절과 같은 특별한 날 등이 있다. 이와 같이 도로 속도에 영향을 미치는 요소를 도로 환경 데이터라고 정의한다. 도로 환경 데이터들은 교통 혼잡에 영향을 주므로 각 요소들 또는 결합된 요소들이 교통 혼잡에 미치는 영향을 분석할 필요가 있다.Road speed is an important indicator of traffic conditions, and various factors affect road speed. Factors that affect road speed include the speed of the road, the amount of traffic it can accommodate, the flow of traffic over time, the impact of connected roads, accidents, construction, weather, and special occasions such as holidays. A factor that affects road speed in this way is defined as road environment data. Since road environment data affects traffic congestion, it is necessary to analyze the effect of each factor or a combination of factors on traffic congestion.

과거의 도로 속도 예측 방법들은 속도와 교통량을 주로 고려하였고, 시간에 따른 속도와 교통량 변화를 이용하여 평상시 도로의 흐름을 반영하였다. 과거의 도로 속도 예측 방법들을 예시하면 다음과 같다. Past road speed prediction methods mainly considered speed and traffic volume, and the normal road flow was reflected by using speed and traffic volume changes over time. Examples of past road speed prediction methods are as follows.

베이지안 네트워크를 이용하여 교통 속도를 예측하는 방법(기존 방법 1)이 있다. 이 방법은 예측 정확도를 높이기 위해 예측 도로의 상·하류 도로의 교통 상태를 고려하였다. There is a method (existing method 1) to predict traffic speed using a Bayesian network. In this method, the traffic conditions of the upstream and downstream roads of the predicted road were taken into consideration in order to increase the prediction accuracy.

그리고, LSTM(Long short-term memory 모델을 이용하여 단기 도로 속도를 예측하는 방식(기존 방법 2)이 있다. 이 방식은 타겟 도로와 연결된 도로의 과거 속도데이터를 LSTM의 입력 데이터로 활용하여 연결된 도로의 영향을 반영함으로써 가까운 미래의 속도를 예측하였다. In addition, there is a method (existing method 2) that predicts short-term road speed using a long short-term memory model (LSTM). This method utilizes the past speed data of the road connected to the target road as input data of the LSTM to predict the connected road. The near future speed was predicted by reflecting the influence of

그리고, 저속 차량을 도로 혼잡의 핵심 요소로 판단하여 저속 차량의 수를 이용하여 도로의 혼잡도를 판단하는 방식(기존 방법 3)이 있다. 이 방식에서는 도로 혼잡도를 예측하기 위한 도구로 CNN(Convolution Neural Network) 모델을 이용했으며, 연결된 도로의 영향과 교통사고, 교통 단속 그리고 날씨의 영향을 고려하여 교통 혼잡도를 예측하였다.In addition, there is a method (existing method 3) in which low-speed vehicles are determined as a key factor of road congestion and the degree of road congestion is determined using the number of low-speed vehicles. In this method, a Convolution Neural Network (CNN) model was used as a tool to predict road congestion, and the traffic congestion was predicted by considering the effects of connected roads, traffic accidents, traffic regulation, and weather.

이처럼, 속도와 교통량 변화를 이용한 도로 속도 예측 방법과 저속 차량의 수를 이용하여 교통 혼잡도를 예측하는 기존 방법은 도로 환경 데이터들을 고려하지 않았다. As such, the road speed prediction method using changes in speed and traffic volume and the existing method of predicting traffic congestion using the number of low-speed vehicles do not consider road environment data.

기존 방법 1과 2에서는 연결된 도로가 미치는 영향을 고려하였고, 기존 방법 1은 5분에서 60분 후의 교통 속도를 예측했으나 현재 시간에서 멀어질수록 예측 오차가 커지며, 돌발 상황이 발생한 경우 예측 오차가 점차 증가하였다. 또한, 두 방법은 날씨와 사고와 같은 도로 환경 데이터들을 고려하지 않았다. Existing methods 1 and 2 considered the effect of the connected road, and the existing method 1 predicted the traffic speed after 5 to 60 minutes, but the further away from the current time, the larger the prediction error. increased. In addition, both methods did not take into account road environment data such as weather and accidents.

기존 방법 3은 과거 교통 혼잡도 데이터와 도로 환경 데이터를 추가적으로 고려하여 교통 혼잡도를 예측하였고, 도로 환경 데이터를 고려하기 위해 각 도로 환경 데이터를 0~1사이의 값으로 정규화 하여 완전 연결 신경망의 입력으로 사용하였다. 하지만 각 도로 환경 데이터들의 특성을 값으로 산출하는 방법을 제시하지 않았다. Existing method 3 predicted traffic congestion by additionally considering past traffic congestion data and road environment data. did However, a method for calculating the characteristics of each road environment data as a value was not presented.

또한, 대부분의 기존 관련 연구들은 날씨와 사고가 도로 속도에 미치는 영향을 고려하지 않았다. 예를 들어, 비가 많이 내리는 날에는 차량의 대부분 저속으로 주행하며, 사고 발생 시에 도로의 상태가 회복되는 시간이 지체된다. 따라서 날씨와 사고가 도로 속도에 미치는 영향을 고려할 필요가 있다.In addition, most of the existing related studies did not consider the effects of weather and accidents on road speed. For example, on a rainy day, most vehicles drive at a low speed, and when an accident occurs, the recovery time of the road condition is delayed. Therefore, it is necessary to consider the effects of weather and accidents on road speed.

기존의 도로 속도 예측 방법에서는 돌발 상황이 발생한 경우 예측 정확도가 크게 떨어지는 문제를 보완하기 위해 가장 최신의 도로 속도 데이터를 이용하였다. 하지만 예측 시점이 멀어지는 경우, 얻을 수 있는 가장 최신의 도로 속도 데이터를 반영한다고 하더라도 현재 시점과 예측 시점 사이에 발생하는 돌발 상황을 반영하기 어려운 한계가 있었다. 따라서 돌발 상황의 원인인 도로 환경데이터를 고려할 필요가 있다. In the existing road speed prediction method, the most recent road speed data is used to compensate for the problem that prediction accuracy is greatly reduced when an unexpected situation occurs. However, when the prediction time is farther away, even if the most recent road speed data that can be obtained is reflected, there is a limit in that it is difficult to reflect the sudden situation occurring between the current time and the prediction time. Therefore, it is necessary to consider road environment data, which is the cause of an abrupt situation.

대한민국 등록특허 10-1638368Republic of Korea Patent Registration 10-1638368

본 발명은 상기와 같은 문제점을 해결하기 위하여 안출된 것으로서, 본 발명에서는 도로 환경 데이터 분석을 통한 기계 학습 기반의 도로 속도 예측 방법을 제안하는데 그 목적이 있다. The present invention has been devised to solve the above problems, and an object of the present invention is to propose a machine learning-based road speed prediction method through road environment data analysis.

본 발명의 목적은 이상에서 언급한 목적으로 제한되지 않으며, 언급되지 않은 또 다른 목적들은 아래의 기재로부터 통상의 기술자에게 명확하게 이해될 수 있을 것이다.Objects of the present invention are not limited to the objects mentioned above, and other objects not mentioned will be clearly understood by those skilled in the art from the following description.

이와 같은 목적을 달성하기 위한 본 발명의 어느 시점에서 특정 도로를 통행하는 차량 흐름의 속도인 도로 속도를 예측하는 방법에서, 도로 속도를 예측하고자 하는 도로(이하 '타겟 도로'라 함)의 도로 환경 데이터를 실시간으로 수집하는 단계, 수집된 도로 환경 데이터를 정규화하여 도로 속도 예측에 필요한 예측 데이터 집합을 생성하는 단계, 생성된 예측 데이터 집합을 입력 데이터로 하는 신경망 학습 모델을 통해 1차 예측 속도를 예측하는 단계, 상기 타겟 도로의 일반적인 차량 흐름을 반영하기 위해, 상기 1차 예측 속도에 상기 타겟 도로의 과거 평균 속도를 적용하는 단계, 상기 타겟 도로에서 발생하는 이벤트에 의해 급변하는 차량 흐름을 반영하기 위해, 상기 1차 예측 속도에 이벤트 가중치를 적용하는 단계 및 상기 이벤트 가중치와 상기 과거 평균 속도를 적용하는 오류 보정을 통해 최종 예측 속도를 예측하는 단계를 포함한다. In the method of predicting the road speed, which is the speed of vehicle flow passing through a specific road at any point in the present invention for achieving the above object, the road environment of the road for which the road speed is to be predicted (hereinafter referred to as 'target road') Collecting data in real time, normalizing the collected road environment data to generate a prediction data set required for road speed prediction, predicting the primary prediction speed through a neural network learning model using the generated prediction data set as input data applying the historical average speed of the target road to the first predicted speed to reflect the general vehicle flow of the target road; To reflect the rapidly changing vehicle flow due to an event occurring on the target road , applying an event weight to the first prediction speed, and predicting a final prediction speed through error correction by applying the event weight and the past average speed.

상기 신경망 학습 모델은 LSTM(Long Short-Term Memory) 학습 모델로 구현될 수 있다. The neural network learning model may be implemented as a Long Short-Term Memory (LSTM) learning model.

상기 예측 데이터 집합은 타겟 도로의 속도 데이터와, 이웃 도로의 속도 데이터와, 날씨 데이터를 포함할 수 있다. The prediction data set may include speed data of a target road, speed data of a neighboring road, and weather data.

Figure 112020028957557-pat00001
은 도로 R에서 수집한 전체 속도 데이터,
Figure 112020028957557-pat00002
는 도로 R에서 수집한 t시간의 속도라고 할 때,
Figure 112020028957557-pat00003
(1)의 수학식을 이용하여 속도 데이터를 정규화할 수 있다.
Figure 112020028957557-pat00001
is the full speed data collected from road R,
Figure 112020028957557-pat00002
Let is the speed of time t collected from road R,
Figure 112020028957557-pat00003
The speed data can be normalized using the equation of (1).

Figure 112020028957557-pat00004
는 타겟 도로가 속한 지역의 t시간 동안의 강우량이라고 할 때,
Figure 112020028957557-pat00005
(2)의 수학식을 이용하여 날씨 데이터를 정규화할 수 있다.
Figure 112020028957557-pat00004
is the rainfall for time t in the area to which the target road belongs,
Figure 112020028957557-pat00005
Weather data can be normalized using the equation (2).

Figure 112020028957557-pat00006
는 특정 요일의 과거 평균 속도 변화량,
Figure 112020028957557-pat00007
는 특정 요일, t시간으로부터 15분 전의 과거 평균 속도,
Figure 112020028957557-pat00008
는 특정 요일, t시간의 속도라고 할 때,
Figure 112020028957557-pat00009
(4)의 수학식으로 나타낼 수 있고,
Figure 112020028957557-pat00010
는 특정 요일, 특정 시간의 1차 예측 속도,
Figure 112020028957557-pat00011
는 과거 평균 속도 적용 과정을 수행한 예측 속도라고 할 때,
Figure 112020028957557-pat00012
(5)의 수학식으로 나타낼 수 있다. 여기서, 과거 평균적으로 속도가 감소하는 시간대에 예측한
Figure 112020028957557-pat00013
Figure 112020028957557-pat00014
보다 크면
Figure 112020028957557-pat00015
로 1차 예측 속도를 대체하고, 그렇지 않으면 1차 예측 속도를 그대로 사용하는 방식으로, 상기 1차 예측 속도에 상기 타겟 도로의 과거 평균 속도를 적용하는 단계를 수행할 수 있다.
Figure 112020028957557-pat00006
is the historical average speed change for a specific day,
Figure 112020028957557-pat00007
is the historical average speed 15 minutes before a specific day of the week, time t,
Figure 112020028957557-pat00008
When is the speed of a specific day of the week, time t,
Figure 112020028957557-pat00009
It can be expressed by the formula of (4),
Figure 112020028957557-pat00010
is the primary prediction rate on a specific day, at a specific time,
Figure 112020028957557-pat00011
Assuming that is the predicted speed at which the past average speed application process was performed,
Figure 112020028957557-pat00012
It can be expressed by the formula of (5). Here, the predicted average speed during the time period of decreasing historical average
Figure 112020028957557-pat00013
go
Figure 112020028957557-pat00014
greater than
Figure 112020028957557-pat00015
In such a way that the primary prediction speed is replaced with the first prediction speed, otherwise the primary prediction speed is used as it is, and the step of applying the historical average speed of the target road to the first prediction speed may be performed.

상기 1차 예측 속도에 이벤트 가중치를 적용하는 단계에서, 타겟 도로의 도로 속도가 급격히 감소되는 구간인 속도 감소 구간과, 급격히 감소된 속도가 회복되는 구간인 속도 회복 구간을 정의하고, 상기 속도 감소 구간에서 상기 1차 예측 속도에 감소 가중치를 적용하고, 상기 속도 회복 구간에서 상기 1차 예측 속도에 회복 가중치를 적용할 수 있다. In the step of applying the event weight to the first prediction speed, a speed reduction section, which is a section in which the road speed of the target road is rapidly reduced, and a speed recovery section, which is a section in which the abruptly reduced speed is recovered, is defined, and the speed reduction section may apply a reduction weight to the first prediction speed, and apply a recovery weight to the first prediction speed in the speed recovery section.

본 발명에서 수집된 도로 환경 데이터를 정규화하여, LSTM 학습 모델을 생성하기 위해 필요한 학습 데이터 집합을 생성하는 단계, 생성된 학습 데이터 집합을 입력으로 하는 LSTM 모델을 수행하는 단계 및 LSTM 모델을 통해 최적의 가중치를 업데이트하여 LSTM 학습 모델을 생성하는 단계를 더 포함할 수 있다. Normalizing the road environment data collected in the present invention, generating a training data set necessary to generate an LSTM learning model, performing an LSTM model using the generated learning data set as an input, and optimally through the LSTM model The method may further include generating the LSTM learning model by updating the weights.

본 발명에 의하면, 도로 환경 데이터를 분석을 통한 기계 학습 기반의 도로 속도 예측 방법을 제안함으로써, 갑작스런 날씨의 변화나, 교통 사고와 공사와 같은 도로 속도에 급격한 변화 흐름을 가져오는 돌발 상황을 고려하여 보다 정확한 도로 속도를 예측할 수 있는 효과가 있다. According to the present invention, by proposing a machine learning-based road speed prediction method through analysis of road environment data, in consideration of sudden changes in the road speed such as sudden changes in weather or traffic accidents and construction It has the effect of predicting the road speed more accurately.

도 1은 본 발명에서 제안하는 도로 속도 예측 방법의 전체 구조를 나타낸 도면이다.
도 2는 본 발명의 일 실시예에 따른 도로 속도 예측 방법에서 예측 단계를 수행하는 과정을 상세히 도시한 흐름도이다.
도 3은 본 발명의 일 실시예에 따른 도로 속도 예측 방법에서 학습 단계를 수행하는 과정을 상세히 도시한 흐름도이다.
도 4는 제안하는 방법의 LSTM 모델 학습 절차를 나타낸다.
도 5는 시간에 따른 실제 도로의 속도와 1차 예측 속도를 도시한 그래프이다.
도 6은 2019년 5월 20일부터 8월 25일까지 약 3개월간의 요일, 시간별 타겟 도로의 평균 속도로 산출한 결과를 나타낸 그래프이다.
도 7은 출근 시간대의 요일별 과거 속도 변화량을 나타낸 그래프이다.
도 8은 과거 데이터를 이용하여 분석한 예측 속도 변화량에 따른 예측 속도의 오차율 통계를 나타낸다.
도 9는 본 발명의 일 실시예에 따른 감소 구간 가중치 적용 알고리즘을 나타낸다.
도 10은 예측 속도 변화량과 실제 속도의 관계를 나타낸다.
도 11은 본 발명의 일 실시예에 따른 회복 구간 가중치 적용 알고리즘을 나타낸다.
1 is a view showing the overall structure of the road speed prediction method proposed in the present invention.
2 is a flowchart illustrating in detail a process of performing a prediction step in a method for predicting a road speed according to an embodiment of the present invention.
3 is a flowchart illustrating in detail a process of performing a learning step in a method for predicting a road speed according to an embodiment of the present invention.
4 shows the LSTM model training procedure of the proposed method.
5 is a graph illustrating an actual road speed and a primary predicted speed according to time.
6 is a graph showing the results of calculating the average speed of the target road by day and hour for about three months from May 20 to August 25, 2019.
7 is a graph showing the amount of change in the past speed for each day of the week at work time.
8 is a graph showing the error rate statistics of the prediction speed according to the amount of change in the prediction speed analyzed using past data.
9 shows an algorithm for applying a weighted reduction section according to an embodiment of the present invention.
10 shows the relationship between the predicted speed change amount and the actual speed.
11 shows an algorithm for applying a weight to a recovery interval according to an embodiment of the present invention.

본 발명은 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시예들을 도면에 예시하고 상세하게 설명하고자 한다. 그러나, 이는 본 발명을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다.Since the present invention can have various changes and can have various embodiments, specific embodiments are illustrated in the drawings and described in detail. However, this is not intended to limit the present invention to specific embodiments, and it should be understood to include all modifications, equivalents and substitutes included in the spirit and scope of the present invention.

본 출원에서 사용한 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 출원에서, "포함하다" 또는 "가지다" 등의 용어는 명세서 상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The terms used in the present application are only used to describe specific embodiments, and are not intended to limit the present invention. The singular expression includes the plural expression unless the context clearly dictates otherwise. In the present application, terms such as “comprise” or “have” are intended to designate that a feature, number, step, operation, component, part, or combination thereof described in the specification exists, but one or more other features It should be understood that this does not preclude the existence or addition of numbers, steps, operations, components, parts, or combinations thereof.

다르게 정의되지 않는 한, 기술적이거나 과학적인 용어를 포함해서 여기서 사용되는 모든 용어들은 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미를 갖고 있다. 일반적으로 사용되는 사전에 정의되어 있는 것과 같은 용어들은 관련 기술의 문맥 상 갖는 의미와 일치하는 의미를 갖는 것으로 해석되어야 하며, 본 출원에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다.Unless defined otherwise, all terms used herein, including technical and scientific terms, have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. Terms such as those defined in a commonly used dictionary should be interpreted as having a meaning consistent with the meaning in the context of the related art, and should not be interpreted in an ideal or excessively formal meaning unless explicitly defined in the present application. does not

또한, 첨부 도면을 참조하여 설명함에 있어, 도면 부호에 관계없이 동일한 구성 요소는 동일한 참조 부호를 부여하고 이에 대한 중복되는 설명은 생략하기로 한다. 본 발명을 설명함에 있어서 관련된 공지 기술에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우 그 상세한 설명을 생략한다.In addition, in the description with reference to the accompanying drawings, the same components are given the same reference numerals regardless of the reference numerals, and the overlapping description thereof will be omitted. In describing the present invention, if it is determined that a detailed description of a related known technology may unnecessarily obscure the gist of the present invention, the detailed description thereof will be omitted.

본 발명의 명세서에서 어느 시점에서 특정 도로를 통행하는 차량 흐름의 속도를 도로 속도라 명명하기로 한다. In the specification of the present invention, a speed of a vehicle flow passing a specific road at a certain point in time will be referred to as a road speed.

본 발명의 도로 환경 데이터 분석을 통한 기계 학습 기반의 도로 속도 예측 방법을 수행하는 주체는 도로 속도 예측 방법을 수행하는 제반 컴퓨터 장치라고 할 수 있으며, 또는 도로 속도 예측 방법을 수행하는 시스템 또는 장치를 전반적으로 제어하는 제어부나 프로세서(processor)일 수 있다. 즉, 본 발명의 도로 속도 예측 방법은 일종의 소프트웨어인 알고리즘으로 구성될 수 있으며, 소프트웨어 또는 알고리즘은 도로 속도 예측 방법을 수행하는 시스템, 장치의 제어부 또는 프로세서(processor)에서 실행될 수 있다.The subject performing the machine learning-based road speed prediction method through road environment data analysis of the present invention can be said to be an overall computer device that performs the road speed prediction method, or a system or device for performing the road speed prediction method as a whole It may be a controller or a processor that controls the . That is, the road speed prediction method of the present invention may be configured as an algorithm, which is a kind of software, and the software or algorithm may be executed in a system or a controller of a device or a processor for performing the road speed prediction method.

본 발명에서는 도로 환경 데이터 분석을 통한 기계 학습 기반의 도로 속도 예측 방법을 제안한다. 본 발명은 기존 도로 속도 예측방법을 활용하여 연결된 도로의 영향을 반영하고, 날씨 요소를 추가하여 날씨가 도로 속도에 미치는 영향을 반영한다. 그리고, 도로의 일반적인 흐름을 깨는 교통사고나 도로 공사와 같은 돌발 상황이 발생하는 경우 예측 오차가 크게 증가하므로, 급격하게 도로의 흐름이 변화하는 구간에 제안하는 이벤트 가중치를 추가적으로 반영하여 예측 오차를 줄이고자 한다. 그리고, 예를 들어 30분 후의 도로 속도를 예측하는 경우, 예측 시점의 데이터가 가장 큰 영향을 미치면서 도로의 일반적인 흐름을 예측하지 못하는 경우가 있다. 이런 문제를 보완하기 위해 과거 평균 도로 속도를 분석하여 도로의 일반적인 흐름을 반영할 수 있는 예측 방법을 제안한다.The present invention proposes a method for predicting road speed based on machine learning through road environment data analysis. The present invention reflects the influence of the connected road by utilizing the existing road speed prediction method, and reflects the influence of the weather on the road speed by adding a weather factor. In addition, when an unexpected situation such as a traffic accident or road construction that breaks the general flow of the road occurs, the prediction error greatly increases. sleep And, for example, when predicting the road speed after 30 minutes, the data at the time of prediction has the greatest influence and may not predict the general flow of the road. To compensate for this problem, we propose a prediction method that can reflect the general flow of the road by analyzing the average road speed in the past.

본 발명에서는 도로 환경 데이터를 고려한 도로 속도 예측 방법을 제안한다. The present invention proposes a road speed prediction method in consideration of road environment data.

본 발명에서 제안하는 방법은 예측하고자 하는 도로, 즉 타겟 도로의 과거 속도 데이터와 과거 평균 속도 데이터를 이용하며, 도로 환경 데이터로 연결된 도로, 즉 이웃 도로의 과거 속도 데이터와 날씨 데이터를 고려한다. 또한, 사고나 공사와 같이 도로 속도에 급격한 변화 흐름을 가져오는 돌발 상황을 고려하기 위해 속도 변화량을 분석하여 이에 대한 영향을 반영한다. 따라서 날씨나 사고 공사 등으로 돌발 상황이 발생한 경우, 도로 속도 예측 정확도가 떨어지는 기존의 문제를 보완할 수 있으며, 과거 평균 속도 데이터를 이용하여 특정 도로의 일반적인 흐름을 반영할 수 있다.The method proposed in the present invention uses past speed data and past average speed data of a road to be predicted, that is, a target road, and takes into account historical speed data and weather data of a road connected by road environment data, that is, a neighboring road. In addition, the amount of speed change is analyzed to take into account the sudden change in road speed, such as an accident or construction, and the effect is reflected. Therefore, when an unexpected situation occurs due to weather or accidental construction, the existing problem of poor road speed prediction accuracy can be supplemented, and the general flow of a specific road can be reflected using historical average speed data.

도 1은 본 발명에서 제안하는 도로 속도 예측 방법의 전체 구조를 나타낸 도면이다. 1 is a view showing the overall structure of the road speed prediction method proposed in the present invention.

도 1에서 본 발명에서 제안하는 도로 속도 예측 방법의 처리 과정은 온라인(online) 처리 과정인 예측 단계(S100)와 오프라인(offline) 처리 과정인 학습 단계(S200)로 구분할 수 있다.The processing process of the road speed prediction method proposed by the present invention in FIG. 1 can be divided into a prediction step S100 which is an online processing process and a learning step S200 which is an offline processing process.

먼저, 예측 단계(S100)에서는 실시간으로 수집되는 데이터에 대해 정규화 과정을 거쳐 예측 데이터 집합을 생성한다. First, in the prediction step S100, a prediction data set is generated through a normalization process for data collected in real time.

그리고, 생성한 데이터 집합을 학습된 LSTM(Long Short-Term Memory) 학습 모델의 입력 데이터로 사용하여 학습 모델을 통해 1차적으로 속도를 예측한다. And, using the generated data set as input data of the learned LSTM (Long Short-Term Memory) learning model, the speed is primarily predicted through the learning model.

예측 데이터 집합은 현재 시점까지의 타겟 도로의 속도와, 이웃 도로의 속도와, 예보된 30분 후의 강수 데이터로 구성된다. 따라서 날씨와 이웃 도로의 영향을 반영하여 1차 예측 속도를 예측한다. 하지만 1차 예측 속도 예측에는 돌발 상황에 대한 영향이 고려되지 않았으며, 가장 최신의 데이터가 예측에 큰 영향을 미치면서 도로의 일반적인 흐름을 예측하지 못하는 경우가 발생한다. The prediction data set consists of the speed of the target road up to the present time, the speed of the neighboring road, and the predicted precipitation data after 30 minutes. Therefore, the primary prediction speed is predicted by reflecting the influence of weather and neighboring roads. However, the impact of sudden events is not taken into account in the primary prediction speed prediction, and the most recent data has a great influence on the prediction, and in some cases it is not possible to predict the general flow of the road.

따라서 돌발 상황에 의해 정확도가 떨어지는 문제를 보완하기 위해 1차 예측 속도에 이벤트에 의해 도로의 급변하는 흐름을 반영하기 위한 이벤트 가중치를 반영하며, 도로의 일반적인 흐름을 반영하기 위해 과거 평균 속도를 적용하여 1차 속도의 오류 보정을 통해 최종 속도를 예측한다. Therefore, in order to compensate for the problem of reduced accuracy due to unexpected situations, the event weight to reflect the rapidly changing flow of the road due to the event is reflected in the primary prediction speed, and the historical average speed is applied to reflect the general flow of the road. The final speed is predicted by correcting the error of the first speed.

학습 단계(S200)는 학습 데이터 집합을 LSTM 모델의 입력으로 넣어 LSTM 학습 모델을 생성한다. 학습 데이터 집합은 타겟 도로와 이웃 도로의 과거 평균 속도 데이터와 강수 데이터로 구성된다. LSTM 학습을 통해 예측 속도와 실제 속도를 비교하면서 최적의 가중치를 갖는 LSTM 학습 모델을 생성한다.In the learning step ( S200 ), the LSTM learning model is generated by putting the training data set as an input of the LSTM model. The training data set consists of historical average speed data and precipitation data of the target road and neighboring roads. Through LSTM learning, an LSTM learning model with optimal weights is generated while comparing the predicted speed with the actual speed.

도 2는 본 발명의 일 실시예에 따른 도로 속도 예측 방법에서 예측 단계를 수행하는 과정을 상세히 도시한 흐름도이다. 2 is a flowchart illustrating in detail a process of performing a prediction step in a method for predicting a road speed according to an embodiment of the present invention.

도 2를 참조하면, 본 발명의 도로 속도 예측 방법에서 예측 단계(S100)를 수행하는 과정을 상세히 설명하면 다음과 같다. Referring to FIG. 2 , the process of performing the prediction step S100 in the method for predicting the road speed of the present invention will be described in detail as follows.

먼저, 도로 속도를 예측하고자 하는 도로(이하 '타겟 도로'라 함)의 도로 환경 데이터를 실시간으로 수집한다(S110). First, road environment data of a road for which a road speed is to be predicted (hereinafter referred to as a 'target road') is collected in real time (S110).

그리고, 수집된 도로 환경 데이터를 정규화하여 도로 속도 예측에 필요한 예측 데이터 집합을 생성한다(S120, S130). 본 발명의 일 실시예에서 예측 데이터 집합은 타겟 도로의 속도 데이터와, 이웃 도로의 속도 데이터와, 날씨 데이터를 포함할 수 있다. Then, the collected road environment data is normalized to generate a prediction data set required for road speed prediction (S120, S130). In an embodiment of the present invention, the prediction data set may include speed data of a target road, speed data of a neighboring road, and weather data.

그리고, 생성된 예측 데이터 집합을 입력 데이터로 하는 신경망 학습 모델을 통해 1차 예측 속도를 예측한다(S140). Then, the first prediction speed is predicted through the neural network learning model using the generated prediction data set as input data (S140).

그리고, 타겟 도로의 일반적인 차량 흐름을 반영하기 위해, 1차 예측 속도에 타겟 도로의 과거 평균 속도를 적용한다(S150). Then, in order to reflect the general vehicle flow of the target road, the average speed of the target road is applied to the primary predicted speed (S150).

그리고, 타겟 도로에서 발생하는 이벤트에 의해 급변하는 차량 흐름을 반영하기 위해, 1차 예측 속도에 이벤트 가중치를 적용한다(S160). Then, in order to reflect the vehicle flow that changes rapidly due to an event occurring on the target road, an event weight is applied to the primary prediction speed (S160).

이벤트 가중치와 과거 평균 속도를 적용하는 오류 보정을 통해 최종 예측 속도를 예측한다(S170), The final prediction speed is predicted through error correction applying the event weight and the past average speed (S170),

본 발명의 일 실시예에서 신경망 학습 모델은 LSTM(Long Short-Term Memory) 학습 모델로 구현될 수 있다. In an embodiment of the present invention, the neural network learning model may be implemented as a Long Short-Term Memory (LSTM) learning model.

본 발명의 1차 예측 속도에 이벤트 가중치를 적용하는 단계(S160)에서, 타겟 도로의 도로 속도가 급격히 감소되는 구간인 속도 감소 구간과, 급격히 감소된 속도가 회복되는 구간인 속도 회복 구간을 정의하고, 속도 감소 구간에서 1차 예측 속도에 감소 가중치를 적용하고, 속도 회복 구간에서 1차 예측 속도에 회복 가중치를 적용할 수 있다. In the step (S160) of applying the event weight to the primary prediction speed of the present invention, a speed reduction section, which is a section in which the road speed of the target road is rapidly reduced, and a speed recovery section, which is a section in which the abruptly reduced speed is recovered, is defined. , a reduction weight may be applied to the first prediction speed in the speed reduction section, and a recovery weight may be applied to the first prediction speed in the speed recovery section.

도 3은 본 발명의 일 실시예에 따른 도로 속도 예측 방법에서 학습 단계를 수행하는 과정을 상세히 도시한 흐름도이다. 3 is a flowchart illustrating in detail a process of performing a learning step in a method for predicting a road speed according to an embodiment of the present invention.

도 3을 참조하면, 본 발명의 도로 속도 예측 방법에서 학습 단계(S120)를 수행하는 상세한 과정을 설명하면 다음과 같다. Referring to FIG. 3 , a detailed process of performing the learning step S120 in the method for predicting road speed of the present invention will be described as follows.

먼저, 수집된 도로 환경 데이터를 정규화하여, LSTM 학습 모델을 생성하기 위해 필요한 학습 데이터 집합을 생성한다(S210). First, by normalizing the collected road environment data, a training data set necessary to generate an LSTM learning model is generated ( S210 ).

그리고, 생성된 학습 데이터 집합을 입력으로 하는 LSTM 모델을 수행한다(S220). Then, an LSTM model using the generated training data set as an input is performed (S220).

그리고, LSTM 모델을 통해 최적의 가중치를 업데이트하여 LSTM 학습 모델을 생성한다(S230, S240). Then, an LSTM learning model is generated by updating the optimal weight through the LSTM model (S230, S240).

신경망 모델을 이용한 예측 방법들은 높은 정확도를 보이며, 신경망 모델을 이용한 학습 방법에는 데이터의 형태가 많은 영향을 미친다. 따라서 LSTM 모델의 입력으로 사용할 학습 데이터 집합을 정규화한다. 예를 들어, 5분 단위로 집계된 타겟 도로와 이웃 도로의 속도 데이터와, 해당 지역의 강수량 데이터를 정규화한다. 이 단계의 목적은 원본 데이터를 신경망 모델 학습에 적합하도록 만드는 것이다. Prediction methods using a neural network model show high accuracy, and the shape of the data has a lot of influence on the learning method using a neural network model. Therefore, we normalize the training data set to be used as input for the LSTM model. For example, the speed data of the target road and neighboring roads, which are aggregated in units of 5 minutes, and the precipitation data of the corresponding area are normalized. The purpose of this step is to make the raw data suitable for training the neural network model.

학습 데이터 집합에는 때때로 누락 데이터가 있을 수 있다. 누락 데이터는 예측 모델의 성능을 크게 떨어뜨릴 수 있는 요소이며, 누락 데이터를 제거하거나 채우는 방식으로 처리할 수 있다. 수집한 속도 데이터에서 누락 데이터는 0.0으로 표시되어 있었다. 예를 들어, 도로 속도 데이터 특성상, 시간별 도로의 속도는 무시할 수 없는 요소이다. Python pandas 라이브러리에서 제공하는 fillna()함수를 이용하여 이웃하고 있는 값의 평균값으로 누락 데이터를 채울 수 있다. 연속으로 데이터가 누락된 경우에는 과거 같은 요일, 시 속도의 평균값으로 누락 데이터를 채울 수 있다.The training data set can sometimes have missing data. Missing data is a factor that can significantly degrade the performance of a predictive model, and can be addressed by removing or filling in missing data. In the collected speed data, missing data was marked as 0.0. For example, due to the characteristics of road speed data, the hourly road speed is a factor that cannot be ignored. You can fill missing data with the average value of neighboring values using the fillna() function provided by the Python pandas library. If data is continuously omitted, the missing data can be filled with the average value of the same day and hour rate in the past.

신경망 모델에 입력되는 데이터는 각 데이터의 특성별로 독립적으로 정규화 해야 한다. 따라서 속도 데이터를 다음 식 1과 같이 정규화하고, 날씨 데이터를 다음 식 2와 같이 정규화 한다. The data input to the neural network model should be independently normalized by the characteristics of each data. Therefore, the speed data is normalized as shown in Equation 1, and the weather data is normalized as shown in Equation 2 below.

Figure 112020028957557-pat00016
(1)
Figure 112020028957557-pat00016
(One)

Figure 112020028957557-pat00017
(2)
Figure 112020028957557-pat00017
(2)

신경망 모델을 통해 쉽게 학습하기 위해서는 일반적으로 0~1사이의 값으로 데이터를 정규화하며, 이는 모든 특성이 비슷한 범위를 가지도록 균일해야 한다는 것을 의미한다. In order to easily learn from a neural network model, we normally normalize the data to values between 0 and 1, which means that all features should be uniform to have a similar range.

식 1에서

Figure 112020028957557-pat00018
은 도로 R에서 수집한 전체 속도 데이터를 의미하고,
Figure 112020028957557-pat00019
는 도로 R에서 수집한 t시간의 속도를 의미한다. 각 도로의 일반적인 특성을 반영하기 위해 각 도로의 속도 데이터 중에서 가장 큰 값으로 해당 도로에서 수집한 속도 데이터를 나누어서 0에서 1사이의 값으로 모두 비슷한 범위를 가지도록 정규화 한다. 예를 들어,
Figure 112020028957557-pat00020
이 110,
Figure 112020028957557-pat00021
이 89라고 가정했을 때,
Figure 112020028957557-pat00022
을 정규화하면 0.81이 된다. in Equation 1
Figure 112020028957557-pat00018
is the total speed data collected from road R,
Figure 112020028957557-pat00019
is the speed at time t collected from road R. In order to reflect the general characteristics of each road, the speed data collected from the road is divided by the largest value among the speed data of each road, and a value between 0 and 1 is normalized to have a similar range. For example,
Figure 112020028957557-pat00020
this 110,
Figure 112020028957557-pat00021
Assuming this is 89,
Figure 112020028957557-pat00022
is normalized to 0.81.

식 2는 날씨 데이터 정규화 식을 나타낸다. 여기서,

Figure 112020028957557-pat00023
는 타겟 도로가 속한 지역의 t시간 동안의 강우량을 의미한다. 날씨 데이터 정규화도 속도 데이터 정규화와 마찬가지로 수집한 날씨 데이터의 최댓값으로 나누어서 0에서 1사이 값으로 정규화 한다.Equation 2 shows the weather data normalization expression. here,
Figure 112020028957557-pat00023
denotes the amount of rainfall during time t in the area to which the target road belongs. Weather data normalization is also normalized to a value between 0 and 1 by dividing by the maximum value of the collected weather data like speed data normalization.

도로 속도 예측을 위해서는 예측 모델을 생성하기 위한 학습 데이터 집합과 실제 예측을 위해 사용할 예측 데이터 집합이 필요하다. For road speed prediction, we need a training data set to create a predictive model and a prediction data set to use for actual prediction.

Figure 112020028957557-pat00024
Figure 112020028957557-pat00024

표 1은 데이터 전처리 과정을 수행한 데이터 예측 데이터 집합의 예시를 나타낸다. 여기서

Figure 112020028957557-pat00025
는 i시점의 타겟 도로의 데이터이고,
Figure 112020028957557-pat00026
는 i시점의 이웃 도로의 데이터를 의미하며,
Figure 112020028957557-pat00027
(이하, '
Figure 112020028957557-pat00028
'라 함)는 i+6시점의 예상 강수량을 의미하고, 모든 데이터는 5분 단위로 기록되어 있다. 예측을 하는 경우에는 실제 30분 후의 도로 속도와 강수량을 알 수 없으므로 i시점의 도로 속도 데이터와 i+6시점의 예상 강수량을 이용하여 표 1과 같이 예측 데이터 집합을 구성한다.Table 1 shows an example of a data prediction data set that has been subjected to data preprocessing. here
Figure 112020028957557-pat00025
is the data of the target road at time i,
Figure 112020028957557-pat00026
is the data of the neighboring road at time i,
Figure 112020028957557-pat00027
(Below, '
Figure 112020028957557-pat00028
') means the expected precipitation at i+6 time, and all data are recorded in units of 5 minutes. In the case of prediction, since the actual road speed and precipitation after 30 minutes cannot be known, the predicted data set is constructed as shown in Table 1 by using the road speed data at time i and the expected precipitation at time i+6.

Figure 112020028957557-pat00029
Figure 112020028957557-pat00029

표 2는 학습 데이터 집합 예시를 나타낸다. 학습 데이터 집합은 예측한 도로 속도와 실제 30분 후의 도로 속도를 비교하는 과정을 반복하여 예측 모델을 생성하는 데 이용한다. 학습 시에는 과거 데이터를 이용하기 때문에 i+6시점의 실제 속도와 강수량을 얻을 수 있다. 따라서 i시점과 i+6시점의 실제 타겟 도로의 속도 데이터와 i+6시점의 실제 강수량인

Figure 112020028957557-pat00030
를 표 2와 같이 같은 열로 구성한다. Table 2 shows an example of a training data set. The training data set is used to generate a predictive model by repeating the process of comparing the predicted road speed with the actual road speed after 30 minutes. Since the past data is used for learning, the actual speed and precipitation at i+6 time can be obtained. Therefore, the speed data of the actual target road at time i and i+6 and the actual precipitation at i+6
Figure 112020028957557-pat00030
is organized in the same column as in Table 2.

본 발명에서는 이웃 도로와 날씨의 영향을 반영하여 도로 속도를 예측하기 위해 LSTM 학습 모델을 생성한다. 본 발명에서 학습 단계(S200)의 오프라인 처리에서 LSTM 학습 모델을 생성하는 과정을 수행한다. In the present invention, an LSTM learning model is generated to predict the road speed by reflecting the influence of neighboring roads and weather. In the present invention, the process of generating the LSTM learning model is performed in the offline processing of the learning step (S200).

도 4는 제안하는 방법의 LSTM 모델 학습 절차를 나타낸다. 4 shows the LSTM model training procedure of the proposed method.

도 4를 참조하면 LSTM 모델은 LSTM(410), 드롭아웃(Dropout)(420), 덴스(Dense)(430) 레이어(layer)로 구성된다. 표 2 형식으로 구성한 학습 데이터 집합을 LSTM 레이어의 입력으로 넣는다.

Figure 112020028957557-pat00031
는 현재 타겟 도로의 데이터이고,
Figure 112020028957557-pat00032
는 현재 이웃 도로의 데이터를 의미하며,
Figure 112020028957557-pat00033
는 타겟 도로가 위치한 지역에서 수집한 t+6 시점의 강수량 데이터로, 이 데이터들을 사용하여 30분 전의 타겟도로와 이웃 도로, 그리고 예측 시점의 강수량이 타겟 도로의 속도에 미치는 영향을 반영할 수 있다.Referring to FIG. 4 , the LSTM model includes an LSTM 410 , a Dropout 420 , and a Dense 430 layer. The training data set constructed in the format of Table 2 is put as an input of the LSTM layer.
Figure 112020028957557-pat00031
is the data of the current target road,
Figure 112020028957557-pat00032
means the data of the current neighboring road,
Figure 112020028957557-pat00033
is the precipitation data at time t+6 collected in the area where the target road is located. Using these data, it is possible to reflect the effect of precipitation on the speed of the target road 30 minutes ago, the target road, neighboring roads, and the predicted time. .

학습 데이터 집합의 30분 후의 실제 도로 속도(

Figure 112020028957557-pat00034
)는 손실 값 계산 단계에서 사용한다. 과적합을 방지하기 위해서 드롭아웃(Dropout) 레이어(420)를 더했으며, 0.3의 비율을 적용한다. Actual road speed after 30 minutes in the training dataset (
Figure 112020028957557-pat00034
) is used in the loss value calculation step. A dropout layer 420 is added to prevent overfitting, and a ratio of 0.3 is applied.

다음으로, 모든 입력 뉴런과 출력 뉴런을 연결하는 덴스(Dense) 레이어(430)을 통해서 하나의 결과를 출력하도록 설정한다.

Figure 112020028957557-pat00035
는 예측한 타겟 도로의 속도를 의미한다. Next, it is set to output one result through a density layer 430 that connects all input neurons and output neurons.
Figure 112020028957557-pat00035
is the predicted target road speed.

Figure 112020028957557-pat00036
(3)
Figure 112020028957557-pat00036
(3)

그리고,손실 함수 MSE(Mean squared error)를 이용하여 식 3과 같이

Figure 112020028957557-pat00037
Figure 112020028957557-pat00038
의 오차를 계산한다. 이때, 손실 값이 작을수록 높은 정확도로 예측했음을 의미한다. And, using the loss function MSE (Mean squared error), as in Equation 3
Figure 112020028957557-pat00037
Wow
Figure 112020028957557-pat00038
Calculate the error of In this case, the smaller the loss value, the higher the prediction accuracy.

본 발명의 일 실시예에서 학습 속도를 빠르고 안정적이게 할 수 있도록 최적화 함수로 adam을 사용하며, 이 값을 가장 작게 만들 수 있는 최적의 가중치를 구하기 위해 역전파 과정을 수행할 수 있다. 이 과정을 반복하여 최적의 가중치를 갖는 예측 모델을 생성한다.In an embodiment of the present invention, adam is used as an optimization function to make the learning rate fast and stable, and a backpropagation process may be performed to obtain an optimal weight that can make this value the smallest. This process is repeated to generate a predictive model with optimal weights.

본 발명에서 학습 단계(S200)의 오프라인 처리에서 타겟 도로 속도에 영향을 미치는 도로 환경 데이터인 이웃 도로들과 강수량의 영향을 반영하여 최적의 가중치를 갖는 모델을 생성한다. In the present invention, in the offline processing of the learning step (S200), a model having an optimal weight is generated by reflecting the influence of neighboring roads and precipitation, which are road environment data affecting the target road speed.

그리고, 생성된 LSTM 학습 모델을 이용하여 30분 후의 도로 속도를 예측한다. 이 단계에서 예측한 속도는 1차 예측 속도라고 정의한다. 1차 예측 속도를 예측하기 위해 타겟 도로와 이웃 도로들의 속도 데이터, 그리고 30분 후의 예상 강수량 데이터로 구성된 예측 데이터 집합을 이용한다. 예측 데이터 집합을 학습된 LSTM 모델의 입력 데이터로 넣어 최적의 가중치를 이용하여 30분 후의 도로 속도를 예측한다.Then, the road speed after 30 minutes is predicted using the generated LSTM learning model. The speed predicted in this step is defined as the first-order prediction speed. To predict the first prediction speed, a prediction data set consisting of speed data of the target road and neighboring roads, and predicted precipitation data after 30 minutes is used. By putting the prediction data set as input data of the trained LSTM model, the road speed after 30 minutes is predicted using the optimal weight.

도 5는 시간에 따른 실제 도로의 속도와 1차 예측 속도를 도시한 그래프이다. 5 is a graph illustrating an actual road speed and a primary predicted speed according to time.

예를 들어, 2019년 9월 9일은 비가 오지 않은 날로, 강수의 영향을 받지 않았다. 이 경우, 기존 방법으로 가까운 미래의 도로 속도를 예측한 경우에는 높은 정확도로 예측가능했지만 먼 미래의 도로 속도를 예측하는 경우 오차가 크게 나타난다. For example, September 9, 2019 was a non-rain day and was not affected by precipitation. In this case, when predicting the road speed in the near future using the existing method, it can be predicted with high accuracy, but when predicting the road speed in the distant future, the error is large.

도 5를 보면, 30분 전의 속도 패턴을 유사하게 따라가고 있으며, 출근 시간대에 급변하는 도로 속도의 변화와 예기치 못한 사건으로 도로 속도가 급변하는 흐름을 완만한 곡선으로 반영함으로써, 실제 속도와 예측 속도의 차이가 커지는 것을 볼 수 있다. 이처럼, 1차 예측 속도 예측 단계에서는 이웃 도로와 강수의 영향을 고려했으나 추가적으로 도로 상황을 급변하게 하는 요소들을 고려할 필요가 있다. 따라서, 본 발명에서는 과거 평균 도로 속도와 도로 속도 변화량을 분석하여 1차 예측 속도를 보정하여 최종 예측 속도의 정확도를 높인다.Referring to Figure 5, the speed pattern 30 minutes ago is similarly followed, and by reflecting the sudden change in road speed during work hours and the sudden change in road speed due to unexpected events in a smooth curve, the actual speed and the predicted speed It can be seen that the difference between As such, although the influence of neighboring roads and precipitation was considered in the first prediction speed prediction step, it is necessary to additionally consider factors that cause rapid changes in road conditions. Therefore, in the present invention, the accuracy of the final prediction speed is increased by analyzing the past average road speed and the amount of change in road speed and correcting the first prediction speed.

전술한 바와 같이, LSTM 학습 모델만으로 예측한 1차 예측 속도는 바로 이전 시점의 속도 데이터가 가장 큰 영향을 미치므로, 실제 속도를 뒤늦게 따라가는 흐름을 보인다. 예를 들어, 출근 시간에 평균적으로 속도가 감소하는 구간과 급격한 변화가 일어나는 구간을 뒤늦게 완만한 곡선으로 예측함을써, 예측 오차가 커진다. As described above, the first prediction speed predicted only by the LSTM learning model has the greatest influence on the speed data of the immediately preceding point, so it follows the actual speed later. For example, the prediction error increases by predicting the section in which the average speed decreases and the section in which a sudden change occurs during the commute time with a smooth curve belatedly.

따라서 본 발명에서는 1차 예측 속도를 보정하여 예측 정확도를 높이기 위해 두 가지 예측 속도 보정 모듈을 수행한다. Therefore, in the present invention, two prediction speed correction modules are performed to improve prediction accuracy by correcting the primary prediction speed.

먼저, 과거 평균 속도 데이터를 이용하여 도로의 평균적인 흐름을 반영하고자 한다. 그리고 교통사고나 도로 공사와 같은 이벤트 구간의 속도 변화량을 분석을 통해 이벤트 가중치를 적용하여 도로의 일반적이지 않은 흐름을 반영한다. 이러한 두 가지 예측 속도 보정 모듈에 관한 세부 기능을 자세히 설명한다.First, it is intended to reflect the average flow of the road using historical average speed data. In addition, event weights are applied through analysis of the speed change in event sections such as traffic accidents and road construction to reflect the unusual flow of the road. The detailed functions of these two prediction speed correction modules are described in detail.

도로의 속도는 요일, 시간에 따라 유사한 흐름을 보인다. The speed of the road shows a similar flow according to the day of the week and time.

도 6은 2019년 5월 20일부터 8월 25일까지 약 3개월간의 요일, 시간별 타겟 도로의 평균 속도로 산출한 결과를 나타낸 그래프이다. 6 is a graph showing the results of calculating the average speed of the target road by day and hour for about three months from May 20 to August 25, 2019.

도 6에서 보는 바와 같이, 녹색 꺾은선은 평일 도로 속도의 흐름을 의미하고, 붉은색 꺾은선은 주말 도로 속도의 흐름을 의미한다. 평일은 출근 시간 도로 정체의 영향을 받아서 6시부터 9시 사이 급격한 속도 감속으로 정체 구간이 발생하며, 퇴근 시간은 대체적으로 낮은 속도를 보인다. 주말은 출·퇴근의 영향을 받지 않아서 평일에 발생하는 정체구간이 발생하지 않으며, 평일보다 원활한 도로의 흐름을 보인다. 이러한 급격한 흐름의 변화는 기존 방법으로 예측이 어렵다. 따라서 평일 속도를 예측하는 경우, 평일에 일반적으로 발생하는 출근 시간 정체 구간의 영향을 1차 예측 속도에 반영한다. As shown in FIG. 6 , the green broken line means the flow of the road speed on weekdays, and the red broken line means the flow of the road speed on the weekend. On weekdays, under the influence of road congestion during rush hour, congestion occurs due to rapid speed deceleration between 6 and 9 o'clock, and the departure time generally shows a low speed. Weekends are not affected by commuting to and from work, so there is no congestion section that occurs on weekdays, and the road flow is smoother than weekdays. It is difficult to predict such a sudden change in the flow with existing methods. Therefore, when predicting the weekday speed, the effect of the commute time stagnation section, which generally occurs on weekdays, is reflected in the primary prediction speed.

먼저, 과거 평균 속도 변화량에 따라서 평균적으로 속도가 감소하는 구간을 정의한다. 다음으로, 속도 감소 구간의 과거 평균 속도와 1차 예측 속도를 비교하여 조건에 따라 과거 평균 속도를 적용한다.First, a section in which the average speed decreases according to the past average speed change amount is defined. Next, the historical average speed of the speed reduction section is compared with the primary prediction speed, and the historical average speed is applied according to the conditions.

먼저, 과거에 평균적으로 속도가 감소하는 구간은 시간별 과거 평균 속도 변화량 통계 값을 이용하여 정의한다. 과거 속도 변화량은 식 4로 계산한다. First, the section in which the average speed in the past decreases is defined using the historical average speed change statistical value for each hour. The past speed change is calculated by Equation 4.

Figure 112020028957557-pat00039
(4)
Figure 112020028957557-pat00039
(4)

여기서,

Figure 112020028957557-pat00040
는 특정 요일의 과거 평균 속도 변화량을 의미하며,
Figure 112020028957557-pat00041
는 특정 요일, t시간으로부터 15분 전의 과거 평균 속도를 의미하고,
Figure 112020028957557-pat00042
는 특정 요일, t시간의 속도를 의미한다. 따라서, 식 4에서
Figure 112020028957557-pat00043
가 0보다 크다면 15분 동안 속도가 감소했음을 의미하고, 반대로 0보다 작다면 15분 동안 속도가 상승했음을 의미한다. here,
Figure 112020028957557-pat00040
means the historical average speed change on a specific day,
Figure 112020028957557-pat00041
is the historical average speed 15 minutes before a specific day of the week, time t,
Figure 112020028957557-pat00042
is the speed of a specific day of the week, time t. Therefore, in Equation 4
Figure 112020028957557-pat00043
If is greater than 0, it means that the speed decreased for 15 minutes, and conversely, if it is less than 0, it means that the speed increased for 15 minutes.

도 7은 출근 시간대의 요일별 과거 속도 변화량을 나타낸 그래프이다. 7 is a graph showing the amount of change in the past speed for each day of the week at work time.

도 7을 참조하면, 평균적으로 오전 5시 40분부터 모든 요일의 평균 속도 변화량이 양의 방향으로 증가하는 것을 볼 수 있다. 그리고 6시 30분부터는 속도 변화량이 음의 방향으로 감소하므로 평일 5시 40분부터 6시 25분까지를 과거 평균 속도를 적용하는 구간으로 정의한다.Referring to FIG. 7 , it can be seen that the average speed change amount of all days of the week increases in a positive direction from 5:40 am on average. And since the speed change decreases in the negative direction from 6:30, the period from 5:40 to 6:25 on weekdays is defined as the section where the past average speed is applied.

그리고, 정의한 구간에 과거 평균 속도 적용 여부를 판단해야 한다. And, it is necessary to determine whether the past average speed is applied to the defined section.

Figure 112020028957557-pat00044
(5)
Figure 112020028957557-pat00044
(5)

식 5는 과거 평균 속도를 적용하는 조건을 나타낸다. 여기서,

Figure 112020028957557-pat00045
는 특정 요일, 특정 시간의 1차 예측 속도를 의미하고,
Figure 112020028957557-pat00046
는 타겟 도로의 특정 요일, 특정 시간의 과거 평균 속도를 의미한다.
Figure 112020028957557-pat00047
는 과거 평균 속도 적용 과정을 수행한 예측 속도이다. 과거 평균적으로 속도가 감소하는 시간대에 예측한
Figure 112020028957557-pat00048
Figure 112020028957557-pat00049
보다 크면
Figure 112020028957557-pat00050
로 1차 예측 속도를 대체한다. 그렇지 않은 경우, 그 날은 일반적이지 않은 흐름을 보인 것으로 판단하여 1차 예측 속도를 그대로 사용한다.Equation 5 shows the condition for applying the historical average speed. here,
Figure 112020028957557-pat00045
means the primary prediction rate on a specific day and at a specific time,
Figure 112020028957557-pat00046
Means the average speed of the past on a specific day of the week and at a specific time on the target road.
Figure 112020028957557-pat00047
is the predicted speed at which the historical average speed was applied. forecasted during times of decreasing average speed in the past
Figure 112020028957557-pat00048
go
Figure 112020028957557-pat00049
greater than
Figure 112020028957557-pat00050
to replace the first-order prediction speed. Otherwise, it is judged that the day showed an unusual flow, and the first prediction rate is used as it is.

본 발명에서 과거 평균 속도를 적용하여 1차 예측 속도를 보정함으로써, 타겟 도로의 일반적인 흐름을 반영하여 정확도를 높일 수 있다. 하지만 사고나 공사와 같은 이벤트가 발생한 경우, 도로 속도가 급격히 감소하는 일반적이지 않은 흐름을 나타낼 수 있다. 이를 반영하기 위해 본 발명에서는 실시간으로 기록되는 사고와 공사 데이터를 이용한다. 사고 데이터를 사용하기 위해서는 실시간으로 기록되는 사고 정보를 읽어서 사고 발생 위치와 사고의 유형을 반영해야 한다. 하지만 사고가 발생하는 시점과 사고가 기록되는 시점이 다르며, 대부분의 사고 데이터가 정확하지 않다. 따라서 본 발명에서는 속도 급감 구간에 이벤트 가중치를 적용하여 단순한 계산만으로 일반적이지 않은 도로의 흐름을 반영할 수 있는 방법을 제안한다.In the present invention, by correcting the primary prediction speed by applying the historical average speed, it is possible to increase the accuracy by reflecting the general flow of the target road. However, in the event of an event such as an accident or construction, it may represent an unusual flow in which the road speed rapidly decreases. To reflect this, the present invention uses accident and construction data recorded in real time. In order to use accident data, it is necessary to read accident information recorded in real time to reflect the location of the accident and the type of accident. However, when an accident occurs and when an accident is recorded are different, and most accident data is not accurate. Therefore, the present invention proposes a method that can reflect an unusual road flow through a simple calculation by applying an event weight to a section of sudden speed reduction.

도로에서 이벤트가 발생한 경우, 도로의 속도는 급격히 감소했다가 회복하는 패턴을 보인다. 그래서 속도 감소 구간과 속도 회복 구간에 각각 감소 가중치와 회복 가중치를 적용하여 1차 예측 속도에서 발생했던 오차를 줄인다. When an event occurs on the road, the speed of the road rapidly decreases and then recovers. Therefore, by applying a reduction weight and a recovery weight to the speed reduction section and the speed recovery section, respectively, the error occurring in the first prediction speed is reduced.

먼저, 속도 변화량과 오차율의 관계 분석을 통해 감소 구간과 회복 구간을 정의한다. 감소 구간을 판단하는 기준을 정의하기 위해서 실제 속도 변화량과 예측 속도 변화량을 활용하며, 이벤트 가중치 적용 시에는 예측 속도 변화량과 과거 실제 속도 변화량을 이용한다. 예측 속도의 변화량과 과거 실제 속도 변화량, 그리고 실제 속도의 변화량은 다음 식 6, 7, 8과 같이 각각 계산한다. First, a reduction section and a recovery section are defined by analyzing the relationship between the speed change amount and the error rate. The actual speed change and the predicted speed change are used to define the criteria for judging the reduction section, and when the event weight is applied, the predicted speed change and the past actual speed change are used. The amount of change in the predicted speed, the amount of change in the past actual speed, and the amount of change in the actual speed are calculated as shown in Equations 6, 7, and 8, respectively.

Figure 112020028957557-pat00051
(6)
Figure 112020028957557-pat00051
(6)

Figure 112020028957557-pat00052
(7)
Figure 112020028957557-pat00052
(7)

Figure 112020028957557-pat00053
(8)
Figure 112020028957557-pat00053
(8)

식 6에서 타겟 도로의 1차 예측 속도 변화량인

Figure 112020028957557-pat00054
는 t시점을 현재 시점으로 봤을 때, 15분 이전의 예측 속도와의 차를 의미하며, t의 단위는 5분으로 정의한다. In Equation 6, the first predicted speed change of the target road is
Figure 112020028957557-pat00054
is the difference from the predicted speed 15 minutes before when the time t is viewed as the current time, and the unit of t is defined as 5 minutes.

식 7에서 t시점에서 타겟 도로의 속도를 예측하고자 할 때, 얻을 수 있는 실제 속도는 30분 전의 데이터이므로 45분전의 실제 속도와의 차를 계산한다. 이는 식 7과 같이 계산한다. In Equation 7, when trying to predict the speed of the target road at time t, the actual speed that can be obtained is data from 30 minutes ago, so the difference from the actual speed 45 minutes ago is calculated. It is calculated as in Equation 7.

마지막으로 식 8에서 실제 속도 변화량인

Figure 112020028957557-pat00055
은 t시점으로부터 15분 이전의 실제 속도와의 차를 의미한다.Finally, in Equation 8, the actual velocity change is
Figure 112020028957557-pat00055
is the difference from the actual speed 15 minutes before from time t.

본 발명에서 속도 변화량에 따른 예측 속도의 오차율 통계 값을 이용하여 속도 감소 구간의 기준 값을 정의한다. In the present invention, the reference value of the speed reduction section is defined using the statistical value of the error rate of the predicted speed according to the speed change amount.

Figure 112020028957557-pat00056
(9)
Figure 112020028957557-pat00056
(9)

예측 속도의 오차율은 식 9와 같이 계산하며, 오차율이 1에 가까울수록 정확도가 높은 것을 의미한다. The error rate of the prediction speed is calculated as in Equation 9, and the closer the error rate is to 1, the higher the accuracy.

식 9에서

Figure 112020028957557-pat00057
는 t시간, 타겟 도로의 예측 속도 오차율을 의미한다. 식 9에서 오차율이 1 이상이면 실제 속도보다 낮게 예측했음을 의미하며, 1 이하이면 실제 속도보다 높게 예측했음을 의미한다.in Equation 9
Figure 112020028957557-pat00057
is the time t, the prediction speed error rate of the target road. In Equation 9, if the error rate is greater than 1, it means that the prediction was lower than the actual speed, and if it is less than 1, it means that the prediction was higher than the actual speed.

본 발명에서 속도 감소 구간과 속도 회복 구간을 판단하기 위해 과거 이벤트 발생 시 도로의 속도 변화량이 예측 오차율에 미친 영향을 분석하였다. 먼저, 1차 예측 속도의 변화량으로 속도 감소 추세를 알 수 있다. 하지만 예측 속도는 뒤늦게 도로 속도의 흐름을 따라가며, 실제 속도보다 완만한 흐름을 보이므로 정확한 감소 추세를 알 수는 없다. 따라서, 본 발명에서는 과거 실제 속도 변화량을 추가적으로 이용하여 속도 급감 구간을 판단한다. In the present invention, in order to determine the speed reduction section and the speed recovery section, the effect of the speed change amount of the road when a past event occurred on the prediction error rate was analyzed. First, the speed decrease trend can be seen by the amount of change in the primary prediction speed. However, since the predicted speed follows the flow of road speed later and shows a slower flow than the actual speed, it is not possible to know the exact decreasing trend. Therefore, in the present invention, the speed sharp decrease section is determined by additionally using the past actual speed change amount.

도 8은 과거 데이터를 이용하여 분석한 예측 속도 변화량에 따른 예측 속도의 오차율 통계를 나타낸다. 8 is a graph showing the error rate statistics of the prediction speed according to the amount of change in the prediction speed analyzed using past data.

도 8에서 주황색 막대그래프는 예측 속도 변화량을 의미한다. 예측 속도 변화량이 5이하인 경우에는 1에 가까운 수치로 높은 정확도를 보이며, 예측 속도 변화량이 6이상 증가하는 경우 오차율이 낮아진다. In FIG. 8 , the orange bar graph indicates the amount of change in the predicted speed. When the prediction speed change is 5 or less, it shows high accuracy with a value close to 1, and when the prediction speed change increases by 6 or more, the error rate is lowered.

그리고 예측 속도 변화량이 14이상 증가하는 경우, 오히려 오차율이 1이상으로 높아지는데 이는 급격히 감소한 이후에 도로 속도가 바로 회복되기 때문에 이러한 현상이 발생한다. And when the predicted speed change increases by 14 or more, the error rate rises to 1 or more, which occurs because the road speed is immediately restored after a sharp decrease.

이러한 통계 분석에 따라서 속도 감소 구간을 결정하는 첫 번째 기준을 예측 속도 변화량이 6이상일 때로 정의한다. 하지만 예측 속도는 실제 속도보다 완만한 흐름을 보이므로 정확한 감소 추세를 알 수 없다. 따라서 실제 속도 변화량을 추가적으로 고려하여 속도 감소 구간의 판단 기준을 정의한다. According to this statistical analysis, the first criterion for determining the speed reduction section is defined as when the predicted speed change amount is 6 or more. However, since the predicted speed shows a gentler flow than the actual speed, the exact decreasing trend cannot be known. Therefore, the criterion for determining the speed reduction section is defined by additionally considering the actual speed change amount.

도 8에서 파란색 막대그래프는 실제 속도 변화량을 의미한다. 실제 속도 변화량이 4이상부터 정확도가 낮아지고 있으며, 10까지 정확도가 낮아지고 그 이후로 증감을 반복한다. 따라서, 실제 속도 변화량이 10이상 일 때를 두 번째 속도 감소 구간의 판단 기준으로 정의한다.In FIG. 8 , a blue bar graph indicates an actual speed change amount. Accuracy decreases from the actual speed change amount of 4 or more, and the accuracy decreases until 10, and the increase/decrease is repeated thereafter. Therefore, when the actual speed change amount is 10 or more, it is defined as the criterion for determining the second speed reduction section.

본 발명에서 예측 속도와 실제 속도 변화량에 따른 오차율 분석을 통해 두 가지 속도 감소 구간 판단 기준을 정의하였다. 이러한 기준에 부합하는 경우, 1차 예측 속도에 가중치를 주어 속도를 보정한다. 예를 들어, 가중치는 속도 급감 구간의 기준이 되는 두 변화량의 평균 오차율 값인 0.8로 정의하여 예측 속도에서 20% 감소한 속도를 반영할 수 있다. 그리고, 30분 이후부터 가중치를 높여준다. In the present invention, two criteria for determining the speed reduction section were defined through the error rate analysis according to the predicted speed and the actual speed change amount. If these criteria are met, the speed is corrected by giving weight to the first prediction speed. For example, the weight can be defined as 0.8, which is the average error rate value of the two variations, which is the basis of the speed sharply decreasing section, to reflect the speed reduced by 20% from the predicted speed. Then, after 30 minutes, increase the weight.

도 8의 주황색 막대 그래프는 회복 구간이 발생하면서 오차율이 증가하는 것으로 보이지만, 실제 속도 변화량 그래프인 파란색 그래프를 보면, 속도 변화량이 증가할수록 예측 오차율이 낮아지는 것을 볼 수 있다. 이는 속도가 크게 감소할수록 실제 속도보다 예측 속도를 더 높게 예측했으며, 그 차가 커지는 것을 의미한다. 따라서, 다음 표 3과 같이 예측 속도 변화량에 따라 감소 가중치(

Figure 112020028957557-pat00058
)를 다르게 정의한다.The orange bar graph of FIG. 8 shows that the error rate increases as the recovery section occurs, but looking at the blue graph, which is an actual speed change graph, it can be seen that the prediction error rate decreases as the speed change amount increases. This means that as the speed decreases significantly, the predicted speed is predicted to be higher than the actual speed, and the difference becomes larger. Therefore, as shown in Table 3 below, the reduction weight (
Figure 112020028957557-pat00058
) is defined differently.

Figure 112020028957557-pat00059
Figure 112020028957557-pat00059

도 9는 본 발명의 일 실시예에 따른 감소 구간 가중치 적용 알고리즘을 나타낸다.9 shows an algorithm for applying a weighted reduction section according to an embodiment of the present invention.

도 9를 참조하면, 두 가지 속도 감소 구간 판단 기준을 만족하면 표 3에 따라서 감소 가중치를 변경시킨다. Referring to FIG. 9 , if the two speed reduction section determination criteria are satisfied, the reduction weight is changed according to Table 3.

다음으로, 1차 예측 속도에 감소 가중치를 곱하여 1차 예측 속도를 보정하고 카운트를 증가시킨다. 여기서, 카운트 1은 5분을 의미하며, 30분 이후에는 이미 속도 흐름의 추세를 반영할 수 있으므로 감소 가중치를 높여준다. 감소 가중치 1은 의미가 없는 값이므로 감소 가중치 반영을 중단한다. Next, the primary prediction rate is multiplied by a decreasing weight to correct the primary prediction rate and increment the count. Here, count 1 means 5 minutes, and after 30 minutes, it can already reflect the trend of the speed flow, so the reduction weight is increased. Since the reduction weight 1 is a meaningless value, it stops reflecting the reduction weight.

그리고, 감소 구간 판단 기준에 부합하더라도 회복 구간 판단 기준에 부합하면 감소 가중치 반영을 중단하고 회복 가중치 적용 알고리즘을 수행한다.In addition, even if the reduction interval determination criterion is met, if the recovery interval determination criterion is met, the reduction weight reflection is stopped and the recovery weight application algorithm is performed.

본 발명에서 속도 회복 구간을 판단하기 위해 예측 속도의 변화량과 실제 속도의 관계를 분석하였다. In the present invention, to determine the speed recovery section, the relationship between the predicted speed change amount and the actual speed was analyzed.

도 10은 예측 속도 변화량과 실제 속도의 관계를 나타낸다. 10 shows the relationship between the predicted speed change amount and the actual speed.

도 10에서 붉은색 막대 그래프를 보면, 1차 예측 속도 변화량이 급격히 10이상 증가했음에도 불구하고 완만한 곡선으로 속도가 낮아지고 있다. Referring to the red bar graph in FIG. 10 , although the amount of change in the primary prediction speed rapidly increased by 10 or more, the speed is decreasing with a gentle curve.

그리고, 파란색 막대 그래프를 보면, 예측 속도 변화량이 11까지 치솟기 전에 실제 속도는 이미 음의 방향에서 양의 방향으로 전환되며 회복 구간을 형성하였다. 이는 실제 속도 변화량

Figure 112020028957557-pat00060
가 양수에서 음수로 전환된 것과 같은 의미이다. And, looking at the blue bar graph, before the predicted speed change soared to 11, the actual speed was already converted from the negative direction to the positive direction, forming a recovery section. This is the actual speed change.
Figure 112020028957557-pat00060
has the same meaning as converted from a positive number to a negative number.

이처럼 이벤트가 발생한 경우, 도로의 속도는 급격히 감소했다가 회복하는 패턴을 보인다. 속도가 감소하는 구간에서는 과거 실제 속도 변화량이 양수이지만, 속도가 증가하는 구간에서는 음수로 나타난다. 따라서, 본 발명에서는 과거 실제 속도 변화량인

Figure 112020028957557-pat00061
가 양수에서 음수로 전환되는 시점을 회복 구간으로 판단한다.When such an event occurs, the speed of the road rapidly decreases and then recovers. In the section where the speed decreases, the past actual speed change is positive, but in the section where the speed increases, it appears as a negative number. Therefore, in the present invention, the past actual speed change
Figure 112020028957557-pat00061
The point in time when is converted from a positive number to a negative number is judged as the recovery period.

속도 회복 구간으로 판단되면 회복 가중치를 적용하여 속도를 보정한다. 회복 가중치는 감소 가중치와 반대로 예측 속도의 20% 증가한 값으로 보정할 수 있도록 회복 가중치를 1.2로 정의한다. If it is determined as a speed recovery section, the speed is corrected by applying a recovery weight. The recovery weight is defined as 1.2 so that it can be corrected with a value increased by 20% of the prediction rate as opposed to the decrease weight.

도 11은 본 발명의 일 실시예에 따른 회복 구간 가중치 적용 알고리즘을 나타낸다. 11 shows an algorithm for applying a weight to a recovery interval according to an embodiment of the present invention.

도 11에서 과거 속도 변화량이 음수로 전환되면 회복 구간으로 판단하고, 회복 가중치가 1보다 큰 경우에, 1차 예측 속도에 회복 가중치를 적용하여 속도를 보정한다. 회복 구간은 비교적 완만한 곡선을 띄며 회복되며, 30분 후에는 1차 예측 속도도 회복 구간의 추세를 반영할 수 있으므로 30분 이후로 가중치를 0.1씩 낮춰주며 적용한다.11 , when the past speed change amount is converted to a negative number, it is determined as a recovery section, and when the recovery weight is greater than 1, the speed is corrected by applying the recovery weight to the primary prediction speed. The recovery section recovers in a relatively gentle curve, and after 30 minutes, the primary prediction speed can also reflect the trend of the recovery section, so after 30 minutes, the weight is lowered by 0.1 and applied.

본 발명에서 제안하는 방법은 도로 속도를 예측하고자 하는 도로, 즉 타겟 도로의 과거 속도 데이터와 과거 평균 속도 데이터를 이용하며, 도로 환경 데이터로 연결된 도로, 즉 이웃 도로의 과거 속도 데이터와 날씨 데이터를 고려한다. 또한, 사고나 공사와 같이 도로 속도에 급격한 변화 흐름을 가져오는 돌발 상황을 고려하기 위해 속도 변화량을 분석하여 이에 대한 영향을 반영한다. 따라서 날씨나 사고 공사 등으로 돌발 상황이 발생한 경우 도로 속도 예측 정확도가 떨어지는 기존의 문제를 보완할 수 있으며, 과거 평균 속도 데이터를 이용하여 특정 도로의 일반적인 흐름을 반영할 수 있다.The method proposed in the present invention uses past speed data and past average speed data of the road for which the road speed is to be predicted, that is, the target road, and considers the past speed data and weather data of the road connected by road environment data, that is, the neighboring road. do. In addition, the amount of speed change is analyzed to take into account the sudden change in road speed, such as an accident or construction, and the effect is reflected. Therefore, it is possible to supplement the existing problem of low road speed prediction accuracy in case of an unexpected situation due to weather or accidental construction, and it is possible to reflect the general flow of a specific road using historical average speed data.

한편, 본 발명의 실시예에 따른 도로 속도 예측 방법은 컴퓨터로 읽을 수 있는 기록매체에 컴퓨터가 읽을 수 있는 코드로서 구현되는 것이 가능하다. 컴퓨터가 읽을 수 있는 기록매체는 컴퓨터 시스템에 의하여 읽혀질 수 있는 데이터가 저장되는 모든 종류의 기록장치를 포함한다.Meanwhile, the road speed prediction method according to an embodiment of the present invention may be implemented as computer-readable codes on a computer-readable recording medium. The computer-readable recording medium includes all types of recording devices in which data readable by a computer system is stored.

예컨대, 컴퓨터가 읽을 수 있는 기록매체로는 롬(ROM), 램(RAM), 시디-롬(CD-ROM), 자기 테이프, 하드디스크, 플로피디스크, 이동식 저장장치, 비휘발성 메모리(Flash Memory), 광 데이터 저장장치 등이 포함된다.For example, computer-readable recording media include ROM, RAM, CD-ROM, magnetic tape, hard disk, floppy disk, removable storage device, and non-volatile memory (Flash Memory). , optical data storage devices, and the like.

또한, 컴퓨터로 읽을 수 있는 기록매체는 컴퓨터 통신망으로 연결된 컴퓨터 시스템에 분산되어, 분산방식으로 읽을 수 있는 코드로서 저장되고 실행될 수 있다.In addition, the computer-readable recording medium may be distributed in computer systems connected through a computer communication network, and stored and executed as readable codes in a distributed manner.

이상 본 발명을 몇 가지 바람직한 실시예를 사용하여 설명하였으나, 이들 실시예는 예시적인 것이며 한정적인 것이 아니다. 본 발명이 속하는 기술분야에서 통상의 지식을 지닌 자라면 본 발명의 사상과 첨부된 특허청구범위에 제시된 권리범위에서 벗어나지 않으면서 다양한 변화와 수정을 가할 수 있음을 이해할 것이다.Although the present invention has been described above using several preferred embodiments, these examples are illustrative and not restrictive. Those of ordinary skill in the art to which the present invention pertains will understand that various changes and modifications can be made without departing from the spirit of the present invention and the scope of the appended claims.

410 LSTM 레이어 420 드롭아웃 레이어
430 덴스 레이어
410 LSTM Layer 420 Dropout Layer
430 dense layer

Claims (9)

어느 시점에서 특정 도로를 통행하는 차량 흐름의 속도인 도로 속도를 예측하는 방법에서,
도로 속도를 예측하고자 하는 도로(이하 '타겟 도로'라 함)의 도로 환경 데이터를 실시간으로 수집하는 단계;
수집된 도로 환경 데이터를 정규화하여 도로 속도 예측에 필요한 예측 데이터 집합을 생성하는 단계;
생성된 예측 데이터 집합을 입력 데이터로 하는 신경망 학습 모델을 통해 1차 예측 속도를 예측하는 단계;
상기 타겟 도로의 일반적인 차량 흐름을 반영하기 위해, 상기 1차 예측 속도에 상기 타겟 도로의 과거 평균 속도를 적용하는 단계;
상기 타겟 도로에서 발생하는 이벤트에 의해 급변하는 차량 흐름을 반영하기 위해, 상기 1차 예측 속도에 이벤트 가중치를 적용하는 단계; 및
상기 이벤트 가중치와 상기 과거 평균 속도를 적용하는 오류 보정을 통해 최종 예측 속도를 예측하는 단계를 포함하며,
상기 신경망 학습 모델은 LSTM(Long Short-Term Memory) 학습 모델이고,
상기 예측 데이터 집합은 타겟 도로의 속도 데이터와, 이웃 도로의 속도 데이터와, 날씨 데이터를 포함하고,
Figure 112021100058001-pat00062
은 도로 R에서 수집한 전체 속도 데이터,
Figure 112021100058001-pat00063
는 도로 R에서 수집한 t시간의 속도라고 할 때,
Figure 112021100058001-pat00064
(1)
의 수학식을 이용하여 속도 데이터를 정규화하고,
Figure 112021100058001-pat00065
는 타겟 도로가 속한 지역의 t시간 동안의 강우량이라고 할 때,
Figure 112021100058001-pat00066
(2)
의 수학식을 이용하여 날씨 데이터를 정규화하고,
Figure 112021100058001-pat00067
는 특정 요일의 과거 평균 속도 변화량,
Figure 112021100058001-pat00068
는 특정 요일, t시간으로부터 15분 전의 과거 평균 속도,
Figure 112021100058001-pat00069
는 특정 요일, t시간의 속도라고 할 때,
Figure 112021100058001-pat00070
(4)
의 수학식으로 나타낼 수 있고,
Figure 112021100058001-pat00071
는 특정 요일, 특정 시간의 1차 예측 속도,
Figure 112021100058001-pat00072
는 과거 평균 속도 적용 과정을 수행한 예측 속도라고 할 때,
Figure 112021100058001-pat00073
(5)
의 수학식으로 나타낼 수 있고,
여기서, 과거 평균적으로 속도가 감소하는 시간대에 예측한
Figure 112021100058001-pat00074
Figure 112021100058001-pat00075
보다 크면
Figure 112021100058001-pat00076
로 1차 예측 속도를 대체하고, 그렇지 않으면 1차 예측 속도를 그대로 사용하는 방식으로, 상기 1차 예측 속도에 상기 타겟 도로의 과거 평균 속도를 적용하는 단계를 수행하는 것을 특징으로 하는 도로 속도 예측 방법.
In a method of estimating road speed, which is the speed of the flow of vehicles passing through a specific road at a point in time,
collecting road environment data of a road for which a road speed is to be predicted (hereinafter referred to as a 'target road') in real time;
Normalizing the collected road environment data to generate a prediction data set required for road speed prediction;
Predicting a primary prediction speed through a neural network learning model using the generated prediction data set as input data;
applying a historical average speed of the target road to the first predicted speed to reflect a general vehicle flow of the target road;
applying an event weight to the first prediction speed to reflect a rapidly changing vehicle flow due to an event occurring on the target road; and
Predicting the final prediction speed through error correction applying the event weight and the past average speed,
The neural network learning model is a Long Short-Term Memory (LSTM) learning model,
The prediction data set includes speed data of a target road, speed data of a neighboring road, and weather data,
Figure 112021100058001-pat00062
is the full speed data collected from road R,
Figure 112021100058001-pat00063
Let is the speed of time t collected from road R,
Figure 112021100058001-pat00064
(One)
Normalize the velocity data using the equation of
Figure 112021100058001-pat00065
is the rainfall for time t in the area to which the target road belongs,
Figure 112021100058001-pat00066
(2)
Normalize the weather data using the formula of
Figure 112021100058001-pat00067
is the historical average speed change for a specific day,
Figure 112021100058001-pat00068
is the historical average speed 15 minutes before a specific day of the week, time t,
Figure 112021100058001-pat00069
is the speed of a specific day of the week, time t,
Figure 112021100058001-pat00070
(4)
can be expressed by the formula of
Figure 112021100058001-pat00071
is the primary prediction rate for a specific day of the week, at a specific time,
Figure 112021100058001-pat00072
Assuming that is the predicted speed at which the past average speed application process was performed,
Figure 112021100058001-pat00073
(5)
can be expressed by the formula of
Here, the predicted average speed during the time period of decreasing historical average
Figure 112021100058001-pat00074
go
Figure 112021100058001-pat00075
greater than
Figure 112021100058001-pat00076
A method of predicting a road speed, characterized in that the step of applying the historical average speed of the target road to the first predicted speed is performed in such a way that the primary predicted speed is replaced with .
삭제delete 삭제delete 삭제delete 삭제delete 삭제delete 청구항 1에 있어서,
상기 1차 예측 속도에 이벤트 가중치를 적용하는 단계에서,
타겟 도로의 도로 속도가 급격히 감소되는 구간인 속도 감소 구간과, 급격히 감소된 속도가 회복되는 구간인 속도 회복 구간을 정의하고, 상기 속도 감소 구간에서 상기 1차 예측 속도에 감소 가중치를 적용하고, 상기 속도 회복 구간에서 상기 1차 예측 속도에 회복 가중치를 적용하는 것을 특징으로 하는 도로 속도 예측 방법.
The method according to claim 1,
In the step of applying an event weight to the first prediction rate,
defining a speed reduction section, which is a section in which the road speed of the target road is rapidly reduced, and a speed recovery section, which is a section in which the sharply reduced speed is recovered, and applying a reduction weight to the first predicted speed in the speed reduction section; A road speed prediction method, characterized in that a recovery weight is applied to the first predicted speed in the speed recovery section.
청구항 7에 있어서,
수집된 도로 환경 데이터를 정규화하여, LSTM 학습 모델을 생성하기 위해 필요한 학습 데이터 집합을 생성하는 단계;
생성된 학습 데이터 집합을 입력으로 하는 LSTM 모델을 수행하는 단계; 및
LSTM 모델을 통해 최적의 가중치를 업데이트하여 LSTM 학습 모델을 생성하는 단계를 더 포함하는 것을 특징으로 하는 도로 속도 예측 방법.
8. The method of claim 7,
normalizing the collected road environment data to generate a training data set necessary for generating an LSTM learning model;
performing an LSTM model using the generated training data set as an input; and
The method for predicting road speed according to claim 1, further comprising the step of generating an LSTM training model by updating the optimal weights through the LSTM model.
청구항 1, 청구항 7 내지 청구항 8 중 어느 한 청구항의 방법을 컴퓨터로 실행시킬 수 있는 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체.
A computer-readable recording medium in which a program capable of executing the method of any one of claims 1 and 7 to 8 by a computer is recorded.
KR1020200033654A 2020-03-19 2020-03-19 Road speed prediction method based on machine learning by analyzing road environment data, and recording medium thereof KR102341475B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020200033654A KR102341475B1 (en) 2020-03-19 2020-03-19 Road speed prediction method based on machine learning by analyzing road environment data, and recording medium thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020200033654A KR102341475B1 (en) 2020-03-19 2020-03-19 Road speed prediction method based on machine learning by analyzing road environment data, and recording medium thereof

Publications (2)

Publication Number Publication Date
KR20210117445A KR20210117445A (en) 2021-09-29
KR102341475B1 true KR102341475B1 (en) 2021-12-20

Family

ID=77924788

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020200033654A KR102341475B1 (en) 2020-03-19 2020-03-19 Road speed prediction method based on machine learning by analyzing road environment data, and recording medium thereof

Country Status (1)

Country Link
KR (1) KR102341475B1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115018110A (en) * 2022-01-11 2022-09-06 昆明理工大学 XGboost-based road blocking loss prediction method and system
CN115410386B (en) * 2022-09-05 2024-02-06 同盾科技有限公司 Short-time speed prediction method and device, computer storage medium and electronic equipment
CN116415928B (en) * 2023-03-06 2023-11-17 武汉理工大学 Urban waterlogging traffic network rapid restoration method and system based on deep learning

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100836378B1 (en) * 2005-06-23 2008-06-09 현대자동차주식회사 Method for searching optimal driving course with considering domestic road environment

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101028293B1 (en) * 2008-07-10 2011-04-11 현대자동차주식회사 A estimation method of traffic information
KR101385057B1 (en) * 2012-08-30 2014-04-14 경희대학교 산학협력단 Prediction of urban congestion using ITS based data
KR20140059342A (en) * 2012-11-07 2014-05-16 한국도로공사 System and method of providing traffic forecasting
KR101638368B1 (en) 2015-01-02 2016-07-11 경희대학교 산학협력단 Prediction System And Method of Urban Traffic Flow Using Multifactor Pattern Recognition Model

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100836378B1 (en) * 2005-06-23 2008-06-09 현대자동차주식회사 Method for searching optimal driving course with considering domestic road environment

Also Published As

Publication number Publication date
KR20210117445A (en) 2021-09-29

Similar Documents

Publication Publication Date Title
KR102341475B1 (en) Road speed prediction method based on machine learning by analyzing road environment data, and recording medium thereof
CN107610464A (en) A kind of trajectory predictions method based on Gaussian Mixture time series models
CN112270355B (en) Active safety prediction method based on big data technology and SAE-GRU
US11258659B2 (en) Management and control for IP and fixed networking
CN113554875B (en) Variable speed-limiting control method for heterogeneous traffic flow of expressway based on edge calculation
CN113370996A (en) Automatic driving lane changing and following decision method and system and automatic driving vehicle
CN107145714B (en) Multi-factor-based public bicycle usage amount prediction method
CN115344412A (en) Reliability prediction and maintenance strategy optimization method for train door system
CN110780663B (en) Automatic driving state switching method, device, equipment and storage medium
CN116205329A (en) Holiday passenger flow prediction method
CN113682302B (en) Driving state estimation method and device, electronic equipment and storage medium
CN113096405B (en) Construction method of prediction model, and vehicle accident prediction method and device
CN117764340A (en) New energy electric automobile charging guiding grading regulation and control method
CN110866996B (en) Engine start-stop frequency control method and system, vehicle and storage medium
CN110796301A (en) Passenger flow prediction method and device based on IC card data
CN115620525A (en) Short-time traffic passenger demand prediction method based on time-varying dynamic Bayesian network
CN111210361B (en) Power communication network routing planning method based on reliability prediction and particle swarm optimization
CN113207080B (en) Data cooperative transmission method and device in VANET and electronic equipment
CN108985526B (en) Transportation capacity prediction method and device, computer readable storage medium and terminal
CN109272757B (en) Method for balanced calculation of phase green light time length with closed-loop feedback
Lim et al. Long Term Traffic Prediction in Highway Using Parallel CNN
CN117341710A (en) Method and device for judging abnormal running of vehicle
CN113158415B (en) Vehicle track similarity evaluation method based on error analysis
CN114550453B (en) Model training method, model determining method, electronic device and computer storage medium
CN112874586B (en) Urban rail transit intelligent train timetable matching method and electronic equipment

Legal Events

Date Code Title Description
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant