LONDON (REUTERS) - As tens of thousands of Chinese drinkers walked into a beer festival in the eastern port city of Qingdao in August, a software program scanned their pictures.

Those identified as being on a police list of wanted persons were pinpointed in less than a second.

By the end of the three-week event, authorities had made 25 arrests, including one of someone on the run for a decade. According to police, the program had correctly matched faces in 98 per cent of cases.

The exercise is one of the latest examples of how Beijing is tapping the newest technology to redefine the limits and scale of mass surveillance.

As China's President Xi Jinping and those around him cement their power with purges and a ruthless anti-corruption drive, they are relying on these breakthroughs to stymie dissent.

This push for loyalty will form a quiet backdrop to proceedings at the 19th National Congress of the Communist Party in Beijing. When delegates gather for the Oct 18 opening of the meeting, they will showcase a superpower that is becoming increasingly assertive.

In the last year, Beijing opened its first major overseas military base in the east African country of Djibouti, deployed warships as far afield as the Baltic and Atlantic and taken a more assertive stance in the disputed waters of the South China Sea.

All of these priorities, however, pale in comparison to the leadership's commitment to retaining control at home. China's government has long used all the resources at its disposal to keep track of its people and stifle dissent. Spies and wiretaps of the early communist era have been followed by high-tech surveillance of China's internet and social media.

China has become one of the earliest large-scale adopters of widespread facial recognition technology, tapping into an ever-growing collection of millions of security cameras across the country.

Such techniques allow those wanted by the state to be quickly - and often automatically - identified, sometimes en masse.

As part of a separate programme, Chinese media reported that researchers have developed programs that can identify individuals from several hundred yards away simply by their walking style.

For Chinese citizens, mass surveillance is now a largely unquestioned part of everyday life. CCTV feeds from private security cameras are often broadcast live and continuously online, watched by the curious or prurient, and the activities of passersby are discussed on internet forums with little regard for privacy.

Beijing's rulers, however, have access to much, much more information - as well as the data crunching tools to interrogate and analyse it at ever-increasing speed.

When it comes to tracking what its citizens do online, Beijing has long taken things further than any other major power. In 2011, American academic Rebecca MacKinnon coined the phrase "networked authoritarianism" to describe the way China aggressively monitored and censored its own social media platforms while blocking access to many outside services such as Facebook.

Government techniques have becoming increasingly sophisticated since then.

Chinese authorities are now able to censor social media faster and in greater volume, becoming more effective at blocking searches for controversial topics such as Tibet or the Tiananmen Square massacre.

While many users find ways around such restrictions by using euphemisms or popularly understood code, Chinese officials have become increasingly good at tracking any discussion of potential strikes or protests, often letting them prepare preemptive crackdowns.

When authorities find something increasingly difficult to monitor and control, such as online video or audio streaming, they look to ban it outright.

In 2014, Chinese authorities unveiled a strategy to tie together the data available on each individual and private institution to allocate a "social credit score", essentially a way of determining who might be a disruptive influence to society. While it won't be in effect until 2020, it remains the overarching ambition of Beijing's security apparatus and will become much easier as technology leaps ahead.

In Western democracies, the deployment of such techniques has been slowed by concerns over civil liberties. Those qualms are largely absent among China's leadership, however - indeed, facial recognition and similar technologies are also increasingly used by major businesses on the Chinese mainland, with few of the regulatory restrictions that have slowed their adoption elsewhere.

Increased computing power looks set to ramp up their capabilities still further - particularly given China's emergence as a frontrunner in the development of artificial intelligence and associated fields.

Whether that will be enough to stymie dissent is another question.

Beijing has faced a string of massive pro-democracy protests in Hong Kong since 2014, culminating in tens of thousands taking to the streets this summer after the jailing of several prominent pro-democracy activists.

Mr Xi's high profile anti-corruption drive - which the Communist Party says led to up to a million arrests last year - has in part been aimed at alleviating popular anger over graft. But critics say it has also been used to purge political opponents and rivals, bringing in a new generation perceived as more loyal to the senior leadership.

How to entrench that power still further will doubtless be one of the top topics of discussion at this week's congress. But those attending will also be aware that they, too, are under closer surveillance than ever before, and that that will only increase in the years to come.