Horizontal well fracturing technology stands as the cornerstone for achieving large-scale commercial production in shale reservoirs. Yet, the complexity of fracture variables within horizontal wells, comprising both discrete and continuous factors, presents a formidable challenge for optimization. Existing methods struggle to holistically optimize these mixed fracture parameters, including discrete fracture number, continuous fracture location, and half-length. This study pioneers a fracture deployment optimization approach tailored for fractured horizontal wells in shale reservoirs, leveraging the innovative virtual boundary method (VBM). Initially, a virtual boundary model is developed by extending the length of the fracturing horizontal wellbore, defining the extended area as a virtual reservoir devoid of hydrocarbon. Subsequently, the net present value (NPV) is adopted as the objective function, with continuous fracture location and half-length serving as optimization variables. The modified simultaneous perturbation stochastic approximation (mSPSA) algorithm is then employed for optimization. Following optimization, the optimized fractures within the virtual area are identified and deleted via position identification, enabling the comprehensive optimization of fracture number, location, and half-length. Notably, the computational efficiency of this method surpasses existing approaches by a factor of 5.1 compared to the bisection nested SPSA optimization method. Validation through three calculation cases, encompassing homogeneous reservoir, distinct sweet spot reservoir, and strongly heterogeneous reservoir, further underscores the method's reliability. Post-optimization, NPV increases by 1.1 times, 1.4 times, and 0.34 times for the respective calculation cases compared to the initial plan. When applied to an actual shale oil reservoir, the method yields a 1.67 times increase in NPV compared to existing deployment plans. This research lays a solid theoretical foundation for the design of horizontal fracturing well construction plans in shale reservoirs.