## 2 Method
### Method for Constructing the Stochastic Model of Indoor Temperature  
First, a stochastic model of indoor temperature for rural residential buildings must be created. A rural residential building's indoor temperature is mostly determined by the occupancy and activity situations in each room. There are two types of occupancy situations: occupied states and vacant states. In occupied states, there are two types of activity situations: sleeping states and active states. Various occupancy and activity situations translate into varying preferences for interior temperature. To characterize the indoor temperature uncertainty in rural residential buildings in both temporal and spatial dimensions, it is first necessary to describe the random occupancy behavior of each room. To this end, this study described the state change in each room between \"occupied (\(O_{p}=1\))\" and \"vacant (\(O_{p}=0\))\" with the help of a Markov chain model [23], to obtain the corresponding random occupancy schedules. In this model, the next moment state of a room depends only on the current state, which is represented by the transfer probability using the following equation:  
\[p\{X_{t+1}=j|X_{t}=i\}=p_{ij} \tag{1}\]  
where \(X_{t}\) denotes the occupancy situations at moment \(t\), and \(p_{ij}\) denotes the transfer probability. According to the Markov chain model, it is possible to generate random occupancy schedules for each room in a rural residential building. Based on this, the activity situations in occupied states can be analyzed. This study combined the function of the room and the moments at occupied states to jointly determine the activity situations. According to the literature [24], the judgment rules are formulated as follows: (1) When a bedroom is occupied at night, the occupants are judged to be in a sleeping state; and when a bedroom is occupied during the day, the occupants are judged to be in an active state; (2) All other rooms except bedrooms will be judged to be in an active state by default when occupied. The mathematical representation of the judgment rules are as follows:  
When \(O_{p}=1\):Bedrooms:  
\[S_{p}= \begin{cases}0,&\text{if }1\leq t<t_{u}\text{ or }t_{l}<t\leq 24\text{h}\\ 1,&\text{if }t_{u}\leq t\leq t_{l}\end{cases}  \tag{2}\]  
Other rooms:  
\[S_{p}=1,\text{ \ \ \ if }1\leq t\leq 24\text{ h} \tag{3}\]  
where \(S_{p}\) denotes the activity situations. Among them, \(S_{p}=0\) represents sleeping states; and \(S_{p}=1\) represents active states. \(t_{u}\) and \(t_{l}\) denote the upper and lower bounds of time when \(S_{p}=1\) in bedrooms. Finally, according to the occupancy and activity situations, the preference for setting the indoor temperature can be determined. In rural residential buildings, people move between indoors and outdoors more frequently, and therefore prefer to set indoor temperatures low (only 11-18 \({}^{\circ}\)C) to avoid the discomfort caused by drastic temperature changes. At the same time, there are some differences in indoor temperature preferences depending on occupancy and activity situations [25]. In general, when the occupants are active, the corresponding room's indoor temperature will be set higher (such as 16 \({}^{\circ}\)C). However, when the occupants are sleeping, the corresponding room's indoor temperature will be set relatively low (such as 12 \({}^{\circ}\)C) due to the habit of covering up. When a room is unoccupied, the corresponding heating unit stops working, at which point its indoor temperature is kept at a lower value by default. Based on the above guidelines, the mathematical representation of the indoor temperature are as follows:  
\[T_{in}= \begin{cases}\text{U}(a_{1},b_{1}),&\text{if }O_{p}=1,S_{p}=1\\ \text{U}(a_{2},b_{2}),&\text{if }O_{p}=1,S_{p}=0\\ c,&\text{if }O_{p}=1\end{cases}