The paper introduces a novel upper bound privacy leakage constraint-based approach aimed at optimizing the cost-effectiveness of preserving privacy for intermediate data sets in cloud computing. This approach identifies which data sets need encryption while others do not, ultimately reducing the privacy-preserving cost without compromising data holder privacy requirements. Evaluation results indicate significant improvements in efficiency and cost-effectiveness compared to existing methods which encrypt all data sets.