Real-time intelligent recognition of transport modes and mobility patterns via smartphones