Automatic Network Slicing for Resource Allocation in Underwater Acoustic Communication Systems