## 1 Introduction  
Low carbon, resilience, health, social equity, digital transformation, and the upgrading of various industries have highlighted the critical content of sustainable development. Driven by computers and artificial intelligence, the development of multiple research directions and industries has shown a quantitative trend [1]. Not only are universities responsible for propagating the notion of sustainable development in society, but the open research environment on university campuses facilitates the integration of sustainable development theories into real-world applications. University campuses can significantly contribute to global sustainability through educational initiatives and operational frameworks [2]. Indicator assessment is still the most appropriate and straightforward method for assessing its influencing factors. However, the current evaluation of commercial service space on university campuses needs to address the problem of insufficient integration of subjective and objective indicators, making the framework of upper and lower limit indicators unreasonable. In addition, existing studies tend to focus on a single research instrument, so overall structural indicators need more comprehensiveness and accuracy in large samples and multi-factor studies [3]. The allocation of commercial spaces on university campuses is a multifaceted challenge characterized by its intricate and diverse nature. Leveraging the capabilities of machine learning algorithms presents an opportunity to comprehensively dissect and navigate this complexity, offering a potent and adaptable solution for optimizing spatial arrangements across communities of varying sizes and intricacies [4]. The advancement of machine learning and artificial intelligence has bestowed powerful tools for navigating the intricacies of open systems, particularly in the context of commercial space management within communities. Leveraging machine learning, an extensive dataset of this multifaceted system can be systematically categorized to establish a comprehensive set of indicators, thereby quantifying its sustainable development and defining its scope [5]. Machine learning algorithms can integrate subjective survey data and objective measurement data to establish a unified community commercial space evaluation index. Constructing a comprehensive analysis framework and a machine learning model and program allows for analyzing relationships among various indicators, including human flow, traversal, and accessibility in communities [6]. Additionally, machine learning model algorithms exhibit a degree of dynamism, enabling the prediction of future development trends through the analysis of historical data and real-time information collection. This capability allows business service spaces to more effectively adapt to the evolving needs of the communities [7]. Ultimately, machine-learning-generated index data becomes increasingly accurate as the sample size increases. This precision is achieved through continuous learning and improvement based on feedback data, incorporating suggestions for spatial optimization for layout from various angles [8]. This paper integrates machine learning algorithms to optimize campus commercial service space layout to reduce campus energy consumption. It uses machine learning to establish a fundamental model for determining campus commercial space evaluation indicators. The process involves three key steps: (1) Defining subjective factors impacting campus commercial space layout and specifying the objects for evaluation. (2) Measuring the actual campus commercial space layout and structural parameters, analyzing the relationship between parameters and their standardized weights through machine learning. (3) Utilizing a substantial dataset, the paper constructs a comprehensive model for evaluating the sustainability of campus commercial space.