FedQS: Optimizing Gradient and Model Aggregation for Semi-Asynchronous Federated Learning