The government plans to build a system using artificial intelligence to ease spectator congestion at the 2020 Tokyo Olympics and Paralympics, sources said Tuesday.

The system will help guide spectators to less crowded exit routes at competition venues. Some 10 million spectators are expected to attend the Summer Olympics and Paralympics from July to September 2020.

Fans will receive congestion forecasts at various points every 30 minutes after an event ends through their smartphones and electronic boards set up around the venue, and will be guided toward less congested routes to train stations.

To make such forecasts, the AI-based system will obtain information on the flow of pedestrians through roadside cameras and by measuring smartphone activity. Measures to protect individuals' privacy are being considered.

The system will also help to effectively dispatch security guards to locations where large crowds are expected.

Congestion near venues was a major issue at the Rio Games in 2016 but countermeasures have so far focused mainly on controlling vehicle traffic.

The government plans to start collecting necessary data from major events this fall in order to set up the new system. It has yet to decide which venues will use the system. In addition to the two main venue clusters in the capital, Olympic events will take place across a wide area of Japan, from Hokkaido to Shizuoka.

The government plans to ask companies to participate in the project, particularly those with advanced data analysis technology.

At the Pyeongchang Winter Olympics in South Korea, Chinese e-commerce giant Alibaba Group Holding Ltd. showcased a traffic control system that it plans to implement at the 2022 Beijing Winter Olympics.

After the Tokyo Games, the government plans to use the knowledge obtained through the new system for disaster relief, including in the organizing of evacuations.