Resource Allocation in Relay-based Satellite and Wireless Communication Networks