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

The system will help guide spectators to less crowded routes after watching competitions, as some 10 million spectators are expected to come to the Summer Olympics and Paralympics hosted by the Japanese capital from July to September 2020.

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

The AI-based system will obtain information on the flow of people needed to make such forecasts through roadside cameras and with the number of people accessing the internet on smartphones. The government will consider ways to protect individuals' information in using the data.

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

Congestion around venues was a major issue at the Rio Summer Olympics in 2016 but countermeasures have so far focused mainly on vehicle traffic controls.

The government plans to start collecting necessary data from major events this fall for setting up the new system. It has yet to decide at which venues it will use the system. Competition venues for the Tokyo Olympics are spread throughout various areas in Japan, from the northernmost prefecture of Hokkaido to Shizuoka in the central Japan.

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 Olympics, the government plans to use the know-how obtained through the new system for disaster countermeasures such as guiding evacuees.