Cloud-based software services necessitate adaptive resource allocation with the promise of dynamic resource adjustment for guaranteeing the Quality-of-Service (QoS) and reducing resource costs. However, it is challenging to achieve adaptive resource allocation for software services in complex cloud environments with dynamic workloads. To address this essential problem, we propose an adaptive resource allocation strategy for cloud-based software services with workload-time windows. Based on the QoS prediction, the proposed strategy first brings the current and future workloads into the process of calculating resource allocation plans. Next, the particle swarm optimization and genetic algorithm (PSO-GA) is proposed to make runtime decisions for exploring the objective resource allocation plan. Using the RUBiS benchmark, the extensive simulation experiments are conducted to validate the effectiveness of the proposed strategy on improving the performance of resource allocation for cloud-based software services. The simulation results show that the proposed strategy can obtain a better trade-off between the QoS and resource costs than two classic resource allocation methods. INDEX TERMS Cloud-based software services, resource allocation, QoS prediction, workload-time windows, particle swarm optimization, genetic algorithm.