Sounds like IoT to me (Internet of Things). The "algorithm" may be a daemon running on a VM in the "cloud" probably supported by a NoSQL database (maybe even tech like Redis - in cache - for better speed). The algo is continuously fed telemetry data from social media apps running on our devices probably via a websocket connection. Could be done utilizing a lightweight messaging protocol like MQTT or similar. In theory, they could harvest any type of metadata they want. The posts are unclear whether or not the hardware layer is also compromised.
Amazon Web Services supports all of this technology. Its my guess this is all being done in Bezos' cloud. Don't forget … Alexa is listening too.
Remember, Amazon's phenomenal growth has been achieved through AWS not retail sales. Dig AWS anons. You may be surprised by what you find.
EEfag.