Intelligent technology for sewage treatment