It contains an air particulates detector and a CO2 detector, plus humidity, temperature, and noise and light sensors. They're probably looking for particulates and CO2 ramp up, hence the "algorithm". It's not clear how accurate this is, but it's not mysterious.
There's a version sold to schools that adds "bullying detector" capability. This adds detection of "keyword calls for help, loud sounds, and gunshots."
[1] https://fobsin.com/products/mountable-air-quality-vape-detec...