Uplink Access Scheme Design and Machine Learning based Optimization for Industrial Internet of Things