Today, energy consumption is important in calculating the heating and cooling loads of residential, industrial, and other units. In order to calculate, design, and select the heating-cooling system, a suitable method of consumption and cost analysis is needed to prepare the required data for air conditioning motors and design an intelligent system. In this research, a method for balancing the temperature of an intelligent building in the context of the Internet of Things is presented based on a combination of network cutting and clustering techniques. In order to achieve the optimization of the algorithm in this method, it is necessary to convert heterogeneous data into homogeneous data, which was done by introducing a complex network and appropriate clustering techniques. In this method, information was collected by the IoT, and a graph matrix of these data was generated, then recorded by an artificial intelligence method and a combination of three methods of hierarchical clustering, Gaussian mixture, and K-means for comparison with the preliminary results. Finally, due to the reliability of the K-means method and the use of majority voting for weights, the K-means method reached 0.4 and was selected as the clustering method. The main part of the proposed method is based on different classifications in Appropriate criteria that were evaluated. Acceptable results were recorded so that with the minimum value of 88% and the highest value of about 100, the results of the proposed method can be confirmed. All hypotheses of the method can be declared possible and acceptable.