Real-time detection of the broken thread of textile products