Passengers crowd the aisle of a train near Shijiazhuang, in China's northern Hebei province (AFP Photo/Greg Baker)
As hundreds of millions in China flock home to celebrate the Year of the Sheep, the world's biggest human migration places extraordinary pressure on roads and railways -- but technology is offering new ways to find a route home.
Chinese tradition requires people to gather at their family home before the Lunar New Year begins -- on February 19 this year -- with authorities expecting more than 2.8 billion trips to be taken over the festive period.
Rail is one of the favoured ways to travel and while historically there have been endless queues at the ticket windows, China's official train booking website 12306.cn is helping to relieve congestion in stations and kiosks.
But with such huge demand users say it can be still be an exercise in hair-tearing frustration. Posters on social media say the booking website is "more difficult to access than the Diaoyu Islands" -- the uninhabited East China Sea archipelago disputed between Beijing and Tokyo, which calls them the Senkakus.
There are, however, new tactics in the battle.
Kelly Gan, a 27-year-old accountant, explained: "I was using a program that refreshes the page every five seconds to grab a spot as soon as it was available on 12306.cn. I basically did it all day long, from when I woke up until I slept."
Passengers wait to board a train at Beijing West Railway Station (AFP Photo/Greg Baker)
She finally managed to get her ticket from Shanghai to Chengdu, a journey of more than 2,600 kilometres (1,600 miles) and 39 hours. It cost her 450 yuan ($72) for a "hard sleeper" -- a bed and mattress that are a far more comfortable option than the firm bench most passengers will have to endure.
- 1,000 tickets a second -
Chinese train tickets can only be bought a maximum of 60 days before departure, triggering a scramble.
All tickets are sold in the first few minutes after they become available, and purchases for this year's festivities peaked on December 19, with 12306.cn at one point selling 1,032 tickets every second.
The next best opportunity to buy is 15 days before departure, the last date that people can secure a full refund for tickets if they are unable to use them.
Rail is one of the favoured ways to travel in China (AFP Photo/Greg Baker)
Vast numbers of people initially buy tickets that are not exactly what they want, in order to have some way to get home, and then seek better alternatives.
At Shanghai railway station, more than 7,000 tickets were being returned each day, reports said in late January.
The program Gan used to secure a returned ticket was an open-source one made available for free by a lone independent developer, but major Chinese internet firms have also waded into the fray.