This research presents deterministic and stochastic service provider models optimized through mixed-integer programming (MIP) to minimize rejection values for computing nodes in ubiquitous computing systems. The deterministic model focuses on reducing data transmission costs by considering processing capacities and service demands, while the stochastic model enhances service provision adaptability in dynamically changing environments. Test results confirm that the proposed models effectively meet constraints and optimize resource allocation in wireless sensor network distributions.